Commit Graph

4698 Commits

Author SHA1 Message Date
Johnni Winther ee42a0524a Handle constructor invocation, is, as, throw, for-in and (a)sync(*) in kernel_impact
R=het@google.com

Review URL: https://codereview.chromium.org/2377623002 .
2016-09-30 09:58:11 +02:00
Johnni Winther 93d7c65cc9 Handle fields with initializers in kernel_impact
- and use Feature.TYPE_VARIABLE_BOUNDS_CHECK only for new-expressions.

R=het@google.com

Review URL: https://codereview.chromium.org/2366263004 .
2016-09-30 09:50:53 +02:00
Harry Terkelsen 81e13861fb kernel->ssa: implement assert statements
R=johnniwinther@google.com, sigmund@google.com

Review URL: https://codereview.chromium.org/2380573004 .
2016-09-29 14:17:13 -07:00
Harry Terkelsen a56cf2cac4 Some kernel->ssa cleanups.
* add --disable-inlining flag to top-level command for testing
* merge pushCheckNull into GraphBuilder now that compiler is in there
* fix typo

R=sigmund@google.com

Review URL: https://codereview.chromium.org/2378113004 .
2016-09-28 12:39:59 -07:00
Harry Terkelsen 71613d72a8 kernel->ssa: implement for-in loops
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/2377813002 .
2016-09-28 10:20:26 -07:00
Johnni Winther 06d7fb2fc5 Replace ClosedWorld.backend with ClosedWorld.backendClasses
R=het@google.com

Review URL: https://codereview.chromium.org/2370833002 .
2016-09-27 10:33:51 +02:00
Johnni Winther a1cd695612 Move remaining functionality from ClassWorld to ClosedWorld
... and rename ClassWorld to World.

R=het@google.com

Review URL: https://codereview.chromium.org/2366363002 .
2016-09-27 10:23:03 +02:00
Lasse R.H. Nielsen 3ba0e98020 Allow surrogates in string literals.
Fixes issue #26620
BUG: http://dartbug.com/26620

R=asiva@google.com, brianwilkerson@google.com, floitsch@google.com, hausner@google.com, sigmund@google.com

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

Committed: https://github.com/dart-lang/sdk/commit/574ae435f3996de9293528393e54f55976a354e6
2016-09-26 14:32:21 +02:00
Lasse R.H. Nielsen 574ae435f3 Allow surrogates in string literals.
Fixes issue #26620
BUG: http://dartbug.com/26620

R=asiva@google.com, brianwilkerson@google.com, floitsch@google.com, hausner@google.com, sigmund@google.com

Review URL: https://codereview.chromium.org/2304923002 .
2016-09-26 13:23:41 +02:00
Johnni Winther 8820b8046b Move closed world reasoning methods from ClassWorld to ClosedWorld.
Main changes in world.dart

R=het@google.com

Review URL: https://codereview.chromium.org/2363773005 .
2016-09-26 11:14:57 +02:00
Johnni Winther 62f6c08959 Perform MixinFullResolution before baseline test.
R=asgerf@google.com, het@google.com

Review URL: https://codereview.chromium.org/2367793002 .
2016-09-26 10:54:31 +02:00
Stephen Adams a2945cb281 Rewrite HStringify(a) to a.toString() when guaranteed to return a String
BUG=
R=het@google.com

Review URL: https://codereview.chromium.org/2365493002 .
2016-09-23 15:29:54 -07:00
Johnni Winther 3d533a08f2 More kernel_impact.
R=het@google.com

Review URL: https://codereview.chromium.org/2360773003 .
2016-09-23 11:01:53 +02:00
Johnni Winther bad12f912b Move towards using WorldImpact for codegen
CustomElementsAnalysis, TypeVariableHandler, LookupAnalysis and metadata
constants no longer require a [Registry] but instead collect their impact.

R=het@google.com, sra@google.com

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

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

Reverted:  https://github.com/dart-lang/sdk/commit/2a1ae8a3cecad9abf3a48a89f31a8aff96a4cb36
2016-09-23 10:43:12 +02:00
Johnni Winther a52683ff9b Handle calls to redirecting factories.
R=het@google.com

Review URL: https://codereview.chromium.org/2361783002 .
2016-09-23 10:03:49 +02:00
Stephen Adams 5cafe42577 Use indexing for type variable access when the receiver type constrains the substitution(s)
Often we are accessing Iterable.E from a precisely known class.

BUG=
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/2352913003 .
2016-09-22 11:32:26 -07:00
Johnni Winther 7a570f1b80 Roll kernel to latest and add baseline test.
The added visitor_test tests that the IR generated by the KernelVisitor
in dart2js matches the spec-mode IR.

R=asgerf@google.com, het@google.com

Review URL: https://codereview.chromium.org/2360603002 .
2016-09-22 10:16:11 +02:00
Harry Terkelsen 3a01cbd31c kernel->ssa: Implement for-loops and while-loops
This involved splitting out the loop handling logic from the
original SSA builder and sharing it with the kernel builder.
This was just the easiest way to do this for now, but in the future
we should write the loop handler for kernel to take into account
the simplified structure that kernel provides.

R=sra@google.com

Review URL: https://codereview.chromium.org/2360673003 .
2016-09-21 16:38:10 -07:00
Harry Terkelsen b114cfc724 kernel->ssa: support string concatenations/interpolations
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/2357513005 .
2016-09-21 10:42:46 -07:00
Stephen Adams 2a1ae8a3ce Revert "Move towards using WorldImpact for codegen"
-36% on DromeaoDRT Benchmark?benchmark=dom-query-getElementsByTagName(div)

TBR=johnniwinther@google.com
BUG=

Review URL: https://codereview.chromium.org/2359923002 .
2016-09-21 10:41:16 -07:00
Johnni Winther 0a79576ed0 Move towards using WorldImpact for codegen
CustomElementsAnalysis, TypeVariableHandler, LookupAnalysis and metadata
constants no longer require a [Registry] but instead collect their impact.

R=het@google.com

Review URL: https://codereview.chromium.org/2349163003 .
2016-09-21 12:31:38 +02:00
Johnni Winther ca3c2882ae Introduce OpenWorld.
R=het@google.com

Review URL: https://codereview.chromium.org/2320583002 .
2016-09-21 11:48:10 +02:00
Johnni Winther 012229ec83 Split Universe into ResolutionUniverse and CodegenUniverse
Main changes in universe.dart

R=het@google.com, sigmund@google.com

Review URL: https://codereview.chromium.org/2318593003 .
2016-09-21 11:24:26 +02:00
Johnni Winther b7d424f6fd Handle local functions in kernel_impact.
R=het@google.com

Review URL: https://codereview.chromium.org/2359453002 .
2016-09-21 11:18:03 +02:00
Johnni Winther 614cde5b1c Split World usage into open, inference, and closed world.
This is a step towards separating the backend element model from the frontend model.

Main changes in world.dart.

R=het@google.com

Review URL: https://codereview.chromium.org/2314703002 .
2016-09-21 10:54:34 +02:00
Johnni Winther 7ea9f8b8bc Handle string interpolation/juxtaposition in kernel_impact.
R=het@google.com

Review URL: https://codereview.chromium.org/2357433003 .
2016-09-21 10:44:57 +02:00
Stephen Adams 3d9bbdaa9a dart2js load elimination: Look through refinements for locations
We have to look through the refinements (via .nonCheck()) for locations in order to avoid mistaking two different refinements for two separate locations.

R=het@google.com

Review URL: https://codereview.chromium.org/1459273002 .
2016-09-20 16:12:55 -07:00
Harry Terkelsen 636084afa2 kernel->ssa: implement top-level getters and setters
See https://github.com/dart-lang/sdk/issues/27394

R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/2353793002 .
2016-09-20 10:18:08 -07:00
Johnni Winther e24939f8d6 Handle generic factory constructors in kernel_impact
R=het@google.com

Review URL: https://codereview.chromium.org/2341263002 .
2016-09-19 11:35:56 +02:00
Stephen Adams a51d185ff5 Do not add type information to constants with constructor taking type information
R=sigmund@google.com
BUG=

Review URL: https://codereview.chromium.org/2343193002 .
2016-09-16 15:09:28 -07:00
Johnni Winther 4eca725670 More features handled in kernel impact.
BUG=
R=het@google.com

Review URL: https://codereview.chromium.org/2329403003 .
2016-09-16 12:52:47 +02:00
Johnni Winther 6e62b8af9a Handle signature types and fields in kernel_impact
R=het@google.com

Review URL: https://codereview.chromium.org/2331923002 .
2016-09-16 12:43:41 +02:00
Stephen Adams 591f8ea79e Avoid merging conditions across lopp boundary
Fixes https://github.com/dart-lang/sdk/issues/27354

R=sigmund@google.com

Review URL: https://codereview.chromium.org/2339853004 .
2016-09-14 17:08:39 -07:00
Harry Terkelsen 076f4c30c9 kernel -> ssa: implement literal maps
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2335203005 .
2016-09-14 16:59:30 -07:00
Harry Terkelsen 866e4ea550 kernel -> ssa: implement literal lists
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2346543002 .
2016-09-14 11:26:26 -07:00
Harry Terkelsen 8be34ddd39 Build entire program with kernel for conversion to ssa.
This CL has the kernel task of the backend building the entire program.
This causes the compiler to resolve a lot more than usual, and so we need
to support many language features in the kernel -> ssa builder to compile
all of the helper functions that are included in the output.

R=sigmund@google.com

Review URL: https://codereview.chromium.org/2338093002 .
2016-09-14 09:42:23 -07:00
Lasse R.H. Nielsen bcdf0a1f12 Make dart2js not consider dart:io there if the library is unsupported.
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2321973002 .
2016-09-13 09:21:54 +02:00
Florian Loitsch 0683f81979 Async-helper only takes 3 arguments.
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2322323002 .
2016-09-10 13:10:36 +02:00
Harry Terkelsen 62ec3cf5aa fix other files in kernel after roll
Review URL: https://codereview.chromium.org/2323373003 .
2016-09-09 16:58:56 -07:00
Harry Terkelsen e4f1526449 roll kernel to latest
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2329123002 .
2016-09-09 16:35:31 -07:00
Harry Terkelsen 53870d1914 build kernel for the entire program after resolution
Rasta needs to have access to elements that aren't resolved by normal
dart2js. We need to let it add elements to the resolution queue so
it can get all the information it needs.

R=sigmund@google.com

Review URL: https://codereview.chromium.org/2324213003 .
2016-09-09 16:06:22 -07:00
Johnni Winther 8bdf7ab425 Compute ResolutionImpact directly from kernel, part 1 of ?
R=het@google.com

Review URL: https://codereview.chromium.org/2323733002 .
2016-09-09 09:24:47 +02:00
Harry Terkelsen 689aa18799 When registering deferred constant, use canonical output unit.
Before, we were just creating a new output unit, which would cause
constants to map to unnamed output units.

BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2315973002 .
2016-09-07 17:01:39 -07:00
Stephen Adams c70952c7bc dart2js: Pass type information to constructor rather than add later.
This is a redo of https://codereview.chromium.org/1913033002 that fixes some bug with the interactions with type optimizations.

BUG=
R=sigmund@google.com

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

Committed: https://github.com/dart-lang/sdk/commit/9217be050d7bd45eb399ea0b457f8b44eea3892f
Reverted:  https://github.com/dart-lang/sdk/commit/cdd6eeb57dbb2d0715c6b93451ce5861c03afa49
2016-09-07 15:07:54 -07:00
Stephen Adams cdd6eeb57d Revert "dart2js: Pass type information to constructor rather than add later."
lib/mirrors/fields_type_test fails due to the extra fieldspec.
We will have to filter or use some other technique to make constructor generation
add the extra parameter and assignment.

TBR=sigmund@google.com

BUG=

Review URL: https://codereview.chromium.org/2319863002 .
2016-09-07 13:46:42 -07:00
Stephen Adams 9217be050d dart2js: Pass type information to constructor rather than add later.
This is a redo of https://codereview.chromium.org/1913033002 that fixes some bug with the interactions with type optimizations.

BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2310573002 .
2016-09-07 12:29:01 -07:00
Stephen Adams 65efe1dc08 Another round of GVN is sometimes worthwhile after code motion
Code motion really should be integrated with of GVN, since GVN and
code motion generate opportunities for each other.  Looking at a
sample of functions it is rare that the extra phases execute solely
due to code motion, so I don't think this much of a compile-time risk
and benchmarks back that up.

This fixes some sad looking code from a pending CL.

R=sigmund@google.com

Review URL: https://codereview.chromium.org/2315143002 .
2016-09-07 11:18:06 -07:00
Stephen Adams ecb0938f11 Don't undo an interceptor optimization
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2316893002 .
2016-09-07 09:15:31 -07:00
Stephen Adams 74fee40234 dart2js: Inhibit code motion of indexing
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2318673004 .
2016-09-07 09:13:03 -07:00
Johnni Winther f3520a2d35 Further separate CodegenEnqueuer from ResolutionEnqueuer
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2306423002 .
2016-09-07 11:00:21 +02:00