Commit Graph

46 Commits

Author SHA1 Message Date
lrn@google.com 6764a2462c Made old dart:json library use convert to parse JSON.
Make convert library use "null" as marker for top-level value in reviver calls.
Moved JSON implementation into convert_patch files.
Move error classes into convert library, and reexport from dart:json.

R=floitsch@google.com

Review URL: https://codereview.chromium.org//23554004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26767 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 07:56:12 +00:00
floitsch@google.com f601233af9 Remove dart:codec and move classes into dart:convert.
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//19941002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25267 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-22 12:25:16 +00:00
floitsch@google.com b0913f7894 First version of Codecs and Converters.
No chunked conversions, yet.

R=asiva@google.com, lrn@google.com

Review URL: https://codereview.chromium.org//19000006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24999 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-15 10:26:38 +00:00
iposva@google.com 1836035266 - Modify dart_api.h to be a proper C API.
- Verify that dart_api.h can be used from C
  by changing the test_extension to be a pure C file.

R=asiva@google.com

Review URL: https://codereview.chromium.org//15689013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23476 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-31 16:36:27 +00:00
sgjesse@google.com bb6d8c6d20 Remove library dart:crypto
Moved the contnet of dart:crypto to the package pkg/crypto.

R=dgrove@google.com, floitsch@google.com, iposva@google.com, nweiz@google.com
BUG=

Review URL: https://codereview.chromium.org//15820008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23322 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-29 07:29:29 +00:00
sgjesse@google.com 9d6a64e81b Merge the dart:uri library into dart:core and update the Uri class
This merges the dart:uri library into dart:core removing the dart:uri library. Besides moving the library the Url class has been changed.

* Removed existing Uri constructor as it was equivalent with Uri.parse
* Remamed constructor Uri.fromComponents to Uri
* Moved toplevel function encodeUriComponent to static method Uri.encodeComponent
* Moved toplevel function decodeUriComponent to static method Uri.decodeComponent
* Moved toplevel function encodeUri to static method Uri.encodeFull
* Moved toplevel function decodeUri to static method Uri.decodeFull
* Rename domain to host
* Added static methods Uri.encodeQueryComponent and Uri.decodeQueryComponent
* Added support for path generation and splitting
* Added support for query generation and splitting
* Added some level of normalization

R=floitsch@google.com, lrn@google.com, nweiz@google.com, scheglov@google.com
BUG=

Review URL: https://codereview.chromium.org//16019002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23266 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-28 13:35:01 +00:00
asiva@google.com b51b053da4 Remove print_bootstrap flag as it is not needed anymore considering that we
load core libraries directly from the sources and do not concatenate all the
files into a single script file.

R=regis@google.com

Review URL: https://codereview.chromium.org//14631014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22523 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-08 18:56:38 +00:00
asiva@google.com e5d6ee272a Minor cleanup.
R=srdjan@google.com

Review URL: https://codereview.chromium.org//14828006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22488 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-08 00:44:50 +00:00
asiva@google.com 4577abd566 Third step towards loading core library scripts directly from the sources
- Read the patch source files using the source mapping array generated for
  patch files instead of relying on a generated buffer containing the sources.

- Modify the gyp files to ensure that all patch libraries are read directly
  from the sources. Remove the source buffer generation step in the gypi
  files for all patch files.

R=hausner@google.com, iposva@google.com

Review URL: https://codereview.chromium.org//14784010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22436 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-06 18:16:25 +00:00
asiva@google.com ea5a3919c5 Resubmit 22380 after fixing the windows build.
R=hausner@google.com

Review URL: https://codereview.chromium.org//14645025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22396 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 22:50:26 +00:00
asiva@google.com dab8758e7a Revert 22380 to investigate windows build break.
Review URL: https://codereview.chromium.org//14927003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22382 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 18:26:34 +00:00
asiva@google.com 27e78fb6f8 Second step towards loading core library scripts directly from the sources
- Modify the library source generator to generate a source mapping array
  The generated array is of the following format:
  const char* dart::Bootstrap::corelib_source_paths_[] = {
    "dart:core", "/workspace1/dart-all/dart/sdk/lib/core/core.dart", 

    "bool.dart", "/workspace1/dart-all/dart/sdk/lib/core/bool.dart", 
    ...
    ...
  };

- Read the source file using the source mapping array instead of relying on
  a generated buffer containing the sources

- Modify the gyp files to ensure that all libraries are read directly
  from the sources. This CL does not change the patch part yet.
  Remove the source concatentation step in the gypi files for all the core
  libraries.

R=hausner@google.com, iposva@google.com

Review URL: https://codereview.chromium.org//14786012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22380 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 18:12:24 +00:00
asiva@google.com 04cb8721ad First step towards loading the core library scripts directly from the sources
instead of concatenating all the scripts and linking them into the executable.
- Refactor the bootstrap script loading and compilation part to use a
  custom bootstrap library tag handler

R=iposva@google.com

Review URL: https://codereview.chromium.org//14520010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22154 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-29 22:00:18 +00:00
ager@google.com 431954b584 Rename dart:typeddata to dart:typed_data.
R=asiva@google.com, floitsch@google.com, srdjan@google.com
BUG=

Review URL: https://codereview.chromium.org//14426006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21871 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-23 11:54:54 +00:00
ahe@google.com 45ad548837 Update dart:mirrors to use Symbol.
Review URL: https://codereview.chromium.org//14173005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21460 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 15:00:45 +00:00
kasperl@google.com f15b6960c0 Add a new implementation of HashMap that uses JS objects for its (multiple) hash tables.
I'll start refactoring the implementation to make it a bit more
maintainable, but I wanted to get your first impressions.

R=erikcorry@google.com,lrn@google.com,srdjan@google.com
BUG=

Review URL: https://codereview.chromium.org//12827018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20770 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-02 11:51:36 +00:00
asiva@google.com 2f7ca6843f Remove support for 'dart:scalarlist' in the Dart VM.
Review URL: https://codereview.chromium.org//13139002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20680 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-29 18:33:54 +00:00
asiva@google.com 97f6dee777 First step towards implementing dart:typeddata library.
Review URL: https://codereview.chromium.org//12313088

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19427 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-04 22:11:45 +00:00
iposva@google.com b564104ea5 - Properly load the core libraries as libraries and not as scripts.
This will honor their imports and library names.
Review URL: https://codereview.chromium.org//12321082

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19017 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 23:25:29 +00:00
sra@google.com 039864883a Revert "Revert "Use browsers JSON.parse for parsing JSON (#3)""
Fix more IE special cases

Review URL: https://codereview.chromium.org//12320072

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18933 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-23 00:21:24 +00:00
sra@google.com 0d95ced3dc Revert "Use browsers JSON.parse for parsing JSON (#3)"
Review URL: https://codereview.chromium.org//12313069

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18911 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-22 19:34:08 +00:00
sra@google.com 1b988548de Use browsers JSON.parse for parsing JSON (#3)
Original CL: https://codereview.chromium.org//12114021

This version modified to take advantage of dart:json being moved to VM.

Review URL: https://codereview.chromium.org//12314055

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18908 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-22 19:21:18 +00:00
asiva@google.com 97ef3c86d3 Move json, uri, utf and crypto libraries into the VM.
This should ensure that we would not need a patch per embedder for these libraries in case somebody decides to patch these.
Review URL: https://codereview.chromium.org//12318031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18865 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-22 01:24:57 +00:00
floitsch@google.com e1efa71761 Hide collection-dev library.
Committed: https://code.google.com/p/dart/source/detail?r=18167
Reverted: https://code.google.com/p/dart/source/detail?r=18169

Review URL: https://codereview.chromium.org//11938036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18172 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-06 15:11:47 +00:00
floitsch@google.com 8762c41590 Revert "Hide collection-dev library."
This reverts commit 18167.

Review URL: https://codereview.chromium.org//12221044

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18169 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-06 13:08:29 +00:00
floitsch@google.com 2a56791380 Hide collection-dev library.
Review URL: https://codereview.chromium.org//11938036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18167 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-06 12:43:07 +00:00
floitsch@google.com fb1632180e Add dart:collection_dev library.
Committed: https://code.google.com/p/dart/source/detail?r=17263
Reverted: https://code.google.com/p/dart/source/detail?r=17265

Review URL: https://codereview.chromium.org//11959012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17269 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 13:07:27 +00:00
floitsch@google.com 8d1020c6d2 Revert "Add dart:collection_dev library."
This reverts commit 17263.

Review URL: https://codereview.chromium.org//12026019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17265 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 12:34:34 +00:00
floitsch@google.com ba73897a3e Add dart:collection_dev library.
Review URL: https://codereview.chromium.org//11959012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17263 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 12:26:09 +00:00
floitsch@google.com 4a7dfd2da3 Big merge from experimental to bleeding edge.
Review URL: https://codereview.chromium.org//11783009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16687 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 11:23:16 +00:00
ajohnsen@google.com 970cc5ba68 Move JSSyntaxRegExp to core as a private member. This removes the last refrences to dart:coreimpl.
After this cleanup, RegExp no longer have a const constructor. Use 'new
RegExp(...)' from now on.

BUG=

Review URL: https://codereview.chromium.org//11365196

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14838 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 10:41:37 +00:00
ajohnsen@google.com e925b5591e Move Arrays, Collections and Maps into a new library, dart:collections.
BUG=

Review URL: https://codereview.chromium.org//11274043

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14173 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-29 08:38:15 +00:00
ager@google.com e676e88f81 Introduce a VM-only dart:scalarlist library for byte arrays.
Include it in the SDK so users can use it. Create a dummy
implementation and patch file for the library for dart2js so it can be
documented. Johnni, can you think of a nicer way of making
documentation generation work for a VM only library? Also, it seems that
patching kills the documentation comments and they do not show up in
the generated docs.

R=iposva@google.com,johnniwinther@google.com
BUG=

Review URL: https://codereview.chromium.org//10919267

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12616 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 07:08:10 +00:00
turnidge@google.com 14f614da12 Use the return value of vm native methods to set the return value,
based on Siva's earlier suggestion (he actually suggested putting it
in the generated stub, which I haven't done).

Added SetReturnUnsafe and use it exactly one place so far.
Review URL: https://chromiumcodereview.appspot.com//10874072

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11633 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 17:41:19 +00:00
iposva@google.com f29e6bb659 - Split Dart core libraries into shared sources and patch sources.
Currently this split goes along the runtime vs. library directories,
  eventually more shared code will be sitting in the shared library
  sources.
Review URL: https://chromiumcodereview.appspot.com//10834284

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10612 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 23:01:20 +00:00
asiva@google.com ef67b96777 Rename some of the enum definitions inside classes to avoid conflict with the ObjectKind enum.
Review URL: https://chromiumcodereview.appspot.com//10808064

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9792 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-20 22:24:49 +00:00
srdjan@google.com bfd52ec46a Rename Script's source to Source. Trace parser (--trace-parser) only if source is available (thus skipping all the 'noise' of bootstrap methods).
Review URL: https://chromiumcodereview.appspot.com//10752017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9494 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-10 00:14:25 +00:00
iposva@google.com 3b3b6e5000 - Add a math library. Currently it mostly matches the Math class in dart:core.
- Add a useable Random number generator.
Review URL: https://chromiumcodereview.appspot.com//10389150

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7860 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-22 16:54:31 +00:00
turnidge@google.com ff26341fd6 Heartbeat implementation of dart:mirrors.
Add the skeleton for the dart:mirrors library in all the appropriate
places.  The only thing we can do right now is ask an Isolate for its
debugName.  Add a few tests.
Review URL: https://chromiumcodereview.appspot.com//9420038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5370 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-12 23:51:03 +00:00
sigmund@google.com ee6a907611 isolates refactor: this change introduces 'dart:isolate' as a library. This is a
big global change, so let me explain in more detail. This refactoring CL does
the following:
- moves all the dart code for isolates in a common library (lib/isolate)

- changes frog to understand 'dart:isolate' imoprts by loading the code from the
  location above.

- changes the vm to undernstand 'dart:isolate' imports by creating a separate
  library that is part of the bootstrap. This follows the same code-structure
  that Todd suggested in his CL introducing the mirror library

- changes dartc to use the shared isolate library as the source of truth for
  type checking. I left around some of the internal js code in dartc so that the
  backend continues to work for apps that don't use isolates.

- changes all tests that use isolates to import the library explicitly (this is a large bulk of the files in this CL)

- changes test status for tests we can't fix in this repo (e.g. co19)

- splits the isolate library code to make it possible to preserve some tests
  without exposing internal types (e.g. tests about
  serialization/deserialization)

- changes the create_sdk script to copy the isolate library to the sdk

- includes the isolate library in dartdoc

I'll wait for at least one lgtm from each area (dartc, vm, frog, sdk)

There is one important pending thing this CL doesn't do:
- update test_runner.dart: This should be updated next time we upload the new
  binaries to tool/testing/bin
- dartium specific changes: Vijay, is there anything I need to do for dartium?

Review URL: https://chromiumcodereview.appspot.com//9422019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4647 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-27 22:50:44 +00:00
turnidge@google.com 0ddd4c04e9 Dart_PropagateError, take 2.
This change hopefully takes care of the non-mac build issues.  The
checked mode failures are fixed in a separate cl.
Review URL: https://chromiumcodereview.appspot.com//9316071

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3863 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-02 19:05:06 +00:00
turnidge@google.com ae88492093 Revert Dart_PropagateError until I can track down the problems in
checked mode tests.

Sorry for the hubbub.
Review URL: https://chromiumcodereview.appspot.com//9314053

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3823 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-01 23:39:28 +00:00
turnidge@google.com 9da62c5fea Add Dart_PropagateError.
This function can be used in native functions to properly pass all
errors up the stack.

Set the long jump base in the Compiler instead of outside of the
compiler.  A bunch of errors that used to be propagated through the
sticky_error are now propagated through return values.  This includes
all of the DartEntry and DartLibraryCall functions.

In particular, we no longer use the long jump to cross dart frames.
Instead errors are propagated across dart frames using the same
mechanism that we use for unhandled exceptions.  I've added assertions
to make sure that we only use the long jump when it is "safe".
Review URL: https://chromiumcodereview.appspot.com//9169102

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3815 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-01 22:34:16 +00:00
asiva@google.com b53c955b37 - Refactor the isolate callback mechanism to also include creation of the
isolate, this enables creation of isolates using a snapshot
- remove source buffers of corelib, coreimpl-lib and builtin-lib from the binary
Review URL: http://codereview.chromium.org//8673002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1958 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 00:30:25 +00:00
asiva@google.com 5e6441a5cd Change loaded_ flag in RawLibrary to load_state_ in order to register different
states of the load process.
This state can then be used to ensure we report errors on duplicate loads.
Review URL: http://codereview.chromium.org//8520030

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1643 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 00:09:13 +00:00
dgrove@google.com 4c0f559d23 Initial checkin.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-05 05:20:07 +00:00