Commit Graph

587 Commits

Author SHA1 Message Date
Johnni Winther c987c9e5a7 Propagate cached static types to inference and ssa
+ use it to skip unnecessary casts.

Change-Id: Ib503a6fb74907f7e6367c8ee44548268e03045cf
Reviewed-on: https://dart-review.googlesource.com/c/86560
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-12-07 19:57:05 +00:00
Sigmund Cherem 2a39f63c2a Record deferred accesses in kernel world impacts and use it for splitting only
under a flag.

This reapplies commit 70e1517d98, but adds a flag
to gradually migrate users before enabling it by default.

Patchset 1 matches the old CL

Change-Id: Iaf7ee3dec8d4aa658f0b4334549b507e5a610a68
Reviewed-on: https://dart-review.googlesource.com/c/86444
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-12-06 23:20:38 +00:00
Sigmund Cherem adf595dc62 Revert "Record deferred accesses in kernel world impacts and use it for splitting."
This reverts commit 70e1517d98.

Reason for revert: saw unexpected regression on acx-gallery as well. I'd like to look in more detail and reland if it is justified.

Original change's description:
> Record deferred accesses in kernel world impacts and use it for splitting.
> 
> On large apps this cuts down the time spent in the deferred loading algorithm by
> two thirds. To address issue #35311, this CL keeps things sound and may load in
> the main unit more code.
> 
> On some large apps, it appears the effect of this change is not that measurable,
> and we even see an improvement. I'm still validating the data, but I believe
> this is in part because there was a different bug
> in the previous algorithm: constructors were never deferred
> because we were looking for the constructor-name, usually '', instead of the
> enclosing class name.
> 
> My current data is that, the main unit of some large app shows:
>   old algorithm:        13,213,191
>   sound algorithm:      13,150,145
>   unsound algorithm*:   13,147,282
>   fixed old algorithm:  13,146,509
> 
> * ignoring return type of closures
> 
> 
> Change-Id: I7d3e525393ef38979b26051b4d354fc1001560af
> Reviewed-on: https://dart-review.googlesource.com/c/85725
> Commit-Queue: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

TBR=johnniwinther@google.com,sigmund@google.com

Change-Id: I6992279bebcc99578f94087a17d6c327b32a0876
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/86246
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-12-05 19:16:32 +00:00
Sigmund Cherem 70e1517d98 Record deferred accesses in kernel world impacts and use it for splitting.
On large apps this cuts down the time spent in the deferred loading algorithm by
two thirds. To address issue #35311, this CL keeps things sound and may load in
the main unit more code.

On some large apps, it appears the effect of this change is not that measurable,
and we even see an improvement. I'm still validating the data, but I believe
this is in part because there was a different bug
in the previous algorithm: constructors were never deferred
because we were looking for the constructor-name, usually '', instead of the
enclosing class name.

My current data is that, the main unit of some large app shows:
  old algorithm:        13,213,191
  sound algorithm:      13,150,145
  unsound algorithm*:   13,147,282
  fixed old algorithm:  13,146,509

* ignoring return type of closures


Change-Id: I7d3e525393ef38979b26051b4d354fc1001560af
Reviewed-on: https://dart-review.googlesource.com/c/85725
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-12-05 17:40:27 +00:00
Johnni Winther c18225d98c Implement guarded type promotion in dart2js
Change-Id: Ic284990c73ff5cb4b201ed4bbcc57ec0d7b0b66f
Reviewed-on: https://dart-review.googlesource.com/c/85923
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-12-05 11:52:26 +00:00
Sigmund Cherem 01da85ce7c Add flag to emit kernel immediately after invoking the CFE
This will be used initially to create the 3-way split in the compiler. Later
this will:
- include our transformation for super mixin calls
- remove the need to emit the .dill after global analysis
- eventually get replaced by a modular step that only builds a portion of the
.dill file.

Change-Id: Iebf2bd6d023716f04dc542ae9b2a85919159c4c0
Reviewed-on: https://dart-review.googlesource.com/c/85840
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-12-04 16:55:57 +00:00
Sigmund Cherem d9c6bc0316 Improvements to verbose timing data printing.
- format is padded and includes  %
- measure explicitly subtasks of deferred load
- use shorter names for other tasks


Sample output on swarm:

Info: Timings:
    kernel loader:                                 1.407s (17.1%)
    Front end:                                     0.736s  (8.9%)
    Front end > closures:                          0.102s  (1.2%)
    Front end > worldImpact:                       0.586s  (7.1%)
    Type inference:                                1.143s (13.9%)
    Deferred Loading:                              0.002s  (0.0%)
    Deferred Loading > prepare:                    0.002s  (0.0%)
    Enqueue:                                       0.455s  (5.5%)
    self:                                          0.914s (11.1%)
   *self > impl.run:                               0.034s  (0.4%)
    self > run:                                    0.206s  (2.5%)
    self > compileFromKernel:                      0.012s  (0.1%)
    self > computeClosedWorld:                     0.364s  (4.4%)
    self > processQueue:                           0.033s  (0.4%)
    self > emptyQueue:                             0.040s  (0.5%)
    self > applyImpact:                            0.146s  (1.8%)
    self > work.run:                               0.076s  (0.9%)
    SSA builder:                                   1.002s (12.2%)
    SSA optimizer:                                 1.302s (15.8%)
    SSA optimizer > SsaInstructionSimplifier:      0.421s  (5.1%)
    SSA optimizer > SsaTypeconversionInserter:     0.036s  (0.4%)
    SSA optimizer > SsaRedundantPhiEliminator:     0.012s  (0.1%)
    SSA optimizer > SsaDeadPhiEliminator:          0.010s  (0.1%)
    SSA optimizer > SsaTypePropagator:             0.261s  (3.2%)
    SSA optimizer > SsaCheckInserter:              0.030s  (0.4%)
    SSA optimizer > SsaDeadCodeEliminator:         0.067s  (0.8%)
    SSA optimizer > SsaGlobalValueNumberer:        0.071s  (0.9%)
    SSA optimizer > SsaCodeMotion:                 0.024s  (0.3%)
    SSA optimizer > SsaLoadElimination:            0.083s  (1.0%)
    SSA optimizer > SSA value range builder:       0.099s  (1.2%)
    SSA optimizer > SsaSimplifyInterceptors:       0.048s  (0.6%)
    SSA code generator:                            0.623s  (7.6%)
    Code emitter:                                  0.586s  (7.1%)
    Diagnostic handler:                            0.001s  (0.0%)
Change-Id: I4af3ff04954b28ee12354bc79eae517169a3b96e
Reviewed-on: https://dart-review.googlesource.com/c/85550
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-11-29 18:09:20 +00:00
Johnni Winther 82f9884289 Support exact class and this expression relations in StrongModeConstraint
Change-Id: I32e6e5b6f55d4ef4240b6ba87eb26dfc2a699130
Reviewed-on: https://dart-review.googlesource.com/c/85166
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-11-27 13:50:04 +00:00
Johnni Winther 9cfab12d36 Reorganize imports to decouple dart2js_target.dart from dart2js
Change-Id: Ie958dbbf75f5cac20074b2a64a4eefb9de636116
Reviewed-on: https://dart-review.googlesource.com/c/85290
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-11-27 09:15:34 +00:00
Sigmund Cherem 02f6395606 Cleanup library-loader: rename as kernel producer, remove some dependencies
Once we remove the frontend strategy object, we might want to remove some additional dependencies on KernelResult

Change-Id: I27ef1fbb12e671748b59a87d2dd249100501e02a
Reviewed-on: https://dart-review.googlesource.com/c/85060
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-11-21 17:59:18 +00:00
Johnni Winther e62951fd3d Use assigned variables data to infer static types for effectively final locals.
Change-Id: I3687d28628b0476c6a848f135bbda97e594449c2
Reviewed-on: https://dart-review.googlesource.com/c/84629
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-11-21 09:16:21 +00:00
Johnni Winther 3bf6a550ea Add static type tests
Change-Id: I4282a1261ad4f4f4641750bd5ca492e5a943b6f0
Reviewed-on: https://dart-review.googlesource.com/c/84628
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-11-20 14:02:39 +00:00
Johnni Winther d544a5d3b6 Compute variable allocation data during closure scope visitor.
Change-Id: I71814a30ac469cbcfea5bf6804f6762c2e039c64
Reviewed-on: https://dart-review.googlesource.com/c/84625
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-11-20 14:02:39 +00:00
Johnni Winther b943fa897c Move closure scope classes to ir/
Change-Id: Ib14696e9ab8572e30343e0880c1d028cfc26b377
Reviewed-on: https://dart-review.googlesource.com/c/84621
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-11-20 14:02:39 +00:00
Johnni Winther d062a41404 Make resolution/codegen_world_builder into libraries
Change-Id: Ic8c00b2b3cf13a21e165486c1c825df75edd7d7b
Reviewed-on: https://dart-review.googlesource.com/c/84021
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-11-09 23:05:58 +00:00
Johnni Winther 5cb37ff5b8 Collapse KernelToElementMapImpl hierarchy
Change-Id: Ia6e14e0890709448443c97561c8641d0379a3536
Reviewed-on: https://dart-review.googlesource.com/c/84001
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-11-09 20:20:41 +00:00
Johnni Winther a9e2af657f Refactor static type computation
This decouples the computation of static types from the kernel impact
visitor and prepares for flow sensitive static types (i.e. guarded type
promotion).

Change-Id: Ic8b6283bd64d535ff49b1d6fee2e5ae38d48a2d9
Reviewed-on: https://dart-review.googlesource.com/c/83381
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-11-08 13:16:42 +00:00
Johnni Winther 9a1a7763f1 Skip checking of casts in metadata
This avoids assertion failure on js-interop class computation.

Change-Id: I040c6d63dbc427d239eb97c22dc8c3c67a6fb9fd
Reviewed-on: https://dart-review.googlesource.com/c/82722
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-11-05 10:40:58 +00:00
Matan Lurey c8fd361478 Stop using deprecated package:collection/*.dart
where `*.dart` isn't `collection.dart`.

Closes #32676
https://github.com/dart-lang/sdk/pull/32676

GitOrigin-RevId: 40f025bcf9ef71f6ccef5bc318f9862518aa0692
Change-Id: I95be4e7b31d269921a9ebbb91e5cdb2aa6702ec6
Reviewed-on: https://dart-review.googlesource.com/c/48460
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2018-11-05 10:13:06 +00:00
Johnni Winther 672a049303 Move KClosedWorldImpl to its own library
+ and merge it with its mixin

Change-Id: Ib0eea07cee0bed602be90cf4a324bd423cba0a86
Reviewed-on: https://dart-review.googlesource.com/c/82720
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-11-02 21:11:31 +00:00
Johnni Winther 41c50d9ac9 Support serialization of deferred imports
+ add tests for various fixes
+ add canonicalization support in serialization

Change-Id: Ib6a8bfd6073dbd93c1ba4fd9d2feff77ac43b178
Reviewed-on: https://dart-review.googlesource.com/c/81402
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-10-26 09:36:18 +00:00
Johnni Winther 8b6f8969a6 Support post-inference serialization/deserialization
Currently handling Swarm in-memory serialization/deserialization.

Change-Id: I4b01f70d1e42d7462ed079ece227d6c2ed4de597
Reviewed-on: https://dart-review.googlesource.com/c/80445
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
2018-10-22 14:37:04 +00:00
Sigmund Cherem ef870b25e6 Dont complain about TypeImpl in switch cases
As discussed earlier today: even though TypeImpl overrides ==, all other
implementations do not and most switch cases handling type literals work as
intended.

We however continue to consider this a bug that needs to be fixed in the future
by canonicalizing types in dart2js.

Change-Id: Id8b1a6a84e7bb1859398456ef70f25b7301f9fe4
Reviewed-on: https://dart-review.googlesource.com/c/80703
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-10-18 23:18:16 +00:00
Johnni Winther 843b4c9c23 Refactoring to prepare for serialization
- pipes GlobalLocalsMap, ClosureData and OutputUnitData through JClosedWorld

Change-Id: Id1d8353a9c75217aab7e06a276bfb503f50a5811
Reviewed-on: https://dart-review.googlesource.com/c/79683
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-10-17 12:05:05 +00:00
Johnni Winther 2a9ba09b93 Allow abstract operator == methods in switch case constants
Change-Id: I14800a050f10ced1fd2d029b006b1d55c0cfb32c
Reviewed-on: https://dart-review.googlesource.com/c/80141
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-10-17 07:22:53 +00:00
Johnni Winther dc9d6785de Report compile-time errors on invalid switch cases
This is a temporary fix for issue 32557 until CFE handles it.

Change-Id: I4f0cfa5a98af6b25536f0c8e0a257940f8ce708b
Reviewed-on: https://dart-review.googlesource.com/c/79561
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
2018-10-12 17:52:12 +00:00
Peter von der Ahé f1b6d81404 Remove Target.strongMode
Change-Id: I60f72904f4a9ae3427b2a2633a22f70a6b6f8ea9
Reviewed-on: https://dart-review.googlesource.com/c/79020
Commit-Queue: Peter von der Ahé <ahe@google.com>
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-10-10 12:49:18 +00:00
Peter von der Ahé 8c872e0e3a Remove TargetFlags.strongMode
Change-Id: Ibf8661e5444d16666c54f1d81c626893b000521a
Reviewed-on: https://dart-review.googlesource.com/c/78986
Commit-Queue: Jens Johansen <jensj@google.com>
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-10-10 12:11:41 +00:00
Johnni Winther 127c3fed6c Handle data URIs in dart2js
Change-Id: Ifca03b51aa16e2b4676490c94dafe335e1a94171
Reviewed-on: https://dart-review.googlesource.com/c/76901
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-10-08 13:00:34 +00:00
Johnni Winther 073f6e8623 Register type arguments on generic super invocations.
Closes #34701

Change-Id: Ib0e575213c87be915cbfaff101e4421352030e87
Reviewed-on: https://dart-review.googlesource.com/c/78360
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-10-05 22:25:57 +00:00
Peter von der Ahé 248954117a Consolidate dart2js front-end dependencies
Also, convert dart2js to use onDiagnostic.

Change-Id: Ifdf89349eaf2ebe8cfcd1994712b3d1be2dd4197
Reviewed-on: https://dart-review.googlesource.com/77400
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-10-02 12:34:28 +00:00
Johnni Winther 41a875f420 Fix (super)mixins issues
Change-Id: I5892f2fec7fc7b7449fb600c74e4d105dc0f4bbe
Reviewed-on: https://dart-review.googlesource.com/77180
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-09-28 23:03:24 +00:00
Johnni Winther 82b3501c3c Fix supermixin handling in dart2js
Change-Id: I77251a1b90f62e1c103f018bdd15a7ae385008ee
Reviewed-on: https://dart-review.googlesource.com/76941
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
2018-09-27 11:44:53 +00:00
Kevin Millikin c9b05d3f1f Allow super calls in mixin declarations
Allow super calls to occur in mixin declarations if they target a
method from any of the superclass constraint interfaces.

Instead of compiling the Dart mixin declaration
    mixin M on S0, S1 {...}
to Kernel:
    abstract class _M&S0&S1 = S0 with S1;
    abstract class M extends _M&S0&S1 { ... }
we compile it to Kernel:
    abstract class _M&S0&S1 implements S0, S1 {}
    abstract class M extends _M&S0&S1 { ... }
because the former is not symmetrical with respect to S0 and S1.  It
will prefer a method from the 'mixin' S1 over one from S0 which can
give a compile-time error if the method from S0 is more general.

Modify mixin inference to support the new compilation of mixin
declarations.  It still has to support old-style VM super mixins until
support for those is removed from the VM.

Change-Id: Ib945aa11cc19c457b07bc802beae10d1663ff6b7
Reviewed-on: https://dart-review.googlesource.com/76141
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-09-27 10:19:30 +00:00
Johnni Winther 225b8d5075 Specialize Object properties in static type computation
This normalizes all accesses of Object properties on dynamic receivers
to target the corresponding Object members.

CFE already set the interface target on for instance `a == b` where `a`
has static type `dynamic` but didn't for the implicit call to `==` in
for instance `a?.b`.

Change-Id: I4f714766ac33a431f5ef645df7ee1bbb254c06ce
Reviewed-on: https://dart-review.googlesource.com/76123
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-09-27 09:51:01 +00:00
Johnni Winther 4a58112a7c Move kernel_impact.dart from ssa/ to kernel/
Change-Id: I284aaea0f2743017ec2d0042de7453f479586f03
Reviewed-on: https://dart-review.googlesource.com/76666
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-09-27 09:00:56 +00:00
Johnni Winther e9c949372e Remove unused parts of J/K*Env classes
Change-Id: I5aa5f5cb5504f5479ab9b18960246fb68b56d02c
Reviewed-on: https://dart-review.googlesource.com/76665
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-09-27 08:17:56 +00:00
Johnni Winther 4659cb9480 Fully split JsToElementMap and KernelToElementMap
- including the first benefit: Removing Class/Member definitions from the K-world.

Change-Id: I440dce2e37758dd276a417851f67a1403f6535a0
Reviewed-on: https://dart-review.googlesource.com/76641
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-09-27 08:17:56 +00:00
Johnni Winther 1652850381 Compute static types during impact computation
This speeds up the computation of static type by avoiding repeated
visits of subtrees. The change also paves the way for improving
static type computation beyond what is specified. For instance by
handling negative type promotions.

Change-Id: Ifa3ea0f9760251f43cbbcc97b684004741a97b11
Reviewed-on: https://dart-review.googlesource.com/76020
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-09-25 09:58:19 +00:00
Johnni Winther 4b312b2b8c Support multiple superclasses in the mixin on clause.
Change-Id: I23c613170be8fdf3c4a7ace560d71161b3e7320f
Reviewed-on: https://dart-review.googlesource.com/75881
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-09-25 08:26:38 +00:00
Johnni Winther cf5cdea808 Add J/K versions CommonElements and ElementEnvironment
This is a step towards separating the element map implementations.

Change-Id: Iaf8cee48bd0c127a981b1661773d9036b419fecf
Reviewed-on: https://dart-review.googlesource.com/75300
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-09-20 07:37:32 +00:00
Johnni Winther 5dff98f960 Use inferred map type arguments in element map fields
+ split method creation from lookup in kernel element map.

Change-Id: If375d8ffdb12cde9180476828a9324e372d5738f
Reviewed-on: https://dart-review.googlesource.com/74721
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-09-18 06:51:15 +00:00
Johnni Winther 2da165a62d Stop compilation early on CFE compile-time errors
Change-Id: Ie93af5880bbd0b9f0c72aa6c1832550bf9025595
Reviewed-on: https://dart-review.googlesource.com/75160
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-09-18 06:50:55 +00:00
Johnni Winther 625d679c8b Remove ElementCreatorMixin from JsKernelToElementMap
Change-Id: I2ff9014305177a1f0060626062fadf8276b74979
Reviewed-on: https://dart-review.googlesource.com/74400
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-09-13 07:32:15 +00:00
Johnni Winther 5ab5c00ea4 Compute annotations in the K-World
This ensures that entities only used in metadata is part of the K-world
and doesn't have to be created late in (only) the J-world.

Change-Id: If9a264c51fba99093a196538fb655b1d5fafd47a
Reviewed-on: https://dart-review.googlesource.com/73880
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-09-11 11:10:37 +00:00
Johnni Winther db1570bdcd Split element maps for J/K further
* The J model is in the /js_model/ folder and KernelToElementMapForBuilding is renamed
  to JsToElementMap.
* The K model is in the /kernel/ folder and KernelToElementMapForImpact is renamed
  to KernelToElementMap.
* Code shared between JsToElementMap and KernelToElementMap is in the /ir/ folder using
  the interface IrToElementMap internally.
* KernelToElementMap and JsToElementMap do _not_ implement IrToElementMap so all code
  that is not part of the implementation must explicitly use one or the other.
* Both KernelToElementMap and JsToElementMap extend KernelToElementMapBase
  but this will be changed in a follow-up.

Change-Id: Id6b762984d25354477cb099dc2f8301b83a7ba07
Reviewed-on: https://dart-review.googlesource.com/73382
Reviewed-by: Stephen Adams <sra@google.com>
2018-09-11 11:10:37 +00:00
Johnni Winther f8633aeae7 Move KernelToElementMapForBuilding and friends to js_model/element_map*
- this is part of splitting element map classes between K/J worlds

Change-Id: I82e4373f0849b12cb0d1586b77bfa411f55d26a7
Reviewed-on: https://dart-review.googlesource.com/72822
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-09-10 14:44:02 +00:00
Johnni Winther 88bff737f9 Inline element map mixins that are only applied once
Change-Id: Ibfadf6ee6aaf5ec184b4b7b71cb8767cd968a237
Reviewed-on: https://dart-review.googlesource.com/72820
Reviewed-by: Stephen Adams <sra@google.com>
2018-09-10 14:44:02 +00:00
Johnni Winther 8c03bff4bb Step towards splitting element maps in K/J versions
* Refactor ClassData, remove ensureCallType
* Make kernel/types.dart its own library

Change-Id: I280f7de0b78f9a14551f0ae0548452693a6d0d05
Reviewed-on: https://dart-review.googlesource.com/72761
Reviewed-by: Stephen Adams <sra@google.com>
2018-09-10 14:44:02 +00:00
Johnni Winther e311e12bc4 Move all data for collection for testing behind one flag
- to ensure that we don't retain unneeded data in production

Change-Id: I2f702e040ed99cb8540a5b60efcf88a2c6b33af0
Reviewed-on: https://dart-review.googlesource.com/72720
Reviewed-by: Stephen Adams <sra@google.com>
2018-09-10 14:44:02 +00:00