Before this CL (and still as default) the crashing test minimizer would
operate by
1) Run and verify it crashed; record the first entry of the stacktrace
2) Delete stuff and rerun, verifying that the first entry of the new
stacktrace matched the old one (to verify we have a smaller example
of the same crash).
This doesn't work will with for instance assert errors though, as trying
to find a small reproduction for one assert error could result in a
small reproduction for another assert error.
This CL introduces the "--stack-matches=<n>" option, so you could for
instance add "--stack-matches=3" in an attempt to find the exact
assert error you wanted.
Change-Id: I1b523e9c3d391c63b3ffb5baa8ab673df7e051d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156505
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
We've recently had the flutter-frontend be green even though the
underlying script crashed. This CL should make sure the bot had turned
red (or at least not green) in such a case.
Change-Id: I8ae4916a82604500c37d0ce4389dc71f5260c7f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156461
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
All of the backends (dart2js, DDC, VM) were checking if the invocation
name was tagged with "set:" and appending "=" to the name if so.
Instead, we can simply have the CFE perform this logic at the callsite.
Note that the name of the setter itself is still unchanged. Backends may
still need to generate the correct name themselves when handling NSMs
via code paths other than instantiateInvocation.
Change-Id: Iae42c849d3557be3e3b77c3af6f3993347ba0b6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156142
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
As opposed to the parent CL which creates a new error for cases where no
non-generative constructor is available at all, these improvements
include a bugfix to the previous error message.
The previous message was incorrect in saying 'expected {0} but factory found',
because the argument passed to '{0}' was the factory constructor that
was found, rather than any kind of expected constructor signature.
Fixed.
Also, for implicit constructors, break out the error message to
deliberately explicitly describe that this affects the implicit
constructor.
I considered making an error code for implicit super initializers as
well, (ie `class Foo extends Bar { Foo(); }`), but don't think it is
necessary/common/etc.
Change-Id: I0643ad00abbfb2848cbd2f8f1f83e7c33d4fb846
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155831
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
In the case of extending Exception, the raised error is around the
configuration of the constructors. However, there is no valid
configuration of constructors to be found, and therefore, the better
user facing message is to say that the class cannot be extended as
written.
Change-Id: I5950d438877c450c44cdc914f9f20d7779a64768
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154126
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
On Windows platform, backslashes are used as path separator. (Forward
slashes are also accepted by Windows APIs for most cases) But for an Uri
backslashes will be percent-encoded in the Uri. The other problem is
that "C:\directory" when passed into Uri, the drive letter will be
misinterpreted into scheme (common schemes like "http" or "file").
Bug: https://github.com/dart-lang/sdk/issues/42874
Change-Id: I0fe287b65a5b4faeb791665d2fda9ea0a9744cc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156363
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Many of the tests were highly redundant. Subtyping has been
consolidated, so the tests don't need to cover a dozen different ways
to subtype a class.
Change-Id: I04448790d3a74690d0edb57f15146a6c3b8f2173
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156400
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
The previous version include the closing parenthesis in the link on the
dart doc site so it won't lead to the right place when clicked.
Switch to a markdown link instead of a raw URL to avoid ambiguity and
improve readability of the rendered doc.
Do some minor rephrasing of the rest of the comment to remove noise
words, format according to effective Dart.
Change-Id: I497cfeeeff0885eb34e798c469f95dc46f4a81f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156342
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
This is another step in refactoring that should help with protecting class functions lookup with locks.
Change-Id: Icd8a4831684b5514079bd7e03a3d2358b992e729
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156300
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
* Adds a bool `isNonNullableByDefault` field to Library entities.
* Adds a bool `usesNonNullableInitialization` to the JS emitter's StaticField.
* Emits two lazy-variable initialization functions: one for
pre-null-safety and one for post
New issues:
* Always emits both lazy init functions - even when only one is ever used.
Fixes#42419
Change-Id: I6a76798946b13842fbb2ad566d4505bbcd9ca0d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156063
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
Instead of spawning new processes to run a tool for a command, this
change makes it so we run within the current process when possible. In
general, we should avoid spawning any processes when possible from
dartdev unless:
- We need to interact with the child process from dartdev (e.g.,
analysis server)
- The child needs to interact with the parent process (e.g., DDS)
Change-Id: I9c8cd39de038ab2f3a699165a47bee4c281bda67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156048
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
The new feature will be enabled by default but the option still exists
so that users can disable it if they want/need to.
Change-Id: I9e001b00b5dfe132a6b7bcfdcacd3143fb24f65c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156121
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
This is part of refactoring that should help with protecting class functions lookup with locks.
Change-Id: I28d25aa78c0b4d83eb8ceab827b71852a23368b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156162
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
To make implicit getters/setters frameless in common cases we use graph
intrinsics. We do this for boxed as well as unboxed fields. We do this
only for simple cases (e.g. not if field guards or possible boxing are
involved).
It also removes the hand-written assembly intrinsics for the getters,
which avoids bugs if boxing-state of field is not the same as
boxing-state of setter/getter.
Issue https://github.com/dart-lang/sdk/issues/40876
Change-Id: Id3bd7842ead0278fee61d4a21c8661ce18dbccee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155900
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Previously to unwrap a type in isTop method the declared nullability
was set to Nullability.nonNullable. This doesn't work for
intersection type because .withDeclaredNullability() doesn't work for
them. This CL introduces a method that simulates the removal of the
top-level nullability type constructor from a type term, and uses the
method in isTop to account for intersection types and other possible
similar cases in future.
Change-Id: I3e6f30b5d93850b2cf92475a89d09d6d9255089f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156193
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This ensures redundant bounds checks are eliminated for
GenericCheckBoundsInstr (in addition to CheckArrayBoundInstr which we
already do).
Change-Id: Ie49e63f3e48cd7c90f5616cc1394f4d8a6920699
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156188
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Add experimental flag to tests.
Add words to test spelling dictionary.
Change-Id: Ie739a84fd85e7f85f312416f34506ee76313803b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156021
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Also balances shards to reduce cycle time.
Change-Id: I3e6446076e29627e171a41bd53a1dd4754ce68ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156187
Reviewed-by: William Hesse <whesse@google.com>
Sharding was based on the directory listing. Now we sort the entities
by test name before sharding to avoid dependency on the file system.
Change-Id: I5e6ecc191d84eb1820c05bcef0a27d8b03d89286
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156025
Reviewed-by: Jens Johansen <jensj@google.com>
This adds a language versioning test that shows that the language
version for a package defined in a `.packages` will have version 2.7
and whereas a package defined in a `.packages_config.json` will have
the current language version (2.8 in the test). Therefore the
former will not have the non-nullable experiment enabled even when
the package is in allowed_experiments.json.
Change-Id: Iabf5d6882e21538cfc1237d848bad03a37825dfb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156000
Reviewed-by: Jens Johansen <jensj@google.com>