Ryan Macnak
f1a0056430
Load the native call wrapper via Thread.
...
R=fschneider@google.com
Review URL: https://codereview.chromium.org//1358773002 .
2015-09-20 13:48:17 -07:00
Florian Schneider
bac82e2592
VM: New calling convention for generated code.
...
Instead of calling code object directly, call indirectly and
pass the code object in a register. The object pool is then loaded from
the code object. This is another preparation step for making generated code
relocatable.
All non-ia32 platforms:
No entry patching.
ARM:
PC marker (now code object) moves to the same place as on x64 (below saved PP, above saved FP).
R9 is now used as PP, R10 as CODE_REG.
BUG=
R=koda@google.com , rmacnak@google.com
Committed: https://github.com/dart-lang/sdk/commit/1d343e5a7b75168fb6c9f86b64c55173cdbdc9b2
Review URL: https://codereview.chromium.org//1192103004 .
2015-09-19 13:21:09 +02:00
Florian Schneider
7af7a2db87
Revert "VM: New calling convention for generated code."
...
This reverts commit 1d343e5a7b .
Because of Windows test failures.
BUG=
TBR=whesse@google.com
Review URL: https://codereview.chromium.org//1343373003 .
2015-09-16 13:46:05 +02:00
Florian Schneider
1d343e5a7b
VM: New calling convention for generated code.
...
Instead of calling code object directly, call indirectly and
pass the code object in a register. The object pool is then loaded from
the code object. This is another preparation step for making generated code
relocatable.
All non-ia32 platforms:
No entry patching.
ARM:
PC marker (now code object) moves to the same place as on x64 (below saved PP, above saved FP).
R9 is now used as PP, R10 as CODE_REG.
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1192103004 .
2015-09-16 13:05:58 +02:00
Ryan Macnak
0ab5bc2942
Add missing arity check for native entry in arm64 and mips simulators.
...
R=fschneider@google.com
Review URL: https://codereview.chromium.org//1341623002 .
2015-09-14 12:09:39 -07:00
Florian Schneider
c05f1f9448
VM: Link native calls lazily.
...
The first invocation of a native functions goes into LinkNativeCall which
determines the final entry point and patches the object pool entry.
When running precompiled code, this makes deserializing the object
pool entries for native functions easy, they all initially point to
a single entry (LinkNativeCall).
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1294113004 .
2015-08-21 11:37:50 +02:00
Daniel Andersson
700bd54362
Remove more uses of Isolate::current_zone.
...
The most substantial change is in Parser and ParsedFunction, which now cache their calling thread. (A similar change was tried unsuccessfully in the past, but can now be safely implemented thanks to the ThreadRegistry state saving.)
Only remaining users are the Object::Handle(Isolate*, [...]) methods. Then, this deprecated interface will be removed.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//1242343002 .
2015-07-21 09:37:23 -07:00
Daniel Andersson
6542a451c3
Refactor Isolate -> Thread in NativeArguments and exception handler jump.
...
Further reduces the one-to-one assumption about isolates and threads: native entries now ask the thread for its isolate, rather than the other way around.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//1156143003
2015-05-26 16:49:51 -07:00
koda@google.com
08edbbd6b4
MemorySanitizer support.
...
Enables building (including generating snapshot) and running simple scripts under MemorySanitizer.
Not all tests pass yet.
R=asiva@google.com
Review URL: https://codereview.chromium.org//816123002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42561 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-23 01:07:58 +00:00
iposva@google.com
d36cd610cb
- Use isolate where it is appropriate.
...
- Do not emit an name for ExternalLabel.
R=johnmccutchan@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//306483005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36662 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 10:15:50 +00:00
johnmccutchan@google.com
9ced01eec2
Fix library snapshotting breakage with native entry symbol resolver.
...
- Write out a NULL for the libraries Dart_NativeEntrySymbol.
- Read in the NULL for the libraries Dart_NativeEntrySymbol.
- Set the libraries Dart_NativeEntrySymbol to NULL.
- Use reusable handles.
R=turnidge@google.com
Review URL: https://codereview.chromium.org//268853003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35812 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-06 18:09:49 +00:00
johnmccutchan@google.com
bc35c1752e
Display PC descriptors with disassembling in Observatory
...
Couple other fixes:
- Fix path to shared css
- Fix crash when printing null AbstractType.
R=turnidge@google.com
Review URL: https://codereview.chromium.org//251043003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35529 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-29 16:40:42 +00:00
johnmccutchan@google.com
ef666553a1
Add runtime and native entry tags
...
- Split runtime and native entry tags.
- Set runtime / native entry address as vm tag in stubs.
- Add reverse native entry resolver (pc to name) to public API (breaking change).
- Hookup reverse resolver for standalone VM (io + bootstrap + builtin natives).
- Runtime entries are registered with tags.
- Profiler queries for tag names via the reverse native entry resolver.
- Profiler outputs named entry tags as children under parent tag (runtime or native).
R=asiva@google.com
Review URL: https://codereview.chromium.org//227433004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34941 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 20:26:45 +00:00
johnmccutchan@google.com
762b9a400c
Set VMTag from stubs when transitioning between Dart and Native
...
R=asiva@google.com , zra@google.com
Review URL: https://codereview.chromium.org//200693002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34065 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-18 21:26:07 +00:00
johnmccutchan@google.com
25146ce058
Basic tag infrastructure
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//195733009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33701 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-14 16:16:21 +00:00
fschneider@google.com
16857e0b13
Revert r32930 (Add more timing information in the VM to track time...)
...
It caused severe performance regressions that should be addressed.
TBR=asiva@google.com
Review URL: https://codereview.chromium.org//177733002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32959 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-24 12:15:55 +00:00
asiva@google.com
6d313d3797
Add more timing information in the VM to track time spent is dart code Vs native code.
...
R=johnmccutchan@google.com , turnidge@google.com
Review URL: https://codereview.chromium.org//137483010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32930 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-21 21:30:29 +00:00
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
turnidge@google.com
9731c1c254
Rename Api::NewLocalHandle -> Api::NewHandle.
...
Api::NewHandle now takes a RawObject* intead of an Object&.
- This makes the code shorter and easier to read.
- This allows us to drop the DARTSCOPE from Dart_GetNativeArgument.
(6% speedup on Benchmark_UseDartApi)
Review URL: https://chromiumcodereview.appspot.com//10014002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6283 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-06 17:05:50 +00:00
turnidge@google.com
c0d7f96409
Remove many calls to Isolate::Current() in the dart embedding api by
...
passing the isolate explicitly.
Review URL: https://chromiumcodereview.appspot.com//9956133
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6193 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-04 20:31:49 +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