Commit Graph

1132 Commits

Author SHA1 Message Date
turnidge@google.com 76d4586dea Revert my last change.
Review URL: https://chromiumcodereview.appspot.com//10332257

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7757 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-18 18:35:04 +00:00
turnidge@google.com 6a8c82db83 Implement spawnUri from dart:isolate. This function allows us to
launch an isolate running a different script.  Finally.

Reviewers: This isn't as hard to review as it looks.  Dive right in!

Siggi: Take a look at my test status file changes and make sure I'm
excluding the right stuff.

Much of the churn in the CL comes from moving ownership of the
import_map.  It used to be set per-library and is now set per-isolate.
This caused a lot of superficial diffs.

DART EMBEDDING API CHANGES:

- Dart_IsolateCreateCallback now takes a script_uri and main argument
  instead of a name_prefix argument.  The script_uri argument allows
  the callback to launch different scripts.  The main argument is used
  in creating the isolate debug name.

- Dart_CreateIsolate now takes script_uri and main arguments.  These
  are used to build the isolate's debug name.

- Dart_LibraryTagHandler, Dart_LoadScript, and Dart_LoadLibrary no
  longer take an import_map.

- Added Dart_SetImportMap.

- Added Dart_RootLibrary to provide access to the root library for the
  current isolate.

OTHER STUFF

Add a couple of tests for spawnUri -- the existing tests assume that
scripts end in a .js suffix which isn't going to work out for us.

Changed how the debug name for isolates get built a bit.

Refactored bin/main.cc a bit.  Fixed some problems with error handling
while creating isolates.

Minor refactoring in builtin.dart to always pass is_windows rather
than relying on it being squirreled away.
Review URL: https://chromiumcodereview.appspot.com//10386107

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7756 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-18 18:22:10 +00:00
turnidge@google.com 6448b9af52 Dart_IsSame -> Dart_IdentityEquals.
Use return value for the equality result.  Made function more
efficient by avoiding a DARTSCOPE.
Review URL: https://chromiumcodereview.appspot.com//10196003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7664 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-15 18:34:58 +00:00
turnidge@google.com ff9fdf11b2 Speed up the Dart_IsBlah functions by checking the class index. This
allows us to avoid creating handles (and therefore handle scopes) in
these functions.

Before:
UseDartApi : 66395

After:
UseDartApi : 42730

Main improvement comes from speeding up Dart_IsError.
Review URL: https://chromiumcodereview.appspot.com//10386060

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7619 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-14 17:58:59 +00:00
asiva@google.com 4f105f9d0b Resubmit change 7506.
Review URL: https://chromiumcodereview.appspot.com//10387061

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7511 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 19:17:37 +00:00
asiva@google.com 6911f88b25 Revert change 7506 to check on build failure.
Review URL: https://chromiumcodereview.appspot.com//10386073

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7508 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 18:36:06 +00:00
asiva@google.com 3e5d8216c3 Fix issue 2888.
Allow for the library tag handler to be setup for the isolate, instead of
while loading a script. This ensures that we can use #import on the boot strap libraries like builtin, uri etc.

This change results in a dart API change and corresponding modifications are
necessary in dartium and App Engine.
Review URL: https://chromiumcodereview.appspot.com//10302020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7506 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 18:25:47 +00:00
antonm@google.com 0ccc21fc5a Fix Mac build.
TBR=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7503 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 18:06:00 +00:00
cshapiro@google.com 1472427af8 Revert "Revert "Implement {Int,Uint}{8,16,32,64} and Float{32,64} typed arrays.""
This reverts commit 63480a81fccbde001494dd535cd06a8fa02ed261.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7352 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 23:16:09 +00:00
cshapiro@google.com 3a14326da4 Revert "Implement {Int,Uint}{8,16,32,64} and Float{32,64} typed arrays."
This reverts commit 747dbeaa8f9c0dc1f49d6d6a369c6a3fe2d8b7c9.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7313 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 05:28:10 +00:00
cshapiro@google.com 537010ea16 Implement {Int,Uint}{8,16,32,64} and Float{32,64} typed arrays.
Internal and external representations of each array are provided.  A
single interface type implementing the ByteArray and List interfaces
is shared among the internal and external implementation type.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7311 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 05:12:19 +00:00
cshapiro@google.com 7ac663acc8 Fix two semantic errors from my previous check-in.
TBR=asiva

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7261 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-02 22:48:02 +00:00
cshapiro@google.com 3a40c3eec6 Do not externalize Dart strings as C strings for "print()".
Dart strings with embedded '\0' characters cannot be faithfully
represented as a C string.

This change adds Dart_StringToBytes to the Dart API.  This function
converts a Dart string to array of UTF-8 code units and returns a
length.  Builtin::PrintString now calls Dart_StringToBytes instead of
Dart_StringToCString and, for I/O, fwrite is called instead of fprintf
with the string format specifier.

BUG=1098

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7260 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-02 22:40:48 +00:00
iposva@google.com d8c7c1ada6 - Add a class index to the classes.
- Add a class table which assigns individual ids to classes.
Review URL: https://chromiumcodereview.appspot.com//9965042

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7183 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-01 09:20:40 +00:00
turnidge@google.com 460895ce8b Add Dart_New.
Review URL: https://chromiumcodereview.appspot.com//10153002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6851 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-23 17:36:05 +00:00
turnidge@google.com 9e2c641658 Remove the deprecated method invocation and field access apis from the
dart embbedding api.  Use the new apis instead.

Fixed a bug where field/function lookup was failing for imported libs.
Added tests.  Had to add a couple of lookup functions to Library.

Fixed a bug in Dart_Invoke -- it wasn't handling a null receiver
correctly.
Review URL: https://chromiumcodereview.appspot.com//10021072

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6769 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 21:04:15 +00:00
turnidge@google.com 9d72035ce5 Use the ThreadPool for all isolates and native ports. Previously,
each isolate or native port had a dedicated thread.

Refactored the MessageHandler api...

- Added a Run function to allow a MessageHandler to run on a
  ThreadPool.  These functions take a start and end callback to allow for
  isolate initialization and shutdown.

- Made the queue private to the MessageHandler and moved all message
  processing code inside the MessageHandler (got rid of all of the
  different flavors of RunLoop).  This helps remove some code
  duplication and hides the details of how messages are handled.

- Moved all locking and notification out of MessageQueue and moved it
  up to MessageHandler.  Moved OOB support out of MessageQueue and up
  to MessageHandler.  These changes make the MessageQueue much
  simpler.

- Refactored native port and isolate MessageHandlers to share more code.

- Improved --trace_isolates output.

- Added tests for MessageHandler.

Refactored lib/isolate code...

- Use the new MessageHandler::Run api.

- Got rid of the LongJump stuff in RunIsolate.  No longer needed.

- Use the new StartIsolateScope/SwitchIsolateScope to make the code
  less verbose and less error-prone.

- Store top-level isolate errors in the sticky_error.

Added StartIsolateScope/SwitchIsolateScope classes.
Review URL: https://chromiumcodereview.appspot.com//9924015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6762 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 19:47:27 +00:00
turnidge@google.com a70b90933a Add a missing arity check for top-level methods in Dart_Invoke.
Add a new EXPECT_ERROR macro to make it easier to verify meaningful
error messages in tests.
Review URL: https://chromiumcodereview.appspot.com//10115034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6705 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 18:11:55 +00:00
turnidge@google.com e5022d70d4 Add fast paths for Smi values in the dart embedding api.
This speeds up the UseDartApi microbenchmark by 30%.  Thanks to Carl
for suggesting this.
Review URL: https://chromiumcodereview.appspot.com//10052027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6602 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-16 20:30:37 +00:00
asiva@google.com 8f208ad7ca Wire GrowableArray to use the internal VM object.
This also fixes issue (5526318 : Make access to GrowableArray objects through the dart api more efficient)
Review URL: https://chromiumcodereview.appspot.com//10012042

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6341 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-09 21:50:53 +00:00
turnidge@google.com 9731c1c254 Rename Api::NewLocalHandle -> Api::NewHandle.
Api::NewHandle now takes a RawObject* intead of an Object&.
- This makes the code shorter and easier to read.
- This allows us to drop the DARTSCOPE from Dart_GetNativeArgument.
  (6% speedup on Benchmark_UseDartApi)
Review URL: https://chromiumcodereview.appspot.com//10014002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6283 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-06 17:05:50 +00:00
turnidge@google.com c0d7f96409 Remove many calls to Isolate::Current() in the dart embedding api by
passing the isolate explicitly.
Review URL: https://chromiumcodereview.appspot.com//9956133

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6193 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-04 20:31:49 +00:00
turnidge@google.com d2050dce39 Add a unit test Benchmark_UseDartApi to measure dart api overhead.
Sample output:

Benchmark_UseDartApi: 3.245700 us per iteration
Review URL: https://chromiumcodereview.appspot.com//9979016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6189 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-04 19:47:22 +00:00
iposva@google.com de4e574ac3 - Make the URI resolution methods used by the tag handler private.
Review URL: https://chromiumcodereview.appspot.com//9845040

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5921 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-28 01:21:04 +00:00
cshapiro@google.com f4c5dd4db3 Implement prologue weak persistent handles.
Prologue weak persistent handles are similar to weak persistent
handles but exhibit different behavior during garbage collections that
invoke the prologue and epilogue callbacks.  While weak persistent
handles always weakly reference their referents, prologue weak
persistent handles weakly reference their referents only during a
garbage collection occurs that invokes the prologue and epilogue
callbacks.  During all other garbage collections, prologue weak
persistent handles strongly reference their referents.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5445 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-13 23:41:59 +00:00
turnidge@google.com 3d363b570f Add Dart_Invoke, which will replace Dart_InvokeDynamic and Dart_InvokeStatic.
Fixed Dart_SetField to allow us to set a field to null.
Review URL: https://chromiumcodereview.appspot.com//9608024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5433 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-13 19:49:48 +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
turnidge@google.com 62b835b822 Tiny fix in Dart_CreateIsolate to allow errors to print correctly.
Review URL: https://chromiumcodereview.appspot.com//9689023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5369 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-12 22:56:24 +00:00
iposva@google.com 6225763fad - Fix Windows build: use the global name for the API entry.
Review URL: https://chromiumcodereview.appspot.com//9648015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5201 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-08 23:38:29 +00:00
iposva@google.com 85a9a64cdf - Move finalization until after the classes in dart:builtin have been loaded.
Review URL: https://chromiumcodereview.appspot.com//9652016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5199 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-08 23:29:45 +00:00
iposva@google.com 67b02b441d - Proper URI resolution when loading scripts from the standalone binary.
Review URL: https://chromiumcodereview.appspot.com//9614006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5135 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 22:57:57 +00:00
turnidge@google.com d70bc0e65f Adds new apis Dart_GetField/Dart_SetField.
These are intended to replace Dart_{Get,Set}{Static,Instance}Field.

---

Mess with Library::PrivateName.

Add field/function lookup to Library.
Review URL: https://chromiumcodereview.appspot.com//9616044

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5124 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 21:15:58 +00:00
cshapiro@google.com 0b6ca9919c Implement a garbage collection prologue and epilogue callback mechanism.
Review URL: https://chromiumcodereview.appspot.com//9605033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5112 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 19:38:51 +00:00
regis@google.com f4ddc43cdf Generate dynamic type errors according to spec.
Fix a few bad tests.
Turn a couple negative tests in multi-tests.
Triage a few co19 failing tests.

Still to do:
Check bounds of generic types at runtime in checked mode.
Stop reporting bounds error in new operator as a compile time error.
Review URL: https://chromiumcodereview.appspot.com//9615035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5064 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 02:23:12 +00:00
cshapiro@google.com 05fc273cfa Implement weak references sets and provide an embedding API.
Weak reference sets are similar to "populations" or "weak pairs".
Like these structures, objects in a key set preserve members of an
associated value set.  Unlike these structures, a weak reference set
is not a general associative container.  Weak reference sets exist
for the duration of a garbage collection.

Weak reference sets are proceesed iteratively allowing values of one
weak reference to be keys of a other weak reference sets.  The garbage
collector will process weak reference sets iteratively, revisiting all
unmarked weak reference sets if any one weak reference set is marked.
This process repeates until a fixed-point is reached.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4917 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-03 02:30:20 +00:00
asiva@google.com 4f7f9021c5 - Always write a Null Object for Code objects
- Do not populate the FunctionsCache array as it causes the function cache
  to become inconsistent if we execute some dart code before capturing a
  snapshot.
- Allow preallocation of objects even when generating snapshot and remove the
  flag preallocate_objects_called_ (use a null test instead).
Review URL: https://chromiumcodereview.appspot.com//9580036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4915 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-03 01:53:26 +00:00
cshapiro@google.com 0d4375b68e Check array bounds using an overflow-safe comparison.
Review URL: https://chromiumcodereview.appspot.com//9569044

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4850 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 01:27:27 +00:00
turnidge@google.com e2a88a357a Revert my last change. Odd test failures that I will investigate tomorrow.
Review URL: https://chromiumcodereview.appspot.com//9570051

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4846 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 00:38:18 +00:00
turnidge@google.com cdf40e7b15 Make the message queue private in the message handler.
Move locking up from the message queue to the message handler.
Review URL: https://chromiumcodereview.appspot.com//9570046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4842 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-01 23:57:49 +00:00
asiva@google.com 738f458956 Changes to get rid of dependency on openssl in the dart VM.
(This will enable dartium to be built on the windows platform).
Review URL: https://chromiumcodereview.appspot.com//9481019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4717 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-28 18:36:39 +00:00
asiva@google.com 77b50977be Allow Dart_Null to be passed in for the import map in Dart_LoadLibrary and Dart_LoadScript.
Review URL: https://chromiumcodereview.appspot.com//9447041

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4716 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-28 18:21:57 +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
sgjesse@google.com 6512d83d74 Move MessageWriter from snapshot files to dart_api_message files
Also renamed MessageWriter to ApiMessageWriter

R=asiva@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4375 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-18 10:10:28 +00:00
sgjesse@google.com 2df1d80a02 Add API function Dart_ZoneAllocate
This provides the embedder with the option for allocating temporary C
objects in the current ApiZone.

Zone allocation is especially useful when building a graph of
Dart_CObject structures for posting using Dart_PostCObject.

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

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4348 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-17 07:43:24 +00:00
cshapiro@google.com bb7ee3d0fb Add multi-byte ByteArray access methods to the Dart API.
Review URL: https://chromiumcodereview.appspot.com//9384027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4244 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-15 02:51:11 +00:00
asiva@google.com d50bbba277 Implement support for specifying string interopolation style variable substitution in the import and source statements.
e.g:
sivamach[runtime]>more /workspace/asiva/expr/test1.dart
#library('test1.dart');
#import('${GOOGLE}$SRC/test2.dart');
#import('$DART/test3.dart');
test1() {
  print("test1");
}
main() {
  test1();
  test2();
  test3();
}
sivamach[runtime]>more /workspace/asiva/expr/src/test2.dart
#library('test2.dart');
#source('$GOOGLE$SRC/test2a.dart');
test2() {
  print("test2");
  test2a();
}
sivamach[runtime]>more /workspace/asiva/expr/src/test2a.dart
test2a() {
  print("test2a");
}
sivamach[runtime]>more /workspace/asiva/expr/src/test3.dart
#library('test3.dart');
#source('test3a.dart');
test3() {
  print("test3");
  test3a();
}
sivamach[runtime]>more /workspace/asiva/expr/src/test3a.dart
test3a() {
  print("test3a");
}

sivamach[runtime]>out/Debug_ia32/dart --import_map=GOOGLE,/workspace/asiva/expr --import_map=SRC,src --import_map=DART,/workspace/asiva/expr/src /workspace/asiva/expr/test1.dart
test1
test2
test2a
test3
test3a
Review URL: https://chromiumcodereview.appspot.com//9359009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4199 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-13 22:50:19 +00:00
cshapiro@google.com e8f396df7e Add external byte array API and finalize external strings and byte arrays.
This change adds peer and callback arguments to the external byte array
constructor and moves the peer, callback, and data storage into a VM
peer object.  At construction time, a weak persistent handle and VM
callback is associated with the VM peer.  The VM callback will delete
the VM peer and invokes the user callback to reclaim the user peer.

This change also activates the callback support for the various classes of
external strings.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4164 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-11 04:34:44 +00:00
sgjesse@google.com 3481c5661a Decode the Dart message into a Dart_CMessage structure before calling the native port callback
The native port callback is now passed the message as a decodes
Dart_CMessage structure. The Dart_CMessage structure is allocated
in a zone and the callback receiving it should expect the
lifetime to be controlled by the caller.

Added support for zones which do not require a current
isolate. Changed the GrowableArray to support allocating in
aprovided zone instead of the zone for the current isolate.

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

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4068 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-09 08:47:19 +00:00
sgjesse@google.com b6c9b6de24 Spelling corrections to the API header file
R=asiva@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3964 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-06 19:31:32 +00:00
sgjesse@google.com 4e9686dc4b Implemented encoding af a Dart_CMessage structure into a Dart message. Currently supported types are:
Boolean
  Smi
  Double
  String
  Array

The encoding uses the upper bits of the Dart_CObject type field for "marking" already written objects with their object id for generating backward references. After serialization these mark are removed.

Added the API Dart_PostCMessage for encoding and posting a Dart_CMessage structure.

Removed the API Dart_PostIntArray and used Dart_PostCMessage instead.

R=asive@google.com,turnidge@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3947 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-06 15:42:15 +00:00