Commit Graph

8491 Commits

Author SHA1 Message Date
Konstantin Shcheglov ca5bf28fa5 Chain SummaryResynthesizer(s).
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1585093003 .
2016-01-14 14:43:29 -08:00
Asger Feldthaus fb0330df46 dart2js cps: Improve constant folding of equality operators.
Previously we would only fold comparisons between primitive constants, missing out on e.g. the list sentinel comparisons.

BUG=
R=sra@google.com

Review URL: https://codereview.chromium.org/1583993005 .
2016-01-14 14:01:20 -08:00
Brian Wilkerson d8df717622 Add list length information to the status pages
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1588083003 .
2016-01-14 13:53:53 -08:00
John Messerly 9098ae50ae fix #25425, more inference of generic methods
this adds support for function expr invocation, as well as other element types besides executable elements

R=brianwilkerson@google.com, leafp@google.com

Review URL: https://codereview.chromium.org/1586813002 .
2016-01-14 13:27:34 -08:00
John Messerly 724492ca82 fixes #25340, propagatedType now finds the instantiated generic method's return type
R=brianwilkerson@google.com, leafp@google.com

Review URL: https://codereview.chromium.org/1582863003 .
2016-01-14 13:20:13 -08:00
John Messerly 154959c762 fixes #25407, generic list and map literal type comments
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1589663002 .
2016-01-14 13:18:59 -08:00
Asger Feldthaus 1b9a7e0be5 dart2js cps: Avoid comparing boolean values to boolean constants.
E.g. (x === true) can be replaced with x if x is a boolean.

Box2D has some code where this happens.

BUG=
R=kmillikin@google.com, sra@google.com

Committed: https://github.com/dart-lang/sdk/commit/dd8ba75909d2ba36d8cb79b217e00604c942ba02

Review URL: https://codereview.chromium.org/1588813002 .
2016-01-14 13:01:31 -08:00
Asger Feldthaus 2680d9ab04 Revert "dart2js cps: Avoid comparing boolean values to boolean constants."
This reverts commit dd8ba75909.

BUG=

Review URL: https://codereview.chromium.org/1590523004 .
2016-01-14 12:55:42 -08:00
Asger Feldthaus dd8ba75909 dart2js cps: Avoid comparing boolean values to boolean constants.
E.g. (x === true) can be replaced with x if x is a boolean.

Box2D has some code where this happens.

BUG=
R=kmillikin@google.com, sra@google.com

Review URL: https://codereview.chromium.org/1588813002 .
2016-01-14 12:28:16 -08:00
danrubel 559fb01244 assert isAsynchronous and isGenerator false if parseAsync is false
and fix ASYNC_NOT_SUPPORTED error code

R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1584823003 .
2016-01-14 14:52:23 -05:00
danrubel ebd1736c58 Add EmbedderSdk to EmbedderUriResolver
R=brianwilkerson@google.com, johnmccutchan@google.com, pquitslund@google.com

Review URL: https://codereview.chromium.org/1584663006 .
2016-01-14 14:51:43 -05:00
Brian Wilkerson 1e9326d13f Add tests for computation of constant expressions involving ??
R=paulberry@google.com

Review URL: https://codereview.chromium.org/1589043002 .
2016-01-14 10:55:21 -08:00
Asger Feldthaus 2dd2a0d3f7 dart2js cps: Remove redundant traversal from variable merger pass.
This was a leftover from when we had nested functions in the IR.

BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org/1582033002 .
2016-01-14 10:52:58 -08:00
Asger Feldthaus 2bd0de209c dart2js cps: Use dartArgumentsLength instead of arguments.length
BUG=
R=sra@google.com

Review URL: https://codereview.chromium.org/1589643004 .
2016-01-14 10:51:24 -08:00
Asger Feldthaus 27e2977dc7 dart2js cps: Fix traversal order in statement rewriter.
The statement rewriter uses a backward traversal, but the visitor for
yield and logical operator did not follow this order.

Fixes #25460

BUG=
R=het@google.com

Review URL: https://codereview.chromium.org/1584253003 .
2016-01-14 10:49:41 -08:00
Konstantin Shcheglov 659c9b44e2 Mark analyzer/test/file_system/physical_resource_provider_test as Pass, Fail.
R=brianwilkerson@google.com, whesse@google.com
BUG=

Review URL: https://codereview.chromium.org/1581963009 .
2016-01-14 10:28:46 -08:00
Paul Berry ba31abe429 Use constructor args in favor of summary "encode" functions.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1585973004 .
2016-01-14 09:30:04 -08:00
Konstantin Scheglov 8b3dd51480 Merge pull request #25406 from jimbeveridge/patch-1
Add tutorial in the README
2016-01-14 09:23:50 -08:00
William Hesse 84d7fd63f0 Update status of two analyzer tests.
BUG=https://github.com/dart-lang/sdk/issues/25471
BUG=https://github.com/dart-lang/sdk/issues/25470
R=ricow@google.com

Review URL: https://codereview.chromium.org/1588673005 .
2016-01-14 17:41:59 +01:00
Konstantin Shcheglov 9484bfe1c9 Issue 25064. Incrementally resolve comments only if both are documentation.
R=brianwilkerson@google.com, skybrian@google.com
BUG= https://github.com/dart-lang/sdk/issues/25064

Review URL: https://codereview.chromium.org/1581293002 .
2016-01-14 08:38:37 -08:00
Lasse R.H. Nielsen 2d44ed69e9 Implement (partially) ?? being compile-time constant in analyzer.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1577293002.
2016-01-14 16:17:52 +01:00
Stephen Adams 1aab83e6dd Add cleanup ShrinkingReducer pass after second TypePropagation pass.
The need for cleanup shows up in
co19/LibTest/collection/DoubleLinkedQueue/forEachEntry_A01_t02

The compiler crashed: Internal Error: Unreachable continuations must be removed before computing loop side effects.

TBR=asgerf@google.com

Review URL: https://codereview.chromium.org/1586943002 .
2016-01-13 22:10:42 -08:00
Stephen Adams a56036b0a3 Do TypePropagation again after inlining
R=asgerf@google.com

Committed: https://github.com/dart-lang/sdk/commit/9392a2ece91d550188bab7aa82b4b43e5615c0c5

Reverted.

Review URL: https://codereview.chromium.org/1560963002 .
2016-01-13 20:03:47 -08:00
Stephen Adams bec587aaf3 Revert "Do TypePropagation again after inlining"
Tests need to be updated.

TBR=asgerf@google.com

Review URL: https://codereview.chromium.org/1588723003 .
2016-01-13 15:45:33 -08:00
Stephen Adams 9392a2ece9 Do TypePropagation again after inlining
R=asgerf@google.com

Review URL: https://codereview.chromium.org/1560963002 .
2016-01-13 15:32:13 -08:00
Harry Terkelsen 22200410c0 dart2js: update pubspec
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1582923002 .
2016-01-13 15:01:05 -08:00
Asger Feldthaus add29e3cba dart2js cps: Do redundant join elimination after inlining.
Redundant join elimination can enable optimizations in GVN and BCE, and
redundant joins can occur after inlining a method used in a condition,
such as isEmpty or isNotEmpty.

BUG=
R=het@google.com

Review URL: https://codereview.chromium.org/1581593004 .
2016-01-13 14:17:48 -08:00
Paul Berry 834263789f Include the export namespace in the prelinked summary.
This prevents having to traverse the transitive closure of exports
when resynthesizing a library from its summary.

R=scheglov@google.com

Review URL: https://codereview.chromium.org/1589573003 .
2016-01-13 13:16:23 -08:00
Stephen Adams 9db58343b3 dart2js cps: for(;;) is shorter than while(true)
R=asgerf@google.com

Committed: https://github.com/dart-lang/sdk/commit/dbb96bac3241b2bc0fb66699d6e43625af431d4f

Reverted.

Review URL: https://codereview.chromium.org/1584693003 .
2016-01-13 12:57:13 -08:00
Brian Slesinsky 730d962729 add an option to send the incremental resolver log to stderr
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1585563002 .
2016-01-13 12:55:13 -08:00
Stephen Adams 33056a1ab8 Revert "dart2js cps: for(;;) is shorter than while(true)"
There are some tests I should have updated.

TBR=asgerf@google.com

Review URL: https://codereview.chromium.org/1582103002 .
2016-01-13 12:35:00 -08:00
Kevin Millikin 5c2125c9af dart2js: Flatten the printed representation of the CPS IR.
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1588543003 .
2016-01-13 20:59:57 +01:00
John Messerly f114dc1073 fix #25409, error if a generic method argument did not have a corresponding parameter
R=leafp@google.com

Review URL: https://codereview.chromium.org/1579503005 .
2016-01-13 11:20:13 -08:00
John Messerly 5947a2047f associate a staticInvokeType with loadLibrary
I missed this early-exit code path. This was caught by DDC's tests.

R=leafp@google.com

Review URL: https://codereview.chromium.org/1577143002 .
2016-01-13 10:40:03 -08:00
Stephen Adams dbb96bac32 dart2js cps: for(;;) is shorter than while(true)
R=asgerf@google.com

Review URL: https://codereview.chromium.org/1584693003 .
2016-01-13 10:25:41 -08:00
Konstantin Shcheglov 0d8a31e0a6 Create LibraryElement.loadLibrary during resynth.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1583613002 .
2016-01-13 09:35:37 -08:00
Florian Loitsch 45f4d82cde Revert shared dart2js messages.
This partially reverts commit e802e26d7b.
This reverts commit 6ecea2f559.

R=sigmund@google.com

Review URL: https://codereview.chromium.org/1589493002 .
2016-01-13 18:32:55 +01:00
John Messerly 3aa98fa335 fixes #24711, allow factory constructors to be downcast
R=leafp@google.com

Review URL: https://codereview.chromium.org/1578863004 .
2016-01-13 09:04:21 -08:00
Paul Berry c1642e9d9f Make summary builder classes implement summary interfaces.
This allows for easier unit testing, since we can use a builder class
directly rather than having to serialize and deserialize it.

R=scheglov@google.com

Review URL: https://codereview.chromium.org/1581993002 .
2016-01-13 08:54:48 -08:00
Konstantin Shcheglov 2f57161e74 Patch together getters/setters in different parts.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1577413002 .
2016-01-13 08:26:29 -08:00
Konstantin Shcheglov c474538e77 Resynth LibraryElement.deferred.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1580173002 .
2016-01-13 08:18:57 -08:00
Paul Berry 35f3961ea6 Test dependency tracking of unused imports/exports.
If library A imports or exports library B (either directly or via an
export), library B needs to be included in the dependency list for
library A's prelinked summary, since a change to library B might change
the meaning of a name which *is* used by library A.

Note that two of the new tests are currently failing, due to the fact
that we aren't tracking dependencies that only affect the export
namespace.  That will be fixed in a future CL.

R=scheglov@google.com

Review URL: https://codereview.chromium.org/1580013003 .
2016-01-13 08:17:49 -08:00
Konstantin Shcheglov 9f6612d68c Resynth importElement.prefixOffset.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1581803002 .
2016-01-13 08:14:49 -08:00
Konstantin Shcheglov c09b9025d7 Tests for propagated type of final/const fields/top-levels.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1586493002 .
2016-01-13 07:54:34 -08:00
Konstantin Shcheglov f4c4b27d3f Resynth the 'final' property of top-level variables.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1575323003 .
2016-01-13 07:52:35 -08:00
Florian Loitsch e775fa0932 Add support for 'dart.library.X' environment variables in dart2js.
R=johnniwinther@google.com, sigurdm@google.com

Committed: https://github.com/dart-lang/sdk/commit/369899c8ffca28f28a1af3cc323d1111c1a4a48a
Reverted: https://github.com/dart-lang/sdk/commit/b80994d6ad63ac30b400590cf51815e862c0e8a1

Review URL: https://codereview.chromium.org/1404183002 .
2016-01-13 16:34:46 +01:00
Asger Feldthaus a3cf74fdda dart2js cps: Copy allocation site type when cloning.
Currently makes no difference because type propagation is not run after
inlining, but it will be needed.

BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org/1581853002 .
2016-01-12 16:38:49 -08:00
John Messerly 351ccc586f fix generic function expressions, part of #25175
R=leafp@google.com

Review URL: https://codereview.chromium.org/1579303002 .
2016-01-12 16:04:57 -08:00
Harry Terkelsen 666964b3fc dart2js cps: specialize isEmpty and isNotEmpty
BUG=
R=asgerf@google.com

Review URL: https://codereview.chromium.org/1583663003 .
2016-01-12 15:55:50 -08:00
John Messerly 0549def77d checking and inference of null coalescing operator, fixes #24564 and fixes #25387
R=leafp@google.com

Review URL: https://codereview.chromium.org/1575173005 .
2016-01-12 15:50:18 -08:00