Commit Graph

90 Commits

Author SHA1 Message Date
hausner@google.com fbeaabda52 Debugger support to display global variables
- Add library id to ActivationFrame
- Add debugger function to get all global variables visible in
  a library (including imported variables).
- Add LibraryPrefixIterator
- Fix Dart_GetLibraryImports
Review URL: https://chromiumcodereview.appspot.com//10657048

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9121 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 17:32:34 +00:00
cshapiro@google.com dcaf11db96 Implement a heap profiler for the Dart managed heap.
This profiler will write binary HPROF data to a user provided stream that
can later be viewed by tools such as the Eclipse Memory Analyzer.

While all user defined types are accurately described in the profile data,
internal types that are not self-describing appear as empty objects.  This
will be addressed by a future change.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8636 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 00:08:07 +00:00
hausner@google.com a1cb082925 Add API to configure debugger pause on exception
Still to be done: proper determination whether an exception is
handled or unhandled. We still assume that TypeError and AssertionError
exceptions are unhanded.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8579 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 21:56:50 +00:00
turnidge@google.com 312702a5ac Second local mirrors CL.
Implement a few chunks of new mirror functionality.  Many changes, notably:

- Added currentIsolateMirror() to provide non-async access to the
  local isolate mirror.

- Added mirrorOf(o) to provide access to local instance mirrors.

- Fleshed out InstanceMirror, InterfaceMirror, and LibraryMirror to
  various degrees.

- Added the MirroredError hierarchy, which lets the user handle Dart
  errors of various sorts from invocation, etc.

- Introduce lazy resolvers for interface mirrors and library mirrors.
  These allow us to build the self-referential library/interface
  hierarchy without going mad.

- Added better toStrings all around.

- Extended the isolate_mirror_local_test to cover new functionality.

Other changes that were required or seemed prudent:

- Exposed the error hierarchy to the embedder.  They need to be able
  to distinguish different error types in some situations.  Improved
  the documetation around error handles and error propagation.

- Added new functions to the dart embedding api as required.  Added
  tests for all new dart api functions.
Review URL: https://chromiumcodereview.appspot.com//10538043

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8575 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 21:07:49 +00:00
hausner@google.com eebec2a081 Debugger break on TypeError, AssertionError
Add debugger functionality to pause the VM whenever a TypeError
or AssertionError exception happens.

This is a first step towards breaking on handled and unhanded
exceptions in general. We first need to generate more debug info
for catch handlers so we can determine whether an exception will
be handled or not before we unwind the stack to run the catch
clauses.
Review URL: https://chromiumcodereview.appspot.com//10537065

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8457 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 17:51:50 +00:00
fschneider@google.com 84027c4457 Add flow graph printing into a .cfg file with flag --print-flow-graph-file.
This CL adds a flag --print-flow-graph-file which produces one
.cfg-file per isolate when enabled. Currently it prints the final
flow graph before code generation.

I also added SuccessorAt and SuccessorCount to allow easy iteration
over the successors of a basic block.
Review URL: https://chromiumcodereview.appspot.com//10446116

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8322 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-06 11:09:02 +00:00
hausner@google.com c39f48340d Add string encoding to wire protocol
Also, add command to retrieve the source text of a given script.
Review URL: https://chromiumcodereview.appspot.com//10496006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8220 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-02 00:07:12 +00:00
turnidge@google.com ec36e02c28 Remove the partially completed code for remote IsolateMirrors and
replace it with the beginnings of a local (same isolate) IsolateMirror
implementation.

Removed old mirror tests and added two new mirror tests.

Even though mirrors.cc is part of the vm, I chose to implement most of
it using the dart embedding interface instead of our internal
interfaces because the embedding interface was more convenient.
mirrors.cc is basically all new in this CL -- don't pay any attention
to diffs for that file.

Added dart embedding functions required for the functionality in this
CL: Dart_DebugName, Dart_GetNativeInstanceFieldCount,
Dart_RootLibrary, Dart_RegisteredLibraryUrls, and Dart_LibraryName.

Extended or modified some existing dart api functions, primarily to
make them propagate error handles properly.

Added tests for new dart embedding api functionality.

Added the ability to determine if a port is local to the current isolate.

Extended NotImplementedException to accept an optional string
argument.  I wanted to give more descriptive error messages.
Review URL: https://chromiumcodereview.appspot.com//10416050

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8117 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-30 17:07:19 +00:00
hausner@google.com eeaa660d52 Introduce library ids and info in the wire protocol
- Library hierarchy (imports, prefixes)
- Global (top-level) variables
- Removing breakpoints
Review URL: https://chromiumcodereview.appspot.com//10447045

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8075 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-29 19:51:51 +00:00
turnidge@google.com 6d0932f0b2 Make Dart_GetClass work for private classes.
Review URL: https://chromiumcodereview.appspot.com//10433003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7926 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-23 21:54:00 +00:00
turnidge@google.com 05b5d44b0e spawnUri. Take two. This time I'll wait for Anton before committing :-).
See original change 7756 for description.
Review URL: https://chromiumcodereview.appspot.com//10407042

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7917 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-23 18:32:51 +00:00
hausner@google.com b00ae2d1a0 Introduce remote objects in Debugger protocol
Review URL: https://chromiumcodereview.appspot.com//10407071

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7864 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-22 18:06:34 +00:00
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
cshapiro@google.com c99bbc8a87 Make dart_api.h C compatible.
BUG=3024

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7666 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-15 20:03:05 +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
ager@google.com 4a698f9fb3 Start 'fuzzing' of dart:io APIs and fix first issue found.
Deserialize unsupported Dart objects to Dart_CObject of type
kUnsupported instead of NULL pointers. That way the normal
Dart_CObject validation that tests for supported types will
work out of the box and not crash the VM.

R=sgjesse@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7645 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-15 10:40:44 +00:00
hausner@google.com de86bd5ed8 Debugger wire protocol: setting breakpoints
- Adding commands to set breakpoints and showing current stack trace.
- Adding a callback hook to signal when a breakpoint gets resolved to
  and actual line number. 
- Adding ids for breakpoints and new breakpoint API functions, deprecating
  the existing ones. 
- Adding one helper function to the JSON class

Anton may want to take a look at the JSON addition.
Review URL: https://chromiumcodereview.appspot.com//10383164

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7628 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-14 21:10:25 +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
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