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>
Make sure Future.value constructor is inlined, so 'value == null'
test can be removed. Also, removes the implicit cast to FutureOr<T> on
all code paths and only leave a faster 'value as T' cast in case
value == null.
EmptyFutureTest benchmark in AOT/null safety mode on linux/x64: +11.62%
Change-Id: I56916d3a1f6a60e3fc9c50cd565db71aea6ab975
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155928
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
With the introduction of paged new-space, it became possible for the scavenger to fail to allocate if old-space could not grow and survivors did not pack after being reordered, and the scavenger would FATAL out. Long before that, the scavenger could fail to allocate the other semispace and FATAL out. Now an allocation failure causes the scavenge to abort, and partial forwarding to be reversed.
Change-Id: Idadfa4d9797aa7afce362bf70343e66b1b1dfeaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155683
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Pass the CommonMasks abstract value domain instead of the JClosedWorld to TypeMask methods that need access to *their* abstract value domain. It is wrong to get the abstract value domain from the JClosedWorld because when we try to wrap abstract values, the abstract value domain in the JClosedWorld is the wrapper domain, not the domain being wrapped.
Change-Id: I5bbd0f4c56abe45714dd0a2657f73ef240efae0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155640
Commit-Queue: Christian Altamirano <coam@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
This also captures the information needed for the hints we want to add
around duplicated, erroneous and unnecessary ignore comments.
Change-Id: Ibafa2a92a02cf8113c222680f4868c38166d94e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155847
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This is no longer a feature we plan to support.
Change-Id: Ie916f3bbb0313c98863e360472f126c24340013d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156026
Reviewed-by: William Hesse <whesse@google.com>
With more co19 tests getting migrated, some shards were timing out.
Change-Id: I2e8acbf6f41cb472fc48a8bcdbf07d2387623ad1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156024
Reviewed-by: Karl Klose <karlklose@google.com>
- Makes Future.wait a recognised function, and asserts its chained
future, _future is allocated at a known index in the context.
- Adds logic to locate, extract the chained future during lazy async
stack unwinding.
- Adds tests for the Future.wait async case.
- Minor consistency nits, comments.
This change is similar to a previous CL, adding Future.timeout support:
https://dart-review.googlesource.com/c/sdk/+/152328
Change-Id: I7439750968595d25d7bbac0068ad64fcc891e176
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155420
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
The default behavior is controlled via a private configuration variable
settable by embedders (#_mayUseInsecureSocket). It is, by default,
configured to allow insecure connections. The domain configuration
itself is sent as a JSON encoded string which gets parsed once.
Embedders are expected to set these configurations before they run any
user code.
This is a re-work of https://dart-review.googlesource.com/c/sdk/+/142446
[dart:_http] Allow the embedder to prohibit HTTP traffic.
Change-Id: I4ccbd35da9ce25bf5f81ad4468111018d6af2f03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154180
Commit-Queue: Mehmet Fidanboylu <mehmetf@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>