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>
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>
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>
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>
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>
- 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>
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>
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>
* 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>
* 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>
This makes closed world computation take the static type of the receiver
into account and removes non-live members from the J-world.
Change-Id: I5547aaae4685c6417a94916df0bc4e621296ce8d
Reviewed-on: https://dart-review.googlesource.com/72643
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
+ improve the commonSubclasses implementation to support the
implementation of FlatTypeMask.intersection and RuntimeEquals.equals
computation. FlatTypeMask.intersection is now ~20% faster.
Change-Id: I0b452afd260ab3b0598ed4d67f07a55ea96d2756
Reviewed-on: https://dart-review.googlesource.com/63560
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
+ improve the commonSubclasses implementation to support the
implementation of FlatTypeMask.intersection and RuntimeEquals.equals
computation.
Change-Id: I51c4d229e9dc6d5de101aff33e56bb44bf93bc0d
Reviewed-on: https://dart-review.googlesource.com/61927
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>