This class can be used to annotate declarations with
tool specific hints.
For example @pragma('vm:extern') can tell that a method is invoked from
outside (e.g. via VM C API), which informs Kernel based tools not to
tree-shake this method.
Design doc (internal) https://docs.google.com/document/d/1yqje8uctBqITcwKxhebb0EHunY1bt0Qd4yZExrTHIW8/edit
Change-Id: Icf2106accfb1167124582466a3a55486d432793d
Reviewed-on: https://dart-review.googlesource.com/43062
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Change-Id: I5d073d1c678dc313e79193074c6491085c093596
Reviewed-on: https://dart-review.googlesource.com/45381
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
This CL changes the handling of writeContext (for complex
assignments), returnOrYieldContext (for closures), expectedType (for
ensureAssignable), and receiverType (for findInterfaceMember) so that
they no longer use `null` to represent a context; they use UnknownType
or DynamicType as appropriate.
It also changes the handling of expectedType (for ensureAssignable) so
that it does not require the type to be known. That makes this CL
simpler and paves the way for fixing #31792.
Change-Id: Ib1be06182f9a9e9f77a9eb81f5daf2364de0f3a7
Reviewed-on: https://dart-review.googlesource.com/44800
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
recursive_import: was covering logic for the old frontend and it is no longer
relevant. dummy_compiler is not just about APIs, is about self-hosting.
TBR=sra@google.com
Bug: https://github.com/dart-lang/sdk/issues/30773
Change-Id: I56d094d9ecee47264c7a7a206f942d9e3dbdaadc
Reviewed-on: https://dart-review.googlesource.com/45364
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
There are a few bug fixes here as well. Most notably, `.name.name`
instead of `.name` in DDK's analysis of virtual accessors. DDC/K's
handling of spread arguments in JS interop was also fairly broken
(it was generating a RestParameter instead of Spread). There's
also a lot of cleanup in js_ast as well, to make it a bit more
type safe.
Change-Id: Ia5333179e6dd0a62f20ce64a2b2b8bedf2ed7c49
Reviewed-on: https://dart-review.googlesource.com/44700
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
We use renamable variables for Dart libraries, this ensures we still
export it with the correct name.
Change-Id: I96dc161e33d265c0ffbd07f8d642629504dffe62
Reviewed-on: https://dart-review.googlesource.com/42892
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
The only change in co19-runtime.status that isn't just combining two
sections and normalizing is the movement of
Language/Classes/definition_t24: MissingCompileTimeError # Issue co19 #129, sdk issue #31624
from the vm section to a section with vm, dart_precompiled, and flutter, and
the removal of two sections only containing a single Generative_Constructors
test each.
The file is also normalized.
Bug: dartbug.com/32434
Change-Id: Ic62817b3ebdfd27e3cd58abc21f8bd61e7a18664
Reviewed-on: https://dart-review.googlesource.com/45380
Reviewed-by: Peter von der Ahé <ahe@google.com>
Technically we could eventually implement rendering widgets in parts,
but this is probably rare situation, and IntelliJ plugin does not
handle this case yet.
R=brianwilkerson@google.com, devoncarew@google.com
Change-Id: I734eb5f5b26c386780a776f652366bd4d21125f9
Reviewed-on: https://dart-review.googlesource.com/45361
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
The ARM simulator has assertions that there are no duplicates in the
[Redirection::list_] but the code does not guarantee this, since
multiple threads can add the same add [Redirection] entries for the same
native concurrently.
This CL guards the modification of [list_] with a [Mutex] and ensures
there's no duplicates.
This issue caused flakiness on the debug-simarm configuration.
Change-Id: Ia84a08e6e6f851a6047bae047ffb990044fb4a4b
Reviewed-on: https://dart-review.googlesource.com/45281
Reviewed-by: Erik Corry <erikcorry@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Actually make default value expression not constant.
Change-Id: Id9082716a6606618b91545f427726925849fb61c
Reviewed-on: https://dart-review.googlesource.com/45323
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Change-Id: Ia923f953069bd41dbd5f0f3dc48aa55bad46aabd
Reviewed-on: https://dart-review.googlesource.com/45220
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
This is necessary since the old task model doesn't implement mixin
type inference properly.
Works around bug #32421.
Change-Id: I6d7873d658d9d0fd8ea6aa5d2452bf9e92947032
Reviewed-on: https://dart-review.googlesource.com/45200
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Change-Id: Id5328ba0568d7eba78c2b9145ee2db3476dc5bd5
Reviewed-on: https://dart-review.googlesource.com/44961
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
See issue #31470
The performance numbers from the example in that issue improved as follows:
Before:
Set.first 2669 ms
Set.last 15509 ms
HashSet.first 2845 ms
HashSet.last 22053 ms
After:
Set.first 1244 ms
Set.last 1422 ms
HashSet.first 1075 ms
HashSet.last 4552 ms
Bug: http://dartbug.com/31470
Change-Id: I8afc91ad8835ac18bcc37737570c7f4be0bb6e8a
Reviewed-on: https://dart-review.googlesource.com/44782
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Corry <erikcorry@google.com>
These instructions will soon be used for for smaller (32 bit) Smis.
Also fix broken ubfiz instruction in ARM64 assembler.
This reland fixes the disassembler test that used Stop
instructions which disassemble differently on Mac
because constants have higher addresses.
Originally reviewed at
https://dart-review.googlesource.com/c/sdk/+/43668
Fix assembler test on Mac
R=kustermann@google.com
Change-Id: I61f8626184af495f18a74b5fef07bad02b6615e9
Reviewed-on: https://dart-review.googlesource.com/45240
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Erik Corry <erikcorry@google.com>
This CL adds a test that invalidates a part file after initializing from
a dill file. It futher more fixes the found issue so the part file (and
subsequent entire library it is a part of) is invalidated. Previously
invalidating a part file had no effect.
Change-Id: I0e76998d0ce2247b58c4a0e6cd691062b3069a2b
Reviewed-on: https://dart-review.googlesource.com/45181
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
In the incremental compiler, invalidating a file that exports other
libraries (among them one containing main) will fail to have a main set
in the resulting dill file.
This CL fixes the issue and introduces a test.
Change-Id: Ib7fe5ca46a44017eba6c5fcd39c358fe1b857a26
Reviewed-on: https://dart-review.googlesource.com/45000
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Move logic out into a ContextCache since we're not interested in caching
at least two if not three things (the options, the options path, and
optionally the builder).
Move some convenience methods around accessing contexts into a mixin.
Regarding some semantic decisions for finding analysis roots:
* treat the analysis_options.yaml file as the analysis root if it exists
* if it doesn't exist, assume the directory passed in is the root
* if custom options are provided, assume they "overwrite" the others
_in-place_.
Tests to confirm this logic via excludes configurations with & without
the yaml file specified, passing in the root in some cases and
subdirectories in others.
Also change to use PathFinder for handling wildcards in excludes.
Bug: 31343,31344
Change-Id: I400fe30a1ec379f9040f812fc0bd9481d42a13cf
Reviewed-on: https://dart-review.googlesource.com/41570
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
We no longer have any sections with !$fasta. I saved around status lines that appear accurate at the dart2js global level.
TBR=sra@google.com
Change-Id: Ia2b212df87e196181d2631950f7d970edc9d6371
Reviewed-on: https://dart-review.googlesource.com/45123
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Change-Id: I35d9c7105c2a5278b5b9558af9fe0570839fc51f
Reviewed-on: https://dart-review.googlesource.com/44882
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
This fixes test breakage on Windows.
Change-Id: I54dba0ec6955dee9d2417d81faa42dfc6b7e2da8
Reviewed-on: https://dart-review.googlesource.com/45040
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
This reverts commit a5f173f165.
Reason for revert: Some test failures.
Original change's description:
> [VM] Support some 32bit instructions in 64bit assemblers.
>
> These instructions will soon be used for for smaller (32 bit) Smis.
>
> Also fix broken ubfiz instruction in ARM64 assembler.
>
> R=kustermann@google.com
>
> Change-Id: I9068a1c4281047dbd7c1c447fc32ac0e92c89e9d
> Reviewed-on: https://dart-review.googlesource.com/43668
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
TBR=vegorov@google.com,kustermann@google.com,erikcorry@google.com
Change-Id: I0991712936d903f2cb1f3851c919ed6171a96711
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/44981
Reviewed-by: Erik Corry <erikcorry@google.com>
Commit-Queue: Erik Corry <erikcorry@google.com>
These instructions will soon be used for for smaller (32 bit) Smis.
Also fix broken ubfiz instruction in ARM64 assembler.
R=kustermann@google.com
Change-Id: I9068a1c4281047dbd7c1c447fc32ac0e92c89e9d
Reviewed-on: https://dart-review.googlesource.com/43668
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Change-Id: I6dba18b8202b24ee3a87df5f18b1989bc62ef465
Reviewed-on: https://dart-review.googlesource.com/44431
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>