Moving here allows the checks to cover more code paths including
the mode used in google3 where the no mixed .dills in sound mode
was not being enforced for ddc targets.
Change-Id: I1af1d63f96dd23f56d637bffd4eef397d4deb167
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162823
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Override errors on member signatures would point to the synthesized
location (the enclosing class definition) and not the original
member declaration.
Change-Id: If271039f2238f7ae74706e5c4f5143ea6ee4fc1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162750
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Add an initial draft of the widget cache for fast single widget reloads.
THe intention is to capture the common cases where only a single widget class is modified. This can
provide a signal to the flutter tool that a faster reassemble can be performed, rather than forcing
a complete cold frame.
For more details see the linked issue or go/fast-single-widget-reloads
Bug: https://github.com/flutter/flutter/issues/61407
Change-Id: I1c95fd8fb2d1b297f41874dd69c1c76b0456a4bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161604
Commit-Queue: Jonah Williams <jonahwilliams@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
InterfaceType's referring to unnamed mixin applications continuously
cause problems for backends since these might not correspond to
types supported at runtime. The LUB specification does not mention
how to handle these so it is valid skip these in the computation of
LUB.
Change-Id: I38f46bf43d5858dec473c26326b741cf36eb57d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145420
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
This CL also adds fileUri/charOffset to all TypeBuilder's and renames
Void/FutureOr/Never/Dynamic/BuiltInTypeBuilder to *TypeDeclarationBuilder
so match their relation to TypeBuilder/TypeDeclarationBuilder.
Closes#42962
Change-Id: Iee5102134574d24f748103282a37bb9a85a0ac2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161165
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
This CL enables textual outline modelling in the incremental compiler,
meaning that the textual outlines created (and compared) to figure out
if we can do a "minimal invalidation" (with the experiment enabled)
is "modelled", i.e. have members, classes etc sorted so that re-ordering
things in a file generally doesn't cause a "transitive invalidation".
Change-Id: I9daddf2bd34e4c2e17b42a5e356033816d05b359
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161172
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
This CL:
* Changes the events so beginX and endX events always comes in pairs
(though technically not right as some specific events can be beginX
endY --- but in those cases it is at least documented and used in code
that actually tests it).
-> This entails adding some events and converting something from
"beginX" to "handleX" instead.
* Adds a utility that can generate an AST of sorts directly from the
parser via a listener using the begin/end matching (and knowing of the
specific ones that doesn't match directly).
* Adds a test that checks that - at least for all tested (50,000+) files
- the AST actually generate "correctly", i.e. matches up begin/ends
and ends up with a single top entry "CompilationUnit".
* Adds a different visualization to the parser listener events by
displaying the "AST directly from the parser" in a UI that can be
navigated. The visualization may not be the best, but it's certainly
a stepping stone.
Change-Id: I9b27f7bbf3be442adc92f357c7b3c46da6f84cf7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159664
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This adds support lowering the encoding of top-level/static fields
with initializers as if they were marked as late fields. This ensures
that LateInitialization is thrown if final fields are written to during
initialization.
Closes#42956
Change-Id: I488fdddd87ebd935a0cdaf82a724e9b87d5f91ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160724
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
When a crash occurs in Uri it doesn't include the content of the failing
Uri, making it very hard to determine why the error situation occurred.
With the change the offending Uri will be printed as part of the message.
Change-Id: I41bb9762e5fc8deb97e051adaf336ecf3599a901
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160281
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
This CL basically change two things about the sorting:
* Entities are not sorted according to metadata. Metadata just follows
along. Before "@a class B {}" would come before "class A {}" because
"@" comes before "c". Now "class A {}" comes first because "A" < "B".
* Sorting happens on a token level, i.e. "F<int>" will now come before
"F2<int>" because "F" < "F2" whereas before it was the other way
around because "F2" < "F<" (because "2" < "<").
None of it really matters as long as sorting is done the same way when
comparing the outlines.
Doing it this way makes it faster and actually brings the runtime
(in benchmarks) less than the old (now deleted) textual outline.
Change-Id: Ib1d887ab0c14519316c8e9a3da38f0dd49b4104f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159041
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This version generally produce the same output (with slight variations
for spacing between some elements as well as for unassociated metadata)
but is slightly slower in modelled (i.e. sorting) mode.
The slow-down is remedied (so the whole thing actually becomes slighly
faster) if sorting slightly differently than the old version. That is
for another CL though.
Change-Id: Id19df710dff965250bfb7cf51d8756394cbe2067
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159080
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Before this CL the textual outline didn't know about imports and exports
and thus couldn't sort them.
This CL makes it know about them and allows imports and exports to be
sorted internally, but not mix with other stuff (e.g. imports should be
placed after "foo() {}" just because "f" comes before "i", but putting
"import 'a.dart'" before "import 'b.dart'" is OK.
This CL does not sort the hide and show entries.
Change-Id: Ic640cdaa98ac3562f8b36b21180a26584cb6d205
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158551
Reviewed-by: Johnni Winther <johnniwinther@google.com>