This change adjusts the organize imports logic, to keep any comments
written in the line above an import statement attached when
organizing the imports, while being smart about what comments to keep.
Closes https://github.com/dart-lang/sdk/issues/42515
Change-Id: Ibcca4f24411ac16bcdb17f66fb6d2b9c45f7d367
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157743
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
The tests incremental_dart2js_test and incremental_compiler_leak_test
- taking ~1 minute each locally - often times out at 4 minutes (after
almost being done) on the bots. This CL gives them a little more time
hopefully allowing them to finish.
Fixes https://github.com/dart-lang/sdk/issues/43000
Change-Id: Ic6309ebc1a0c77300f1b4f5262f8d48f4de3e0be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157982
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Moves the file check after the stderr and exitCode check to show any
process error before checking for success output from the process.
In effect we'll now see the error message from the compiler when the
binary isn't created.
Change-Id: I2fb5c87caf6b87f5cff5c89eccaebd2690b20408
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158009
Auto-Submit: Clement Skau <cskau@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Adds a member signature origin to member signatures and includes
an additional reference to these in MethodInvocation, PropertyGet,
PropertySet, etc.
This enables the VM to bypass the member signatures when loading the
AST.
Change-Id: I5cae11f4434bc052d0ba0acf0670dd002c6f3df1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157498
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Update CFE tests (and a few analyzer tests) to match the new world
of the syntax being unsupported.
Fixes https://github.com/dart-lang/sdk/issues/42681
Change-Id: I71bc973f36dfb978ddb825edb68530d8e260a58a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157980
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
I would have prefered to have renamed them all to undefined_super_member,
but that would have broken existing links. Some day we should add the
support necessary to allow for forwarding so that we can rename codes.
Change-Id: I81e416407e3464b5b60a4dbbfe60a375eb47bb84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157921
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
In follow-up CLs I will update error reporting logic.
Change-Id: Id07b861aa117b93e0c869ad0b52c048085706ee6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157801
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Although these error conditions are not reported by the parser, the
language grammar does not permit them, so from a customer perspective
they are parser errors. Accordingly, they have been assigned
ParserErrorCodes and reported by the AstBuilder, as we do for other
similar errors.
Change-Id: I79d0ad1dcad518981b8b649c117df326279008f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157800
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
There are three ways to initialize a field, so we have to check for
three error conditions:
- At the declaration site
- Via a field formal parameter
- Via a constructor initializer
Fixes#42981
Change-Id: Ifc32a28ffb62d60fd2171d4980e88da9eebcb481
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157664
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Adds errors for class members that have a @JS annotation but the
enclosing class does not.
Change-Id: Id693af71678510047a723863846d89aa29cebe26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157004
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
native_test is set up so that it validates only one error per static
error. This CL allows multiple errors to be reported and validates
that all are reported.
Change-Id: I97e9abbfbd8273c0c436e44d08f5768eea3f7785
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157663
Reviewed-by: Stephen Adams <sra@google.com>
Currently we are gathering classes for all supertypes, but we only need
to gather classes for applied mixins and super classes.
Change-Id: Ie55a6587b0bc9cacf5061a52d2d9a9ec5fdbf2eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156761
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This is based on the wrapped version that also includes a bit integer.
Right now the methods use the old abstract value domain but will use the integer bits in later CLs.
Also added and updated a flag so that now there is one for a wrapped domain and another for a powerset domain..
Change-Id: Iab6b93584a9a644dfef92f689c4be8c42ce8076a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157620
Commit-Queue: Christian Altamirano <coam@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
dart:core contains a class Type and it can also contain objects which
are instances of this class. Previously we would try to put size
information for both under dart:core/Type bucket which caused issues.
To prevent the clash we now wrap snapshot node types in '<...>' before using
them as path components, so that the first case would remain dart:core/Type
but size of Type instances would be written into dart:core/<Type> bucket.
Fixes https://github.com/dart-lang/sdk/issues/42969
Fixed: 42969
Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try,pkg-win-release-try,pkg-mac-release-try
Change-Id: Ie6c3400e90511507ff37b7ca037bd385dea1b11c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157493
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
Declared variables cannot be configured using analysis_options.yaml,
so I put them into AnalysisContextCollectionImpl for now.
R=brianwilkerson@google.com
Change-Id: I2aaa3cfa94ad4a386f0be7d47acc979a89b69b05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This CL covers two cases: when an abstract field appears in a concrete
class (which we report as CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, just as
we do for abstract methods), and when a concrete class implements a
class with an abstract field, but fails to supply the necessary
concrete implementation(s) (which we report as
NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_*, just as we do for
abstract methods).
Change-Id: I94bdbafc4ed7b058d9b33b3774e79cb55393380b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157600
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Before null safety
try {
...
} catch (e) {
...
}
was translated to a try-catch block with 'dynamic' catch type.
VM has a special, more efficient handling of such catch-all try blocks.
Those try blocks were detected by comparing catch type with 'dynamic'.
With null safety front-end started to translate those try blocks
using non-nullable Object as a catch type. As a result, this disabled
all optimizations for catch-all try blocks in the VM.
This change extends detection of catch-all try blocks to handle both
dynamic and Object as catch types.
Improves ParserCombinators benchmark with null safety 12x in JIT mode,
15x in AOT mode. This benchmark is now on par with legacy (pre-NNBD)
version.
Change-Id: I128aa1599d8a6f979fc2e8535d0f5c934bf3a5ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157565
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This is in preparation for working on external and abstract fields,
which will require introducing some NNBD-only tests to this file.
Change-Id: I2e1a77634aef0493d5e44edf88373deaa9acb6c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157580
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>