Commit graph

80348 commits

Author SHA1 Message Date
Ryan Macnak
1acc926edd [build] Increase linker optimization level to match Flutter and Fuchsia.
Reduces VM code size by about 15k.

Change-Id: Icaa1a5278855f88f7ce702802d6aaa62639cfac5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205120
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-06-28 18:55:11 +00:00
Alexander Markov
9c190c5e00 [vm/aot/tfa] Tree-shake instance fields with initializers
In order to simplify removal of instance fields with initializers which
may have side effects, such field initializers are moved to constructor
initializer lists before type flow analysis.

In case of multiple generative non-redirecting constructors AST of
field initializers is cloned. Moving and cloning of initializers is
performed before the analysis to avoid maintaining and spreading
inferred TFA information attached to AST nodes.

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

Change-Id: I4dc9c44c441ece5792f0748789ece117a2814581
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204943
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-06-28 18:33:43 +00:00
Konstantin Shcheglov
e13cd8e38f Issue 46475. Make class Enum is optional, does not exist in older SDKs.
Bug: https://github.com/dart-lang/sdk/issues/46475
Change-Id: I01368e597c3f9bbd3b7f84663a1a39dd5f2d654d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205141
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-28 18:20:53 +00:00
Brian Wilkerson
aebde75dbf Cleanup invalid declarations of main, part 3
Change-Id: Iba6b4708a66034c9ac56d0b8910aad6d7f86b56d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205064
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-28 18:14:21 +00:00
Brian Wilkerson
66aa132c84 Cleanup invalid declarations of main, part 2
Change-Id: Ic9626a500a8ceb4b9b0518e911658b96968d845f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205063
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-28 18:14:02 +00:00
Brian Wilkerson
69dd787ff0 Cleanup invalid declarations of main, part 1
The purpose of this CL is to clean up test code that references `main`
in a way that will be invalid when the tests are converted to analyze
the test code under null safety by default. This is the first of three
such CLs.

In all three I only touched test files that contained an invalid use of
`main`, but in any file I touched I removed any use of `main` where the
name of the function/method was not critical to the test.

Change-Id: Ib753302a4c3ffc7eb5f248e9c6000e80dc77fca9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205062
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-28 18:13:24 +00:00
Ryan Macnak
206c7ba8a6 [vm, gc] Don't use Thread::sticky_error_ when aborting a scavenge.
TEST=tsan
Bug: https://github.com/dart-lang/sdk/issues/46095
Change-Id: I5c2695ec9a6a0d9fa1415805bc83a90fc1f8ee17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204820
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-06-28 18:06:12 +00:00
Brian Wilkerson
f5b28a83e8 Fix a bug in both add_missing_enum_case_clauses and add_missing_enum_like_case_clauses
We should rename ClassMemberLocation to reflect the wider usage, but I
thought it would be better to do that in a separate CL.

Closes: https://github.com/dart-lang/sdk/issues/38693
Change-Id: I657f7945022b09eb8deb89d8f2f5d43164fe53cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205061
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-06-28 18:04:52 +00:00
Janice Collins
f899fd1310 Update SDK documentation for new lookup code.
This fixes existing problems in the SDK documentation, and corrects
expressions that were invalid but ignored in the previous version of
dartdoc.

Change-Id: Ic06b6bce7a886f8e5ce797594d37e382fe37bd40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205068
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2021-06-28 17:33:30 +00:00
Konstantin Shcheglov
67bb5bcc2e Issue 46489. LibraryElement.name is not nullable.
Bug: https://github.com/dart-lang/sdk/issues/46489
Change-Id: Iddbb0d2c3cb32f4497147edc965fbd933b5de277
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-28 17:26:30 +00:00
Danny Tuppeny
5dbf8992ed [analysis_server] Include file path in generated "part of" statements for unnamed libraries
Fixes https://github.com/Dart-Code/Dart-Code/issues/3268.

Change-Id: Ic681da09d0161e2e432959989db8c8002b1669a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204981
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-28 17:13:41 +00:00
Martin Kustermann
af078e5821 [vm/concurrency] Run TSAN tests on iso-stress builder in batches
Currently the TSAN JIT run runs all tests in one go, that causes the bot
to run OOM. Instead we'll run it in batches, to limit the amount of RAM
TSAN needs to accumulate until end of program.

TEST=Existing test suite.

Change-Id: I6e5b3e9201dda94bbe4deb39a9fd01c8f84329f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204983
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-06-28 16:24:42 +00:00
Brian Wilkerson
0fc6f218bb Move bulk fix tests, part 1
Change-Id: I2b05dfbe5d26b9cd5534cc3971c0500ff11dc474
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205065
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-28 16:21:42 +00:00
Brian Wilkerson
548cba8d84 Add documentation for more diagnostics
Change-Id: Idc81811f0956a97331cd74684155da933a544b64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205066
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-28 16:11:55 +00:00
Brian Wilkerson
86e3c1b231 Add a fix for the unnecessary_string_escapes lint
Closes: https://github.com/dart-lang/sdk/issues/45930
Change-Id: I7b50756256867174aa11adf7d29a67d2cb012839
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205060
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-28 16:05:02 +00:00
Zach Anderson
99b69adb6f [build] Add Windows optimization flags to dart_config
Change-Id: I48afc0e286116b4473adfe2d4e884a68e5971f36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205000
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2021-06-28 15:57:52 +00:00
Lasse R.H. Nielsen
8a57112091 Add some operator based tests.
Change-Id: Id9aa12854621eab68227b64bebf507f25b07ea1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154683
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-06-28 15:06:52 +00:00
Erik Ernst
070e32e553 Add test on identity and equality of tearoffs
Change-Id: Ief2313b6c7f859622f8970cb3abb42ba98c89084
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202243
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2021-06-28 14:57:02 +00:00
Jens Johansen
34e1f6cd26 [CFE] Third pass at internal test utility
* No longer ammend the "actual" file with test code. Instead do like
  the expression compilation and create a new library builder that
  can access the same things as the original builder and use that.
  This has the benefit of not invalidating anything really, meaning it's
  much faster.

Change-Id: I65fc45d17217a62a04dd43ab14806d759d0fdca8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204961
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-06-28 08:27:42 +00:00
Hoylen Sue
4b82a5f5c2 Added documentation about out-of-range components to DateTime.parse.
The [DateTime.parse](https://api.dart.dev/stable/2.10.4/dart-core/DateTime/parse.html) method accepts out-of-range components. For example, parsing the string "2020-01-42" produces "2020-02-11".

This was raised as a bug in https://github.com/dart-lang/sdk/issues/11189, but after more than 7 years that issue was closed with the solution being "use parseStrict from the intl package" instead.

This pull request simply **updates the documentation of DateTime's _parse_ method** so that users know:

1. This is how the method behaves. Otherwise they might be surprised when it unexpectedly happens in their code.
2. This behaviour is a feature and not a bug. Otherwise they might raise another issue for it.
3. The _parseStrict_ method in the intl package exists. Otherwise they might reinvent the wheel.

Closes https://github.com/dart-lang/sdk/pull/44521
https://github.com/dart-lang/sdk/pull/44521

GitOrigin-RevId: a88ada479d6664cac69a6dc44de3fe2a41f8e9be
Change-Id: Ic45e4db118bd3fad3a612659a35ca7a5d80937b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176680
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-06-28 06:45:51 +00:00
Alexander Thomas
2517517baa [infra] Upgrade d8 to 9.1.269
Use the depot_tools provided gsutil in the update script.

Cq-Include-Trybots: luci.dart.try:dart2js-minified-strong-linux-x64-d8-try,dart2js-strong-hostasserts-linux-ia32-d8-try
Change-Id: Ia12e61d6ba76a0cd89923d6f8821f7a3e2919cea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204205
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-06-27 11:00:31 +00:00
Mayank Patke
58ad941a5a [dart2js] Fix interface subtyping bug.
Previously, when checking S <: T, we only checked if S and T had the
same interface name once. However, it's possible that redirections
eventually cause them to become equal. For example, if S is an interop
type and T is JavaScriptObject, after following the redirection from S
to JavaScriptObject, we end up checking JavaScriptObject <:
JavaScriptObject. Therefore, we need to recheck after following each
redirection.

Change-Id: Ie3eb9530627a0e48a5ea704fd4078ae238a65c78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204744
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-06-25 22:34:06 +00:00
Stephen Adams
3d081f907a [dart2js] Clean up tear-off code
- Simplify tear-off signatures
- Make BoundClosure have consistent Dart receiver
- Use receiver/interceptor terminology rather than self / self+receiver

Change-Id: Ifb6c52cc7a9475b79e468efb19eb76f70ec5cd09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204680
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-06-25 21:51:20 +00:00
Kevin Moore
03b2b6bac9 Fix changelog for dart:html for 2.14
Change-Id: I866378cba43db7f559e37d3c0bf163843f74d186
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204941
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-06-25 21:47:29 +00:00
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