Commit Graph

5559 Commits

Author SHA1 Message Date
regis@google.com 06115b867c Allow await in assert (fix issue 22728).
Add regression test.

R=iposva@google.com

Review URL: https://codereview.chromium.org//991373003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44388 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 22:44:52 +00:00
regis@google.com 47b17b78e4 Make sure the mixin class is finalized immediately (and not some time later)
before applying mixin members (issue 22719).
Add regression test.

R=asiva@google.com

Review URL: https://codereview.chromium.org//994103002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44383 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 18:39:50 +00:00
herhut@google.com 0f95c2df6b Use no arguments when simulating implicit call to super constructor during type inference.
BUG= http://dartbug.com/22723
R=floitsch@google.com

Review URL: https://codereview.chromium.org//994823003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44380 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 17:33:28 +00:00
paulberry@google.com 017afb5db9 Remove Crash annotation for regress_22700_test.
Analyzer stopped crashing on this test as of r44341.  See
dartbug.com/22739.

TBR=regis@google.com

Review URL: https://codereview.chromium.org//998603002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44379 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 16:35:21 +00:00
sigurdm@google.com 69984cd0f8 Fix dart2js for switches in async code with only awaits in the key.
BUG=
R=floitsch@google.com

Review URL: https://codereview.chromium.org//994853003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44371 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 14:25:00 +00:00
lrn@google.com c54856f8be Revert "Add some async/await tests."
Some tests are failing on the bots.

Review URL: https://codereview.chromium.org//995803002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44369 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 13:41:34 +00:00
lrn@google.com fc0f0c144a Add some async/await tests.
R=sgjesse@google.com, sigurdm@google.com

Review URL: https://codereview.chromium.org//968963002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44368 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 12:56:38 +00:00
karlklose@google.com 3fb9f53b51 Update new dart2dart test expectations.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//989123007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44362 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 09:34:24 +00:00
hausner@google.com 15f91a1979 Suspend after async generator terminates
Suspend the async generator after it closes the stream. If there
are outstanding requests to schedule the generator, this ensures
that no portions of the generator body get executed again.

R=regis@google.com

Review URL: https://codereview.chromium.org//990363002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44352 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 23:25:01 +00:00
hausner@google.com 48aac0fc1c Fix test expectations for dart2js
Review URL: https://codereview.chromium.org//995553002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44346 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 21:06:08 +00:00
hausner@google.com 0505673560 Fix async getter with => syntax
Fixes issue 22632.

Also adding test cases and compile-time error for arrow style getters that are marked as generators (sync* or async*).

R=iposva@google.com

Review URL: https://codereview.chromium.org//996443002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44345 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 20:56:38 +00:00
regis@google.com 438d13fc9e Allow direct access to type parameters from factory (issue 22700).
Add regression test.
Fix wrong test and update status files.

Review URL: https://codereview.chromium.org//985203002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44339 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 19:39:17 +00:00
hausner@google.com 564cd7541c Fix await x++
Fixes compiler crash bug 22634

Simplify transformation of await expressions. Do not allocate
unnecessary temporary variables.

Await LetNode temporary expressions still does not work properly
since the temporary values are only saved on the stack by the
back-end. Thus, a[await f()]++ still does not work after this change.

R=iposva@google.com

Review URL: https://codereview.chromium.org//989633003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44337 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 19:17:24 +00:00
regis@google.com 87790063a4 Fix finalization of cyclic mixin types (issue 22666).
Add regression test.

R=asiva@google.com

Review URL: https://codereview.chromium.org//988903003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44306 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-07 00:25:25 +00:00
vegorov@google.com b2d9992127 Fix incorrect kNumTemps for BinaryUint32OpInstr on x64
R=johnmccutchan@google.com
BUG=http://dartbug.com/22693

Review URL: https://codereview.chromium.org//988743002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44296 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 17:53:39 +00:00
whesse@google.com 07750d9a42 Update test status for Chrome 41 on Windows and Mac OS X.
BUG=
R=kustermann@google.com

Review URL: https://codereview.chromium.org//983173002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44291 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 14:19:58 +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
sigurdm@google.com 4bea71e030 Fix dart2js async error handling of finallies nested in finallies.
BUG=
R=floitsch@google.com

Review URL: https://codereview.chromium.org//989503002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44287 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 12:48:33 +00:00
asgerf@google.com bc2b857a60 Integrity checker for CPS and Tree IR.
BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//981523002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44285 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 11:27:42 +00:00
johnniwinther@google.com 48dd2273f3 Fix dart2dart new_backend
BUG=
R=asgerf@google.com

Review URL: https://codereview.chromium.org//980203002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44257 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-05 11:24:06 +00:00
regis@google.com c502cb8371 Fix more async machinery (issue 22579 and possibly more to be triaged).
Add regression test.

R=hausner@google.com

Review URL: https://codereview.chromium.org//977243002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44250 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-05 00:42:17 +00:00
hausner@google.com 8873c9962a Fix issue 22633
Put saved try context variables in the right scope when the try
statement has a label.

Added new test.

R=regis@google.com

Review URL: https://codereview.chromium.org//977993002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44246 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-04 20:52:48 +00:00
fschneider@google.com d0ca8036a2 Fix VM bug with super-constructor invocation and mixins.
When using mixins, the constructor of a super-class was incorrectly
invoked twice if the super() call was not at the end of the initializer
list.

When generating the super constructor call in an implicit constructor, pass
along the phase parameter that comes in instead of invoking all phases.

BUG=dartbug.com/22604
TEST=tests/language/constructor_with_mixin_test.dart
R=hausner@google.com

Review URL: https://codereview.chromium.org//973843005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44242 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-04 18:02:40 +00:00
sigurdm@google.com 649796355b Copy the parameters to a sync* function for each invocation of .iterator
BUG=
R=floitsch@google.com

Review URL: https://codereview.chromium.org//977053003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44227 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-04 13:09:24 +00:00
paulberry@google.com c867649e4a Don't define parameters when visiting a function-typed formal parameter.
BUG=dartbug.com/13179
R=scheglov@google.com

Review URL: https://codereview.chromium.org//978633003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44212 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-04 00:39:14 +00:00
regis@google.com 7d391bd655 Remove passing test from dart2dart status file.
Review URL: https://codereview.chromium.org//970343003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44211 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-04 00:25:35 +00:00
regis@google.com 5cb782b7fb Fix async machinery for finally clauses (issues 22445, 22300).
R=hausner@google.com

Review URL: https://codereview.chromium.org//974073002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44210 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 23:55:18 +00:00
regis@google.com d3e4da7d12 Mark test regress_22445_test as failing.
R=hausner@google.com

Review URL: https://codereview.chromium.org//977633002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44194 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 19:22:16 +00:00
hausner@google.com b099f3d79e Fixium for dartium
Review URL: https://codereview.chromium.org//970273002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44193 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 19:16:14 +00:00
regis@google.com 8618df1864 One more fix to async machinery (rethrow in finally, issue 22595).
R=hausner@google.com

Review URL: https://codereview.chromium.org//973103002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44189 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 18:34:01 +00:00
hausner@google.com 9a6ed9a718 Implement async* functions in VM
R=iposva@google.com

Review URL: https://codereview.chromium.org//944893005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44185 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 17:49:53 +00:00
vegorov@google.com 8c89e30eb8 Emit stackmaps even in unoptimized code if slow path pushes untagged values.
These stackmaps cover only pushed registers region, the rest of the stack (copied parameters, locals and temporaries) will be scanned as tagged values.

R=fschneider@google.com
BUG=http://dartbug.com/22621

Review URL: https://codereview.chromium.org//968183003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44173 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 15:43:32 +00:00
sigurdm@google.com ef983cd0ee Fix problems with default-cases in async code.
BUG=
R=floitsch@google.com

Review URL: https://codereview.chromium.org//976603002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44170 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 14:20:17 +00:00
paulberry@google.com d767611e01 Fix warning in deferred_shared_and_unshared_classes_test.
TBR=sigurdm@google.com

Review URL: https://codereview.chromium.org//971353002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44169 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 13:42:05 +00:00
sigurdm@google.com 6787beb0f6 Analyze locals in await for loops as inside a try-finally.
Otherwise they do not get the right boxing behavior.

BUG=
R=floitsch@google.com

Review URL: https://codereview.chromium.org//964553004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44166 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 12:41:10 +00:00
sigurdm@google.com f82faf5bb7 Support for a dart2js dartDeferredLoader hook.
Also move deferred loading special casing of d8 and jsshell to
preambles.

BUG=
R=floitsch@google.com, lrn@google.com

Review URL: https://codereview.chromium.org//956953002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44163 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 10:12:09 +00:00
sigurdm@google.com 4e5078f2e7 Move the dart_precompiled function inside scoping function.
Also make it a property of init.

This is also done for deferred hunks, allowing deferred loading to work
in CSP mode.

Long term I would like the precompiled function to go away, and move
the generated functions into the library-initializer when they are
 needed.

BUG=16898
R=floitsch@google.com

Review URL: https://codereview.chromium.org//968163002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44162 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 09:31:29 +00:00
regis@google.com a9e03a9166 More fixes in async machinery (issue 22438 and maybe more).
Add a regression test.

R=hausner@google.com

Review URL: https://codereview.chromium.org//969903002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44153 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-02 23:09:01 +00:00
fschneider@google.com ea77da464b VM: Better type propagation for string objects.
For strings we can't propagate the class-id because of externalization,
but we still can record the compile-type (String). This is for example useful
for eliminating number-checks with identical-comparisons.

R=vegorov@google.com

Review URL: https://codereview.chromium.org//966773002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44133 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-02 16:10:22 +00:00
floitsch@google.com a74cc4f5df Fix order of box and types for constructor-body invocations.
BUG= http://dartbug.com/22590
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//966763002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44130 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-02 14:57:49 +00:00
johnniwinther@google.com 5a5cfc18a2 Typecheck return with respect to async.
BUG=http://dartbug.com/22552
R=floitsch@google.com

Review URL: https://codereview.chromium.org//962603002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44128 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-02 13:04:43 +00:00
regis@google.com c2b5257847 Mark test as timing out on dartium (as it was before r44107).
Review URL: https://codereview.chromium.org//970473002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44110 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-28 00:17:07 +00:00
regis@google.com 0036014d8a Fix async machinery (issue 22445 and possibly others to be triaged later).
R=hausner@google.com, iposva@google.com

Review URL: https://codereview.chromium.org//958243003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44107 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-27 22:19:47 +00:00
asgerf@google.com 96b77b5be9 dart2js: Refactoring, documentation, and a few bugfixes in Namer class.
See long doc comment in namer.dart.

BUG=
R=floitsch@google.com

Committed: https://code.google.com/p/dart/source/detail?r=43588

Reverted: https://code.google.com/p/dart/source/detail?r=43590
(to avoid rebase conflicts for people pushing to trunk)

Committed: https://code.google.com/p/dart/source/detail?r=43724

Reverted: https://code.google.com/p/dart/source/detail?r=43739
(red bots)

Review URL: https://codereview.chromium.org//891673003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44092 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-27 14:20:49 +00:00
kmillikin@google.com 1bfb7768ed dart2dart: Implementation of simple try/catch.
A LetHandler form is introduced to the CPS IR.  It binds an exception
handler continuation which is in scope for its body.  LetHandler is
translated to try/catch when translating back to direct style.

Optimizations in the CPS and Tree languages that move code have to be
careful when moving code into or out of the scope of an exception
handler.  This change prohibits such code motion, though it might be
sometimes provably safe.

BUG=
R=asgerf@google.com, karlklose@google.com

Review URL: https://codereview.chromium.org//923013002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44047 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-26 13:24:58 +00:00
vegorov@google.com 094e899972 Fix Range::Mul for fully non-positive ranges.
BUG=http://dartbug.com/22541
R=fschneider@google.com, iposva@google.com

Review URL: https://codereview.chromium.org//961443005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44046 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-26 12:40:55 +00:00
regis@google.com 00ce7069d2 Update dart2dart language status file after fix.
Review URL: https://codereview.chromium.org//951773004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44005 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-24 22:48:15 +00:00
regis@google.com afd4864b0e Save exception and stack trace variables in async catch clauses and use them
in rethrow statements (fix issue 22523).

R=hausner@google.com

Review URL: https://codereview.chromium.org//956583003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44001 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-24 22:05:35 +00:00
vegorov@google.com 598811048b Fold BIT_NOT and NEGATE during constant propagation.
Convert (a & 2^n) == 2^n into TestSmi instruction.

R=fschneider@google.com
BUG=

Review URL: https://codereview.chromium.org//943273004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43957 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-23 14:53:02 +00:00
asgerf@google.com 3d1bb0bbec Propagate pseudo-constants expressions separately in tree rewriter.
Two constants would fail to swap places even though there clearly is no
danger of swapping side effects. Moreover, a constant would prevent other
expressions from propagating.

Example:
var z = foo();
var y = 1;
bar('x', y, z); // neither foo() or 1 propagates past 'x'

This change may be made redundant in the future by a more sophisticated
side-effect analysis.

But for now, it helps debugging since the code is more readable and
it's easier to see if other rewritings are working when they are not
blocked by redundant variable assignments.

BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//918653002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43953 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-23 12:57:34 +00:00