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 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>
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>
... and no longer generate handleLiteralSet or handleLiteralMap.
In addition, a new hasSetEntry parameter has been added to the
handleLiteralSetOrMap event generated by the parser to support
existing behavior. Once all listeners have implemented
unified collections and that feature is enabled by default,
the hasSetEntry parameter can be removed.
This is the third of several CLs updating the parser and its listeners
to conform to the unified collection spec:
https://github.com/dart-lang/language/pull/200
Change-Id: Ia305eab1f720658f357ac4102b0b0c8128d16997
Reviewed-on: https://dart-review.googlesource.com/c/93963
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
In the incremental compiler we used to invalidate the entry point for
every invocation. This is no longer necessary, and we should stop.
Change-Id: I563bdea53c8ec85657fbb8be96d15ba3a7b57e3c
Reviewed-on: https://dart-review.googlesource.com/c/91824
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
To get the same context on errors for expressions compiled against
something we just compiled and something we've loaded from dill we need
the dill to contain offsets on TypeParameters.
We cannot currently change the binary format to include it, so for now
ignore the context in expression_test.
Change-Id: Ifbcc4352650fc56974bf5a78d9eb615ecec34e39
Reviewed-on: https://dart-review.googlesource.com/c/92743
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Prior to f4379435dd,
using a type variable in an expression used for
expression compilation, where the type variable came from a class
that was loaded from dill would fail because type variables wasn't set
up so the type variable didn't exist in scope.
This adds a test for it - the actual fix was landed in
f4379435dd.
Change-Id: Icccf796b96853ece5ea96d4f29d76bb92b59fc83
Reviewed-on: https://dart-review.googlesource.com/c/92564
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Without this CL the incremental compiler could potentially return too
few libraries (or possibly 0 libraries):
If the entry point is translated to a package-URI and there is no main,
the entry-library when doing the transitive closure cannot be found and the
output will be no libraries.
If the entry point is translated to a package-URI and there is a main,
the entry-library when doing the transitive clusire is only found because
of the otherwise unneeded `mainMethod` parametesr.
This CL adds tests and fixes the problem.
Change-Id: Icea72eb892cb0d16f0d86e3729e29ce026fa7073
Reviewed-on: https://dart-review.googlesource.com/c/92430
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>