Zachary Anderson
871e4a2788
Uses a HashMap to complete deferred library loads.
...
HashMap.forEach is a few ms faster to compile than LinkedHashMap.forEach,
and iteration order appears not to matter for _outstandingLoadRequests.
BUG=
R=hausner@google.com
Review URL: https://codereview.chromium.org/1453513002 .
2015-11-17 10:52:44 -08:00
Todd Turnidge
5817a6f187
Remove some prototype code that snuck into one of my commits.
...
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1435943003 .
2015-11-16 15:07:16 -08:00
Lasse R.H. Nielsen
50aa43569d
Add "growable" parameter to List.filled constructor.
...
Fixes issue #24884
BUG= http://dartbug.com/24884
R=floitsch@google.com
Review URL: https://codereview.chromium.org/1440663003 .
2015-11-13 09:30:46 +01:00
John McCutchan
291befa1cd
Redo TimelineTask API
...
A TimelineTask represents an asynchronous track of operations on the timeline.
The old API allowed multiple isolates to emit events simultaneously on the same task or to start / finish events in any order. This isn't supported by our UI and probably many other tools that consume trace-event.
With this change, operations within a TimelineTask must complete in the reverse order of their start calls (aka a stack). You can pass a TimelineTask from one isolate to another but you must first complete all open operations before passing it.
Example:
var task = new TimelineTask();
task.start('Some phase');
await someFuture;
task.finish();
Also: Add support for instant events.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1412183008 .
2015-11-11 10:59:38 -08:00
Jacob Richman
27686cf808
Missed adding the isExternal property to all VM MethodMirror subclasses.
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1407333007 .
2015-11-06 10:51:45 -08:00
Lasse R.H. Nielsen
b13607d247
Split _uriEncode into JS and VM versions.
...
R=iposva@google.com , sra@google.com
Review URL: https://codereview.chromium.org/1416373007 .
2015-11-05 13:00:37 +01:00
Florian Loitsch
be025b8412
Revert "Remove deprecated dart:profiler library"
...
This reverts commit 535a9715ac .
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1415843008 .
2015-11-04 01:59:53 +01:00
Jacob Richman
688b69fb65
Support isExternal method on MethodMirror in the Dart VM. Not really intended for public consumption. switch to using isExternal and using anonymous.
...
BUG=
R=alanknight@google.com , asiva@google.com
Review URL: https://codereview.chromium.org/1421133003 .
2015-10-29 19:17:08 -07:00
Florian Schneider
bcde4eee0b
VM: Add double unary minus intrinsic.
...
Also remove an extra indirection in the unary minus operator for Double.
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1422753004 .
2015-10-29 22:58:33 +01:00
Srdjan Mitrovic
cd98aff665
Getting rid of Isolate::current_zone() usage. Pass thread instead of isolate where it makes sense.
...
BUG=
R=hausner@google.com , johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1424703004 .
2015-10-26 15:31:50 -07:00
John McCutchan
2844eb86ca
Service isolate requests Observatory assets from embedder
...
- Provide a new callback to Dart_Initialize that will be called when the service isolate needs the Observatory assets
- Move asset management code out of embedder and into common dart:_vmservice
- Use the tar format as the archive format
- Add build script to generate .cc file containing the archive
- Add a simple tar parser to service isolate
This makes it possible for embedders to not bake Observatory into their executable but instead load it off disk or over the network. The standalone embedder still links Observatory into the executable.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1411853003 .
2015-10-26 07:21:23 -07:00
Ivan Posva
1fa2ef874d
- Rollback packageConfig/File/Spec updates for 1.13.
...
BUG=24691
R=sethladd@google.com
Review URL: https://codereview.chromium.org/1409343007 .
2015-10-22 16:22:17 -07:00
Siva Annamalai
99abe7d883
- Some cleanup of dynamic_type usage.
...
- Avoid egregious creation of handles in Class::CreateInvocationDispatcher
R=regis@google.com
Review URL: https://codereview.chromium.org/1409113006 .
2015-10-21 17:24:10 -07:00
John McCutchan
f55de246ec
More timeline cleanups
...
- Blocks are associated with threads and not isolates.
- Fix isolate filters when iterating over blocks and events.
- Always add the isolateNumber argument when serializing events.
- Add new (kSerializedJSON) EventType for events already serialized to JSON.
- Have events coming from Dart code use the standard event structure w/ type = kSerializedJSON.
- Remove now unused DartTimelineEvent and machinary.
- Dart and C++ events now use the same structures and system.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1411783004 .
2015-10-20 09:14:23 -07:00
Srdjan Mitrovic
465cf10a7c
Remove some Isolate::current_zone() calls, as it gets the zone from mutator thread not the current thread
...
BUG=
R=zra@google.com
Review URL: https://codereview.chromium.org/1414493003 .
2015-10-19 10:27:36 -07:00
Regis Crelier
09954546fb
Add a 'secure' constructor to Random in dart:math returning a cryptographically
...
secure random generator which reads from the entropy source provided by the
embedder for every generated random value.
Add a test.
Fixes #1746 .
R=lrn@google.com
Review URL: https://codereview.chromium.org/1398453004 .
2015-10-15 10:16:03 -07:00
Srdjan Mitrovic
e520dd567f
Remove isolate argument from handle allocation: Part I
...
BUG=
R=hausner@google.com
Review URL: https://codereview.chromium.org/1393373003 .
2015-10-12 11:32:08 -07:00
Ivan Posva
60eab65aa0
- Implement package map parameter when spawning isolate.
...
BUG=
R=lrn@google.com
Review URL: https://codereview.chromium.org/1403693002 .
2015-10-12 09:05:37 -07:00
Lasse R.H. Nielsen
57f4827c76
Rename [packages] to [packageMap] as Isolate.spawnUri parameter.
...
This matches the static [packageMap] getter on Isolate.
Fixes issue #24545 .
BUG= http://dartbug.com/24545
R=floitsch@google.com
Review URL: https://codereview.chromium.org/1401713002 .
2015-10-12 16:31:48 +02:00
John McCutchan
1a0066816d
Add support for emitting asynchronous timeline events from Dart code
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1397823002 .
2015-10-09 10:21:02 -07:00
Zachary Anderson
bb7f3a7501
Fixes RawReceivePort.hashCode
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1386253003 .
2015-10-08 13:06:49 -07:00
John McCutchan
4831a1a315
Properly split dart:_vmservice across sdk and runtime
...
- This is needed to satisfy the GN build system (mojo, flutter).
- It also makes dart:_vmservice even more regular with othe rlibraries.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1396603002 .
2015-10-07 13:19:55 -07:00
John McCutchan
535a9715ac
Remove deprecated dart:profiler library
...
Fixes #24510
R=turnidge@google.com
Review URL: https://codereview.chromium.org/1398433002 .
2015-10-07 10:01:33 -07:00
Srdjan Mitrovic
8c7a94e9f4
Preparation for moving reusable handles to thread and more cleanups: isolate -> thread based handle allocation.
...
BUG=
R=koda@google.com
Review URL: https://codereview.chromium.org/1384403002 .
2015-10-06 10:17:12 -07:00
John McCutchan
150e8d2757
Move dart:_vmservice native entries into bootstrap natives
...
With this CL the dart:_vmservice library is made regular with respect to other dart: builtin libraries.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1390803002 .
2015-10-06 09:16:39 -07:00
John McCutchan
af0ab36f7c
Make dart:_vmservice a proper builtin library
...
- Drops custom resource table for sources.
- Stops loading dart:vmservice library by sources.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1387043002 .
2015-10-06 07:58:14 -07:00
Lasse R.H. Nielsen
da8baacae4
Make root-zone handleUncaughtError rethrow with the correct stack.
...
Adds _rethrow function which reifies the stack trace of an async
error on the VM. There is no corresponding JS functionality, it still
just throws an AsyncError wrapper.
Fixes issue #24163
BUG= http://dartbug.com/24163
R=iposva@google.com , turnidge@google.com
Review URL: https://codereview.chromium.org//1383983002 .
2015-10-05 08:16:52 +02:00
Ivan Posva
ba6c0ace3e
- Add getters for the current packageRoot or packageMap to the Isolate class.
...
- Simplify loading in builtin.dart.
BUG=
R=asiva@google.com , lrn@google.com
Review URL: https://codereview.chromium.org//1334353002 .
2015-10-03 06:53:13 -07:00
John McCutchan
7b01e5fa11
Fix Mac dartium build
...
BUG=
Review URL: https://codereview.chromium.org/1380103006 .
2015-10-01 11:26:41 -07:00
John McCutchan
03b41129a2
Add Timeline to dart:developer
...
- This CL only adds support for synchronous blocks of time. A follow up CL will add asynchronous blocks of time.
- Reports true thread id to tracing system. This is an improvement over Mojo's tracing helper.
- Dart events are included in individual isolate traces and global traces obtained via the embedders API.
- Dart events are included in the write to disk path (--timeline_dir).
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1377663002 .
2015-10-01 09:30:47 -07:00
Lasse R.H. Nielsen
232a9d687e
Add "environment" parameter to spawnUri for String.fromEnvironment support.
...
This completes the parameters corresponding to official command line parameters
for the VM/dart2js.
R=floitsch@google.com , iposva@google.com , sigmund@google.com
Review URL: https://codereview.chromium.org//1350053002 .
2015-09-22 12:29:40 +02:00
Ryan Macnak
5ee2da4475
Spec says empty namedArguments is const {}, not const <Symbol, dynamic>{}.
...
BUG=http://dartbug.com/24331
R=gbracha@google.com
Review URL: https://codereview.chromium.org//1359503002 .
2015-09-18 17:05:35 -07:00
regis
e8139d4d92
Fix right shifting of a Mint value by an amount larger than 63.
...
Add regression test.
Enhance existing bit shift test.
Fixes #24283
R=ager@google.com
Review URL: https://codereview.chromium.org//1338233002 .
2015-09-14 18:20:48 +08:00
regis
9ca5ca6316
Fix a typo in Bigint dart implementation of modInverse.
...
Fixes #24324
Review URL: https://codereview.chromium.org//1344483003 .
2015-09-14 12:03:50 +08:00
Todd Turnidge
b0ca0789be
Fix a variety of service protocol bugs.
...
Add documentation for breakpoint.
Fix Instance.pattern documentation.
Fix Instance.bytes documentation.
Add class field for null instances.
Fix documentation of Context and closureContext.
Make getObject return Collected for deleted breakpoints.
Closes #24247
Closes #24249
Closes #24309
Closes #24325
Closes #24326
Closes #24327
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//1341473002 .
2015-09-11 12:29:21 -07:00
Lasse R.H. Nielsen
ff65079c47
Add packages parameter to Isolate.spawnUri.
...
No implementation supplied, marked as "not implemented everywhere".
BUG= http://dartbug.com/23951
R=iposva@google.com , sigmund@google.com
Review URL: https://codereview.chromium.org//1323373002 .
2015-09-11 13:07:54 +02:00
Lasse R.H. Nielsen
7464947ca0
Make Map constructor external to allow dart2js to specialize it.
...
Review URL: https://codereview.chromium.org//1330303002 .
2015-09-11 13:06:09 +02:00
Lasse R.H. Nielsen
d755dd65b9
Update range errors to agree on the numbers.
...
Also ensure that typed-data errors are consistent with other lists.
Fixes issue #24295
BUG= http://dartbug.com/24295
R=floitsch@google.com , iposva@google.com , sra@google.com
Review URL: https://codereview.chromium.org//1318943005 .
2015-09-11 13:05:36 +02:00
Siva Annamalai
79ef28317f
Changes to prepare for allowing script snapshots to be taken after running the main application:
...
- Rename accessors of class Field to make it more apparent as to what is being accessed (static field values or instance field offsets
- Use precompiled initializer state (Used only during precompilation) to also store saved initial value of static fields (Used only during application snapshot generation)
BUG=
R=hausner@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org//1289643005 .
2015-09-04 11:03:46 -07:00
Florian Schneider
7e40108ff5
VM: Simplify irregexp entry stub.
...
Pass on the incoming arguments descriptor when invoking an irregexp function.
Avoiding loading an arguments descriptor in the intrinsic code also allows
generated regexp code in precompiled code.
Loading a new descriptor is not necessary since the arguments are already on
the stack in the right order.
Use named constants for parameter indices in the regexp assembler.
BUG=
R=srdjan@google.com
Review URL: https://codereview.chromium.org//1305993005 .
2015-09-04 10:06:02 +02:00
Srdjan Mitrovic
d4365bc6f4
Lookup getter/setter symbols before alllocating them, thus eliminating extra String allocations in new space.
...
Various old space allocations, cleanups.
Add a test for Symbols concatenation.
BUG=
R=hausner@google.com
Review URL: https://codereview.chromium.org//1320673012 .
2015-09-03 14:09:34 -07:00
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
John McCutchan
7052bd6bed
Rework service extensions to be safe
...
- When scheduling a service extension to be invoked, store the closure in an array held in the isolate.
- At the tail of IsolateMessageHandler::HandleMessage, invoke all pending service extension closures.
R=iposva@google.com , turnidge@google.com
Review URL: https://codereview.chromium.org//1299493007 .
2015-08-27 11:23:39 -07:00
Seth Ladd
26eaf632cf
removes a return from a void function
...
BUG=
Review URL: https://codereview.chromium.org//1305583003 .
2015-08-20 13:40:29 -07:00
Ryan Macnak
360b40a599
Update return type of dart2js patch of dart:developer.log.
...
Review URL: https://codereview.chromium.org//1302823002 .
2015-08-19 13:42:53 -07:00
Florian Loitsch
debf1d6f7c
Don't zone-register async callbacks for every await call in the VM.
...
This has the nice side-effect that the stack_trace package provides nicer chains.
Fixes issue 23394.
R=hausner@google.com
Committed: https://github.com/dart-lang/sdk/commit/4dae43d63727268f2e0cc45d6020246eb49177b8
Reverted: https://github.com/dart-lang/sdk/commit/cb4f9fc925c5a92c6cf756751e38296383f66507
Review URL: https://codereview.chromium.org//1274133002 .
2015-08-17 19:26:50 +02:00
Florian Loitsch
cb4f9fc925
Revert "Don't zone-register async callbacks for every await call in the VM."
...
This reverts commit 4dae43d637 .
Review URL: https://codereview.chromium.org//1296973002 .
2015-08-17 16:43:35 +02:00
Florian Loitsch
4dae43d637
Don't zone-register async callbacks for every await call in the VM.
...
This has the nice side-effect that the stack_trace package provides nicer chains.
Fixes issue 23394.
R=hausner@google.com
Review URL: https://codereview.chromium.org//1274133002 .
2015-08-17 15:58:19 +02:00
Lasse R.H. Nielsen
edff0face7
Make String.allMatches lazy.
...
R=floitsch@google.com , iposva@google.com
Review URL: https://codereview.chromium.org//1273713003 .
2015-08-12 11:01:21 +02:00
Florian Schneider
b19d518ede
VM: Use const instead of final for constants in runtime libraries.
...
It does not make a difference for optimized code (final does not help in
optimized code either btw), but allows using those constants directly in
unoptimized code.
BUG=
R=srdjan@google.com
Review URL: https://codereview.chromium.org//1284873002 .
2015-08-12 09:40:22 +02:00