Commit Graph

1132 Commits

Author SHA1 Message Date
turnidge@google.com 9a0cbfe8da Make fewer assumptions about the layout of api handles.
Found these problems by changing the layout and seeing what broke.
Review URL: https://chromiumcodereview.appspot.com//10915015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11647 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 19:40:27 +00:00
asiva@google.com 0dc73ee3a2 Remove inclusion of 'include/dart_api.h' in 'raw_object.h'
Review URL: https://chromiumcodereview.appspot.com//10902002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11571 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 00:17:52 +00:00
tball@google.com 962da19ba8 Reworked previous CL (ExternalStringGetPeer speed up) to avoid the
need for an 'extern "C"' declaration in raw_object.h, which broke
the Windows builds.  Instead, a peer() method is added to the
RawExternalString*Object classes, and RawObject::ToAddr() is used
to fetch the address of these raw instances.  This avoids the need
for Dart_ExternalStringGetPeer needing friend access to those classes.
Review URL: https://chromiumcodereview.appspot.com//10891036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11540 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 20:04:55 +00:00
tball@google.com 59efb29a14 Performance improvement for the Dart VM runtime method
Dart_ExternalStringGetPeer. This change is basically an unrolling 
of the templates that previously defined the method, to reduce 
the number of handles allocated. 

This change is supported by the DartStringAccess VM benchmark, which 
showed a ~20x improvement from the above change. Currently this 
benchmark focuses on Dart_ExternalStringGetPeer, rather than String 
performance in general. 

Please review this carefully. Commented-out is a "NoGCScope no_gc_scope;" 
line, which when enabled asserts that GC doesn't happen when this function 
is called. However, one of the tests fails this check, though when I 
set a breakpoint in gdb before the NoGCScope item is allocated, it's not 
hit before the assertion fails. I commented out that line, in the hope 
that more senior reviewers suggest improvements.
Review URL: https://chromiumcodereview.appspot.com//10897014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11534 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 18:06:17 +00:00
ager@google.com c16f0ef499 Fix compilation errors on Windows.
R=antonm@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11499 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 09:05:47 +00:00
ager@google.com 2ad46b61fe Beginning support for library prefixes in the dart API.
This is a request for comments. Do we want to expose library
prefixes like this? Is there a way to import with a prefix already
and lookup members?

The reason why I would like to do this is so that I can import the
user-supplied builtins library under a prefix. This will be a useful
first step to move the print function to corelib while preserving
the ability to patch in a print implementation via the builtins
library.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11494 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 08:35:43 +00:00
tball@google.com c228cb4b55 Rollback of previous commit -- still under review.
Review URL: https://chromiumcodereview.appspot.com//10896018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11476 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-28 21:18:21 +00:00
tball@google.com 8f12d338d6 First implementation of performance improvement for
Dart_ExternalStringGetPeer.


git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11475 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-28 20:55:16 +00:00
turnidge@google.com bd995a345e Avoid trusting the length encoded in the Snapshot if there is an
external length available.  We now pass a length with all messages in
the vm and verify that there is no mismatch with the length from the
Snapshot.

Fixed a bug in the use of ApiMessageReader.  We were always manually
adding Snapshot::kHeaderSize to the data, but neglecting to subtract
kHeaderSize from the message length.

Added FullSnapshotWriter and MessageWriter classes.
Review URL: https://chromiumcodereview.appspot.com//10829444

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11413 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-27 20:25:44 +00:00
tball@google.com 7e2aafa16a Reordered handle validity tests in order of handle type likelihood.
This slightly speeds up verification in Api::UnwrapHandle, which 
only runs with DEBUG enabled.


git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11260 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 21:26:15 +00:00
regis@google.com 55c106f812 Make ClassFinalizer indifferent on whether we are generating a snapshot or not.
Add flag --error_on_malformed_type.
Remove obsolete flag --verify_implements.
Support snapshotting of LanguageError (for malformed types) and ApiError.
Review URL: https://chromiumcodereview.appspot.com//10871005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11198 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 00:27:49 +00:00
whesse@google.com b6cda7c0d2 Check for an error handle passed in, in all dart_api functions that return a handle. Pass the error handle through unchanged.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11148 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 13:42:06 +00:00
srdjan@google.com d5ad183f5b Add --use_cha (default true, switch to false if you use dynamic class loading). Use CHA to specify receiver class if no subclasses of the receiver exist, eliminate check class computation.
Remove all optimized code whenever we load scripts/libraries/snapshots. Currently this occurs only when no Dart frame is live on stack. Future change (deoptimization) will allow dynamic class loading in presence of live Dart frames.
The cost of removing all optimized code is supposed to be low. If that assumptions turns out to be false I can add more elaborate tracking of optimized functions.
Review URL: https://chromiumcodereview.appspot.com//10825483

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11106 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 22:31:49 +00:00
iposva@google.com 26d59247df - Pass the correct version of handle reference to Class::NewNativeWrapper.
Review URL: https://chromiumcodereview.appspot.com//10827434

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11012 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 02:49:46 +00:00
iposva@google.com 99d563982c - Support for patching of class methods and fields.
Review URL: https://chromiumcodereview.appspot.com//10827288

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10616 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 00:38:01 +00:00
hausner@google.com 9b47d131bf Support new getter syntax (no formal parameter list)
Support both new and old getter syntax in the VM compiler.
One co19 test becomes invalid, as it expects a compile error
due to missing getter formal parameters.
Review URL: https://chromiumcodereview.appspot.com//10837208

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10541 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 22:53:34 +00:00
asiva@google.com d4d781d636 - Unify class ids and snapshot object ids list so that we don't have disparate
and sometimes confusing values.
- Remove instance_kind_ field from RawClass.
- Rename all class id names to have a Cid suffix.
- Remove code from object.h and object_store.h which dealt with object ids
  of predefined classes for snapshots.
Review URL: https://chromiumcodereview.appspot.com//10827209

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10418 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-08 19:46:23 +00:00
turnidge@google.com 2d70c7a5eb Improve the stack trace output to be more readable.
BEFORE

Unhandled exception:
MyException
 0. Function: '::baz' url: 'file:///Users/turnidge/dart/bug.dart' line:2 col:3
 1. Function: '_OtherClass@11f7ef14._OtherClass@11f7ef14._named@11f7ef14' url: 'file:///Users/turnidge/dart/bug.dart' line:7 col:8
 2. Function: '::set:globalVar' url: 'file:///Users/turnidge/dart/bug.dart' line:12 col:3
 3. Function: '::_bar@11f7ef14' url: 'file:///Users/turnidge/dart/bug.dart' line:16 col:3
 4. Function: 'MyClass.get:field' url: 'file:///Users/turnidge/dart/bug.dart' line:25 col:9
 5. Function: 'MyClass.fooHelper' url: 'file:///Users/turnidge/dart/bug.dart' line:30 col:7
 6. Function: 'MyClass.foo' url: 'file:///Users/turnidge/dart/bug.dart' line:32 col:14
 7. Function: 'MyClass.function' url: 'file:///Users/turnidge/dart/bug.dart' line:21 col:15
 8. Function: 'MyClass.MyClass.' url: 'file:///Users/turnidge/dart/bug.dart' line:21 col:18
 9. Function: '::function' url: 'file:///Users/turnidge/dart/bug.dart' line:38 col:10
 10. Function: '::main' url: 'file:///Users/turnidge/dart/bug.dart' line:38 col:24

AFTER

Unhandled exception:
MyException
#0      baz (file:///Users/turnidge/dart/bug.dart:2:3)
#1      _OtherClass._OtherClass._named (file:///Users/turnidge/dart/bug.dart:7:8)
#2      globalVar= (file:///Users/turnidge/dart/bug.dart:12:3)
#3      _bar (file:///Users/turnidge/dart/bug.dart:16:3)
#4      MyClass.field (file:///Users/turnidge/dart/bug.dart:25:9)
#5      MyClass.foo.fooHelper (file:///Users/turnidge/dart/bug.dart:30:7)
#6      MyClass.foo (file:///Users/turnidge/dart/bug.dart:32:14)
#7      MyClass.MyClass.<anonymous closure> (file:///Users/turnidge/dart/bug.dart:21:15)
#8      MyClass.MyClass (file:///Users/turnidge/dart/bug.dart:21:18)
#9      main.<anonymous closure> (file:///Users/turnidge/dart/bug.dart:38:10)
#10     main (file:///Users/turnidge/dart/bug.dart:38:24)
Review URL: https://chromiumcodereview.appspot.com//10826191

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10408 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-08 17:22:26 +00:00
rmacnak@google.com a3468803c5 Made it possible to distinguish between a method or top-level function and the
function for a closure defined in such. Addresses issue 4337.
Review URL: https://chromiumcodereview.appspot.com//10831165

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10266 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 22:56:21 +00:00
turnidge@google.com 2803d78dfd Change the zone allocation api.
Instead of passing a size in bytes to the allocation function, we now
have a templatized Alloc function:

  zone->Alloc<Type>(len)

This is better for security, as we can check for integer overflow in
the size computation before performing the allocation.  Before, we
often failed to check this.
Review URL: https://chromiumcodereview.appspot.com//10836061

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10254 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 21:51:44 +00:00
turnidge@google.com 4288220bb2 The null tests that I added for Dart_NewString{8,16,32} were too restrictive.
It is okay to pass NULL codepoints if the length is zero.

This should fix the issue we were seeing in dartium.
Review URL: https://chromiumcodereview.appspot.com//10829153

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10204 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 23:56:16 +00:00
nweiz@google.com 637f6fe616 Fix the definition of kIllegalPort in dart_api.h.
Declaring a variable directly in a header will cause C to be unable to link
multiple object files that both include that header, even if that variable is
const.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10135 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-01 18:47:33 +00:00
turnidge@google.com 8b68d343c7 Enforce length/size limits for variable size heap object in order to
avoid overflow.

For each variable size heap object, compute the maximum number of
elements and use that in the ::New functions to avoid overflow.  If a
bad length/size reaches a ::New function, that is a FATAL error -- the
problem should have been caught earlier by the dart api or by the
library code.

Add "border guards" in the dart api and in library calls which cause
new variable size heap objects to be allocated.  We check for invalid
length/size and throw explanatory error messages.
Review URL: https://chromiumcodereview.appspot.com//10782016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10130 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-01 18:22:30 +00:00
rmacnak@google.com 407f371e3b Added Dart_FunctionEnclosingClassOrLibrary.
Review URL: https://chromiumcodereview.appspot.com//10834096

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10096 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-31 22:47:52 +00:00
turnidge@google.com a3a73029f0 Consolidate a few fields in RawFunction using bitfields.
Remove kAbstract from the list of function kinds.  It now has its own
dedicated bit.  This allows us to distinguish abstract methods from
abstract getters and setters.
Review URL: https://chromiumcodereview.appspot.com//10796004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10087 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-31 21:26:28 +00:00
cshapiro@google.com d11bc69870 Rename WeakReference to WeakReferenceSet.
This makes room for naming other weak reference types.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9970 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 23:52:20 +00:00
rmacnak@google.com 6d56bfd545 Added a test of Dart_FunctionParameterCounts against a closure inside of an
instance method. It currently gives the wrong answer for the fixed parameter
count because the closure's function is identified as non-static => instance
=> one implicit parameter (receiver) in Function::NumberOfImplicitParameters.
Review URL: https://chromiumcodereview.appspot.com//10831021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9956 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 18:30:40 +00:00
cshapiro@google.com 772a399cab Emit symbol maps for compiled code for use by the Linux perf tool.
Review URL: https://chromiumcodereview.appspot.com//10831005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9922 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 00:21:25 +00:00
rmacnak@google.com 99ad7f4170 Added ClosureMirror to dart:mirrors. Added Dart_ClosureFunction to the
embedding API. ClosureMirrors currently implement answering the closure's
function and applying the closure.
Review URL: https://chromiumcodereview.appspot.com//10800065

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9860 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 17:59:12 +00:00
asiva@google.com ec7f44f025 Create frequently used symbols in the vm isolate
- Avoids the need for doing a NewSymbol on these everytime
- saves space as they get shared by isolates
Review URL: https://chromiumcodereview.appspot.com//10783035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9834 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 00:01:50 +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
rmacnak@google.com 3d1c598ed5 Add a limited version of ParameterMirrors that can only tell whether they are
optional. Add Dart_FunctionParameterCounts. Drop passing isSimpleValue to
instance mirrors: they can compute this on the Dart-side.
Review URL: https://chromiumcodereview.appspot.com//10778005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9683 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-16 22:05:16 +00:00
regis@google.com a7b85ecff8 Provide better error message when passing wrong number of arguments.
Review URL: https://chromiumcodereview.appspot.com//10695137

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9602 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 17:46:55 +00:00
turnidge@google.com 22fb45f640 Implement method and variable reflection in dart:mirrors.
Review URL: https://chromiumcodereview.appspot.com//10687004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9493 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-09 23:57:08 +00:00
regis@google.com d95cbc8d7f Use VM type cast and save handles.
Review URL: https://chromiumcodereview.appspot.com//10693071

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9317 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-02 21:42:53 +00:00
turnidge@google.com a45c6255ba Add Dart_CurrentIsolateData().
Review URL: https://chromiumcodereview.appspot.com//10690027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9228 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-28 21:28:12 +00:00
turnidge@google.com 3f940819a7 Add a callback to inform embedders when an isolate is being shut down.
Review URL: https://chromiumcodereview.appspot.com//10450016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9211 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-28 18:15:17 +00:00
cshapiro@google.com 2f3f42e3dc Check that the C string passed to Dart_NewString is valid UTF-8.
BUG=2663

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8942 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 22:09:20 +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
iposva@google.com e1c28d7adf - Remove trailing '\n' when getting the API error message.
Review URL: https://chromiumcodereview.appspot.com//10539133

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8608 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 14:47:33 +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
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
vegorov@google.com dc45a91a4e Avoid reading RawObject::class_ directly in the runtime.
Instead rely on tags_ and perform lookups through isolate's class table where appropriately.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8244 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-04 10:29:00 +00:00
hausner@google.com 0c66cef0d9 Bigger stepping granularity in debugging
- Single step now steps to a safe point on the next line.
- Step into no longer steps into library code.
- Each library has a flag that specifies whether one
  can step into its code.

Later I will add an API to set the per-library flag. Currently
it's set to true for the top-level library and to false for
all other libraries.
Review URL: https://chromiumcodereview.appspot.com//10442088

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8173 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-31 20:17:34 +00:00
iposva@google.com bee192cbe4 - Rename class index to class id.
- Remove unused method.
Review URL: https://chromiumcodereview.appspot.com//10441111

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8148 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-31 12:41:37 +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
turnidge@google.com 30452c3c82 Fix Dart_New so that it works with List.
Specifically, when some interface "I" declares a default class "C",
that class "C" may either implement or not implement "I".  It turns
out that the name lookup is supposed to be different in these two
cases.  Before I only handled one of these cases correctly.

Also, it turns out I was passing bogus parameters to factory constructors.
I was supposed to pass type arguments, but instead I was passing the
wrong thing.  Fixed this.

This should fix issue 2971.
Review URL: https://chromiumcodereview.appspot.com//10441034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8072 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-29 18:00:45 +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
asiva@google.com 2a25dbda09 Fix some dart api functions to use the proper unwrap patterns.
Review URL: https://chromiumcodereview.appspot.com//10411038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7824 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-21 21:41:49 +00:00