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
asiva@google.com
d6aaf0cc94
1. Add flag --trace-api to trace API function invocation
...
2. Add tracing of external native functions under --trace-natives flag
3. Added a _printCurrentStacktrace() function so that one could get a
dart stack trace under 'gdb' when in a native or runtime function.
R=regis@google.com
Review URL: https://codereview.chromium.org//23453035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27166 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-04 23:42:13 +00:00
asiva@google.com
b4d9e0d620
Auto create ApiLocalScope before calling native functions, this ensures that
...
native functions do not have to call Dart_EnterScope/Dart_ExitScope
when they callback into the VM.
Remove Dart_EnterScope/Dart_ExitScope calls around native functions in 'bin'
directory.
R=regis@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//22303002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25827 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-06 19:27:48 +00:00
asiva@google.com
61e1d90402
Added check that the object being stored as a return value in the NativeArguments array is a Dart instance.
...
Review URL: https://codereview.chromium.org//12744006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19932 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-13 14:16:13 +00:00
asiva@google.com
8af296c9c8
Cleanup the exceptions create code to use Arrays instead GrowableArrays so
...
that it is consistent with the DartEntry invoke code that it calls finally.
Review URL: https://codereview.chromium.org//11639007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16295 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 23:47:35 +00:00
regis@google.com
dd6a0ec349
Rename GET_NATIVE_ARGUMENT macro to GET_NON_NULL_NATIVE_ARGUMENT.
...
Introduce new GET_NATIVE_ARGUMENT macro accepting null.
Add test.
Review URL: https://codereview.chromium.org//11468016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15919 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-10 17:59:40 +00:00
hausner@google.com
7eb3efc2ba
Fix native argument handling
...
Native functions need to fetch arguments differently if they are
called through a closure.
fixes issue 6696.
Review URL: https://codereview.chromium.org//11293290
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14937 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-15 01:14:01 +00:00
tball@google.com
76d7c9b105
Renamed Zone->StackZone, BaseZone->Zone, in preparation for changing isolate->get_zone() to return what was called the BaseZone instead of its wrapper. The GetBaseZone() methods were not renamed, to help the next CL.
...
BUG=
Review URL: https://codereview.chromium.org//11040062
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13314 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-05 19:52:55 +00:00
lrn@google.com
a1faa6f135
Change IllegalArgumentException to ArgumentError.
...
Review URL: https://codereview.chromium.org//10989013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12841 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 12:27:52 +00:00
srdjan@google.com
caf04303f7
Deoptimization can occur at Dart calls (includes native calls to C) but not at runtime calls. This assumption (verified with Todd and Gilad) simplifies the implementation of lazy deoptimization considerably.
...
Add flag --deoptimize-alot, which will lazily deoptimize all live optimized frames. Currently only the presence of deoptimization information is checked.
Add kDeoptAfter deoptimization point, which is the continuation for lazy deoptimization, after a call. Rename kDeopt to kDeoptBefore.
Removed a tests case that called into a native without properly setting up a Dart frame (Ok-d by Siva).
Native functions are not optimizable.
TODO: Split deoptimization information from DeoptimizationStubs. Check for redundant PcDescriptor information (what can be merged, especially at calls).
Review URL: https://chromiumcodereview.appspot.com//10885039
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11642 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 18:53:46 +00:00
turnidge@google.com
14f614da12
Use the return value of vm native methods to set the return value,
...
based on Siva's earlier suggestion (he actually suggested putting it
in the generated stub, which I haven't done).
Added SetReturnUnsafe and use it exactly one place so far.
Review URL: https://chromiumcodereview.appspot.com//10874072
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11633 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 17:41:19 +00:00
iposva@google.com
093c16d6ea
- GET_NATIVE_ARGUMENT uses the isolate which is passed in to allocate the handle.
...
- Avoid frequent calls to Isolate::Current().
- Avoid handle allocation in a loop for StringBase.createFromCodepoints.
- Avoid copying in StringBase._interpolate.
Review URL: https://chromiumcodereview.appspot.com//10878037
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11279 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-24 00:22:07 +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
hausner@google.com
09b97fefd4
Address Ivan's review comments.
...
Review URL: https://chromiumcodereview.appspot.com//9696048
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5438 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-13 21:07:42 +00:00
asiva@google.com
5cf3ad018a
Changes to pass the current isolate to all runtime and native calls.
...
Review URL: http://codereview.chromium.org//8528010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1499 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-12 05:55:22 +00:00
srdjan@google.com
59b79d8171
Fix more co19 crashes. Introduce GET_NATIVE_ARGUMENT that throws an illegal argument exception if the native argument is of incorrect type.
...
Review URL: http://codereview.chromium.org//8476002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1205 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-04 16:30:29 +00:00
dgrove@google.com
4c0f559d23
Initial checkin.
...
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-05 05:20:07 +00:00