This prepares the generators to be implemented by the analyzer.
Change-Id: I28ada82b602893b427c8d34df68b2c9a7f8439cf
Reviewed-on: https://dart-review.googlesource.com/56341
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
This prepares the generator to be implemented by the analyzer.
Change-Id: I7c6ebf43e8dee46ea734d7a245c20fc03fe74b65
Reviewed-on: https://dart-review.googlesource.com/56325
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Change-Id: Ib7f82b2d9a3d367f20bb5e9be7456ef8693bd69f
Reviewed-on: https://dart-review.googlesource.com/56042
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
This also enables us to remove unsupported front-end API.
Change-Id: I1f655039e9fa4718ef5c941d1932c136eefab3c5
Reviewed-on: https://dart-review.googlesource.com/56342
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
This is another step towards removing parseType and improving recovery.
Change-Id: Ie2cb1999406bc603355015e8a3b9aaa854f785db
Reviewed-on: https://dart-review.googlesource.com/56120
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Change-Id: I04c954c4233cc6c43b1f065be95f587a09ed5003
Reviewed-on: https://dart-review.googlesource.com/56328
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Change-Id: I73cea25140ad1123ff1a8cb1bca1c69742d3d6f7
Reviewed-on: https://dart-review.googlesource.com/56201
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This prepares the generator to be implemented by the analyzer.
Change-Id: I6468e0eb24a812e6de498b358d33d668683da3ed
Reviewed-on: https://dart-review.googlesource.com/56321
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
This prepares the generator to be implemented by the analyzer.
Change-Id: I429f41beec55057b427ef686d99c7ff26c1e6b25
Reviewed-on: https://dart-review.googlesource.com/56118
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
Change-Id: I9d8c95665eed15be45c2a5b734e541af73a7db91
Reviewed-on: https://dart-review.googlesource.com/56117
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
This is following the design discussion we had a few months ago.
Change-Id: I48b2e82af33d10b9cd1e599e1b3a4e8e419417c8
Reviewed-on: https://dart-review.googlesource.com/56035
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
This reverts commit ac8971a98a.
Reason for revert: Tests fail on windows
Original change's description:
> New package:build workspace before we support it at the language level.
>
> Does not work with dartanalyzer, only dart analysis server.
>
> Change-Id: I1d7c3fbbbda512d799ac44a6fa5a188d1a3bb8c3
> Reviewed-on: https://dart-review.googlesource.com/55586
> Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
TBR=brianwilkerson@google.com,mfairhurst@google.com
Change-Id: Ie3a0f7549cdbd65c9a3f7100f303105b121830a6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/56162
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Change-Id: I8baf2347aaab8a32eb41518ea8079dc491753af5
Reviewed-on: https://dart-review.googlesource.com/56106
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Change-Id: I459ee57e95b47bf59935df32902ce19051c3e7ab
Reviewed-on: https://dart-review.googlesource.com/56105
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Change-Id: I1bd94725b4e4e44e706c6d22543bbea22649ec69
Reviewed-on: https://dart-review.googlesource.com/55680
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Change-Id: Ie023607a0a85adcb710ec91174188a2013146254
Reviewed-on: https://dart-review.googlesource.com/56100
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
Change-Id: I439670b0fafa09536901647572615afa4e82977a
Reviewed-on: https://dart-review.googlesource.com/55965
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Change-Id: Id9afaa968616d48c0dbe088d19a7dcb0f94ef369
Reviewed-on: https://dart-review.googlesource.com/55964
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Correspondingly all files that were referenced using relative URI(s)
also put into /project, which is the contextRoot for the test
AnalysisDriver.
This will let us (in a following CL) start checking that the element
being renamed is defined inside the current workspace (the set of
analysis roots). Currently the context root is hardcoded as /project.
R=brianwilkerson@google.com
Change-Id: I9dca3509af1be13c9016bf03d4a4b95d71bc9374
Reviewed-on: https://dart-review.googlesource.com/56031
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
With this change debugger requests yield(await) positions from kernel builder so it can confirm which frame handles what exceptions.
This also renames ':completer' to ':async_completer' in constructed kernel, so it is compliant with what VM expects to see(and updates test expectations accordingly).
Further it fixes async stack navigation for sync-async that became default in dart vm since first version went for the review((uses `future` getter, rather than property).
It also makes `future` getter non-debuggable to allow stepping-out of async methods.
Make Handle zone-scoped. Clean up frame counter var name.
Bug: https://github.com/dart-lang/sdk/issues/29056
Change-Id: Ia71f3c851a6b313655b57dad28c296f5dd081eda
Reviewed-on: https://dart-review.googlesource.com/54640
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
This simplifies reading, as exceptions table refers to constant pool.
Change-Id: Id20d2a315ad87aa4e5247fcd98d7e5996c188eec
Reviewed-on: https://dart-review.googlesource.com/56032
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
VM will use the invocation kind to distinguish between getters,
setters and calls via field/getter.
Change-Id: I97cf36bc8778533e53f8251c25b373fddec3c2e8
Reviewed-on: https://dart-review.googlesource.com/55581
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This is in preparation for detecting if a generator header has checks.
By not registering the redundant checks (which should really done in codegen) we remove a few $isXXX flags.
Change-Id: I30deb2bc498858540cd326243798248c51ce9375
Reviewed-on: https://dart-review.googlesource.com/56006
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Does not work with dartanalyzer, only dart analysis server.
Change-Id: I1d7c3fbbbda512d799ac44a6fa5a188d1a3bb8c3
Reviewed-on: https://dart-review.googlesource.com/55586
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Summary:
The constants table contains a concatenation of the variable-length encodings of
each constant used in the serialized component. Previously, we referenced the
constants in the code by index into the constants table, which requires reading
potentially the entire constants table to dereference. Now, we refer to the
constant by the binary offset into the constants table, which allows us to peek
into it in constant time.
Test Plan:
The constants table is used by all the precompiler modes, so the new encoding
will inherit the coverage of the existing encoding.
Results from debug and release precompiler bots are available under the
"cl-linux-try" button.
Change-Id: I4782bc0035d0b0cbd5bd6b9d086561ea601286c8
Reviewed-on: https://dart-review.googlesource.com/55470
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This CL replaces several calls to parseTypeVariablesOpt with calls
to computeTypeParam with improved recovery for missing '>'.
In addition, this CL
* moves isOneOfOrEof to util.dart
* moves insertSyntheticIdentifierAfter into TokenStreamRewriter
Change-Id: I48080809d156dd98ccfed7aa2f67be254f4da201
Reviewed-on: https://dart-review.googlesource.com/55940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
So, we support all elements - class fields, top-level functions and
variables, etc. And it is just simpler too.
R=brianwilkerson@google.com
Change-Id: Ifed8f9b8d8ef857750b28c48f851d8611a56ef22
Reviewed-on: https://dart-review.googlesource.com/55990
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Change-Id: I097c330712c789a65a1ce9c6a57ef0c81a3a32ed
Reviewed-on: https://dart-review.googlesource.com/55893
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Change-Id: If9fbbdaf495b32da7a5a288e2fe63bee6f29ee1e
Reviewed-on: https://dart-review.googlesource.com/55888
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Change-Id: Ie62314781b264a56a77e466f334f6c9d8cec2cba
Reviewed-on: https://dart-review.googlesource.com/55887
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
We always have fully reoslved unit, so usually actual types are available.
For the case when the type annotation cannot be resolved, keep the
old code that returns unresolved type string in this case. Probably
can be simplified more, e.g. remember declared types on the side instead
of passing them around just in case. Later.
R=brianwilkerson@google.com
Change-Id: Ida0b6caa90fc1408e5e7d12b762b19651cb201f6
Reviewed-on: https://dart-review.googlesource.com/55980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Change-Id: I69aa15244dff20d18d7a34c6b052bd9eeed388ed
Reviewed-on: https://dart-review.googlesource.com/55761
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
In particular, if the type was invalid, so that we cannot write it.
R=brianwilkerson@google.com
Change-Id: I5499e17e2aa3527d21cab050b7fecfd3cd09efc7
Reviewed-on: https://dart-review.googlesource.com/55860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This is a starting point for supporting blocks and variable
declarations in the forest API. I'm not sure exactly how the
analyzer handles variable declarations, so we'll probably have
to iterate on that part.
Change-Id: I93aec818baec24f8b038f02c66699117070d6b0c
Reviewed-on: https://dart-review.googlesource.com/55683
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Change-Id: I0b3dacbbe5bc45b9e0142e7bb3f6793c83ac4cd2
Reviewed-on: https://dart-review.googlesource.com/55885
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
This improves recovery when parsing type names in a class declaration header
by replacing calls to parseType with calls to computeType.
Change-Id: Icbb86fd977d4d92b00abf2282baea34a1ff21e1d
Reviewed-on: https://dart-review.googlesource.com/55802
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
Only local variables, no tests for multiple blocks, or parameters.
No support for classes yet.
No support for expressions or runtime variable types.
R=brianwilkerson@google.com
Change-Id: I9ec5c40e407cda48be408e4e4882d97349413b9c
Reviewed-on: https://dart-review.googlesource.com/55762
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Also extract code that ensures imports and writes prefixes into a
separate method.
R=brianwilkerson@google.com
Change-Id: Icd35af19435153bfaebd46f7611823e6a9830d20
Reviewed-on: https://dart-review.googlesource.com/55640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Change-Id: Iae637b02ee517e06d4d04f1e0f0289d760750195
Reviewed-on: https://dart-review.googlesource.com/55600
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
This CL improves typedef recovery and removes another call to parseType.
Change-Id: I55aca86fe08bb06b040f5ec3c54266fcf795dbb3
Reviewed-on: https://dart-review.googlesource.com/55540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Change-Id: Iea2acd59b7b6283a6144dd06e1cabc0c10521d35
Reviewed-on: https://dart-review.googlesource.com/55583
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Change-Id: I904562f31a5f03fb7dfdd8dac3db55b5085ed68a
Reviewed-on: https://dart-review.googlesource.com/55469
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
To make uses of TypeMask explicit in the imports.
Change-Id: I7c0c2377b65720394dcda217e5e68a4e3f9a4e9c
Reviewed-on: https://dart-review.googlesource.com/55421
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This CL updates the frontend_server to allow specifying what dill
file to initialize from.
Normally, it tries to initialize from the same dill file as is the
output. This is fine in many cases (e.g. flutter run always says it
should output to build/app.dill): The first time it compiles
everything, subsequent times (across restarts) it only recompiles
what's needed.
When running tests, however, the output is in a temporary directory,
so it doesn't work across restarts. The startup time for tests is
always rather high, because it always has to recompile everything.
This CL updates the frontend_server to allow specifying what dill
file to initialize from. Flutter can thus save the compiled test
file in a centralized location (e.g. build/test.dill) and load from
that across restarts.
Plumbing this into flutter yields the following result, when running
a single test (the one automatically created when creating a new
flutter project):
Before: ~5.5 seconds
Now, first run: ~5.5 second (unchanged)
Now, subsequent runs: ~3.4 seconds
Approximate breakdown:
Startup cost (e.g. if there's no test directory): ~ 800 ms
Starting up the actual frontend server: ~150 ms
Reading source from old dill, loading all relevant files
and invalidating source: ~ 300 ms
Compiling everything (or, rather, nothing as it's all
from the dill at this point): ~ 650 ms
Serializing: ~ 250 ms
Copying files: ~ 50 ms
Running the actual test: ~1100 ms
Total: ~3300 ms
`time flutter test --local-engine=host_debug --preview-dart-2`
says ~3.4 seconds...
To compare, --no-preview-dart-2 takes ~2.2 seconds,
so dart2 still has a (significantly) higher startup cost.
Moves the needle on https://github.com/flutter/flutter/issues/15767.
Change-Id: I36a2d05bc76e0193d369df42eb3b9f08416dd78f
Reviewed-on: https://dart-review.googlesource.com/51820
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
* Extract parseParenthesizedCondition from parseParenthesizedExpression
* Update parsing of control structures to use parseParenthesizedCondition
* Add a new handleParenthesizedCondition event
Change-Id: I9972bfa3fa4060fc6de2e6315902c4c524c76544
Reviewed-on: https://dart-review.googlesource.com/55560
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
Also this removes the workaround for dart:html that used a RegExp to
attempt to match inline-JS code that might trigger the problem.
Change-Id: I74b447928aaeaca43b3a9241d42526c284dbeffa
Reviewed-on: https://dart-review.googlesource.com/55504
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Only one import is generated for each library.
If there is already an import for a library, new prefix is not asked.
If a prefix was generated once, it is not possible to force another
import with a different prefix.
R=brianwilkerson@google.com
Change-Id: I1676a1953002060b5e7155ce90abf87b3bfe270e
Reviewed-on: https://dart-review.googlesource.com/55326
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
It now returns the text of the URI that will be actually used, so
we can show it in the quick fix message without computing it separately.
R=brianwilkerson@google.com
Change-Id: I16a455d8f6a3c3e3a9c5779c94d654de32992006
Reviewed-on: https://dart-review.googlesource.com/55501
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reason for revert: Breaking API change blocks Flutter rolls. Reverting
to reconsider, work around, etc..
Revert "[ VM ] Fixed issue where backing array was deleted from an ExternalTypedData before the ExternalTypedData was used."
This reverts commit 916b9da48d.
Revert "[ VM ] Fixed tests for non-UTF8 paths on Windows / Macos."
This reverts commit 6327fe91c2.
Revert "[ VM ] Fix failing tests on Windows bots after non-UTF-8 paths change."
This reverts commit b51f4b7956.
Revert "[ VM ] Updated non-UTF-8 tests to expect exceptions on OSX/iOS."
This reverts commit bcb36247d2.
Revert "Revert "[ VM ] Updated non-UTF-8 tests to expect exceptions on OSX/iOS.""
This reverts commit 24450c79a5.
Change-Id: I756f74f4acdde168d0984fe130f05f9252366334
Reviewed-on: https://dart-review.googlesource.com/55441
Reviewed-by: Todd Volkert <tvolkert@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
The implementation built up a list of closures and then immediately
looped over them to apply them. It seems simpler to do the operations
directly in the first place and it's probably faster too.
Change-Id: I4f3ce4cd1cb1bc3169f1b7190d54118ec22b8bda
Reviewed-on: https://dart-review.googlesource.com/55223
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
The CL was originally committed in 039e8a175 (and reverted in
46ab040e5). The fix for the issue has landed in 9d9ce8d69 .
This time the CL will land in "disabled" form and will be enabled in a separate CL.
Change-Id: I3d5eb952230aee99875e3c58a6595691c5145e25
Reviewed-on: https://dart-review.googlesource.com/55361
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
This CL is the next step in replacing parseType and improving recovery.
It introduces a new parseVariables method for parsing type parameters
(aka type variables) method in addition to improving recovery in the
parseArguments method.
Change-Id: I4049528152a7c731771d7a8145e5f79729165d79
Reviewed-on: https://dart-review.googlesource.com/55301
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
This avoids a runtime typecheck failure because Future is Future<dynamic>
which isn't a subtype of Future<T> for any T that is not a top type.
Change-Id: I067987e27177f3ed81ec14101c965488f1c35e2e
Reviewed-on: https://dart-review.googlesource.com/55281
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Move implementation details into patch files, it does not belong in the interface.
Actually implement NoSuchMethod.withInvocation in dart2js.
Change-Id: I37049c258067b962d18eff42196e37aa127f0dea
Reviewed-on: https://dart-review.googlesource.com/55166
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
We don't support invalidating `dart:` libraries, so there's no reason
to include such libraries in the computeReusedLibraries calculations:
They should aways be reused.
This CL does exactly that.
On 430 flutter tests, it changes the time it takes to execute
`computeReusedLibraries` by -15.7188% +/- 8.83679%
(-193.125 ms +/- 108.571 ms for all 430 tests) (at 95% confidence).
Said another way it reduces the average runtime for
computeReusedLibraries from ~2.8 ms to ~2.4 ms.
Change-Id: I23a68d4910c81be94b8d9d29495e63546bdad23f
Reviewed-on: https://dart-review.googlesource.com/52441
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Before this CL we always translated a package import URI to file URI
to check whether the file URI had been updated.
This CL changes that so it only does that once* per invalidation of the
.packages file.
Running 430 flutter tests in "batch incremental compilation mode" and
timing computeReusedLibraries, this change, at 95% confidence, changes
the time by -61.7793% +/- 7.63375% (-1941.6 ms +/- 239.914 ms) for all
430 files, or on average reduces the time it takes to run
computeReusedLibraries from ~7.3 ms to ~2.8 ms.
The total compilation time varies too much for it make a difference
at 95% confidence on that figure though.
* Once is a loose term here, it's once per successful compilation, i.e.
if we get a compilation error that goes into erroneousComponent it
doesn't count and we have to do it again and again until we get into
a good state.
Change-Id: Id1b4534f515d8c0487362f743112b44ce1372ed0
Reviewed-on: https://dart-review.googlesource.com/52440
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Change-Id: Ia7f1f672adee0e8da2e5c1c54f9690e7f2597263
Reviewed-on: https://dart-review.googlesource.com/55273
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
There is a similar setter on Resolver, and without it, users are seeing
an issue:
https://github.com/dart-lang/angular_analyzer_plugin/issues/567.
Alternative options to modifying pkg:analyzer APIs are few. One option
is to block UNQUALIFIED_STATIC_REFERNCE errors, however, that will be
too general. We would need to implement a lookup to double-check when
those errors are reported, if they should be.
Alternatively the plugin could block all of them, and then do a second
pass to provide them where the plugins deems they should exist.
This seems the easiest approach and mirrors the api that [Resolver.set
enclosingClass] provides, but the chain of assertions makes we want a
second look on it.
Change-Id: I12df71719c7a0e968a0b3a43cc27c69160ec5210
Reviewed-on: https://dart-review.googlesource.com/54703
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Change-Id: I244d6e17dee72704c6cb5cc2c26b9379fac03440
Reviewed-on: https://dart-review.googlesource.com/55274
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reland "Fix issues with FileSystemEntities which have non-UTF8 paths causing exceptions to be thrown when converting to/from a Dart VM String."
This reverts commit 4f549e2900.
Change-Id: Ia27c8c300beb178fa7b08ffe0bfcb2d61f65bbb5
Reviewed-on: https://dart-review.googlesource.com/55271
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This CL adds experimental option --drop-ast to the gen_kernel tool in
order to remove AST bodies of members with bytecode.
Change-Id: Ib5f02eb189ec1ccd9fa77159c175fc3774998ce5
Reviewed-on: https://dart-review.googlesource.com/55262
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Change-Id: Ia92bb1c8e30f3f79a7aaa5d3b93e9461cce23c17
Reviewed-on: https://dart-review.googlesource.com/55261
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
The addition of recently added [PartialInstantiationConstant] caused an
issue during constant table writing, becaused we the table writing code
wasn't updated.
This change uses visitChildren to guard against such changes in the
future.
Closes https://github.com/dart-lang/sdk/issues/33095
Change-Id: I3c6b19e1383c6825f11120b2d6255b8b747d0063
Reviewed-on: https://dart-review.googlesource.com/55161
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Change-Id: I4d3746c85370125c617cd1b331db095689ce4b5b
Reviewed-on: https://dart-review.googlesource.com/54963
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Before this CL, the invalidated URLs would be cleared sooner than we
threw away the old "userCode".
On a compile time error (issuing an erroneousComponent) we restore
the old userCode, thus in practical terms forgetting about whatever
had been invalidated prior to that.
This CL introduces a test and fixes the problem.
Change-Id: I8f5329c2f499ec3842d0b7d67e2eda1de1e7d938
Reviewed-on: https://dart-review.googlesource.com/52321
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Change-Id: Iffba18a8c81462373122c9204d758008448fbfed
Reviewed-on: https://dart-review.googlesource.com/55021
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Change-Id: I568edd93204056298b640a09a67fe128f2e2c206
Reviewed-on: https://dart-review.googlesource.com/55022
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This seems to be the last remaining case which causes constant
evaluation in the VM in AOT mode.
Change-Id: I37dba2c634afa3bebd918ebe6dd93ff52a7708e7
Reviewed-on: https://dart-review.googlesource.com/55163
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
This reverts commit b5154dd01e.
Original revision is in patchset 1.
Change-Id: Ic0776011c6fdbd64c025086535351474a9a88b6e
Reviewed-on: https://dart-review.googlesource.com/54407
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
The behavioral difference is that named and optional arguments are filled in
with their default values in the `Invocation` object passed to `noSuchMethod`.
On the implementation side we make NSM forwarders concrete and fill in their
bodies in the CFE. The custom (and somewhat hacky) VM support is no longer
needed, and Dart2JS can benefit from this implementation as well.
According to discussion on #33031 we will be able to re-land this soon without
breaking Mockito.
Prior failures on precompiler bots are fixed in Patchset 2.
Change-Id: If1b7fe4cf6da5ef38f330e1ad226121bcfc958a1
Reviewed-on: https://dart-review.googlesource.com/54401
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Change-Id: I3cd1d3c88c0572874b3fbfb4c1862898ce8037a4
Reviewed-on: https://dart-review.googlesource.com/55103
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Change-Id: I9252da81d07b948b16ce0da4a0e989b63df996e5
Reviewed-on: https://dart-review.googlesource.com/55102
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Change-Id: I55a656f153cd6226f55fad47e952b065928754fb
Reviewed-on: https://dart-review.googlesource.com/54915
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
This CL turns the ClassHierarchy incremental and use that in two places:
* When compiling incrementally
* When performing the second ClassHierarchy computation after adding
forwarding stubs.
Change-Id: I7046d6be9d7673dc0783a98789b5a25183b44799
Reviewed-on: https://dart-review.googlesource.com/53804
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
This builds on the VM's support for constants, and brings dartdevk to
parity with dartdevc. Also, constants are computed with arithmetic
operations that match runtime behavior (JS numbers).
Constants are limited in some cases right now: when building outline
kernel files (via pkg/dev_compiler/tool/build_pkgs.dart), constant field
initializers are not preserved, and this fact is not recorded, making
these fields appear to be implicitly null. dartdevk will recognize this
and avoid inlining the constant in these cases.
Change-Id: I5e6d95ccc32799da3bec1667ed16078a1a87d0bd
Reviewed-on: https://dart-review.googlesource.com/53121
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Metadata is no longer written ahead of all nodes. Instead, metadata for
each node is written in the same context as the node itself (into a separate
buffer). This allows metadata to contain (serialize) arbitrary nodes
(for example, arbitrary DartTypes) and use serialization context of parent
nodes (such as declared type parameters).
However, with this change metadata looses the ability to reference
arbitrary AST nodes. This ability was overly restricted and had no
practical uses. (It was not possible to reference nodes which are not
reachable from root Component. As a consequence, it was not possible to
write references to arbitrary DartTypes.)
This change aligns the serialization capabilities of metadata with
how kernel AST nodes are serialized.
Change-Id: I027299a33b599b62572eccd4aa7083ad1dd2b3b3
Reviewed-on: https://dart-review.googlesource.com/54481
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
The rest of the code was used in a single place, so I've moved the code to the
appropriate library.
Change-Id: Idd0416bf7365e3de05f20ab1184428ae7ae614b2
Reviewed-on: https://dart-review.googlesource.com/54745
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>