This allows dartdevc and the bazel worker to user
the incremental compiler with kernel.
Use --reuse-compiler-result --use-incremental-compiler to run in this mode.
Change-Id: I9189ce5f1a51320d9d96e071f8c95c80fe6fca84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95386
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
To properly recognize control-flow constructs in sets, the constant
evaluator needs to get un-desugared set literals. This commit skips the
desugaring of const set literals if the constant evaluator is enabled
and adds a similar desugaring in the constant evaluator.
Doing the desugaring in the constant evaluator (which can be called
independently of Fasta) necessitates that dart:collection is indexed
in CoreTypes. We can remove this indexing again when the VM gains
native support for set constants.
Change-Id: Ibddafdcb182e4471012801745b51b529805b7b9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98008
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
This acts as a stable backstop for situations where Fasta fails to
rewrite various erroneous constructs into invalid expressions.
Change-Id: Ibaac3d62b9cfdc597c0f85aadf9aec2920689222
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97511
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Implement the translation of for and for-in loops in non-const lists
and sets. They are lowered to block expressions containing a loop.
It is impossible to target these loops with a break or continue
because they do not contain statements in their body.
Type inference is not yet implemented.
Change-Id: I35ff1650fde54cd376fe0b444891010435c74507
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97922
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
In collection literals, support for and for-in in Fasta's body
builder. They are removed when encountered during type inference and
their lowering to block expressions is not yet implemented.
Change-Id: I41e6a7a4aca7ffafdc12119e1503e9c0df5a6589
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97628
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
This reverts commit 9db4119b67.
Revert "Change default of 'keepFields' in constant transformation to true"
This reverts commit b1e14cbe5f.
Revert "[fasta] Don't create forwarding stub if there's already a member"
This reverts commit 51da94da76.
These commits are reverted to unblock rolls into Flutter.
b1e14cbe5f is reverted because it contained
changes that prevented clean revert of the other CLs.
Change-Id: I8d3c00f0c1b146f4debe7f1a1a7de75be154e265
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97802
Commit-Queue: Alexander Aprelev <aam@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Parser support was enabled under a flag.
Enabling it would crash fasta though. This CL stops that from happening
and instead creates code that seems to work.
Change-Id: I492c9cd3cd2da5fc4e91d332481e2c5916bd927d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97505
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
This is necessary to support modular constant transformation as
needed for instance of for platform dill files.
This change also restricts the removal of additionExports to fields.
Change-Id: Ie7379f09672d8caeaf0689d42af9e1246b9678fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97632
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Parser support was enabled a long time ago (under a flag;
52892f7c47).
Enabling it would crash fasta though. This CL stops that from happening
and instead creates code that seems to work.
Change-Id: Ibe9735bd428104371ab34a1be08838988079220c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97621
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
This CL removes the sources from uriToSource for libraries
the incremental compiler doesn't keep around.
This includes:
* Explicitly invalidated libraries, also if in a package.
* Transitively invalidated libraries, also if in a package.
* Libraries that are now no longer referenced in the resulting whole
program, unless it's in a package.
* Libraries from packages that are implicitly invalidated by an
updated .packages file (e.g. if the .packages file no longer
reference it or reference a new version of it).
This does *NOT* include:
* Libraries from packages that are not invalidated and that are still
mentioned in .packages, even if the actual libraries are no longer
referenced in the resulting whole program. The reason is that these
libraries are kept around in the incremental compiler.
Bug: 36197
Change-Id: I0ed41567ab54828585326ffd4dcb3722980bf874
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97201
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>