This CL refactors the fasta parse variable declaration functionality
to pass the modifier with the begin event rather than using the
handleModifer and handleModifiers events.
* Refactor modifier parsing as described above
* Update same modifier parsing to use ModifierRecoveryContext2
* Cleanup functionality of ModifierRecovery2
* Remove 2 unused fasta parser methods
Change-Id: Ib3a6b24428dcf6ad3cb462a979a05600fe7ee673
Reviewed-on: https://dart-review.googlesource.com/44860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
This must land after we make the libraries strong clean.
Change-Id: I3a49a2be3b2bcb15842434266f55ce49e3800fc6
Reviewed-on: https://dart-review.googlesource.com/42140
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
These are a couple of cases where inlining differs from the previous
version and makes a difference in angular code.
Change-Id: Ibc8ba0d720b8bb49481c41e1332fc6a4a0292d9d
Reviewed-on: https://dart-review.googlesource.com/44701
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
In the VM, TypeRef (extending AbstractType) did _not_ implement
error(), meaning that callong error() on such a type would call it in
AbstractType which basically just says `UNREACHABLE();`.
This fixes the issue.
Change-Id: I6cb9ebe8f814296db8383c187c880f367b096312
Reviewed-on: https://dart-review.googlesource.com/44420
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
This broke ARM on a non-standard compiler.
Change-Id: Idf4e7d5ea9072e6e07d796dc676ec3e7afd6f235
Reviewed-on: https://dart-review.googlesource.com/44786
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Not only does it speed the two methods a bit up, it will also allow us to use the assembler
before all of the stubs are initialized.
Issue https://github.com/dart-lang/sdk/issues/31798
Change-Id: Ic14743ecd9d11ca4cbc5208cacad30beee0982ef
Reviewed-on: https://dart-review.googlesource.com/44500
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
incremental_load_from_dill_test is sometimes slow on Windows. Mark it as such.
Change-Id: I11bf1bac275829f5bb612ab6f8b80d646cc31a3e
Reviewed-on: https://dart-review.googlesource.com/44780
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
Change-Id: I9a2e07de692127069d8098e3a0ea45846a3f45ae
Reviewed-on: https://dart-review.googlesource.com/43672
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
In the incremental compiler we can bootstrap from a dill file.
In some cases this can lead to a crash, where compiling from scratch
wouldn't have crashed.
This CL introduces a fallback, so that if compilation crashes
(technically when we build the outline) when bootstrapping from a dill
file, we retry without bootstrapping from the dill file.
Fixes 32384.
Change-Id: Iaefc01a2c03589f615d34910b7b93f73f1fbdc36
Reviewed-on: https://dart-review.googlesource.com/44720
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
The change was reverted (thanks Slava) because gen_snapshot was failing to
find the core lib class _BigIntImpl on flutter.
The PR https://github.com/flutter/engine/pull/4735 fixed that issue on flutter.
Change-Id: Id6863d79f7fdb17f0076b63b0168394d5e95ec8d
Reviewed-on: https://dart-review.googlesource.com/44660
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Note: $fasta is true when passing --dart2js-with-kernel. This change will make it
easier to flip the default: the plan is that $fasta will be true by default
later on, and passing --dart2js-old-frontend will make it false.
TBR=sra@google.com
Change-Id: Ib917d55b2d14db954c56513af057dd9a37b9c825
Reviewed-on: https://dart-review.googlesource.com/44601
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Change-Id: I9790de51542547b4236956ed9642e565a036249c
Reviewed-on: https://dart-review.googlesource.com/44544
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
Passes bodies are moved into compiler_pass{.cc,.h}.
Invoking a pass is just INVOKE_PASS(Name) now, instead of putting a bunch of
if-s and calls in compiler.cc or precompiler.cc.
We also consolidate ability to print IL and enable-disable passes under a
single flag --compiler-passes, e.g.
--compiler-passes=-Inlining,-CSE disable inlining and CSE passes
--compiler-passes=Inlining+ print IL after Inlining pass and all
subsequent passes
Change-Id: I90ff54b04a54f20099f5bf38dd45b16b8e3c4781
Reviewed-on: https://dart-review.googlesource.com/43968
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
The VM uses normally strong mode types for LoadField instructions.
Though for certain fields we have known class-ids which we attach to the
Field instructions.
Before we had a case where the strong mode type was dynamic, but we had
a very specific cid for the Field. Though when using the [CompileType]
afterwards via [CompileType()->ToAbstractType()] it was returning
`dynamic`.
We should use CompileType::ComputeRefineType() to get the most specific
one of those two.
Issue https://github.com/dart-lang/sdk/issues/31798
Change-Id: Ib0b7a596449cba0bc53e118ee603b2039aa312b3
Reviewed-on: https://dart-review.googlesource.com/43422
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Clear out generic-covariant-{impl,interface} on parameters which are
statically checked on call site. If all call sites are this-dispatches then
we are guaranteed to not need the checks.
Issue https://github.com/dart-lang/sdk/issues/31798
Change-Id: I5452a1c9eb3c3e36c1dfc978327bfdcb256cc003
Reviewed-on: https://dart-review.googlesource.com/43421
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
With the [_table] field being `dynamic` we were unable to eliminate
checks for the [_isModifiedSince] method, since there is a dynamic call
site.
This CL adds a type to [_table] so [_isModifiedSince] does not need to
perform any checks (via package:vm/transf.../no_dynamic_invocations_annotator.dart)
Issue https://github.com/dart-lang/sdk/issues/31798
Change-Id: If773c4b63fab62d1ccdd2e783aa16c19f780000a
Reviewed-on: https://dart-review.googlesource.com/43423
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Update the generated `dart.rb` formula file to fix:
```
Warning: Calling <<-EOS.undent is deprecated!
Use <<~EOS instead.
/usr/local/Homebrew/Library/Taps/dart-lang/homebrew-dart/dart.rb:72:in `caveats'
Please report this to the dart-lang/dart tap!
```
being reported by `brew`.
Fixes https://github.com/dart-lang/homebrew-dart/issues/48
Credit for original patch to @fsouza:
06b76e0935Closes#32346https://github.com/dart-lang/sdk/pull/32346
GitOrigin-RevId: 938a696caea21eda193375ad4cce5aab0e7b5e71
Change-Id: I757647a7ef0a373cb0258f0fcf03f89849aeba5e
Reviewed-on: https://dart-review.googlesource.com/44100
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: William Hesse <whesse@google.com>