Commit graph

76379 commits

Author SHA1 Message Date
Konstantin Shcheglov 1726476120 Check for '!' operator when report HintCode.NULL_CHECK_ALWAYS_FAILS
Follow up for:
https://dart-review.googlesource.com/c/sdk/+/170122

Change-Id: If9b3cb1a18ecd7cf21149dbd0fda4ec209506b90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170220
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-11-04 03:43:25 +00:00
Ben Konyi ffc36db613 [ CLI / VM ] Add --enable-experiment support for 'dart compile', change
where --enable experiment is accepted

Adds --enable-experiment support for:
  - dart compile aot-snapshot
  - dart compile jit-snapshot
  - dart compile js
  - dart compile exe
  - dart compile kernel

Also changes --enable-experiment from a top level CLI flag to a
per-command flag. --enable-experiment flags will now only be
interpreted by the VM if:

1) They are provided before a CLI command (e.g., dart
--enable-experiment=non-nullable analyze) or

2) They are provided with an explicit or implicit run command (e.g.,
dart --enable-experiment=non-nullable foo.dart or dart
--enable-experiment=non-nullable run foo.dart or dart run
--enable-experiment=non-nullable foo.dart)

This should make it more generally clear where --enable-experiment is
accepted and what subcommands can accept the flag. Prior to this change,
providing --enable-experiment anywhere, even for commands without
experiment support, would not raise an error.

Fixes https://github.com/dart-lang/sdk/issues/43623

Change-Id: I5ec48b2dd2bb6db5526185dae2edbca95ef24d9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169902
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2020-11-04 00:34:26 +00:00
Ben Konyi 2865802d93 [ Service ] Disable get_stack_limit_rpc_test on precompiled bots
Change-Id: I658d43ef9ad058766f117bdaa45a58590599e7a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170281
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-11-04 00:29:27 +00:00
Jia Hao Goh 8c91d919b7 Treat integration_test/ as a directory for tests
This allows `invalid_use_of_visible_for_testing_member` to work with `@visibleForTesting` annotations when such symbols are accessed from an `integration_test/` package directory.

Bug: https://github.com/dart-lang/sdk/issues/43921
Change-Id: I530b88459060dbb05eb18d2a6de2902c88c246af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169180
Auto-Submit: Jia Hao Goh <jiahaog@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-04 00:26:15 +00:00
Ben Konyi a486752050 Revert "[ DDS ] Keep event history for Stdout, Stderr, and Extension streams"
This reverts commit 892cc93f26.

Reason for revert: Causing assertion failures on pkg-linux-debug

Original change's description:
> [ DDS ] Keep event history for Stdout, Stderr, and Extension streams
>
> Change-Id: I14ce732cd408ece1da2801887cac3b518bc36af6
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169146
> Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

TBR=bkonyi@google.com,rmacnak@google.com,kenzieschmoll@google.com

Change-Id: Idf2a5f07433af0772ef36aaa2ba7b24b1a5e0323
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170300
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-11-04 00:25:37 +00:00
Devon Carew 282e3dc29f [pkg/dartdev] opt a test out of nnbd
Bug: https://github.com/dart-lang/sdk/issues/44050
Change-Id: Id102c927ec4918940050783aa23aed0dad03b341
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170241
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-11-03 23:04:07 +00:00
Paul Berry 92587baee5 Migration: fix "whereOrNull" transformation to handle complex targets.
Previously, when analyzing a call to an iterable method that could
potentially be transformed into an `OrNull` extension, such as:

  allMatches(str).firstWhere(..., orElse: () => null);

the migration tool would erroneously identify some subexpressions of
the call target (`str` in this example) as the argument supplied to
`orElse`, resulting in a crash.

This CL fixes the logic so that we use an `identical` check to verify
when we are looking at the argument to `orElse`.

Fixes #43956.

Bug: https://github.com/dart-lang/sdk/issues/43956
Change-Id: I2f4a0e81becf789cab5334d4926e014bda2772f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170162
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-11-03 22:48:17 +00:00
Alexander Markov 0b3e6bd16c [vm] Enable non-nullable experiment in the VM by default
VM was not performing auto-detection of sound null safety mode
if --enable-experiment=non-nullable was not specified on the command
line. This change flips that logic to perform auto-detection unless
--enable-experiment=no-non-nullable is specified.

TEST=Added regression test runtime/tests/vm/dart/regress_44026_test.dart.

Fixes https://github.com/dart-lang/sdk/issues/44026
Fixes https://github.com/dart-lang/sdk/issues/44043

Change-Id: Ide8935e90dd3a8bd5a417aeb758605dedbb853eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170201
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-11-03 22:29:08 +00:00
Ben Konyi 89de1e82d9 [ VM / Service ] Add optional 'limit' parameter to getStack RPC
Allows for clients to request the top N frames of the current stack.

Fixes https://github.com/dart-lang/sdk/issues/43826

Change-Id: Ia8d38e6317373024382a5e857faff73c89a0d2c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169980
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-11-03 21:39:37 +00:00
Nate Bosch 7784843910 Bump SDK constraints in js for pub
Use a 2.12.0 lower bound since pub does not understand allowed
experiments for earlier versions.

Use a 3.0.0 upper bound to avoid a warning in pub and to give some
flexibility in publishing for stable.

Change-Id: I482e89becc7aa9f1a36298701ade70cbcc39702c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170204
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2020-11-03 21:28:47 +00:00
Nate Bosch d7a0c06108 Update to latest package:async
Migrates to `runZonedGuarded` from `runZoned` with an `onError`
argument.

Change-Id: I5636ce6c6718822440913f8344f6bc15aaec7999
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170203
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2020-11-03 21:01:08 +00:00
Nate Bosch 9ebbca4371 Bump SDK constraints in meta for pub
Use a 2.12.0 lower bound since pub does not understand allowed
experiments for earlier versions.

Use a 3.0.0 upper bound to avoid a warning in pub and to give some
flexibility in publishing for stable.

Change-Id: I3540dc3c085ac120997e107cfed5a991ad3f5ec4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170202
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2020-11-03 20:45:37 +00:00
Nate Bosch 64aaa0174e Update to latest package:stack_trace
Fixes async gap handling for VM stack traces.

Migrates to `runZonedGuarded` from `runZoned` with `onError`.

Change-Id: I8bcb543b4107d12c6be541a156b97aca754f4377
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170240
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2020-11-03 20:34:57 +00:00
Konstantin Shcheglov c0c453f7f1 Issue 44029. Use the function type itself as the type of '.call'.
Presubmit in google3 looks green.
https://test.corp.google.com/ui#id=OCL:340480353:BASE:340480464:1604433051239:7c3180b

Bug: https://github.com/dart-lang/sdk/issues/44029
Change-Id: Ifc02615aa92da7ae0369ef55657cf6b0e9cdb0bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170200
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-03 19:59:07 +00:00
Janice Collins 6992e9da41 Update to dartdoc to rev matching v0.36.2.
Release notes:  https://github.com/dart-lang/dartdoc/releases/tag/v0.36.2

Tested:  spot checked that right version is built and null safety tags appear.

Bug: 44035
Change-Id: I84bbc5c7a7b715bf60d048bfbb3c802b8a7e5421
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170163
Auto-Submit: Janice Collins <jcollins@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2020-11-03 19:13:07 +00:00
Ben Konyi 892cc93f26 [ DDS ] Keep event history for Stdout, Stderr, and Extension streams
Change-Id: I14ce732cd408ece1da2801887cac3b518bc36af6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169146
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-11-03 19:09:47 +00:00
Sam Rawlins 090e234172 Remove unused dart:async imports
As of Dart 2.1, Future/Stream have been exported from dart:core.

Change-Id: Ia4d70d1ccb55ac117bafe630a24b4ee2f60ff993
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170126
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-11-03 18:49:54 +00:00
Sam Rawlins c6e4d6bcc8 Analyzer: new Hint: NULL_CHECK_ALWAYS_FAILS
This Hint reports when an expression of type Null is null-checked with `!`.
This check will always fail at runtime.

Fixes https://github.com/dart-lang/sdk/issues/43982

Change-Id: I6e2eac4f7b7720a6b9a1c02066470eb039aa9010
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170122
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-11-03 17:20:14 +00:00
Paul Berry 4c59c39648 Migration: set SDK max constraint appropriately.
After further discussion, we've decided to reverse the decision from
https://dart-review.googlesource.com/c/sdk/+/169143 and have the
migration tool generate packages with a max SDK constraint of 3.0.0.
See
https://github.com/dart-lang/sdk/issues/44031#issuecomment-720967259.

Bug: https://github.com/dart-lang/sdk/issues/44031
Change-Id: I37b43dfb1f13dd0fe08ab81f4ac01bcc46016bc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170160
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-11-03 16:16:06 +00:00
Jens Johansen 9ec87c2da0 [kernel] Field has 2 references
Change-Id: I9c946119e55256b9fbcbf3076ea008aaa1312e86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168949
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-11-03 16:02:16 +00:00
Jens Johansen 332ce76055 [CFE][kernel] Add 'invalid' nnbd mode; use when trying to out out when compiling in strong mode
Change-Id: I3d1a8da4378cd59e733fc796df38ae98aaf59d6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169881
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-11-03 14:12:56 +00:00
Johnni Winther 0609c6dacc [cfe] Add predefined constructors for late error messages
This CL adds predefined constructors to LateInitializationErrorImpl that
only take the name of the late field/variable as argument. This can reduce
the size of the generated code for ddc/dart2js size because the long
message isn't repeated at all call sites.

In response to #43995

Change-Id: Ie276dd1455feab1655da3a503856da425b20f04f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169883
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-11-03 12:47:06 +00:00
Paul Berry b8a243ea48 Remove unnecessary bool return types from flow analysis methods.
The `bool` return types were added to `FlowAnalysis` methods
`nullAwareAccess_rightBegin`, `ifNullExpression_rightBegin`,
`equalityOp_end`, and `isExpression_end` in September as part of an
effort to fix mixed-mode unsoundness loopholes by having the front end
throw exceptions if "impossible" conditions arose.  We later decided
that we would prefer to allow these conditions to arise without
generating exceptions, because that makes it easier for the user to
write defensive mixed-mode code.  So the booleans stopped being used.
This CL removes them entirely.

Change-Id: Ia0ff91a22fe79c2df1dea89bbb286c84a3603821
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170125
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-11-03 12:42:26 +00:00
Johnni Winther 3f7ca42391 [cfe] Ensure that getDispatchTargetKernel returns a concrete member
In response to #43988

Change-Id: I3aa73a073b275b634b679bebfa2bf2ed9c292074
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170087
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-11-03 12:20:37 +00:00
Daco Harkes 5278383736 [vm] Native API: Make Dart_NewWeakPersistentHandle not auto delete
Changes Dart_NewWeakPersistentHandle to no longer auto delete the
weak persistent handle.

Changes the signatures of WeakPersistentHandleFinalizers to no longer
have access to the handle.

Flutter PR: https://github.com/flutter/engine/pull/19843
g3 presubmit: cl/318028238

Issue: https://github.com/dart-lang/sdk/issues/42312

TEST=runtime/vm/dart_api_impl_test.cc

Change-Id: I3f77db9954d9486759f903b78c03a494f73c68ba
Cq-Include-Trybots:dart/try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-msan-linux-release-x64-try,vm-kernel-precomp-msan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-mac-debug-x64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-nnbd-linux-debug-x64-try,analyzer-nnbd-linux-release-try,front-end-nnbd-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151525
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-11-03 10:27:44 +00:00
Robert Nystrom 6cfd46e177 Roll dart_style 1.3.9 into repo.
This does not affect the formatting of any existing code, so is safe to
roll without updating the pre-built SDK.

Change-Id: I2e7fc20d6933d136dc0390f93f6bc72dc340e9ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170141
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2020-11-02 23:47:40 +00:00
Sam Rawlins 4097d3024a Migrator: Insert required keyword in correct position
Previously, migration might change:

m({@required @deprecated x}) {}

to

m({required @deprecated x}) {}

Which is illegal syntax.

Change-Id: Ib8397e9e22dbb951758a04c085c40905860a7cb3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170026
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-11-02 23:40:25 +00:00
Liam Appelbe f25c50fdcb [wasm] Use wasm traps to handle exceptions
The Dart exception is converted to a string, stored in a trap which
is passed through wasm, then converted back to a Dart exception.

Module instantiation can also throw a trap, because it internally
invokes the initialization function, if the module defines one. So I'm
handling this too.

Also, update to the new version of the wasm C API, which replaces some
foo_t** with foo_vec_t*.

Bug: https://github.com/dart-lang/sdk/issues/37882
Change-Id: I1e6952a191134734a892c42b2fb8ba3506bb0844
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169784
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-11-02 23:32:20 +00:00
Vijay Menon f346cb7f77 Fix ddc debugger_test
This CL:
- Fixes https://github.com/dart-lang/sdk/issues/43987 (an exception in custom formatting code)
- Restores (most of) debugger_test.dart to passing (which tests above)
- Fixes a type caching error also exposed by the above test

Note, this skips the golden file comparison.  That appears to be very broken
(see comment).

Change-Id: I283b66a710f17765faed47aa099b0b8570e6cac1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170022
Reviewed-by: Gary Roumanis <grouma@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2020-11-02 23:31:30 +00:00
Kevin Moore 47b5a1e9f5 Support the latest SDK with pkg:dart_internal
Change-Id: Ife3c77834df9f781d447a7d3cbc842fb7e44be49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170140
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
2020-11-02 21:51:39 +00:00
Nicholas Shahan ab7dc265d7 [ddc] Avoid weak mode warning in FutureOr casts
This is not intended to change the result of the cast in any mode.

An optimization for casting null in weak mode accidentally added
warnings when casting to a FutureOr (non-nullable) of a legacy
type.

Also moves the `is` and `as` methods for FutureOr types from being
hard-coded in the compiler to the runtime method that builds the
type.

Tested on golem and found no attributable performance regressions:
https://golem.corp.goog/Comparison?team=dartdevc#targetA%3Ddartdevc-null%3BmachineTypeA%3Dlinux-x64%3BrevisionA%3D88970%3BpatchA%3Dnshahan-FutureOr-Fix%3BtargetB%3Ddartdevc-null%3BmachineTypeB%3Dlinux-x64%3BrevisionB%3D88964%3BpatchB%3DNone

Change-Id: I44a23c7e2e1d15bc6c383fc95b19f99b584a3f7a
Fixes: https://github.com/dart-lang/sdk/issues/43990
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170001
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-11-02 21:45:09 +00:00
Ryan Macnak 53c82cbc4b [vm] Prefer longjmp to throw when an allocation fails from lack of memory.
SuspendLongJumpScope during Dart entry ensures that if a longjmp base is available, it is the innermost error handler.

Bug: https://github.com/dart-lang/sdk/issues/35224
Change-Id: Ifc19a0241d213b9f012aacaddca0f85b0e79aedd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169783
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-11-02 21:27:19 +00:00
Vyacheslav Egorov 11c62356ec [vm] Fix compilation issue on Mac
b97e8ecf72 introduced an accidental type
mismatch which is only revealed on Mac

TBR=rmacnak@google.com

Change-Id: I6cb8d0cf14afe9961507ba15cc6342f0d0a3d1ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170090
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2020-11-02 21:25:02 +00:00
Vyacheslav Egorov b97e8ecf72 [vm/snapshots] Write strings as ROData in root snapshot
This partially undoes changes from acbd51c08
because they are now known to increate RSS of AOT
compiled applications.

This CL also removes length adjustment code from *String::InstanceSize
which tried to ensure that external string fits into a non-external
string. This code is no longer necessary because APIs for
string externalization were removed.

TEST=covered by the existing tests

Cq-Include-Trybots: luci.dart.try:app-kernel-linux-release-x64-try,app-kernel-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try
Change-Id: Ife4f16d6939d98bb7966121b5899cef9f0121220
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170080
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-11-02 21:11:50 +00:00
Konstantin Shcheglov e8c4cc60d6 Update analyzer/CHANGELOG.md for published 0.40.6
The version 0.40.6 was published, without 0.41.0 breaking changes.
We did not want to land this CL, but we want the CHANGELOG.md

Change-Id: I667c4bf8308cc81ff608b21993e0e1b5591ab5c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170027
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-11-02 20:06:49 +00:00
Anna Gringauze 42dc617ee8 Emit constants during expression compilation to js
Closes: https://github.com/dart-lang/sdk/issues/43963
Change-Id: Ic8af046b2cf1506984b84ea66b2676b3cc0f1771
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169580
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-11-02 20:03:14 +00:00
Paul Berry 3eb34ef646 Migration: programmatically generate package_config.json in unit tests.
Previously, we hard a hard-coded set that included all packages added
by unit tests, which created confusion when writing new unit tests.
Now, `addPackageFile` records a list of all packages and
`package_config.json` is automatically generated just before analysis
begins.

Change-Id: I3393c0266a54d051ffa7601e74753a75857635e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170024
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-11-02 19:55:39 +00:00
Jonas Finnemann Jensen 5918aa8985 Fix #44027
Remove if-else branches introduced in [1], fixing crash bug when
`$HOME/.dart/` does not exists.

[1]: https://dart-review.googlesource.com/c/sdk/+/168947

Fixed: 44027
Change-Id: Ic178ebf8eb04ac34c1574269b5d7191a5e514460
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170088
Auto-Submit: Jonas Jensen <jonasfj@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
2020-11-02 19:55:09 +00:00
Sam Rawlins 416cfa7c41 Migrator: Add /*required*/ hints when meta not imported.
Currently the migrator can add `@required` from the preview, which will crash
the preview upon rerunning, if package:meta is not imported.

This change instead adds a /*required*/ hint when meta is not imported.

Additionally, /*required*/ is understood by the migrator just as if it were
`@required`.

Fixes https://github.com/dart-lang/sdk/issues/43751

Change-Id: I1ea532246b956feacedd179146372b13c65003df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169900
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-11-02 17:30:59 +00:00
Tess Strickland 132bec50fc [vm/compiler] Fix runtime regressions in GenerateAssertAssignable.
Specifically, we used to specialize TypeParameter TTS stubs, but that
was mistakenly removed when the non-IA32 versions were unified. Also
move the int subtype check before TypeParameters as it was before.

TEST=Ran golem benchmarks before submission to verify.

Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-nnbd-linux-debug-ia32-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-debug-simarm_x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-simarm-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try
Change-Id: I235d519c49341af76a902ac22df46c6754445a11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170086
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2020-11-02 17:26:59 +00:00
Konstantin Shcheglov 5ac23a0c51 Use ExperimentStatus.currentVersion in MockSdk.
Change-Id: I9750278b58656d9049f689d4e1ea9b9c1f00f863
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170025
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-11-02 17:21:59 +00:00
William Hesse 979c10c5b5 [infra] Rename test.py option to --cleanup-dart-processes
The option is changed from --cleanup_dart_processes to
--cleanup-dart-processes.

Change-Id: I3f9aefea81ac4ea040741d0850a851688f69e1a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170084
Reviewed-by: Alexander Thomas <athom@google.com>
2020-11-02 15:22:55 +00:00
Erik Ernst 1072a85ec7 Lower aliased constructor invocations
Change-Id: Iceb4c5bcf7e317a534eecb39f389b7e70aa39f84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169889
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-11-02 15:10:09 +00:00
Johnni Winther b74e408f1a [cfe] Ensure redirecting factory parameters are declared before inference
Closes #43918

Change-Id: I5cbd733abebb388ebb1e70556f7c1ea8af105711
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169888
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-11-02 15:09:19 +00:00
Paul Berry 531ffd0e45 Migration: add repro for #44012
Bug: https://github.com/dart-lang/sdk/issues/44012
Change-Id: Iabddb6de213aa70feb42b273f0e48fc2b5fa582d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170020
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-11-02 14:43:29 +00:00
Alexander Markov 4054a9edf4 [Test tool] Remove -c dartkb configuration
Change-Id: I178f18484b853aa35248fa9f6252509ec0df6832
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169500
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-11-02 14:06:19 +00:00
Sigurd Meldgaard ea7e27cfeb Roll dart_style 1.3.8+1 into the SDK.
There are no formatting changes in this release. The only change is the
fix for https://github.com/dart-lang/dart_style/issues/964.

Includes corresponding adaptations of dartdev/dart CLI.

Change-Id: I1c97f0b7009b98ae609b258401522453faa35c64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170083
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2020-11-02 13:42:19 +00:00
William Hesse 5b159f0970 [infra] Add --cleanup_dart_processes to test.py
This is needed for Windows test shards on swarming builders,
    where the task_kill step at the end of the recipe is not sufficient
    to clean up abandoned Dart processes on a single shard task.

BUG=https://github.com/dart-lang/sdk/issues/32138
Change-Id: Id48f29f46350b5496c7427ca043dc5f2445fae37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170082
Reviewed-by: Karl Klose <karlklose@google.com>
2020-11-02 13:24:09 +00:00
Gihwan Oh afa41aa3f1 Correct a typo in the documentation
`Symbol("[]=")` is identical with `#[]=` not `#[]=]`

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

GitOrigin-RevId: 48e3c5da1c1e9e2374fbb29247244a765aef4258
Change-Id: I3da5e74b9f075094a5d3e4667a5b9b1a386d7b3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162760
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2020-11-02 11:03:52 +00:00
gaaclarke a4786e8f77 [vm] Update Dart_Initialize doc string for parameter
Closes https://github.com/dart-lang/sdk/pull/43964
https://github.com/dart-lang/sdk/pull/43964

GitOrigin-RevId: 7d803758ca60764423915b5319a12711d56808dc
Change-Id: I4b396673014735a44564ca7400632d01beafd112
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169582
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-11-02 11:00:32 +00:00