Ivan Posva
4bd7cdc75c
- Ensure that HandleScope is initialized with a thread. (Remove
...
deprecated isolate based API.)
- Update all code impacted by this change. E.g. DARTSCOPE
- TEST_CASE now passes the current thread as a parameter to the unit test.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//1310463005 .
2015-09-01 17:18:55 -07:00
Regis Crelier
26031ab6b0
Avoid numerous type allocations by caching the canonical type of a class, which
...
is used as the receiver type for non-static methods of this class, be it a
generic, non-generic, or signature class.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//1309613002 .
2015-08-21 13:37:07 -07:00
John McCutchan
1ff7144c31
Switch to a VM wide timeline recorder
...
- Initialize and shutdown timeline recorder with VM.
- Allocate global blocks for timeline events without an isolate.
- Stop storing the Stream pointer inside a TimelineEvent.
- Store category name in TimelineEvent.
- Store isolate pointer in TimelineEvent.
- TimelineEventRecorder::WriteTo is full VM dump.
- Allow JSONStream to be used without an isolate.
- When a ThreadRegistry is deleted, Finish all open timeline blocks.
- PrintJSON takes a filter.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1294023009 .
2015-08-18 15:18:02 -07:00
Ivan Posva
6dc5df76c0
- Avoid scavenging the same location twice.
...
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//1287333007 .
2015-08-18 11:05:34 -07:00
Adam Barth
bc88578fe1
Add Dart_ListGetRange
...
This API lets you get multiple values out of a list at once, saving overhead.
R=asiva@google.com
Review URL: https://codereview.chromium.org//1284633004 .
2015-08-12 16:46:38 -07:00
John McCutchan
8be0e8a9c5
Refactor Dart_TimelineGetTrace to use a StreamConsumer callback
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//1287543003 .
2015-08-11 10:08:31 -07:00
John McCutchan
35cd1fa13c
Add timeline stream control and trace retrieval to the dart embedder api.
...
BUG=
R=turnidge@google.com
Review URL: https://codereview.chromium.org//1276903004 .
2015-08-10 13:47:03 -07:00
Florian Schneider
0cf617ef13
VM: Refactor allocation stats code and remove duplicate code.
...
Make context allocation stub shared between isolates.
The fast-path used in optimized code still has isolate-specific
addresses inlined for performance reasons.
Common functions are moved into class_table.h/.cc.
This is a preparation for adding an isolate-independent version of the
allocation code and allocation tracking code.
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//1241863002 .
2015-07-17 15:15:33 +02:00
Siva Annamalai
e9de48f49a
Fix for issue 23646 https://github.com/dart-lang/sdk/issues/23646
...
Allow an ApiError or CompilationError to be passed into Dart_NewUnhandledExceptionError and use the error message in these objects as the Dart instance to throw.
BUG=23646
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1190413006 .
2015-06-19 16:55:47 -07:00
John McCutchan
bcf6eb7099
Remove dart_debugger_api.h
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//1190103003 .
2015-06-17 14:56:55 -07:00
John McCutchan
f58029a0cd
Refactor some Timeline interfaces to be simpler and support streaming
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1173333007 .
2015-06-16 10:52:48 -07:00
John McCutchan
c7187924a9
Initial Timeline Events
...
- Each isolate has its own TimelineEventBuffer
- Each isolate has TimelineEventStreams for API, Compiler, Embedder, Isolate, and GC
- Compiler, Isolate, Embedder, and GC are being inserted into the stream
- Basic unit tests
- Dart API for injecting timeline events
- Arbitrary number of native and Dart arguments can be attached to each event
- JSON printing
- Output can be loaded by about://tracing
- Add --timeline-trace-dir flag
Short term follow up CLS:
- Service protocol requests to enable / disable tracing and retrieve a trace
- UI for Observatory
- Dart code EventStreams and Events
R=asiva@google.com
Review URL: https://codereview.chromium.org//1170503004 .
2015-06-16 10:10:14 -07:00
Ivan Posva
f5e3f94019
Fix http://dartbug.com/23578 :
...
- Complete revamp of isolate-specific flags.
- Associate flags with the isolate on creation.
- Dart_CreateIsolate and associate callback do take an
extra flags argument.
- Make sure to clear IC data array when clearing code.
BUG=23578
Review URL: https://codereview.chromium.org//1162033005
2015-06-07 17:57:34 +02:00
Siva Annamalai
7af681ead9
Fix for issue 23547, return an proper ApiError instead of a string when we report outstanding typed data acquire errors.
...
BUG=23547
R=koda@google.com
Review URL: https://codereview.chromium.org//1156993012
2015-05-29 11:13:33 -07:00
John McCutchan
51d8bae199
Revert "Hide Isolate pointer from embedder"
...
This reverts commit 014e694ba7 .
Revert "Fix fall out from hide isolate pointer change"
This reverts commit 966aafbc81 .
Revert "Fix build"
This reverts commit d7b03ba7b0 .
BUG=
Review URL: https://codereview.chromium.org//1140263005
2015-05-19 11:41:42 -07:00
John McCutchan
014e694ba7
Hide Isolate pointer from embedder
...
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//1130753006
2015-05-18 14:06:10 -07:00
asiva@google.com
05d7eb5dfa
Move symbol table from per isolate snapshot to vm isolate snapshot, this reduces the per isolate initial heap size
...
from New space (0k of 1024k) Old space (1274k of 1536k)
to New space (0k of 1024k) Old space (756k of 1280k)
R=hausner@google.com
Review URL: https://codereview.chromium.org//1123813002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45795 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-14 20:14:37 +00:00
srdjan@google.com
3ac643115f
Remove unneeded flag declaratiosn (enable_type_checks, enable_asserts).
...
R=hausner@google.com
Review URL: https://codereview.chromium.org//1133793002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45647 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 16:48:43 +00:00
vegorov@google.com
7db7425826
Reland r45243.
...
Type and constant propagator should guard against mutable class ids.
Constant strings can be externalized so we can't fold away class checks against
them.
Prevent CP from removing redefinitions of constants with mutable cids.
BUG=
R=fschneider@google.com
Review URL: https://codereview.chromium.org//1091353002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45275 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-20 10:42:54 +00:00
vegorov@google.com
ea74236e5c
Revert "Type and constant propagator should guard against mutable class ids."
...
This reverts commit r45243.
Reason: VM segfauls when running dart2js in Release mode.
TBR=fschneider@google.com
Review URL: https://codereview.chromium.org//1093873002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45245 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-17 17:39:52 +00:00
vegorov@google.com
1cf4621d46
Type and constant propagator should guard against mutable class ids.
...
Constant strings can be externalized so we can't fold away class checks against them.
R=fschneider@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//1097723002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45243 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-17 16:58:25 +00:00
rmacnak@google.com
5797153584
Add Dart_NewIntegerFromUint64. Fix Dart_IntegerToUint64 for negative Smis.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//1086713002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45143 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-14 17:52:06 +00:00
zra@google.com
bce0195683
Fixes bug in LoadIndexedInstr on ARM.
...
Assembler::ElementAddressForRegIndex already untags the index.
On MIPS, the removed instruction had no effect.
BUG=https://code.google.com/p/dart/issues/detail?id=22384
R=regis@google.com
Review URL: https://codereview.chromium.org//1068823004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44955 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-07 23:48:38 +00:00
johnmccutchan@google.com
5c7d4bd9d3
Fix crash when posting a message to a send port with port id 0.
...
BUG=
R=zra@google.com
Review URL: https://codereview.chromium.org//1056223002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44906 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-05 19:06:29 +00:00
asiva@google.com
87c8a6ee76
First step towards splitting a full snapshot into a vm isolate snapshot and a
...
regular isolate snapsot.
- change gen_snapshot to split a full snapshot into a vm isolate snapshot
and an isolate snapshot
- change the build process and scripts to account for splitting the full
snapshot
R=hausner@google.com
Review URL: https://codereview.chromium.org//1023753006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44814 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-31 18:46:19 +00:00
rmacnak@google.com
e1bbc90322
Display call site data for functions.
...
- Requested with coverage data, only in function view for now.
- Adjust token position associated with ICData to correspond to the identifier instead of the open paren.
- Fix JSONifying ICs for static/constructor calls.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//977283002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44476 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-13 20:44:41 +00:00
koda@google.com
6b936e5be0
Verify acquired typed data: allow detection of use-after-free.
...
With --verify_acquired_data, copy to a buffer on the side (which is zapped on release). Allows AddressSanitizer to catch bugs.
Extend unit tests to exercise new code.
R=asiva@google.com
Review URL: https://codereview.chromium.org//957483002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44102 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-27 19:24:17 +00:00
zra@google.com
1299ad1485
Allows turning on checked mode on a per-isolate basis
...
using the embedding API.
R=regis@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//883263004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43481 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-04 18:32:48 +00:00
johnmccutchan@google.com
4ebfc3a73f
Make Dart_Invoke work for private static functions
...
Our API documentation states that Dart_Invoke will invoke private functions.
R=turnidge@google.com
Review URL: https://codereview.chromium.org//891053004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43375 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 00:37:08 +00:00
johnmccutchan@google.com
172baa03ff
Service isolate rework take 2
...
Review URL: https://codereview.chromium.org//889443002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43306 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-29 18:31:27 +00:00
lrn@google.com
ab51ccc9f0
Create string efficiently from Uint16List/View.
...
R=asiva@google.com , fschneider@google.com
Review URL: https://codereview.chromium.org//864463002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43235 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-28 12:44:44 +00:00
johnmccutchan@google.com
db271b0477
Revert r43217, r43215, r43208, r43207, and r43202.
...
Reverting because of some isolate spawn issues (on Windows, and pub bots).
Review URL: https://codereview.chromium.org//867113003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43219 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-27 22:56:18 +00:00
johnmccutchan@google.com
66aa470fc6
* Create vm-service isolate at Dart_Initialize time.
...
* Remove Service create callback.
* Simplify creation of service isolate.
* Creation is done on thread pool.
* Use vm-service isolate for loading in standalone embedder.
* Remove import of dart:io from builtin library.
performance changes:
no service isolate:
$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:27 | 100% | +12363 | - 0]
$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:27 | 100% | +12363 | - 0]
always start service isolate (as a thread pool task):
$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:45 | 100% | +12363 | - 0]
$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:44 | 100% | +12363 | - 0]
service does I/O (calls to Dart_LoadScript block until service is running):
$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:55 | 100% | +12363 | - 0]
$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:55 | 100% | +12363 | - 0]
R=asiva@google.com
Review URL: https://codereview.chromium.org//584023004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43202 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-27 19:45:48 +00:00
koda@google.com
8b6d5b1ada
Remove default heap size limit and add separate limit for externals.
...
Review URL: https://codereview.chromium.org//864843002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43111 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-23 16:32:20 +00:00
koda@google.com
c7e9e048ed
Rename Thread -> OSThread.
...
It's a collection of static utility methods for primitive operations on OS threads.
Make room in the namespace for upcoming class that will represent all the complex state of a VM thread.
Review URL: https://codereview.chromium.org//796063006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42895 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 02:30:07 +00:00
asiva@google.com
ca1c3241c4
Fix for issue 21398.
...
Accept only 'literal-like' objects when sending messages to isolates
spawned using spawnURI. Allow all objects for isolates spawned using
spawnFunction.
R=iposva@google.com
Review URL: https://codereview.chromium.org//834233003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42793 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-12 23:14:30 +00:00
rmacnak@google.com
a8e5ad20a5
Don't crash when generating error messages with malformed strings.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//563043003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40829 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-01 00:49:36 +00:00
ajohnsen@google.com
0491f4e887
Per isolate package root.
...
BUG=
R=iposva@google.com , ricow@google.com , sgjesse@google.com , turnidge@google.com
Committed: https://code.google.com/p/dart/source/detail?r=40534
Review URL: https://codereview.chromium.org//545483002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40581 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-23 05:46:14 +00:00
rmacnak@google.com
046a81b6b1
Add Dart_IsFuture. To be used in Dartium implementation of Promises.
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//585643004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40577 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-22 23:05:58 +00:00
ajohnsen@google.com
38619425c2
Revert "Per isolate package root."
...
Revert "Fix test in checked mode."
The Dartium branch is locked atm, making it impossible to land this and have green Dartium bots.
BUG=
Review URL: https://codereview.chromium.org//590123002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40540 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-22 11:13:28 +00:00
ajohnsen@google.com
a058d07806
Per isolate package root.
...
BUG=
R=iposva@google.com , sgjesse@google.com , turnidge@google.com
Review URL: https://codereview.chromium.org//545483002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40534 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-22 08:07:06 +00:00
johnmccutchan@google.com
7c7bcbdd29
Make Dart API Dart_IsTypedData work for typed data views
...
BUG=http://dartbug.com/20765
R=asiva@google.com
Review URL: https://codereview.chromium.org//529053002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39752 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-02 16:35:58 +00:00
iposva@google.com
4835041da9
- Account for number of pending tasks in old-space collections.
...
- Protect access to the free lists.
- MutexLocker/MonitorLocker do not need to be StackResources.
R=koda@google.com
Review URL: https://codereview.chromium.org//474913004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39396 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-20 03:54:14 +00:00
asiva@google.com
98c5d02664
Ensure that hash for a symbol is not set to 0 when it is made external.
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//474033002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39268 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-14 21:17:40 +00:00
iposva@google.com
14ecdbd66a
- Separate the thread implementation used in bin/ and vm/
...
to allow us to make VM specific changes.
R=asiva@google.com
Review URL: https://codereview.chromium.org//463993002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39172 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-12 23:19:53 +00:00
rmacnak@google.com
e803f27641
Make Dart_LoadLibrary and Dart_LoadSource take line and column offsets like Dart_LoadScript.
...
BUG=http://dartbug.com/13460
R=hausner@google.com
Review URL: https://codereview.chromium.org//429013002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38801 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-31 21:25:23 +00:00
asiva@google.com
97b903c665
Fix for issue 19817
...
- do not try to finalize classes on every Dart API call which could
potentially result in calls to dart code
- Invoke Dart_FinalizeLoading after all loads are done to ensure that
classes are finalized
R=hausner@google.com
Review URL: https://codereview.chromium.org//411633002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38471 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-22 20:08:15 +00:00
asiva@google.com
a323a9c9db
The dart version of typeddata library has changed to be compatible with the dart2js implementation
...
(typeddata does not implement ByteBuffer anymore).
Added new Dart API functions to account for this change.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//392043003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38351 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-17 22:08:07 +00:00
asiva@google.com
9a718b8235
Add a function Dart_AllocateWithNativeFields which allocates an object and sets the native fields in one call.
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org//349643003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37568 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-20 21:08:33 +00:00
koda@google.com
b700281db4
Missing file.
...
Review URL: https://codereview.chromium.org//343503002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37416 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-17 20:16:00 +00:00