Lasse R.H. Nielsen
2890a7a2a9
Add Resource class. Currently unimplemented.
...
R=herhut@google.com , iposva@google.com
Review URL: https://codereview.chromium.org//1181663002 .
2015-06-22 15:05:14 +02:00
Regis Crelier
a192ef4acb
Implement gcd in sdk.
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org//1199513003 .
2015-06-19 13:40:01 -07:00
Regis Crelier
16bb52b88d
Implement modInverse for an even modulus.
...
Update test.
Fixes #23502
R=srdjan@google.com
Review URL: https://codereview.chromium.org//1188843004 .
2015-06-17 13:50:30 -07:00
Ryan Macnak
98b9ff6a30
Fix reflective NoSuchMethodErrors to match their non-reflective counterparts when due to argument mismatches.
...
BUG=http://dartbug.com/23266
R=asiva@google.com
Review URL: https://codereview.chromium.org//1182613004 .
2015-06-16 09:42:11 -07:00
Regis Crelier
9edc6e5a6d
Detect zero receiver of modInverse (may not converge and time out
...
in that case).
See #23502
Review URL: https://codereview.chromium.org//1177063002 .
2015-06-10 16:40:24 -07:00
Regis Crelier
f6f338ce67
Implement modInverse (bigint version does not support even modulus yet).
...
Added tests.
See #23502
R=srdjan@google.com
Review URL: https://codereview.chromium.org//1174513004 .
2015-06-10 15:01:46 -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
Ryan Macnak
6545e8539e
Fix isAssignableTo in VM mirrors to use subtype (<:) rather than moreSpecificThan (<<).
...
BUG=http://dartbug.com/22852
R=gbracha@google.com
Review URL: https://codereview.chromium.org//1156583005
2015-06-04 12:25:59 -07:00
Lasse R.H. Nielsen
de68aaa595
Clean up JSON parsing code.
...
Fixes some hard-to-find bugs and warnings.
Improves the layout of all the constants.
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//1150033013
2015-06-04 14:55:32 +02:00
Srdjan Mitrovic
7b04897743
Fix fix
...
BUG=
Review URL: https://codereview.chromium.org//1166523005
2015-06-03 12:39:59 -07:00
Srdjan Mitrovic
12da412110
Fix build
...
BUG=
Review URL: https://codereview.chromium.org//1160623004
2015-06-03 11:22:46 -07:00
Srdjan Mitrovic
c0824e7725
Fix 23563: double unary- operator unstable for NANs
...
BUG=
R=koda@google.com
Review URL: https://codereview.chromium.org//1160453003
2015-06-03 11:00:28 -07:00
Lasse R.H. Nielsen
5a843ebbf3
Add "checked" parameter to Isolate.spawnUri.
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//1154673004
2015-06-03 12:32:52 +02:00
Ryan Macnak
eca0d72abe
Provide a logical view of VM-internal maps in Observatory.
...
BUG=http://dartbug.com/20551
BUG=http://dartbug.com/21185
R=koda@google.com
Review URL: https://codereview.chromium.org//1150103005
2015-06-02 11:38:39 -07:00
Daniel Andersson
6090af8f0b
Serialize maps without hashes.
...
Re-generate the indices after deserialization.
This is a more compact representation, and also fixes the issue with identity hash codes not being portable between isolates.
BUG=21675
R=asiva@google.com
Review URL: https://codereview.chromium.org//1151013005
2015-06-02 09:04:37 -07:00
Ryan Macnak
4102b0c446
Canonicalize mixin type during class finalization. Add asserts that most types are canonical.
...
R=regis@google.com
Review URL: https://codereview.chromium.org//1167583002
2015-05-29 15:29:04 -07:00
Lasse R.H. Nielsen
babcd4e9c0
Revert "Make EfficientLength public, as EfficientLengthIterable."
...
It's still not a good solution for detecting an Iterable with an efficient
length. It's not inherited by, e.g., a DelegatingIterable wrapper or similar
generic Iterable transformers.
Keep this as an internal optimization for quickly detecting the most common
efficient-length Iterable classes (List, Set, Queue, Map.keys/values), but
don't make it public.
A *real* solution would be adding a hasEfficientLength getter to Iterable, or
adding an efficientLength getter that may return null if it's not efficient.
This would something that a wrapper can attach to.
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//1154263003
2015-05-29 12:52:45 +02:00
Lasse R.H. Nielsen
cf4eaae5a6
Change RangeError instances to use RangeError.range.
...
This avoids using the (sometimes confusing) "[...)" notation for half-open ranges.
Also change argument tests to simpler interval tests, and move error handling to the end of the functions.
Mostly in VM typed-data libraries.
R=sgjesse@google.com , srdjan@google.com
Committed: https://github.com/dart-lang/sdk/commit/932bcc6901d70492c6f1b8d000b9555a0db62f4b
Review URL: https://codereview.chromium.org//1132603003
2015-05-29 10:50:20 +02:00
Daniel Andersson
ea46192ca3
VM-internalize the default Map implementation.
...
Make the compact linked hash map, which is the default implementation for Map
(including map literals), a VM-internal class.
This makes it easy to have more efficient serialization of maps (although for
now, the implementation is straight-forward).
Refactor the compact hash class hierarchy to enable the VM-internal class and
the rest (also the Set classes) to share a maximal amount of code, by using
two different bases for implicit/explicit fields.
Remove existing proof-of-concept, C++-based internal VM-class.
BUG=http://dartbug.com/22982
R=asiva@google.com
Review URL: https://codereview.chromium.org//1151523002
2015-05-28 09:32:54 -07:00
Lasse R.H. Nielsen
9e175d27d7
Revert "Change RangeError instances to use RangeError.range."
...
Method hashes needs to be updated.
Review URL: https://codereview.chromium.org//1160903002
2015-05-28 10:46:15 +02:00
Lasse R.H. Nielsen
932bcc6901
Change RangeError instances to use RangeError.range.
...
This avoids using the (sometimes confusing) "[...)" notation for half-open ranges.
Also change argument tests to simpler interval tests, and move error handling to the end of the functions.
Mostly in VM typed-data libraries.
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//1132603003
2015-05-28 10:34:03 +02:00
Florian Schneider
96e4c4d3c6
VM: Fix bugs with missing deoptimization environment and int32x4 constructor
...
It can occur that we don't have exact type information at UnboxUint32 instructions,
but range information concludes that the instruction can't deoptimize. In this case,
we can assume the input must be a smi or mint if the range fits into mint range.
The generated coe for this case was missing on x64 and arm64. It was already added
for ia32, ARM and MIPS (see https://codereview.chromium.org//770303002 )
The optimized instruction of the Int32x4 constructor was incorrectly using uint32 as
input representation, instead of int32.
R=iposva@google.com , vegorov@google.com
Review URL: https://codereview.chromium.org//1148943004
2015-05-28 10:09:49 +02: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
John McCutchan
d7450e43fb
Update GN build files for Mojo roll
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//1142293007
2015-05-22 11:32:14 -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
John McCutchan
6e42aec4f6
Deprecate 'dart:profiler' and move functionality to 'dart:developer'
...
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//1133713006
2015-05-18 11:31:20 -07:00
johnmccutchan@google.com
f01c1490f7
Revert 45783
...
BUG=
Review URL: https://codereview.chromium.org//1138993005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45784 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-14 00:32:32 +00:00
johnmccutchan@google.com
95515238cc
Move 'dart:profiler' contents into 'dart:developer' and remove 'dart:profiler'
...
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//1139503002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45783 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-13 23:48:04 +00:00
lrn@google.com
5351182e38
Add Map.unmodifiable constructor.
...
R=sgjesse@google.com , sra@google.com
Review URL: https://codereview.chromium.org//1127533002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45733 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 11:09:13 +00:00
rmacnak@google.com
016214f002
Add Debugger.inspect. 1976 here we come!
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//1132153002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45664 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 22:18:43 +00:00
johnmccutchan@google.com
1f851efdbb
Rename 'dart:debugger' to 'dart:developer'
...
- Rename 'dart:debugger' to 'dart:developer'
- Make 'breakHere' and 'breakHereIf' top level functions.
R=iposva@google.com
Review URL: https://codereview.chromium.org//1132113002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45658 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 21:24:57 +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
lrn@google.com
92c526b2a2
Make EfficientLength public, as EfficientLengthIterable.
...
R=iposva@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//1104063002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45556 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-06 09:00:45 +00:00
johnmccutchan@google.com
a19cd071e5
Add 'dart:debugger' library
...
- Add the 'dart:debugger' library.
- Add the 'Debugger' class.
- Add explicit Dart breakpoint triggered by a call to: Debugger.breakHere();
- Add Debugger.breakHereIf(bool expr)
R=hausner@google.com , turnidge@google.com
Review URL: https://codereview.chromium.org//1116263004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45529 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-05 17:05:37 +00:00
rmacnak@google.com
a6e42c48b5
Deal with deferred loading in the VM mirrors.
...
- Invalidate MirrorSystem.libraries when a load completes.
- Recheck if a deferred import's target has been loaded before failing.
- Allow loading libraries from a LibraryDepedencyMirror.
- Propogate compile-time error when attempting to reflect a deferred type.
BUG=http://dartbug.com/22592
R=asiva@google.com , gbracha@google.com
Review URL: https://codereview.chromium.org//1095903002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45444 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-28 23:47:45 +00:00
srdjan@google.com
6a524865a1
Remove public int.is64Bit.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//1105453003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45407 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-24 18:53:05 +00:00
rmacnak@google.com
327b85d956
Move symbol demangling to dart:_internal to remove dart:core dependency on dart:mirrors.
...
BUG=
R=srdjan@google.com
Review URL: https://codereview.chromium.org//1107613002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45405 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-24 17:49:58 +00:00
rmacnak@google.com
e2c41789ee
Mirrors memory usage tweaks.
...
- Don't build and cache vestigial members/constructors maps.
- Avoid creating multiple LibraryMirrors for the same library.
- Store infrequently used method flags as a bitfield.
- Don't cache MethodMirror source.
mirrors_reader_test final heap size: 10.8 -> 8.9 MB (-17.5%)
mirrors_reader_test time: 1.55 -> 1.33 seconds (-14.2%)
R=asiva@google.com
Review URL: https://codereview.chromium.org//1080393006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45352 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-22 17:51:49 +00:00
lrn@google.com
a8036defab
Ensure that native function throws on bad argument instead of aborting.
...
Review URL: https://codereview.chromium.org//1072193006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45343 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-22 12:40:45 +00:00
lrn@google.com
f139d0e93b
Add List.unmodifiable constructor.
...
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//1056353004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45334 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-22 10:48:22 +00:00
regis@google.com
c983ebf506
Fix bigint division (issue 23238).
...
Add regression test.
R=zra@google.com
Review URL: https://codereview.chromium.org//1062753004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45253 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-17 20:30:29 +00:00
rmacnak@google.com
9f56280609
Add asserts that isolates have a root library set up before they become runnable.
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//1073983010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45224 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-17 00:44:47 +00:00
sra@google.com
6467b4302d
dart2js implementation of StringBuffer.writeAll that optimizes better.
...
Sometimes we can avoid the StringBuffer object:
t1 = new P.StringBuffer(leftDelimiter);
t1.writeAll$2(parts, ", ");
t1 = t1._contents += rightDelimiter;
return t1.charCodeAt(0) == 0 ? t1 : t1;
-->
t1 = P.StringBuffer__writeAll(leftDelimiter, parts, ", ") + rightDelimiter;
return t1.charCodeAt(0) == 0 ? t1 : t1;
Also updated tests with missing cases.
R=lrn@google.com
Committed: https://code.google.com/p/dart/source/detail?r=45184
Reverted: https://code.google.com/p/dart/source/detail?r=45186
Review URL: https://codereview.chromium.org//1086043002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45188 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-15 23:13:29 +00:00
sra@google.com
18dd1aa826
Revert "dart2js implementation of StringBuffer.writeAll that optimizes better."
...
StringBuffer.writeAll is expected by pub tests to not be patched or inlined. I'll fix that and redo.
TBR=lrn@google.com
Review URL: https://codereview.chromium.org//1085423003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45186 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-15 22:55:05 +00:00
sra@google.com
54718dc6e2
dart2js implementation of StringBuffer.writeAll that optimizes better.
...
Sometimes we can avoid the StringBuffer object:
t1 = new P.StringBuffer(leftDelimiter);
t1.writeAll$2(parts, ", ");
t1 = t1._contents += rightDelimiter;
return t1.charCodeAt(0) == 0 ? t1 : t1;
-->
t1 = P.StringBuffer__writeAll(leftDelimiter, parts, ", ") + rightDelimiter;
return t1.charCodeAt(0) == 0 ? t1 : t1;
Also updated tests with missing cases.
R=lrn@google.com
Review URL: https://codereview.chromium.org//1086043002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45184 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-15 22:02:05 +00:00
rmacnak@google.com
26548a2f3d
Remove some duplication in code that extracts the source for a function.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//1071703002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45145 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-14 19:41:38 +00:00
lrn@google.com
e96a973492
Reduce timer stack overhead by getting immediate callback and run it, instead of calling through function.
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//892963002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45097 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-13 12:35:40 +00:00
lrn@google.com
1b208bd6e6
Update Isolate API.
...
Remove AS_EVENT as priority of ping/kill. It wasn't very usable or predictable.
Make priority consistently named and a named parameter.
Add response object to ping/addExitListener so it doesn't have to send null.
This is useful for cases where you want to use the same receive port for
multiple purposes.
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//1074223002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45092 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-13 10:29:54 +00:00
iposva@google.com
320b0e5541
- Remove JSCRE from the runtime.
...
R=vegorov@google.com
Review URL: https://codereview.chromium.org//1071713003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44987 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-08 23:59:23 +00:00