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
Johnni Winther
411246ccc7
Handle .fromEnvironment and incompatible constructor invocations
...
BUG=
R=karlklose@google.com
Review URL: https://codereview.chromium.org//1161823004
2015-06-02 10:44:19 +02:00
Asger Feldthaus
bd4e1d726f
dart2js cps: Track underlying value of interceptors in type propagation.
...
BUG=
R=karlklose@google.com
Review URL: https://codereview.chromium.org//1154173002
2015-06-01 11:19:36 +02: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
Karl Klose
993338408e
cps_ir: Handle malformed type arguments and type checks.
...
R=asgerf@google.com
Review URL: https://codereview.chromium.org//1156373008
2015-05-29 09:53:35 +02:00
Asger Feldthaus
f1bbc3bb2d
dart2js cps: 'is' checks on types with type arguments.
...
R=karlklose@google.com
Committed: https://github.com/dart-lang/sdk/commit/00c33fb1347fc5c44a324f9503c7c57969e88ca3
Reverted: https://github.com/dart-lang/sdk/commit/f0c4e31174996e6259fab283af14c49aa8faf28c
Review URL: https://codereview.chromium.org//1161683002
2015-05-27 14:14:07 +02:00
Asger Feldthaus
f0c4e31174
Revert "dart2js cps: 'is' checks on types with type arguments."
...
This reverts commit 00c33fb134 .
TBR=karlklose@google.com
BUG=
Review URL: https://codereview.chromium.org//1161793002
2015-05-27 13:54:07 +02:00
Asger Feldthaus
00c33fb134
dart2js cps: 'is' checks on types with type arguments.
...
R=karlklose@google.com
Review URL: https://codereview.chromium.org//1161683002
2015-05-27 13:45:39 +02:00
Asger Feldthaus
f42a0ef25c
dart2js cps: Always use interceptors and type tags for 'is' checks.
...
"x is Foo" will become getInterceptor(x).$isFoo
Testing against a type with type arguments is still a giveup().
This test always works, but is not very fast. For instance, testing
against an int should be "typeof x === 'number' && Math.floor(x) === x".
Following an offline discussion with Karl, the plan is to rewrite
'is'-checks to more fine-grained tests in a CPS optimization pass,
probably the type propagator.
Concretely, we plan to introduce IR nodes like TypeOfTest, FloorTest,
InstanceofTest, etc, which optimization phases can introduce under the
right circumstances. That way, the code generation phase remains simple.
BUG=
R=karlklose@google.com
Review URL: https://codereview.chromium.org//1144163004
2015-05-26 17:50:48 +02:00
Karl Klose
bd612bbec3
cps-ir: Add test suppressions for new tests.
...
TBR=johnniwinther@google.com
Review URL: https://codereview.chromium.org//1156673002
2015-05-22 12:43:19 +02:00
Lasse R.H. Nielsen
dcf0286f53
Add Iterable.empty constructor.
...
Convenience constructor giving an easy/quick way to create an empty iterable.
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//1152483002
2015-05-22 10:39:58 +02:00
Karl Klose
36d3e0d0e6
Update cps-ir test expectations.
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//1152133003
2015-05-22 09:58:58 +02:00
Asger Feldthaus
ccee558a5b
dart2js cps: Access to lazily initialized fields.
...
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1136843006
2015-05-19 10:05:09 +02:00
sra@google.com
28cfbd8f44
Make more use of ArgumentError.value in js_lib.
...
This helps surface error values in the messages which helps make captured errors understandable.
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1137233004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45782 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-13 22:16:50 +00:00
karlklose@google.com
9b32c9e673
Implement raw list checks.
...
R=asgerf@google.com
Review URL: https://codereview.chromium.org//1123343008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45762 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-13 11:58:45 +00:00
asgerf@google.com
f5f1eb643d
dart2js cps: Introduce GetStatic/SetStatic.
...
The GetStatic is used for reading static fields and tearing off
static methods.
Invoking a static getter/setter (not from a field) is still an
InvokeStatic, which IMO is the way it should remain.
BUG=
R=karlklose@google.com
Committed: https://code.google.com/p/dart/source/detail?r=45735
Reverted: https://code.google.com/p/dart/source/detail?r=45737
Review URL: https://codereview.chromium.org//1134063002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45738 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 14:19:40 +00:00
asgerf@google.com
961c805398
Revert "dart2js cps: Introduce GetStatic/SetStatic."
...
This reverts commit 28e4518df87c72cb8e23fe6d73b7750ad0f2183a.
TBR=karlklose@google.com
BUG=
Review URL: https://codereview.chromium.org//1136523008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45737 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 13:53:15 +00:00
asgerf@google.com
2c90643171
dart2js cps: Introduce GetStatic/SetStatic.
...
The GetStatic is used for reading static fields and tearing off
static methods.
Invoking a static getter/setter (not from a field) is still an
InvokeStatic, which IMO is the way it should remain.
BUG=
R=karlklose@google.com
Review URL: https://codereview.chromium.org//1134063002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45735 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 13:35:49 +00:00
karlklose@google.com
a31ba4242c
Adjust test expectations for dart2js_cps-ir.
...
TBR=johnniwinther@google.com
Review URL: https://codereview.chromium.org//1138033003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45705 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 18:33:14 +00:00
floitsch@google.com
f4a1b28077
Move isolate tests to lib/isolate.
...
Moves most tests that require dart:isolate to the isolate-directory in the tests section.
Also enables the string_from_environment_default_value_test which didn't have "_test" in its name.
R=lrn@google.com
Review URL: https://codereview.chromium.org//1133983002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45701 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 17:59:51 +00:00
karlklose@google.com
0eaa4d4717
cps-ir: Support compilation of methods that use interceptor calling convention.
...
This is a modified version of sra@'s CL https://codereview.chromium.org/1020243002/ with kmillikin@'s comments addressed.
R=sigurdm@google.com , kmillikin@google.com
Review URL: https://codereview.chromium.org//1109403002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45680 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 12:38:14 +00:00
kmillikin@google.com
6ab3c55366
Fix an assertion failure in dart2js.
...
In the CPS translation we assert that a mutable variable added to the CPS
term belongs to the function currently being compiled, which is reasonable.
However, in the JS backend this didn't work as written. The variable
element can report that it belongs to a Dart function, and the function
currently being compiled can be a synthesized .call method of a closure
class representing that Dart function.
The solution presented here is to plumb the mapping from Dart function to
closure class .call methods through to where the mutable variables are
created. It might be better, but a lot more complicated, to make the
variable elements able to correctly report their owner after closure
conversion.
R=asgerf@google.com , karlklose@google.com
BUG=
Review URL: https://codereview.chromium.org//1084413003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45636 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 08:58:00 +00:00
ricow@google.com
e92f697236
Remove dart2dart support from testing scripts and status files
...
I will leave it to the dart2js people to remove the support from the dart2js tools (there is also a bunch of comments still in code, do a git grep)
R=kustermann@google.com , floitsch@google.com , kmillikin@google.com
BUG=
Review URL: https://codereview.chromium.org//1126363003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45588 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 11:29:55 +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
lrn@google.com
7fe3363524
Fix SplayTreeMap.from ignoring the compare and isValidKey arguments.
...
BUG= http://dartbug.com/23387
R=wibling@google.com
Review URL: https://codereview.chromium.org//1127043002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45550 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-06 08:18:56 +00:00
karlklose@google.com
e8fa15c30a
Update dart2js-cps_ir test expectations.
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//1091143003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45371 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-23 08:40:49 +00:00
johnniwinther@google.com
19c838f3eb
Fix dart2dart new backend status.
...
BUG=
R=karlklose@google.com
Review URL: https://codereview.chromium.org//1083093005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45346 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-22 13:20:48 +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
lrn@google.com
b4d052c5da
Fix bug in DateTime.parse.
...
Used unescaepd "." to match "." in RegExp.
BUG= http://dartbug.com/22468
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//1091553005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45274 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-20 10:27:24 +00:00
karlklose@google.com
7dd2608820
Adjust test expectations for dart2js-cps-ir.
...
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1092013003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45236 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-17 11:45:51 +00:00
kmillikin@google.com
00e4ba52ea
CPS implementation of throw and rethrow.
...
Throw and rethrow are implemented as CPS expressions in tail position.
The CPS translation assumes that all expressions translate to a primitive
that is the value of the expression, and throw is an expression in Dart.
For simplicity of the translation, a non-tail throw Primitive is sometimes
used as a placeholder during the translation and removed immediately
afterward.
Both throw and rethrow are represented in the Tree IR. In the Dart backend,
throw translates to throw and rethrow translates to rethrow. In the JS
backend, throw translates to JS throw of a wrapped value. Rethrow is not
currently implemented for the JS backend, it bails out of the compiler.
R=asgerf@google.com
BUG=
Review URL: https://codereview.chromium.org//1092023002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45235 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-17 11:15:45 +00:00
lrn@google.com
a412878666
Fix typo in test, add check of error thrown.
...
R=karlklose@google.com
Review URL: https://codereview.chromium.org//1063603004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45233 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-17 10:55:30 +00:00
lrn@google.com
d8dbb4a60f
Add Uri.directory constructor.
...
Make Directory.uri getter use the new constructor.
This also fixes that the uri getter doesn't work correctly on Windows.
Add uri getter on file system entity.
BUG= http://dartbug.com/17065
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//1089183004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45227 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-17 08:56:03 +00:00
sra@google.com
39dfecbfb5
Revert "Change ListIterator to only check for concurrent modification at each iteration"
...
Revert "Fix ListIterator.iterator function hash for VM."
This is not as easy to optimize for dart2js as initially thought.
Revert this change while we discuss.
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1064053007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45216 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-16 18:53:39 +00:00
lrn@google.com
5a79c03e09
Change ListIterator to only check for concurrent modification at each iteration
...
in checked mode.
It also checks at the end in all cases.
Iteration only goes from 0 to the original length of the list.
This ensures that iterating a list while adding to it (like by x.addAll(x))
is caught instead of growing until out-of-memory.
For well-behaved programs this makes no difference since length and original
length stay the same.
Also, it means that calling moveNext again later, after increasing the length,
will not make iteration continue. After returning false, iteration is always
done.
However, it means that reducing the length causes an out-of-range read before
reaching the end, and before a concurrent modification error can happen.
R=sra@google.com
Review URL: https://codereview.chromium.org//1024843002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45198 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-16 09:07:58 +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
zra@google.com
86bfd7cb30
Adds a simarmv5te build and test target.
...
Also:
- Removes command line flags to choose simulated arm version.
I think we should use build targets instead, like in this change,
to make building and testing more obvious.
- Skips pkg tests on all simulators.
R=regis@google.com , ricow@google.com
Review URL: https://codereview.chromium.org//1077823002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45181 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-15 20:44:43 +00:00
lrn@google.com
5cbb84dfa2
Add normalizePath to Uri class.
...
The algorithm for removing '.' and '..' from a path is only available through the [resolve] method.
This change makes it available directly as a function on a Uri, returning a new Uri if necessary.
The current workaround is to do:
var normalizedUri = new Uri().resolveUri(originalUri);
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//1083253002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45163 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-15 11:56:35 +00:00
karlklose@google.com
d839c64766
Establish test expectations for dart2js running with the CPS based backend.
...
R=ricow@google.com
Review URL: https://codereview.chromium.org//1089113003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45162 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-15 11:44:02 +00:00
lrn@google.com
68dd6f6338
Add StackTrace.fromString constructor.
...
Remove _RemoteStackTrace from dart:isolate and use the new version instead.
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//1088433004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45088 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-13 09:17:13 +00:00
lrn@google.com
83376079f6
Add start/end to Uri.parse, allowing you to parse a substring without creating a new String object.
...
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//1071573002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44993 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-09 08:01:15 +00:00
lrn@google.com
2da1a00f3d
Clean up apply2-test.
...
It was quite unreadable.
Review URL: https://codereview.chromium.org//1024563003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44679 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-25 07:01:46 +00:00
herhut@google.com
0ad152ebac
Fix implementation of Function.apply with optional positional arguments.
...
BUG=
R=karlklose@google.com
Review URL: https://codereview.chromium.org//1029853002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44666 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-24 14:17:10 +00:00
lrn@google.com
f80cfe1401
Fix DoubleLinkedQueue so that appending to entries also update the queue length.
...
The extra non-queue features of this class are probably unnecessary, and are not proper naming (some functions should be getters).
Keeping unchanged for backwards compatibility, but it should probably either be removed or be suitably updated for 2.0.
BUG= http://dartbug.com/22802
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//1001863002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44451 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-13 09:40:57 +00:00
sra@google.com
31993af4bf
There was a weird dead expression that should have been used but was not, letting all upper case letters be 'accepted' for any radix over 10. The result was NaN values flowing into the program.
...
R=lrn@google.com
Review URL: https://codereview.chromium.org//988523002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44304 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 21:34:02 +00:00
koda@google.com
784c1e4f88
Replace Linked{Identity,Custom}Hash{Map,Set} with compact implementation; remove old code and flag.
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//983703003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44294 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 15:13:01 +00:00
herhut@google.com
f19447b972
Fix status files after jsshell update.
...
BUG=
R=floitsch@google.com
TBR=floitsch@google.com
Review URL: https://codereview.chromium.org//983163002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44289 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 13:40:51 +00:00
karlklose@google.com
3b5acff24d
Change test to detect checked mode.
...
R=ricow@google.com
Review URL: https://codereview.chromium.org//969393002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44167 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 13:25:10 +00:00