If - for instance - a file (say 'main.dart') tries to include a part
(say 'lib.dart') that is not part of that file (i.e. doesn't state
something like 'part of "main.dart"'), and the file ('lib.dart') is not
otherwise used, before this change, the library ('lib.dart') would be
included in the first comile, but on subsequent re-compiles wouldn't
include it because it's not referenced, nor ever cleaned up
(and would thus be re-compiled.)
This change garbage-collects the library as it's not referenced.
Change-Id: I8fa90b3ae6fc3d99af9fec780abe62855e653ddb
Reviewed-on: https://dart-review.googlesource.com/c/90385
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Change-Id: Ib36a0bd243010a5b51bf49bda750d7e432017eae
Reviewed-on: https://dart-review.googlesource.com/c/90703
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
The classes Future and Stream are exported by dart:core.
By attempting to look up FutureOr in dart:core before dart:async,
we support simple a simple test scenario where there's only one
platform library.
Change-Id: I76627f89957b91fbdb52a7772c177a769c37cecb
Reviewed-on: https://dart-review.googlesource.com/c/90381
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
The tests are copied from pkg/kernel/test/type_subtype_test.dart
Change-Id: I1120aa7ae1928fc20982f24fab14925b9ee851c8
Reviewed-on: https://dart-review.googlesource.com/c/90229
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Unevaluated constants are re-evaluated, and evaluated constants are
re-canonicalized.
Change-Id: I241f6b5d734797101ab1168746a849713c104695
Reviewed-on: https://dart-review.googlesource.com/c/91230
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Change-Id: I3c1f1af40f5930a02355f8d986a27db606998096
Reviewed-on: https://dart-review.googlesource.com/c/90980
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Change-Id: I93b43ad2d58ab2804ed7deafeadb6346eade9eab
Reviewed-on: https://dart-review.googlesource.com/c/91481
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
This implementation did not check whether the path was actually contained
in the package:build workspace. It also made an assumption about how a
resource which is a directory would be treated, which was masked by an
unconditional-and-silenced catch.
The existing test which should have caught this had a hidden exception,
caught by the same unconditional-and-silenced catch. :(
Bug: https://github.com/dart-lang/linter/issues/1393
Change-Id: I0a6ecb584e06877463a47681830eed8f6f914030
Reviewed-on: https://dart-review.googlesource.com/c/91441
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
When creating a closure, receiver is loaded in order to obtain
instantiator type arguments. That access was not capturing
receiver, if a closure was created inside another closure.
Change-Id: I9ec6d9f2c90643e6deb9c4efde1b070a3255a387
Reviewed-on: https://dart-review.googlesource.com/c/91442
Commit-Queue: Régis Crelier <regis@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Rationale:
This is a start with a graph checker that verifies
the consistency of the flow graph after each compiler
pass with the goal of detecting errors as early as
possible. The checks add overhead, so are only run
in debug mode. The objective is that all written
and unwritten assumptions on the flow graph that
are relatively easy to check will be converted
into actual code.
Change-Id: Iad9927d5b0fd87a43dc6a7369174d52761d89c9e
Reviewed-on: https://dart-review.googlesource.com/c/91143
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Rationale:
Found by the new graph checker! Dominance relation was
not complete after incremental update (note that most
passes get around this by just recomputing the full
relation). Graph checkers are very useful to find
such omissions.
Change-Id: I4f2c8bfaee54b7a092aaaec04886635c86b451fa
Reviewed-on: https://dart-review.googlesource.com/c/91244
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
If, for instance, including something that is not a part of the file
you include it from, previously we would copy things over anyway, and
other libraries wouldn't be able to use it
(for instance including it would fail).
Now, instead, we don't include it, structurally pretending the "part of"
line wasn't there (that is, we don't copy things over and other libraries
are free to include it).
As before, an error is given, but errors doesn't 'cascade' into other
libraries that (before this change) couldn't use the included file.
Change-Id: Ica6225c437ea7dd66f9e8955e638f442b2df8f97
Reviewed-on: https://dart-review.googlesource.com/c/90380
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
This achieves consistency with similar getters in the API.
This is technically a breaking change, since it changes a published
part of the Kernel API. Since the constants API is relatively new and
so far only used internally in the AOT compiler, the change is
expected to be unproblematic.
Closes https://github.com/dart-lang/sdk/issues/35696
Change-Id: I3ca30922580d226ccbdb6f77496983c21ef2102b
Reviewed-on: https://dart-review.googlesource.com/c/90220
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Get an error saying something like
"The argument type 'dart.core::String' can't be assigned to
the parameter type 'dart.core::String'"
Change-Id: I327c613a2070495653e4089475a4f3edf550e9d4
Reviewed-on: https://dart-review.googlesource.com/c/91228
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Change-Id: Ia2bc80d7a9ba3dc7716f8052e367c7711646a839
Reviewed-on: https://dart-review.googlesource.com/c/91145
Auto-Submit: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
This reverts commit 324718fadd as it fixes performance issue found on Flutter benchmark.
The fix is to make TLAB smaller than new heap semi-space. Original implementation had TLAB occupy whole semi-space.
Change-Id: I4b5b5a3027b2d352ccb80538079a042406b5cf54
Reviewed-on: https://dart-review.googlesource.com/c/91171
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
This avoids a bug in handling ir.Let bindings.
Change-Id: I0ccd932248a550a5017dfe565209e8ef62299ff3
Reviewed-on: https://dart-review.googlesource.com/c/91241
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
It was deprecated in analyzer version 0.34.0, and clients are no
longer using it.
Change-Id: Ib27e9173eb57bcbec700071bd69acbcfaf96e913
Reviewed-on: https://dart-review.googlesource.com/c/91112
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
The PackageBuildWorkspace depends on its ContextBuilder to know if a
[findFile] should return null.
Bug: https://github.com/dart-lang/sdk/issues/35750
Change-Id: Ic562314fa87d1333e8f07efbb06a461be769ea32
Reviewed-on: https://dart-review.googlesource.com/c/91161
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Plumb experimental flags found in a test's SharedOptions through to the
gen_kernel command invoked in dartkp tests. Also enable a whole bunch
of tests that are now passing.
Bug: https://github.com/dart-lang/sdk/issues/35602
Change-Id: I425f55ea6c84d28e085ab2c848376e396e68a225
Reviewed-on: https://dart-review.googlesource.com/c/90860
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Based off of these original changes:
https://codereview.chromium.org/2857393003
This is a breaking change and will require an annoucement stating such
before landing.
Fixes#29554.
Change-Id: Ibb56fd49648edc6b9fd567240a3bebb05a14234d
Reviewed-on: https://dart-review.googlesource.com/c/90120
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
In addition to (path, modification) also cache on the content hash.
Implement getLibraries().
R=brianwilkerson@google.com
Change-Id: I263b5479f867aa28d5e43bc0c1bb02702ab6c915
Reviewed-on: https://dart-review.googlesource.com/c/91160
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
- Move compiler pass events to a new CompilerVerbose stream
- Remove serialization phase events
- Add class name to class finalization event (lost along with finalization events in recent cleanups of finalization)
- Add event for kernel loading
Change-Id: Ie72bced978400ea174c1551c961baa55c691b019
Reviewed-on: https://dart-review.googlesource.com/c/90883
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
This CL introduces 2 new parser listener events
in preparation for parsing for control flow structures
in literal lists, sets, and maps.
Change-Id: I230f36cded714a13e4badb401fe5b5906c93a2da
Reviewed-on: https://dart-review.googlesource.com/c/91144
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>