Commit graph

80324 commits

Author SHA1 Message Date
Alexander Thomas
41aa60ea2b [infra] Add explicit gen_snapshot build target to macOS arm64 AOT builds
macOS arm64 builds only create the x64 gen_snapshot by default because
they are cross-compiled in Rosetta. Adding the gen_snapshot target
ensures that we have a gen_snapshot for arm64 as well.

These bots require clang which currently isn't provisioned on shards, so
they are running on the main bot.

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-mac-release-arm64-try
Change-Id: I842f37019a65dfb30e522d2d9bead5e62bb3ff79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204505
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2021-06-25 19:35:32 +00:00
Johnni Winther
2a3e884c80 [cfe] Eagerly canonicalize instantiations
With the constructor-tearoff feature, effectively constant
instantiations are canonicalized.

Change-Id: I4e83fef47e5a404da19667ccfb1d13a3b00d632f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204960
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2021-06-25 17:49:16 +00:00
Nicholas Shahan
e2cb0b8553 [ddc] Fix function apply arguments list
- Fix default value assignment when passing a list of positional
  arguments that isn't a dart:core `List` at runtime.
- Fix modification of the original list passed as positional arguments
  when also passing named arguments.

Change-Id: I3aef6b1584f159c92251b963ffb927e1f75d3472
Fixes: https://github.com/dart-lang/sdk/issues/46457
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204900
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-06-25 15:44:15 +00:00
Johnni Winther
268290725d [cfe] Support explicit instantiation
+ add bounds check for implicit instantiation

Closes #46458

Change-Id: I032f79d8ae4ed6944fbad999e067976ff72d94fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204802
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2021-06-25 14:47:45 +00:00
Lasse R.H. Nielsen
43cff26365 Add supertype to enum classes.
TEST= language/enum/enum_test

Change-Id: I83b7fd1c29103c3aa4dc7ad3e41141fb8c62339e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203564
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-06-25 14:08:16 +00:00
Johnni Winther
253764ebbb [cfe] Avoid using inferrer.helper.uri in top-level inference
Change-Id: Ifb0bbf579f8728fe14a9330631d4fd90ccb78e58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204801
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-06-25 13:30:25 +00:00
Lasse R.H. Nielsen
83376bf1ee Add Object.hash and Object.hashAll static helper methods.
Fixes #11617.

Bug: http://dartbug.com/11617
Change-Id: Id06fb5b3914bee24713427edbd3b9b7e86f86449
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/73360
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-06-25 11:40:35 +00:00
Tess Strickland
843bd00c71 [bots] Run vm unit tests using qemu as well as FFI tests.
Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try
Change-Id: I3c104ce5594d8f427fdf247364e6952a45132820
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204786
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2021-06-25 11:35:25 +00:00
Jens Johansen
2f8cc223d5 [CFE] Second pass at internal test utility
* Add tests of extraction of comments
* Add tests of extraction of tests
* Add tests (both positive and negative) of actually running tests
* Use parser for extracting tests so it correctly parses stuff with
  commas and braces for instance.

Change-Id: I48a7e8ae179d53371a9bcfed982f0df177306c12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204502
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2021-06-25 08:36:45 +00:00
Tess Strickland
f75d1819bc [test_runner] Adjust VMTestSuite to appropriately use qemu.
No qemu-using CI bot runs vm/cc tests currently, but this allows
developers to run vm/cc tests locally using qemu. This way, tests
like those from assembler_arm_test.cc can be tested both with and
without our own ARM7/ARM8 simulators.

Change-Id: I7fd97e411936954b59d9f0fc65e16c518e9ee332
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204781
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2021-06-25 07:33:26 +00:00
Mark Zhou
a44b4f5b62 [dartdevc] Updating eval tests that check for internal Future state.
Fixes #46451

Change-Id: Iacf1b115d3c1b9372d0061c6dcbe370c36cea865
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204924
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2021-06-25 05:23:55 +00:00
Mark Zhou
a725f0c835 [dart2js] Updating deobfuscator function name resolution to support method definitions.
Change-Id: Ie0ddce9e42ab9f069aebddc7514da95e9b240b60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204745
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-06-24 23:12:42 +00:00
Martin Kustermann
22bbfebabe [vm] Verify we never add large arrays into store buffer
The storebuffer verification code did check that objects in the store
buffer do not have the IsCardRemembered bit set.

This CL adds some extra checks to also ensure the bit is correctly set
(or said differently, that we never add large arrays to the store
buffer)

TEST=Existing test coverage.

Change-Id: I764ac15eec30fef3769706972e1783a31f911e57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204800
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-06-24 22:35:00 +00:00
Nicholas Shahan
8ff5176a77 [ddc] Avoid source maps on logical Not operator
Adding explicit source maps to the operator created a breakable location
when viewing source-mapped dart code in chrome devtools. There isn't a
breakable point in the javascript for a `!` operator so trying to enable
the breakpoint visible in the dart code would trigger some "other
breakpoint".

Recent changes in the V8 debugger have changed which "other breakpoint"
would be triggered.
16b0767adc

This causes our tests to fail and makes the user
interaction a little confusing. Removing the extra source map here seems
to be the most reasonable solution because it prevents a possible
breakpoint from appearing where there isn't a breakable location.

Now, the ! operator doesn't introduce any new source mapping it simply
continues the previous mapping.

Change-Id: I5903bfeaf1bcb2e2a3ce883433153575aa1fd05a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204742
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-06-24 21:29:29 +00:00
Alexander Markov
cd40fb4318 [vm/aot/tfa] Tree-shake default values of parameters
This change teaches tree shaker to drop default values of parameters of
methods if their bodies are dropped (for example if a method is only
used as an interface target).

TEST=pkg/vm/testcases/transformations/type_flow/transformer/regress_46461.dart
Fixes https://github.com/dart-lang/sdk/issues/46461

Change-Id: Icb50d7ec6acd91e68ceaa3b826c15d09d1c05701
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204840
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-06-24 20:36:09 +00:00
Ben Konyi
0d61348584 [ CLI ] Fix IPv6 VM service support for standalone VM
The CLI was not providing the ipv6 flag to DDS, resulting in a "Could
not start Observatory" error.

Change-Id: Idff0f525455f121b8f1e89bc4ad20a01cd1165ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204860
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-06-24 19:50:59 +00:00
Ryan Macnak
09994d6eaa [vm, arm64] Fix disassembler to name the correct registers as ip0/ip1.
TEST=--disassemble
Change-Id: I5fc1a2ae8b0e4ef6b78754a1ab39e71c1e3e35f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201983
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-06-24 19:47:58 +00:00
Danny Tuppeny
06fc5c522e [dds] Spawn DDS in-process with DAP
+ Switch to package:args CommandRunner
+ Add switches to enable/disable DDS/auth tokens
+ Improve verbose logging for debugging tests
+ Fix a race condition in initial unpausing of Isolates

Change-Id: I7f7ee0ef798e198ee07c1c663bce3edb0b5c7fc9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204143
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-06-24 18:07:49 +00:00
Liam Appelbe
155ac440f7 [vm] Migrate Arrays and Instances to compressed pointers
Change-Id: I8264b340ee91d883afc52a52e83cda504f552e37
TEST=CI
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191302
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-06-24 17:31:12 +00:00
Devon Carew
a3256e6b2f [pkg/vm_snapshot_analysis] switch to using package:lints
Change-Id: Ia36b1bf1127e0b78e0294422cff78338ef19ec26
TEST=this CL updates static analysis settings and address associated warnings
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204640
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2021-06-24 17:07:48 +00:00
Alexander Markov
a9757d177a [vm, kernel] Cleanup support for old invocation nodes from the VM
This change concludes switching to the new invocation nodes in the VM.
Support for the old invocation nodes (MethodInvocation, PropertyGet
and PropertySet) is removed from the VM and VM-specific kernel
transformations.

TEST=ci

Closes https://github.com/dart-lang/sdk/issues/45340

Change-Id: I0717732feb1b9c6ebdf0f6079ed42a90d00970a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204741
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-06-24 16:17:50 +00:00
Martin Kustermann
960cc715ee [vm/compiler] Fix specialization of implicit setter calls in call specializer
The call specializer replaces implicit setter calls with
AssertAssignable+StoreInstanceField. If the former lazy-deopts it will
deopt to after-call and therefore the StoreInstanceField will not be
performed.

This CL makes use of newly added infrastructure that can mark such
instructions as lazy-deopt to before-call, therefore causing a
re-try of the instance call.

Fixes https://github.com/dart-lang/sdk/issues/46446
Issue https://github.com/dart-lang/sdk/issues/45213

TEST=vm/dart{,_2}/deopt/restart_call_on_deopt_regress_46446_test

Change-Id: I460e9a3c86b89a1ae127145024ace2d3d860d0af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204721
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-06-24 15:43:49 +00:00
Joshua Litt
202277c689 [dart2js] Create holder per output unit.
Change-Id: I3c6083f0732c3533a57c5857b3e69e2dc791ce7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198580
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-06-24 15:38:38 +00:00
Jens Johansen
051df5fe16 [CFE] Fix weekly tests didn't wait correctly
When running the weekly test it launches a leak test for flutter first
without the experimental invalidation and then with. As the test starts
with checking out flutter gallery the second launch has to wait for the
first to be done with that.
That stopped working with 8bd4c53381 as
the (in that CL) newly added test trickered that wait to stop (by
printing a "globally listened for" observatory listening on line).

This CL fixes that by only listening for data from the correct process.

It further more makes final error-reporting better.

Change-Id: I1ead96ae4c31616b1e7dc3044ae22437d7f605d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204783
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-06-24 15:29:49 +00:00
Jens Johansen
c0361c291c [CFE] Allow (more) private access in expression compilation
Previously one would for instance get an error when trying to expression
compile an expression like `Foo._private()` on a class like

```
class Foo {
  static int _private() { return 42; }
}
int _private() { return 42; }
```

whereas the expression `_private()` would be fine.

This CL fixes that, so both expressions are accepted.

Change-Id: I959bd5bf8bf5770852add3b979c8382d005ecf41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204782
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-06-24 14:58:29 +00:00
Tess Strickland
b8ecf06943 [vm/compiler] Add kUnboxedUint16 representation.
Adding this representation allows us to create slots for storing
and retrieving values from uint16_t-typed object fields in the runtime.

Also generalize BoxUint8Instr to BoxSmallIntInstr, which holds any
unboxed integer representation where the value is guaranteed to fit
into a Smi.

To unify the implementation of BoxSmallIntInstr across architectures,
we add ExtendValue(Register dst, Register src, OperandSize sz), which
extends the sz-sized value in src to a full register size in dst. If
sz is a signed OperandSize, then the resulting value is sign
extended appropriately.

We also add MoveAndSmiTagRegister / ExtendAndSmiTagValue, which is like
the base operation but also tags the value as a Smi. On some
architectures, this can be performed using a single instruction.

Also adds sbfx/ubfx on ARM for use in ExtendValue.

TEST=Existing tests for BoxSmallIntInstr, followup CL for the new
     representation.

Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-x64-try,vm-kernel-linux-debug-x64c-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-nnbd-linux-debug-simarm_x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-nnbd-linux-debug-ia32-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-linux-debug-simarm64c-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-debug-simarm_x64-try,vm-kernel-linux-debug-simarm64c-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-precomp-ffi-qemu-linux-release-arm-try
Change-Id: I9c0b3a23f5e28480e0bfbde55b9494f7b822dcfa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203761
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-06-24 12:15:48 +00:00
Brian Wilkerson
10354d0aef Convert several of servers tests to be null safe by default
Sorry for the size of the CL. In reptrospect I should have changed the
defaults in any test class with failing tests and then converted them
one-by-one the way you did in analyzer. I'm happy to do anything I can
to make this easier to review.

Change-Id: I0a729d0d07cc3083a9892cfb1ddc75a06ad8f0dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204748
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-24 04:05:39 +00:00
Stephen Adams
8fda1d6cf3 [js_runtime] Don't modify inputs to Function.apply
In some cases adding default arguments modified the 'positional'
arguments input List.  Since there are 'accelerated' paths for small
numbers of arguments, this bug did not show in any other tests.

Change-Id: I5075c96ecfdc9645b85b9beeeb38305415153d20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204747
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2021-06-24 03:29:38 +00:00
Paul Berry
fcb5c4f4b6 Migration: stop explicitly opting generated code into null safety.
This is no longer needed now that the whole migration engine has null
safety enabled.

Change-Id: I834bfb18f9b4d838c0cc933acb6977566bc1643a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204484
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-06-23 23:35:47 +00:00
Paul Berry
730cbcbe6e Fix hints and lints after migration of the migration tool.
Change-Id: I90ac7e88686ba6db9b9e64538663ae2044638894
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204483
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-06-23 23:35:47 +00:00
Paul Berry
768104377b Fix warnings after migration of the migration tool.
Change-Id: Ia1c1f71809ce8d843ee2ed7d99e530ace83e18ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204482
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-06-23 23:35:47 +00:00
Paul Berry
6594ded7d9 Run the migration tool on itself.
Change-Id: Ifbdf1c33cc359519fdcf2637d50a9e4d3b054af7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204481
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-06-23 23:35:47 +00:00
Paul Berry
dcad8c94ef Hints etc. to prep for migrating the migration tool
This change adds just enough migration hints so that I can run the
migration tool on itself and get reasonable results.  Most of the
hints are just marking a few types as nullable or non-nullable that
the migration tool isn't able to correctly infer by itself.  In a few
circumstances I've had to make a type explicit that was previously
inferred, so that I could mark it as nullable.  In a few other
circumstances I've had to add `/*!*/` after an expression to let the
migration tool know that the expression should be null checked.

Note that unlike most of the rest of the Dart SDK, the migration tool
is not expected to be a long term part of the Dart ecosystem, since
the whole point of it is to help people migrate their code to null
safety.  It's not likely to receive a lot more maintenance, and it
will likely be removed sometime around the time of Dart 3.0 once
people stop needing it.  Accordingly, I've tried to err on the side of
liberally allowing types to be nullable where possible.  Although this
means that we will wind up with more null checks in the final result,
it makes the migration process a lot easier and substantially reduces
the risk of introducing bugs during the migration process.

Change-Id: Ia348a09e94d22d83c2c15215ca7ddf5a5a4d05f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204480
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-06-23 23:20:57 +00:00
Paul Berry
c041afad9f Decouple the migration tool from package:dartdev so it can be migrated.
In order to migrate the migration tool to null safety, it can't have a
dependency on `package:dartdev`, because `package:dartdev` isn't
migrated yet.  (This is a problem because once the migration tool's
tests have been migrated to null safety, they will require the
transitive closure of all the packages they depend on to also be
migrated).

Fortunately, it's quite easy to change the migration tool so that it
doesn't depend on `package:dartdev`; we only need to move the class
`MigrateCommand` from `package:nnbd_migration` to `package:dartdev`.

To make this work, we have to move the constant `migrationGuideLink`
from `MigrateCommand` to `MigrationCli`, and make the method
`MigrationCli._defineOptions` public.

Change-Id: Ie1ce8db0e8245e98bbb72facddd723300816340e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204540
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-06-23 22:57:21 +00:00
Joshua Litt
5377034390 Revert "[dart2js] Use library as key for some holder properties."
This reverts commit 889659e876.

Reason for revert: This CL is too limiting.

Original change's description:
> [dart2js] Use library as key for some holder properties.
>
> Change-Id: I24d21dd6239191ab0242387d97d6b47cdf9582b5
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203826
> Reviewed-by: Stephen Adams <sra@google.com>
> Commit-Queue: Joshua Litt <joshualitt@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Id4d3d401a5b96a1c8e42afd87513520e52b725d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204746
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2021-06-23 22:44:27 +00:00
Mayank Patke
3405b94338 [dart2js] Remove Symbol.validated.
Bug: https://github.com/dart-lang/sdk/issues/46397
Fixes: https://github.com/dart-lang/sdk/issues/46397
Change-Id: I307f486deb7afe72c347bfeb6779cb9389d1ff13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204601
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2021-06-23 20:58:18 +00:00
Ryan Macnak
c54ce0b969 [vm] Adjust FreeListProtectedVariableSizeObjects for larger page size on Mac ARM64.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/46434
Change-Id: Id0f0d61648add0462fe38a3ef2c98d19bc355786
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204622
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-06-23 19:17:07 +00:00
Mayank Patke
c015e02180 [dart2js] Fix spurious ! in ConstantMap.
Change-Id: I45ab75005c4f3d658c476886ede3ba37dbb067e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204625
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-06-23 18:30:11 +00:00
Stephen Adams
11991056b6 Specialize closures for 0 and 2 arguments
Change-Id: Ia21249cb9671960eb3e0d96afef5e5efb8ba7ee2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105200
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2021-06-23 16:54:41 +00:00
Martin Kustermann
0999d13ff3 Revert "[vm] Remove --causal-async-stacks flag"
This reverts commit b1f1aee94d.

Reason for revert: Some left-over uses in g3 need to removed first
(some were removed in b/380758599 but apparently there's some 
usages left).

Original change's description:
> [vm] Remove --causal-async-stacks flag
>
> The flag isn't used anywhere in our tests or in embedder code. Turning
> it on will result in a VM startup error.
>
> We should therefore remove all uses of the flag and the flag itself.
>
> TEST=Existing test suite.
>
> Change-Id: I19dfba052df7948dfdb379c0610dab67ebbcd12d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204500
> Reviewed-by: Clement Skau <cskau@google.com>
> Commit-Queue: Martin Kustermann <kustermann@google.com>

TBR=kustermann@google.com,cskau@google.com

Change-Id: I03aad46f46153d5ea4ac2fcdd5685d0ef2a0d9af
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204723
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-06-23 16:53:22 +00:00
Sam Rawlins
0740566438 Revert analyzer Dart language version to 2.12
Change-Id: I2076c6134f8da11ef78db96433241e2eea779a15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204700
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-06-23 16:36:41 +00:00
Dmitry Stefantsov
a98d1da827 [cfe] Exclude extension types from scopes of on-types
Change-Id: I3512b6ea023df0f0e9d1121454366d7daafa38a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204722
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2021-06-23 16:14:01 +00:00
Alexander Thomas
a6f29eda6d [infra] Remove obsolete "global" key from the test_matrix.json
Follow-up to https://dart-review.googlesource.com/c/recipes/+/203620.

Change-Id: I179a1084212ec66cf7a74be8bcf81f15a4493d6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204120
Reviewed-by: Karl Klose <karlklose@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-06-23 14:53:52 +00:00
Simon Binder
8fbc2ad8c0 [analyzer] Diagnostics for invalid Future.value and Completer.complete
When Future.value and Completer.complete are used with a non-nullable
type argument and an argument that is absent or null, a runtime error
occurs.

This adds a diagnostic detecting those invalid usages.

Closes: https://github.com/dart-lang/sdk/issues/45319
Change-Id: Ifd9af70e002c351bf145f4a623105476feb213d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202622
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Simon Binder <oss@simonbinder.eu>
2021-06-23 14:47:51 +00:00
Martin Kustermann
b1f1aee94d [vm] Remove --causal-async-stacks flag
The flag isn't used anywhere in our tests or in embedder code. Turning
it on will result in a VM startup error.

We should therefore remove all uses of the flag and the flag itself.

TEST=Existing test suite.

Change-Id: I19dfba052df7948dfdb379c0610dab67ebbcd12d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204500
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-06-23 14:37:31 +00:00
Brian Wilkerson
0e4c640451 Suggest void as a return type in existing generic function types
Change-Id: I88c37e5ce273de2e9598b182fc5fb61066c11740
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204600
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-23 14:04:21 +00:00
Dmitry Stefantsov
f81bf604a9 [cfe] Allow instantiated type literals for constructor-tearoffs flag
Change-Id: I04de71bb4bcb4dc17dd28d5501b79d87a1bc5658
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204200
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-06-23 11:51:25 +00:00
Lasse R.H. Nielsen
f89ed9bfc3 More elaborate error when a future error handler returns something of the wrong type.
Bug: https://github.com/dart-lang/sdk/issues/44386, https://github.com/dart-lang/sdk/issues/41313
Change-Id: I87b10c3cd03475f4cd80b7a7c5cba6a558167748
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175062
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-06-23 11:25:25 +00:00
Alexander Thomas
af16281712 [release] Add release notes for 2.13.4
Change-Id: I5bce7cfc6b136e457ce719c2d7f3a487f2b95742
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204720
Reviewed-by: Michael Thomsen <mit@google.com>
2021-06-23 10:25:13 +00:00
Tess Strickland
40a53e2a2a [build] Fix paths to clang shared libraries on Fuchsia.
Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-x64-try,vm-kernel-win-release-x64-try
Change-Id: I94d65dbc239ce154db840638410d444d9f9bf50e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204584
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2021-06-23 10:23:05 +00:00