Lasse R.H. Nielsen
5363e5c945
Make dart2js code retain the original stack trace for uncaught async errors.
...
R=sigmund@google.com
Review URL: https://codereview.chromium.org/1383213002 .
2015-11-17 15:17:04 +01:00
Srdjan Mitrovic
0553fd711b
Disable a failing test on Windows, release, ia32; filed issue.
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1439123002 .
2015-11-12 14:26:19 -08: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
Lasse R.H. Nielsen
98a5da5948
Mark stream_periodic6_test failing on jsshell.
...
Review URL: https://codereview.chromium.org/1434463002 .
2015-11-04 12:35:03 +01:00
Florian Schneider
eb3186b7bd
Fix flaky async test.
...
Replacing > with >= since finishing in 10 to 11 ms is to be expected.
BUG=dartbug.com/24788
R=floitsch@google.com
Review URL: https://codereview.chromium.org/1415413012 .
2015-11-03 23:30:00 +01:00
Asger Feldthaus
f4429324eb
dart2js cps: Fix codegen for yield.
...
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org/1415843006 .
2015-11-03 14:21:52 +01:00
Florian Schneider
e75056ccb4
VM: Fix bug with CHA-based inlining in --noopt mode.
...
Use propagated cids (not abstract types) only to specialize instance calls.
BUG=dartbug.com/24789
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1419013006 .
2015-11-02 19:48:26 +01:00
Florian Schneider
dde638f7db
Mark tests failing with --noopt in the status files.
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1415823004 .
2015-10-31 01:45:50 +01:00
Asger Feldthaus
3634c3998a
dart2js: Bugfix for when 'await' occurs in an initializer list.
...
If the JS ast contains an initializer list:
var x = foo(), y = await x;
It would be retained as a single statement and generate invalid output
that awaits 'x' before it has been defined.
CLOSES=23997
BUG=
R=sigurdm@google.com
Review URL: https://codereview.chromium.org/1427593003 .
2015-10-27 11:36:57 +01:00
Lasse R.H. Nielsen
b70109683b
Implement cryptographically secure random numbers by using crypto.getRandomValues.
...
Closes https://github.com/dart-lang/sdk/issues/24687
R=floitsch@google.com , sigmund@google.com
Review URL: https://codereview.chromium.org/1413923004 .
2015-10-23 11:14:37 +02:00
Ryan Macnak
371a5dc932
Get tools/test.py --noopt green.
...
More specifically ./tools/test.py --noopt -mall -ax64,simarm,simarm64,simmips --exclude-suite=pkg
- Add missing dart:io entry point.
- Add checks that Dart_FinalizeLoading, Dart_Precompile, Dart_CreatePrecompiledSnapshot are called in order.
- Add checks for --precompilation flag.
- Add checks for dropped class in Dart_New/Allocate/AllocateWithNativeFields.
R=fschneider@google.com
Review URL: https://codereview.chromium.org/1407393005 .
2015-10-21 10:35:01 -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
Ryan Macnak
5532a354c3
Add a test configuration for noopt so we can add status file entries for it.
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org/1409543004 .
2015-10-14 12:36:39 -07:00
Asger Feldthaus
c4b418a2c3
dart2js cps: Updated status file for host-checked mode.
...
BUG=
Review URL: https://codereview.chromium.org/1402943003 .
2015-10-13 15:31:40 +02:00
Asger Feldthaus
f1a40e23c1
dart2js cps: Status updates and minor fixes for host checked mode.
...
CPS should now run the test suite cleanly in host-checked mode. Let's keep it that way.
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org/1377323003 .
2015-10-02 15:36:21 +02:00
Lasse R.H. Nielsen
bd4c7a8a07
Add Base64 codec to dart:convert.
...
This is a simple converter that only accepts and produces plain base-64 strings
with the default alphabet and no whitespace.
R=floitsch@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//1370073002 .
2015-09-29 13:49:53 +02:00
Alan Knight
f3261b5608
Suppress the slow_consumer test, fails on drt/checked with heap exhaustion
...
BUG=
Review URL: https://codereview.chromium.org//1374093002 .
2015-09-28 16:34:38 -07:00
Karl Klose
e28e578731
dart2js cps: Support sync* and yield.
...
R=asgerf@google.com , kmillikin@google.com
Review URL: https://codereview.chromium.org//1353843002 .
2015-09-23 11:01:34 +02:00
Terry L. Lucas
c5a690fa26
Revert "Mark tests problems because of Dartium JSInterop"
...
This reverts commit d1a7ee9ad7 .
TBR=alanknight@google.com
Review URL: https://codereview.chromium.org//1355683005 .
2015-09-18 11:00:54 -07:00
Terry L. Lucas
d1a7ee9ad7
Mark tests problems because of Dartium JSInterop
...
TBR=alanknight@google.com
Review URL: https://codereview.chromium.org//1358503002 .
2015-09-18 09:37:37 -07:00
Asger Feldthaus
19cb08fa05
dart2js cps: Remove code after calls that cannot return.
...
This should resolve an outstanding issue with unreachable code being
transformed. A subterm in the unreachable code would get specialized
and then reanalyzed while some of the definitions in scope have no type.
This changes a lot of test case results. Some test results
have changed in very surprising ways, but I would argue
these are separate bugs that we should hunt down.
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1335273003 .
2015-09-15 17:46:48 +02:00
Asger Feldthaus
0216e21efc
dart2js cps: Use 'this' instead of receiver-arg when possible.
...
This fixes a bug in how intercepted super calls were handled,
and enables the redundant receiver optimization.
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1312393002 .
2015-08-26 16:06:41 +02:00
Karl Klose
6820b95c1c
dart2js cps: update test expectations.
...
TBR=kmillikin@google.com
Review URL: https://codereview.chromium.org//1303333003 .
2015-08-24 10:59:15 +02:00
Lasse R.H. Nielsen
1a7ff8578d
Make line_splitter_test not use multi-line strings.
...
Apparently dart2js and the VM disagrees on which characters are in
a multi-line string if the source uses Windows line endings.
Fixes issue 23856
BUG= http://dartbug.com/23856
R=sgjesse@google.com
Committed: https://github.com/dart-lang/sdk/commit/194c729a2a80714ab56a61c11802479da9cae95d
Review URL: https://codereview.chromium.org//1294353003 .
2015-08-19 12:35:28 +02:00
Asger Feldthaus
496a1e0085
dart2js cps: More status files updates.
...
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1302473002 .
2015-08-18 11:01:05 +02:00
Florian Loitsch
6592391adf
Update status file. Timers are not supported on jsshell.
...
Review URL: https://codereview.chromium.org//1301573002 .
2015-08-17 14:12:08 +02:00
Karl Klose
bafb8fb191
dart2js cps: Support async/await by rewriting the JavaScript AST.
...
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1253333002 .
2015-08-07 11:27:40 +02:00
Karl Klose
7eb3bb82b7
dart2js cps: update test expectations for new tests.
...
TBR=kmillikin@google.com
Review URL: https://codereview.chromium.org//1280603003 .
2015-08-07 08:36:47 +02:00
Ryan Macnak
b6c979f20b
Hoist InstanceMirror.delegate to ObjectMirror.
...
BUG=http://dartbug.com/14827
R=gbracha@google.com
Review URL: https://codereview.chromium.org//1273983002 .
2015-08-05 17:09:59 -07:00
Karl Klose
0bf80c919b
Fix merge error in commit 0869c5ca4a.
...
TBR=lrn@google.com
Review URL: https://codereview.chromium.org//1244743003 .
2015-07-21 10:00:24 +02:00
Karl Klose
0869c5ca4a
dart2js cps: Update test expectations.
...
TBR=asgerf@google.com
Review URL: https://codereview.chromium.org//1240253002 .
2015-07-20 14:40:37 +02:00
Alan Knight
e2e50d30a5
Suppress line splitter test on Chrome/FF on Windows
...
BUG=
R=sigmund@google.com
Review URL: https://codereview.chromium.org//1236793011 .
2015-07-17 10:16:39 -07:00
William Hesse
92fa3d7e51
Update status of flaky windows vm tests
...
BUG=https://github.com/dart-lang/sdk/issues/23848
R=koda@google.com
Review URL: https://codereview.chromium.org//1230113008 .
2015-07-15 17:34:37 +02:00
Karl Klose
04dacd24f4
Remove functions white-listed for use of try-finally and switch, add JS_SET_CURRENT_ISOLATE.
...
R=asgerf@google.com
Review URL: https://codereview.chromium.org//1237573002 .
2015-07-14 10:26:38 +02:00
Karl Klose
3fe9309c96
dart2js cps: Implement compilation of redirecting factory constructors for reflection.
...
Without reflection, redirecting factory constructor invocations are shortcut at the instantiation site. With reflection, code like
reflectClass(Foo).newInstance(const Symbol(''), [])
can hit a redirecting factory constructor and we need to emit a function that does the redirection and type substitution.
R=asgerf@google.com
Review URL: https://codereview.chromium.org//1227873004 .
2015-07-09 14:54:23 +02:00
Karl Klose
71e2bec0a5
dart2js cps: Support JS_CURRENT_ISOLATE.
...
R=asgerf@google.com
Review URL: https://codereview.chromium.org//1222913003 .
2015-07-07 15:55:13 +02:00
Lasse R.H. Nielsen
03f92623b2
Revert usage of delegating generative constructor, still not supported by VM.
...
Also update test expectation for d8/jsshell now that test doesn't use non-zero timer any more.
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//1221033008 .
2015-07-03 14:53:29 +02:00
Asger Feldthaus
dbd197acdd
dart2js cps: Fuse tear-off and call invocation.
...
For example:
new Foo().bar.call(123)
==>
new Foo().bar(123)
This does not trigger much right now, but it will matter when forEach
is rewritten to a loop in a later CL.
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1220193003 .
2015-07-03 14:44:47 +02:00
Asger Feldthaus
61f47e7384
dart2js cps: Ensure JSArray is emitted when we see a type cast.
...
This is a workaround to resolve an issue that is affecting a lot
of tests.
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1214123003 .
2015-07-03 14:32:01 +02:00
Asger Feldthaus
34302b1320
dart2js cps: Translate synthesized mixin constructors.
...
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1216593002 .
2015-06-29 15:28:40 +02:00
Asger Feldthaus
ec55d46148
dart2js cps: Fix translation of local constants.
...
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1211393003 .
2015-06-29 14:32:49 +02:00
Asger Feldthaus
cf920ec66c
dart2js cps: Fix codegen for foreign statements.
...
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1203353003 .
2015-06-25 16:07:56 +02:00
Asger Feldthaus
fceb7f00dc
dart2js cps: Handle checks against mutable and extendable lists.
...
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1206873003 .
2015-06-25 15:03:00 +02:00
Kevin Millikin
089ed2965b
Implement try/finally by inlining the finally code.
...
Try/finally is implemented by inlining. There is a try/catch to catch
exceptions in the try block. The catch body contains the finally code
followed by a rethrow. The code for finally is translated again after the
normal exit of the try block. Break, continue, and return exits in the try
block have the finally code inlined just before the exit is taken.
Try/catch/finally is not yet supported, it requires some changes to the
assigned variables analysis.
R=asgerf@google.com
Review URL: https://codereview.chromium.org//1201983002 .
2015-06-24 10:12:42 +02:00
Kevin Millikin
bf595224d5
Implement simple switch statements as nested if/else.
...
Simple switch statements that do not have continue to labeled cases
are compiled into a chain if/else comparisons.
R=asgerf@google.com
Review URL: https://codereview.chromium.org//1191193005 .
2015-06-22 11:29:31 +02:00
Karl Klose
3f46181244
cps-ir: Support foreign code.
...
R=kmillikin@google.com
Committed: https://github.com/dart-lang/sdk/commit/a120ee7c9071b60edccff066dcdade078f601377
Reverted: https://github.com/dart-lang/sdk/commit/40ed0daaaf71904d2da271e66ba8381ef857116d
Review URL: https://codereview.chromium.org//1185633003 .
2015-06-19 13:44:58 +02:00
Karl Klose
40ed0daaaf
Revert "cps-ir: Support foreign code."
...
This reverts commit a120ee7c90 .
TBR=kmillikin@google.com
Review URL: https://codereview.chromium.org//1196443002 .
2015-06-18 13:37:52 +02:00
Karl Klose
a120ee7c90
cps-ir: Support foreign code.
...
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1185633003 .
2015-06-18 13:09:50 +02:00
Asger Feldthaus
fb38d61dba
dart2js cps: Support function types in 'is' and 'as' operators.
...
The generated code uses different helpers than the SSA. In SSA, there are calls to buildFunctionType and _isTest. The CPS uses checkSubtypeOfRuntimeType, the "one size fits all" method we also use to test against type variable types.
When the function type has no type variables in it we could hoist the function type into a constant, but the constant system does not support type representation constants at the moment. But it seems like an optimization we may want to add later.
BUG=
R=karlklose@google.com
Review URL: https://codereview.chromium.org//1180973003 .
2015-06-18 11:30:57 +02:00
Karl Klose
a842f6dff2
Update dart2js-cps_ir test expectations.
...
TBR=johnniwinther@google.com
Review URL: https://codereview.chromium.org//1188183006 .
2015-06-17 09:41:50 +02:00