Commit Graph

262 Commits

Author SHA1 Message Date
asiva@google.com a576fec3c0 Allow the native resolver to setup whether it needs the Dart API scope to
be setup automatically or not when a native function is invoked.
This would allow the embedder to treat some native functions as leaf
functions whose invocation can be very light.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31286 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-19 17:47:56 +00:00
rmacnak@google.com af3f18fa84 Add an API function to get a debugger stack trace from an error handle.
BUG=http://dartbug.com/14322
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30323 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-15 23:42:23 +00:00
srdjan@google.com cacd63cf7b Improve indexOf for one byte string receiver to work with other string classes.
Optimize access to core class’s class-ids.

R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29610 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 23:51:42 +00:00
sgjesse@google.com 2f27215203 Remove the reply port form the native isolate handler
The handler function for a native isolate no longer gets an explicit
reply port. Instead the reply port must be sent as part of the message
if required.

The Dart_CObject structure now exposes the send ports in a message to
a native isolate.

R=asiva@google.com, floitsch@google.com, whesse@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29418 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 08:45:32 +00:00
jacobr@google.com 80f92dc265 Add Dart_LibraryId method unblocking landing 45613003. TBR
BUG=
R=sra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29318 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-26 22:55:43 +00:00
floitsch@google.com 6a72655d1b Very simple version of Isolates.
R=ajohnsen@google.com, iposva@google.com, kasperl@google.com, lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29271 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 19:23:00 +00:00
asiva@google.com 1a2f236fab Fix issue 13942 - Dart_Error function invokes OS::VSNPrint with the "format" string containing data derived from the string
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28809 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-17 17:49:45 +00:00
asiva@google.com 21cefcd726 Add a new method Dart_InvokeConstructor to allow invocation of generative
constructors on an object that has already been allocated using Dart_Allocate.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28276 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-04 20:00:48 +00:00
hausner@google.com fcb84c8dc9 Fix expression evaluation in library context
- Use correct source for patch functions when class
  finalizer reports error
- Reinstate support for class in Dart_EvaluateExpr

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28064 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-30 18:49:32 +00:00
asiva@google.com 292d8c9c21 Fix 13594.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28017 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-27 16:55:20 +00:00
ajohnsen@google.com 0cc1e648e2 Re-enable VM isolate tests.
BUG=https://code.google.com/p/dart/issues/detail?id=6890
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27868 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 09:20:40 +00:00
rmacnak@google.com c9eabbcb56 Make Dart_IdentityEqual live up to its sepc and not leak boxing implementation detail. (Reland r27542.)
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27774 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-23 16:23:06 +00:00
rmacnak@google.com 0d6cfb77bd Remove Dart_[Qualified]ClassName.
Review URL: https://codereview.chromium.org//24252014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27724 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-20 21:17:19 +00:00
rmacnak@google.com 89d5616468 Never return a Dart_Handle on a dart::Class from the embedding API.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27715 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-20 18:29:56 +00:00
rmacnak@google.com 1d83b7c8c6 Setup the pool pointer when entering Dart from C++ so the intrinsic functions may rely on it being valid.
R=asiva@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27683 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-20 00:33:24 +00:00
ricow@google.com fab06df0eb Revert revision 27542 "Make Dart_IdentityEqual live up to its spec and not leak boxing implementation detail."
This is causing checked mode failures on all vm bots.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27545 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-17 06:29:47 +00:00
rmacnak@google.com 8ed7a0367f Make Dart_IdentityEqual live up to its spec and not leak boxing implementation detail.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27542 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-17 01:30:30 +00:00
rmacnak@google.com c7460aff0f Add Dart_QualifiedClassName.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27539 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-17 00:06:28 +00:00
iposva@google.com 2c0acad1e5 - Tighten assertions in the X64 assembler related to object pool usage.
- Adjust code passing objects into the assembler.
- Fix stack smashing bug in test.

R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27445 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 20:44:26 +00:00
hausner@google.com fd57843900 Update handling of ambiguous name references
Update VM to latest spec. Referencing a name that is imported
from more than one library is no longer a compile-time error.
If one of the sources of an ambiguous reference is a dart library,
the dart library declaration is automatically hidden.

Also fixes a bug where looking up a getter name in a library
found the getter even though the name is filtered out in the
'hide' combinator.

Long-term we should fix the need for repeatedly convert between
the mangled getter and setter names and the untangled name.

Fixes 12915, 12913, 12724.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27312 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 21:52:40 +00:00
jacobr@google.com 3aec267398 Fix bug where Script files that only contained patches were lost from the list of LoadedScripts() This resulted in incorrect stack traces for int.parse Many Script files containing patches also contained non-patch classes or top level members and so they still worked.
BUG=
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27254 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-06 17:54:05 +00:00
asiva@google.com 7ad55e3c8e The peer pointer was not being setup at all, fixed that and added a test case
for it.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26561 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-22 22:05:22 +00:00
asiva@google.com 848291cea7 - Setup a peer for read only strings that are not externalized in
Dart_MakeExternalString so that it is not necessary to create
a new reference for it everytime it is accessed in native code.

- Removed unused function Dart_ExternalStringGetPeer

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26538 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-22 17:10:37 +00:00
asiva@google.com 497152cc26 Added Dart API methods:
Dart_GetNativeIntegerArgument
Dart_GetNativeDoubleArgument
Dart_GetNativeBooleanArgument

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26485 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 23:20:30 +00:00
asiva@google.com 29fec5afb2 Comment out check in native fields injection until issue 12455 is resolved.
Review URL: https://codereview.chromium.org//23215002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26151 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 20:57:13 +00:00
asiva@google.com 4b2c10ae32 Added following dart API changes to enable more efficient access based
on the dartium usage pattern:
- Dart_GetNativeStringArgument (gets a String object, peer etc. directly from
  the native arguments)
- Dart_SetWeakHandleReturnValue (allows a weak handle to be passed to the
  return value, this ensures a new local handle does not have to be created
  from a weak handle just to return a value)
- Dart_StringGetProperties (gets some common properties of a string, avoids
  multiple API calls to set up a native string)

R=srdjan@google.com, vsm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26046 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 01:19:25 +00:00
regis@google.com 9eb12ad303 Implement updated method overriding rules in the vm (issue 11495).
Introduce --error-on-bad-override flag and use it when generating snapshots.
Fix signature checking when patching methods.
Fix errors in patch files.
Fix receiver type of constructors.
Fix finalization of mixin application typedefs.
Update tests and status files.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26027 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-12 20:28:52 +00:00
rmacnak@google.com 303a29b5ba Move Null class out of the VM isolate.
BUG=http://dartbug.com/12071
BUG=http://dartbug.com/12128
BUG=http://dartbug.com/12319
BUG=http://dartbug.com/12337
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25982 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-09 21:54:30 +00:00
rmacnak@google.com 0abc24d494 Fix name of libraries without a library declaration to be the empty string.
BUG=10580
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25981 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-09 21:27:28 +00:00
srdjan@google.com 0cabd24ae6 Do not use guarded cid on externalizable cid-s (one and two byte strings). An externalizable object can change its type on the fly and therefore we cannot rely on the information obntained while storing into the field.
R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25893 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-07 18:56:48 +00:00
rmacnak@google.com e37a1b46a7 Remove unused functions from dart_mirrors_api.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25749 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-02 22:28:10 +00:00
fschneider@google.com eae62fa866 Improve performance of Dart_ListGetAsBytes.
This fixes two performance issues with Dart_ListGetAsBytes:

1. Avoid excessive handle allocation when copying from a generic List.

2. Add a fast path when copying from byte-size typed data view objects. The
old version only supported typed data, but no views.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25731 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-02 11:32:05 +00:00
regis@google.com 9581071936 Refactor resolution code in the vm to properly handle ambiguity errors.
Add test.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25324 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-23 00:19:39 +00:00
asiva@google.com 36a3bafe81 Fix for issue 11770.
R=iposva@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24900 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-11 00:33:41 +00:00
johnmccutchan@google.com 4aeef86a3d Call shutdown callback before the isolate is destroyed
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24844 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-09 14:59:01 +00:00
asiva@google.com e16291b973 Convert implementation in mirrors.cc to use Dart_GetType instead of Dart_GetClass.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24491 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-26 21:30:18 +00:00
asiva@google.com 106b0847fd Fix for issue 11262.
- Add Dart_InstanceGetType
- Wire Dart_New, Dart_Invoke and Dart_[G|S]etField to use types

R=regis@google.com, vsm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24195 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-19 18:20:55 +00:00
vsm@google.com 9ddec8e9a1 Add Dart_Allocate to the C++ API
This change allows us to allocate Dart objects from C++ without
invoking a constructor.  In turn, it allows us to declare Dartium DOM
types with no public generative constructor.

Note, the current constructor has to be public as dart:html Element is
subclassed by dart:svg SvgElement (and eventually by user defined
custom elements as well).  This leads to unfortunate holes such as: https://code.google.com/p/dart/issues/detail?id=11277

This should also give a modest boost in DOM perf as the existing
constructor does absolutely nothing.

BUG=11277
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24189 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-19 15:48:23 +00:00
asiva@google.com 6a306cbb5f Fix build break (add correct return type in test).
Review URL: https://codereview.chromium.org//17286009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24156 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-18 18:37:49 +00:00
asiva@google.com a01261ef7b Fix for issue 11262.
Provide support for types in the Dart API.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24154 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-18 17:47:15 +00:00
asiva@google.com 51651ee00b Split dart_api.h into multiple parts:
dart_api.h - Has the core API functions
dart_mirrors_api.h - Has API functions to support Mirrors or reflection
dart_native_api.h - Has parts which support the native message handling,
                    profilling and other internal tools

R=sgjesse@google.com, vsm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24062 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 23:47:40 +00:00
asiva@google.com ebcb6943bf Fix the isolate unit tests to create an isolate from a snapshot.
R=zra@google.com

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

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

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23476 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-31 16:36:27 +00:00
iposva@google.com b60d09b1fb - Add different types for persistent and weak persistent handles
in the Dart C API.
- Adapt code in the runtime.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23421 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-30 15:55:59 +00:00
floitsch@google.com 09d7da9250 Rewrite double.parse.
BUG= http://dartbug.com/5654
R=lrn@google.com, srdjan@google.com

Committed: https://code.google.com/p/dart/source/detail?r=23062

Reverted: https://code.google.com/p/dart/source/detail?r=23065

Committed: https://code.google.com/p/dart/source/detail?r=23066

Reverted: https://code.google.com/p/dart/source/detail?r=23068

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23071 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 14:30:16 +00:00
floitsch@google.com 9849fb8900 Revert "Rewrite double.parse."
This reverts commit r23066.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23068 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 13:28:37 +00:00
floitsch@google.com 75cafec89d Rewrite double.parse.
BUG= http://dartbug.com/5654
R=lrn@google.com, srdjan@google.com

Committed: https://code.google.com/p/dart/source/detail?r=23062

Reverted: https://code.google.com/p/dart/source/detail?r=23065

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23066 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 13:09:05 +00:00
floitsch@google.com 724fb6b4aa Revert "Rewrite double.parse."
This reverts commit r23062.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23065 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 13:00:05 +00:00
floitsch@google.com d39ef26225 Rewrite double.parse.
BUG= http://dartbug.com/5654
R=lrn@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23062 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 12:00:45 +00:00
asiva@google.com 9041d156a0 Create test isolates using a snapshot, this ensures that we do not depend
on the location of core libraries which can be a problem when we copy
the run_vm_tests executable to a different machine.

R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23030 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-22 17:25:25 +00:00