Commit Graph

72 Commits

Author SHA1 Message Date
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
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 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
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
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 48de07fb60 Start using Dart_PropagateError in the runtime/bin directory.
Review URL: https://chromiumcodereview.appspot.com//9657001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5197 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-08 23:06:44 +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
ager@google.com 50fa742ebf Remove trailing ',' in enum.
Compiling code with g++ and all warnings turned on complaints about
this.

R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5099 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 16:03:01 +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
hausner@google.com 6d9abc5e3b StepOver, StepInto, StepOut
Implement single stepping in the debugger.
- Add PC descriptors for function return
- functions to set temporary breakpoints on all
  locations in a function.
- patching/restoring of function return code pattern
- determine call target of instance calls
Review URL: https://chromiumcodereview.appspot.com//9484002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4639 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-27 22:00: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 ff0a266e7e Add support for big integers to the native message format
Also fixed snapshotting of negative big integers.

R=asiva@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4078 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-09 14:09:03 +00:00
sgjesse@google.com 61b3c7435c Add support for medium integers to the native message format
R=asiva@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4073 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-09 10:21:38 +00:00
sgjesse@google.com ff3c5e88f1 Add support for byte arrays to native messages
R=asiva@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4071 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-09 09:34:31 +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
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
sgjesse@google.com 085bb5496e Allocate a Dart_CMessage structure when decoding a message into C structures
Changed tests to use zone allocation for C structures.

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

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3835 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-02 10:49:49 +00:00
sgjesse@google.com 3f035ecad0 Add support for lists and backward references when decoding a message to a Dart_CObject object
The C message reader can now read lists created like this:

  new List()
  new List<int>()
  new List<String>()
  new List<double>()
  new List<bool>()

The backward references are now resolved and already allocated
Dart_CObject objects are reused when there is a backward reference.

The reuse of the Dart_CObject objects poses the issue of which objects
where allocated with the supplied allocator and which where not.

Currently this will work best with a zone allocator. This will be added
to the tests in a subsequent change.

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

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3831 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-02 09:55:18 +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
turnidge@google.com 1f5364cd3b Add support for native ports in the vm.
Dart_NewNativePort creates a port associated with a C handler
function.  When messages come in on this port, they are forwarded to
the C function for processing.

To support this, refactored PortMap so that it operates on a new
MessageHandler type instead of directly on Isolates.

For now, native ports have a dedicated single thread.  Eventually we
will back native ports (and possibly Isolates as well) by a shared
thread pool.
Review URL: https://chromiumcodereview.appspot.com//9169063

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3804 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-01 18:53:40 +00:00
hausner@google.com e1d0b0619b Debugger API: get local variables of an activation frame
Also add a test case where the evaluation of a field name results in an error during the evaluation of the field.
Review URL: https://chromiumcodereview.appspot.com//9264058

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3738 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-31 18:10:08 +00:00
sgjesse@google.com f50fb7546e Implementation of message reader for converting a message snapshot into a C structure
It currently supports a limited number of types null, boolean, smi,
double, one byte string and arrays of these.

There is still no public function in the API to access this.

R=asiva@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3682 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-30 08:29:31 +00:00
hausner@google.com 864393bdad Add debugger functions to inspect objects and classes.
Next steps: inspect global variables, better support for inspecting local variables on stack.
Review URL: https://chromiumcodereview.appspot.com//9288071

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3634 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-27 00:27:12 +00:00
cshapiro@google.com 569ef3c044 Add ByteArray interface and provide internal and external implementations.
The new ByteArray interface supersedes the ByteBuffer type which allowed
only external data storage.  This type has been removed and replaced by
the more flexible ByteArray with a default implementation that stores its
elements on the managed heap.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3613 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-26 02:42:08 +00:00
hausner@google.com 02d59f08ba Add functions to list library and script urls in an isolate.
Review URL: https://chromiumcodereview.appspot.com//9117015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3571 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-24 21:33:04 +00:00
turnidge@google.com 8920623dc5 OOB messages and general message refactor.
(1)
No longer give embedders direct access to inter-isolate messages.
Instead, keep these messages in an internal queue and rely on the
embedder only to provide notifications.  This simplifies the api in
numerous ways:

 - post message callback drops parameters and becomes message notify callback.
 - close port callback goes away
 - Dart_Message type goes away
 - Dart_HandleMessage gets a simpler signature

Updated the custom_isolate_test to show what use of the new apis looks like.

(2)
Begin to add support for out-of-band (OOB) messages.  These messages
supercede regular messages in the queue.  We will attempt to deliver
these messages even while code is running, by using the isolate
interrupt mechanism.  These messages are not user-visible.  They will
be used by the runtime internally to implement things like reflection.

Renamed PortMessage to Message.

Refactored message sending apis in PortMap and Isolate.

Modified MessageQueue to be aware of multiple priorities.

Modify Dart_HandleMessage to process multiple OOB messages
Review URL: https://chromiumcodereview.appspot.com//9182001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3562 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-24 19:31:01 +00:00
hausner@google.com 595cb76374 Implement deletion of breakpoints
- deletion of breakpoints
- better cleanup of debugger resources
Review URL: https://chromiumcodereview.appspot.com//9271008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3470 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-20 22:10:59 +00:00
hausner@google.com 3ebdf081ca Set breakpoint at url, line number
Add debugger functionality to set breakpoint at given url and line number.
Review URL: https://chromiumcodereview.appspot.com//9240014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3420 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-18 23:15:56 +00:00
turnidge@google.com e62f34ce77 Give isolates names to be used during debugging.
Implement --trace_isolates.

-------------

Sample output of --trace_isolates for the CrossIsolateMessageTest:

[+] Starting isolate:
    isolate:    CrossIsolateMessageTest.dart/main-7112
[+] Starting isolate:
    isolate:    CrossIsolateMessageTest.dart/CrossIsolate1.main-7114
[+] Starting isolate:
    isolate:    CrossIsolateMessageTest.dart/CrossIsolate2.main-7115
[>] Posting message:
    source:     CrossIsolateMessageTest.dart/main-7112
    reply_port: 7117
    dest:       CrossIsolateMessageTest.dart/CrossIsolate2.main-7115
    dest_port:  7115
[>] Posting message:
    source:     CrossIsolateMessageTest.dart/CrossIsolate2.main-7115
    reply_port: 7118
    dest:       CrossIsolateMessageTest.dart/main-7112
    dest_port:  7117
[>] Posting message:
    source:     CrossIsolateMessageTest.dart/main-7112
    reply_port: 7119
    dest:       CrossIsolateMessageTest.dart/CrossIsolate1.main-7114
    dest_port:  7114
[>] Posting message:
    source:     CrossIsolateMessageTest.dart/CrossIsolate1.main-7114
    reply_port: 7120
    dest:       CrossIsolateMessageTest.dart/main-7112
    dest_port:  7119
[>] Posting message:
    source:     CrossIsolateMessageTest.dart/main-7112
    reply_port: 0
    dest:       CrossIsolateMessageTest.dart/CrossIsolate1.main-7114
    dest_port:  7120
[>] Posting message:
    source:     CrossIsolateMessageTest.dart/CrossIsolate1.main-7114
    reply_port: 0
    dest:       CrossIsolateMessageTest.dart/CrossIsolate2.main-7115
    dest_port:  7118
[>] Posting message:
    source:     CrossIsolateMessageTest.dart/CrossIsolate2.main-7115
    reply_port: 0
    dest:       CrossIsolateMessageTest.dart/main-7112
    dest_port:  7116
[>] Posting message:
    source:     CrossIsolateMessageTest.dart/main-7112
    reply_port: 0
    dest:       CrossIsolateMessageTest.dart/main-7112
    dest_port:  7113
[-] Stopping isolate:
    isolate:    CrossIsolateMessageTest.dart/CrossIsolate2.main-7115
[-] Stopping isolate:
    isolate:    CrossIsolateMessageTest.dart/CrossIsolate1.main-7114
[-] Stopping isolate:
    isolate:    CrossIsolateMessageTest.dart/main-7112
Review URL: https://chromiumcodereview.appspot.com//9242035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3416 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-18 21:46:27 +00:00
cshapiro@google.com 9108ddb9a2 Do not use C++ const references in the C interface.
Review URL: http://codereview.chromium.org//9017018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2711 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-21 17:50:38 +00:00
asiva@google.com bde808f44b Changes to create an application snapshot which can be layered on top
after an isolate is created and initialized.

Added an option --use_script_snapshot which creates a snapshot of the specified script in an isolate, shuts that down and restarts on a new isolate and loads the script from the snapshot buffer and executes it.
Review URL: http://codereview.chromium.org//8970004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2609 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-20 02:04:24 +00:00
cshapiro@google.com 32f55ce37b Implement weak persistent handles in the Dart API.
Review URL: http://codereview.chromium.org//8984006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2607 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-20 01:44:53 +00:00
turnidge@google.com 0b833d4977 Add support for interrupting an isolate in the vm. Interrupts are
implemented by extending the existing support for stack overflow
checking in the vm.  When an interrupt is scheduled for an isolate, we
overwrite the isolate's stack limit with a value guaranteed to cause a
stack overflow.

We support multiple kinds of interrupts, encoded in the low bits of
the stack limit.

Add Dart_InterruptIsolate and Dart_InterruptIsolateCallback to the
dart embedding api to allow the embedder to request and handle
interrupts.

Add EXPECT_SUBSTRING(needle, haystack) testing macro.
Review URL: http://codereview.chromium.org//8851008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2529 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-16 18:41:20 +00:00
turnidge@google.com 3b9026f21d If an unhandled exception occurs in Dart_RunLoop, pass it out to the caller.
Review URL: http://codereview.chromium.org//8918028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2438 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-14 18:27:58 +00:00
hausner@google.com 75918306af First debugger API unit test
Add unit test file, expose more debugger functionality in the API.
Review URL: http://codereview.chromium.org//8872049

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2320 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-09 19:29:37 +00:00
cshapiro@google.com aae8784962 Add an interface for retrieving the value of unsigned 64-bit integers.
With this change, IntegerValue is renamed to IntegerToInt64 for symmetry
with the new IntegerToUint64 interface.  Also uses of UInt64 have been
replaced with Uint64 for naming consistency.

Review URL: http://codereview.chromium.org//8585049

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2317 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-09 17:25:44 +00:00
cshapiro@google.com 59541fef4c Use specialized unwrapping methods for reading Double and Bool values.
Review URL: http://codereview.chromium.org//8888031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2292 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-08 23:50:40 +00:00
hausner@google.com 9159389495 First bits of external debugger API
The debugger API is in a separate set of files. Embedders do not have
to include the debug api if they don't need to.
Review URL: http://codereview.chromium.org//8826007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2198 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-07 22:13:49 +00:00
asiva@google.com 7ddd0f0b89 First step towards generation of application script snapshots
- Introduce 3 kinds of snapshots (full, application script and messages)
- Added a dart API function to be used for generating an application snapshot
  and for loading the script from an application snapshot.

Next step is to introduce special handling in the WriteTo and ReadFrom
snapshot functions for 'kind == Snapshot::kScript'
Review URL: http://codereview.chromium.org//8772061

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2105 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-06 00:34:49 +00:00