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>
During normal execution the return value from `main` is _not_ used as an
exit code. Fix some cases that try to use it that way.
Change-Id: I292dc8ebf0acc8cb3d4d72f55107e438df9112de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156143
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Bots seem much slower than local testing.
Change-Id: If5ce44a0b59b82c8651017f7efe810b8a4c65ef5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156052
Reviewed-by: Ryan Macnak <rmacnak@google.com>
(Disabled; comment in to enable.)
The command calls out to the DAS using the bulk fix protocol to fix all bulk-fixable issues.
Fixable diagnostics are captured in the `BulkFixProcessor.lintProducerMap`.
Sample output:
```
[~/src/repos/dart/sdk/pkg/dartdev] (fix_cmd) $ dart bin/dartdev.dart fix
*** The `fix` command is provisional and subject to change or removal in future releases. ***
Computing fixes in dartdev... 5.0s
Applying fixes to:
lib/dummy2.dart
lib/dummy.dart
Done.
```
Change-Id: I71f82623a452cb747bfc13dba0bb764ec9b1a15b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156046
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>