koda@google.com
1d7ca12fdc
Compact LinkedHashMap/Set implementation.
...
Add GC-friendly replacement for default Map/Set:
* open-addressing hash table, avoiding the overhead of chained entries
* index separate from the keys/values, allowing more of it to fit in the cache
* new keys are always appended, to allow insertion-order iteration
* spare bits in index entries are used to store hashes
* index is typed data, so can be ignored by GC
Enable it with --use_compact_hash (disabled by default).
Reduces Dart2JS compilation time for huge codebase (N=200) by ~30%, due to reduced time in GC. Slightly slower for small maps and maps with deletions: json benchmarks regress by ~5%.
R=vegorov@google.com
Review URL: https://codereview.chromium.org//915323002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43840 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-18 13:58:32 +00:00
iposva@google.com
98e0500c87
- Remove obsolete stack trace functions.
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org//933623003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43802 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-16 22:53:19 +00:00
rmacnak@google.com
511c997316
Implement DeclarationMirror.location for all but ParameterMirrors.
...
- Mark NativeFieldWrapper classes as synthetic.
- Mark ClassID fields as synthetic.
BUG=http://dartbug.com/22378
R=gbracha@google.com , hausner@google.com
Review URL: https://codereview.chromium.org//922023002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43784 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-13 23:32:20 +00:00
hausner@google.com
2487c76886
Add support for sync* and yield and yield*
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org//888463004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43516 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-05 18:36:40 +00:00
regis@google.com
a5ee233d1b
Make Bigint instances immutable by removing all setters.
...
This required rewriting a large portion of bigint.dart.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//842033005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43492 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-04 23:56:23 +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
lrn@google.com
ab2d914ae3
Avoid extra duplication of substrings during string.replaceAll.
...
R=asiva@google.com , zerny@google.com
Review URL: https://codereview.chromium.org//858543002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43059 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-22 08:27:42 +00:00
iposva@google.com
fd69128004
- Allow an isolate to be started in paused state.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//822803003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42576 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-30 23:52:37 +00:00
lrn@google.com
cf724d70a9
Add Isolate.current getter, returning the current isolate as an Isolate object.
...
R=floitsch@google.com
Review URL: https://codereview.chromium.org//771993003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42499 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-19 07:04:29 +00:00
iposva@google.com
320ffa23a1
- Implement hashCode and == for Capability.
...
R=lrn@google.com
Review URL: https://codereview.chromium.org//778983002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42102 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-04 12:17:48 +00:00
lrn@google.com
8bba32d131
Make String.fromCharCodes take start/end.
...
This avoids having to make a sublist of a list of character codes before passing it to String.fromCharCodes.
new String.fromCharCodes(codes.sublist(start, end))
becomes just
new String.fromCharCodes(codes, start, end)
R=floitsch@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//515183002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40672 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-25 10:45:24 +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
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
regis@google.com
0220e41d72
New bigint implementation in the vm.
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org//509153003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40061 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 21:47:44 +00:00
vegorov@google.com
a1e2035eda
Improve List.sublist and List.toList for large lists.
...
- Merge array allocation and List._copyFromObjectArray to provide memmove fast path;
- In optimizer given v2 = CreateArray(v0, v1) fold v2.length load to v1;
BUG=
R=iposva@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//536043002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39831 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-03 20:36:01 +00:00
turnidge@google.com
c48496b873
Refactor isolate startup code in preparation for making isolate spawning more truly non-blocking.
...
Instead of passing a startup message to the new isolate, pass all
necessary information in to _startIsolate directly. The new isolate
sends its control port and capabilities back to the parent.
R=iposva@google.com
Review URL: https://codereview.chromium.org//456983002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39423 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-20 19:57:09 +00:00
koda@google.com
c22d3cf74a
Avoid UTF-8 decoding in num.toString.
...
4-7% speedup on SplayHarder.
Introduce _Num class to make Dart and VM hierarchies match and enable sharing code between integers and doubles.
R=iposva@google.com
Review URL: https://codereview.chromium.org//473673004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39383 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-19 21:15:39 +00:00
hausner@google.com
4258c115b4
Handle load errors in deferred code
...
IO errors on the URL of a deferred library are forwarded to the Future
that handles the deferred load. Syntax errors and finalization errors
are lethal, killing the isolate.
Review URL: https://codereview.chromium.org//419103003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38800 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-31 21:09:33 +00:00
koda@google.com
1cdcb12b4e
Add VM class for Map/LinkedHashMap.
...
Introduces a new internal class for the most common case, the default Map.
Passes all functionality tests.
Slow: Dart side simply calls into runtime for now.
Hidden behind "--use_internal_hash_map".
Add copies of hash map tests to exercise this implementation.
R=asiva@google.com
Review URL: https://codereview.chromium.org//380333002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38588 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-25 20:04:11 +00:00
iposva@google.com
5686b6a793
- Implement Isolate.pause and Isolate.resume.
...
- Implement a minimum Capability functionality.
R=asiva@google.com
Review URL: https://codereview.chromium.org//354763004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37982 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-03 12:56:02 +00:00
lrn@google.com
7a32a75dcc
Avoid unnecessary copying when parsing doubles.
...
R=sgjesse@google.com , vegorov@google.com
Review URL: https://codereview.chromium.org//368483004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37863 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-01 11:59:31 +00:00
srdjan@google.com
d44423b766
Add VM internal Dart class 'ClassID' used to manage class-ids of known classes. Next CL: add constant fields corresponding to each class id (smiCid, oneByteStringCid, etc).
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//345223003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37567 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-20 20:56:55 +00:00
hausner@google.com
4eac05607f
Lazy loading of deferred libraries
...
Defer reading of source code of deferred libraries until the
Dart code executes the loadLibrary() call.
R=iposva@google.com
Review URL: https://codereview.chromium.org//328923002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37334 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-13 22:43:31 +00:00
rmacnak@google.com
3b5ff25469
Lay waste to ClosureMirror.findInContext.
...
BUG=http://dartbug.com/18741
R=gbracha@google.com , iposva@google.com
Review URL: https://codereview.chromium.org//276043003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36704 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 19:35:58 +00:00
johnmccutchan@google.com
850074a704
Refactor 'dart:profiler' UserTag API
...
- Each isolate starts off with a 'Default' UserTag set.
- A null tag cannot be set.
- Calls to clearCurrentTag() should be replaced with a call to UserTag.defaultTag.makeCurrent().
- makeCurrent returns the previously current tag.
This allows for the following pattern to work:
callee() {
var old = calleeTag.makeCurrent();
...
old.makeCurrent();
}
caller() {
var old = callerTag.makeCurrent();
...
callee();
assert(getCurrentTag() == callerTag);
...
old.makeCurrent();
}
R=iposva@google.com , zra@google.com
Review URL: https://codereview.chromium.org//266913010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35810 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-06 17:07:26 +00:00
iposva@google.com
fd8565b071
- Add a minimal implementation of Capability.
...
- Make RawReceivePort and SendPort VM internal objects.
- Rationalize the creation of ports and their handling within the VM.
R=asiva@google.com
Review URL: https://codereview.chromium.org//243973002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35325 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 19:44:03 +00:00
johnmccutchan@google.com
8f0056371d
Initial UserTag and dart:profiler library
...
R=asiva@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//230863005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34949 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 22:32:45 +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
hausner@google.com
ed24226376
Support deferred library prefix syntax
...
First step towards deferred library support:
- Parse the “deferred as” import clause.
- Implement p.loadLibrary() which returns a future that
completes when the library is loaded.
- Treat type annotations of deferred types as malformed.
- Throw NoSuchMethodError when calling functions from
unloaded libraries.
- Libraries are still read synchronously, but items in the
library won’t be visible through the deferred prefix until
the future returned by loadLibrary() completes.
Review URL: https://codereview.chromium.org//208323015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34481 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-27 21:20:47 +00:00
rmacnak@google.com
78ab60a0de
Implement MethodMirror.location in the VM.
...
R=gbracha@google.com , hausner@google.com
Review URL: https://codereview.chromium.org//211243009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34400 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-26 00:44:54 +00:00
rmacnak@google.com
f8c59de4d6
Clean up ClosureMirror.invoke(#call, ...).
...
R=asiva@google.com , gbracha@google.com
Review URL: https://codereview.chromium.org//196513004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33790 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-17 23:43:32 +00:00
iposva@google.com
383f9c03c2
- Avoid exposing the 64-bit state of the PRNG to Dart code.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//199263005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33778 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-17 21:27:24 +00:00
iposva@google.com
214ecc0e2a
- Do not rely on time to seed the default PRNG.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//200483003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33704 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-14 17:30:05 +00:00
srdjan@google.com
8de0c6eb8e
Fix performance of setRange by avoiding going to Lists.copy which can become polymorphic.
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//189443004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33540 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-11 16:56:55 +00:00
rmacnak@google.com
57dd1321d1
Reapply "Access to imports in the VM's runtime mirrors. Extend test coverage of the source mirrors."
...
Regenerate snapshot test due to change in the size of Namespace. Relate the types source mirror libraries dependencies to the runtime library dependencies.
BUG=http://dartbug.com/10360
Review URL: https://codereview.chromium.org//189843003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33441 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-07 19:00:20 +00:00
rmacnak@google.com
62ad4b82ce
Revert "Access to imports in the VM's runtime mirrors. Extend test coverage of the source mirrors."
...
Review URL: https://codereview.chromium.org//189293002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33402 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-06 22:45:29 +00:00
rmacnak@google.com
2d0e54a94d
Access to imports in the VM's runtime mirrors. Extend test coverage of the source mirrors.
...
BUG=http://dartbug.com/10360
R=gbracha@google.com , hausner@google.com
Review URL: https://codereview.chromium.org//154733003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33397 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-06 22:02:29 +00:00
lrn@google.com
0dbb989cb8
Add internal operation that converts a growable list to a fixed list.
...
The conversion breaks the original list, but doesn't copy data.
Currently only used in List.from(Iterable).
BUG= http://dartbug.com/9458
R=floitsch@google.com , iposva@google.com
Review URL: https://codereview.chromium.org//134893003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32896 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-21 13:15:16 +00:00
rmacnak@google.com
1c7fecac7e
Add TypeMirror.isSubtypeOf, TypeMirror.isAssignableTo, ClassMirror.isSubclassOf to the API, the VM runtime mirrors and the source mirrors.
...
BUG=http://dartbug.com/12439
BUG=http://dartbug.com/13856
R=gbracha@google.com , johnniwinther@google.com , regis@google.com
Review URL: https://codereview.chromium.org//126823004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32577 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-11 20:41:32 +00:00
rmacnak@google.com
00c96bfbbf
Optimize getField by caching a closure generated from eval.
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//144383007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32343 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-05 23:03:46 +00:00
johnmccutchan@google.com
9d80608b9c
Add Float64x2, Float64x2List, etc... with runtime and dart2js implementations
...
R=sra@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//148043003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32196 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-31 15:28:05 +00:00
srdjan@google.com
e16402e56e
Fix 16099: Invocation's positionalArguments contains an immutable array.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//139663003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31845 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-15 19:14:45 +00:00
srdjan@google.com
5a093d9f9c
Fix 15413: setRange for views with overlapping buffers.
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//124383007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31528 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-07 00:48:46 +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
rmacnak@google.com
7809fb4276
Remove dead isLocalPort from the VM mirrors implementation.
...
Review URL: https://codereview.chromium.org//115153007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31199 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-17 18:02:14 +00:00
rmacnak@google.com
e5d7ada6e9
VM: Support calling through getters in InstanceMirror.delegate.
...
Implement without accessing private members of dart:core. Fix language test expecting wrong return value.
BUG=http://dartbug.com/15138
R=fschneider@google.com
Review URL: https://codereview.chromium.org//114713002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31140 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-13 18:33:45 +00:00
ajohnsen@google.com
03c7cf69f3
Add optimized String.fromCharCodes path for Uint8List and Int8List.
...
BUG=
R=srdjan@google.com
Review URL: https://codereview.chromium.org//74423005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30496 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-21 06:12:01 +00:00
lrn@google.com
a43c644f63
Make SendPortImpl_internalSend not take a reply port as argument.
...
The reply port is still there in the internal Message structure,
where it is used by control messages.
BUG= http://dartbug.com/14731
R=fschneider@google.com
Review URL: https://codereview.chromium.org//73783002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30302 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-15 11:28:23 +00:00
rmacnak@google.com
1dcc9ea681
Ensure constructorName symbols include private manglings.
...
R=asiva@google.com , gbracha@google.com
Review URL: https://codereview.chromium.org//53883002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30178 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-11 23:08:38 +00:00