Commit graph

74165 commits

Author SHA1 Message Date
Mayank Patke 5c99205769 [dart2js] Support required named parameters in weak NNBD function types.
We cannot simply discard the `required` modifier in weak mode function
types since function types that differ in the placement of `required`
cannot compare equal. Instead, we do that during subtype checks.

We continue to ignore `required` in the actual calling convention in
weak mode.

Change-Id: I7dbb28550095c635f65592f78e495e8e4e8d7026
Fixes: https://github.com/dart-lang/sdk/issues/42608
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153386
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-07-07 21:00:40 +00:00
Konstantin Shcheglov a1f510080d Use analyzer 0.39.12 in nnbd_migration.
So, we can use package:analyzer/src/dart/element/type_system.dart
instead of src/generated/... library.

R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Ic804cd29429bf8a85d25e21f77292a6816a3ede7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153363
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-07 20:59:50 +00:00
Konstantin Shcheglov 7255b99432 Update dartdoc to 0.32.2.
So, that we unblock https://github.com/dart-lang/sdk/issues/40860

Bug: https://github.com/dart-lang/dartdoc/issues/2156
Change-Id: I0e4df8527b2868863de42d631c0833bd38fb448c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-07 20:40:30 +00:00
Konstantin Shcheglov fea5f5866e Add DartTypeVisitor and DartType.accept(DartTypeVisitor) to API.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/40478
Change-Id: I8453011f4a39323bda86244a749509b4b347b4b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153361
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-07 20:13:10 +00:00
Zichang Guo 42fcc18fcc Reland "File::Copy avoids direct copying on Windows"
This is a reland of 391d3bcdd8

The root cause of the failure is that the destination path uses forward
slashes as path separator.

This fix checks for forward slashes as a potential path separators.
If both forward and back slashes exist, the one closer to the end of the
path will be used to get the destination directory.

If any step fails, it will fall back to original copy.


Original change's description:
> File::Copy avoids direct copying on Windows
>
> There is a race condition for copying file on Windows, where CopyFile()
> returns success but data has not been populated into destination file.
> E.g process is killed or died in the middle.
>
> This cl will change File::Copy as
> 1. Copy file to a temp file in the same directory of destination file.
> 2. Rename the file to the target file.
>
> Bug: https://github.com/dart-lang/sdk/issues/42119
> Change-Id: I39b6d451f6ace970bc554501148259d33de232c7
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149667
> Commit-Queue: Zichang Guo <zichangguo@google.com>
> Reviewed-by: Zach Anderson <zra@google.com>

Bug: https://github.com/dart-lang/sdk/issues/42119
Change-Id: I58c3aa432d3f64bddb1deace4c9a1ceb2f0f5e16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151035
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2020-07-07 20:11:00 +00:00
Nicholas Shahan 7ac8f426ff [ddc] Update flags in ddb script
* Start using --sound-null-safety in ddb script To be more consistent
with the finalized naming.
Legacy mode: No flags
Weak mode: --enable-experiment=non-nullable
Sound mode: --enable-experiment=non-nullable --sound-null-safety

* Remove --kernel flag. It's been ignored since analyzer based DDC
was removed.

Change-Id: I1349f7852927e65b1574637a96f68123f1f9741a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153387
Auto-Submit: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-07-07 19:44:40 +00:00
Jonas Termansen 62ff05b84d Roll benchmarks-internal ac71e64e299f..4b33c3149cfe
f8c4bd497b3ded004c3e357abdca17e73df7fded https://dart-internal-review.googlesource.com/c/benchmarks-internal/+/1884
4b33c3149cfec05bb9c888f37e4b5b094cca828a https://dart-internal-review.googlesource.com/c/benchmarks-internal/+/1961

R=athom@google.com

Change-Id: Ibd4d003358f76f59ee13dc5e84c7588f717e5c1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153465
Auto-Submit: Jonas Termansen <sortie@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2020-07-07 17:44:22 +00:00
Jonas Termansen 0d1db38cf8 [ddc] Only print blank line in ddb if verbose.
The blank line clobbers the output if ddb is used in non-verbose mode
to execute a program where the stdout ordinarily belongs to the program
in question whose output might be machine parsed.

Change-Id: Ie929d19deabebb7b1f3d24f99035aec2d9844a64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153208
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2020-07-07 17:36:12 +00:00
Jonas Termansen d47395255b [benchmark] dartdevc doesn't need the --kernel option anymore.
Change-Id: Ibb90f674b181de225ccb4db7087c5733122f2891
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153463
Auto-Submit: Jonas Termansen <sortie@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-07-07 16:11:51 +00:00
Jonas Termansen 55be60db13 Roll benchmarks-internal 772454259330..ac71e64e299f
ac71e64e299f70212628f944dae719d8d26e6114 https://dart-internal-review.googlesource.com/c/benchmarks-internal/+/1960

TBR=athom@google.com

Change-Id: I53e6c0472644b5ce44f049f2ac7f871b94730f87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153464
Reviewed-by: Jonas Termansen <sortie@google.com>
Auto-Submit: Jonas Termansen <sortie@google.com>
2020-07-07 15:53:42 +00:00
Dmitry Stefantsov 2eee76303f [cfe] Add support for constants to Kernel text serialization
The CL also finalizes the support for expressions because the constant
expressions can now be serialized.

Change-Id: I7bc98fc974d3be1d4b9f1712cf67f9fbe6496e01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153461
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-07-07 15:22:01 +00:00
Clement Skau bec928c89f [SDK] Bumps ABI version for sdk_hash.
The ABI version was bumped in the first revision of the sdk_hash CL,
but was lost during a rebase:
https://dart-review.googlesource.com/c/sdk/+/152802/1

Change-Id: Ic677ada4923c92b9ad5e799e86564fffdfef0870
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153460
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2020-07-07 14:53:21 +00:00
Alexander Thomas 40c79c8ed7 [test] Add paths to chrome and firefox to the environment when present
This adds a CHROME_PATH or FIREFOX_PATH environment variable to the
test's evnironment which contains a path to the browser's executable.
This is only set if the --chrome or --firefox argument was passed to
test.py.

https://github.com/dart-lang/sdk/issues/42417

Change-Id: I711de6ab91b8ffbbe72c7fb1530b68c4189a4b8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153209
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-07-07 14:44:01 +00:00
Jonas Termansen 25f01216f5 Roll benchmarks-internal d3eff2adacd3..772454259330
99a2fc879dc578f8e14809a8c573676ab1494bf7 https://dart-internal-review.googlesource.com/c/benchmarks-internal/+/1880
77245425933064c5ec4cc217b9b2f2689e9d08a6 https://dart-internal-review.googlesource.com/c/benchmarks-internal/+/1881

R=athom@google.com

Change-Id: I162661a7216d17d633966f83d808d4de65735528
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153359
Auto-Submit: Jonas Termansen <sortie@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-07-07 13:56:41 +00:00
Johnni Winther e263b52228 [cfe] Update outline expectations
TBR

Change-Id: I44a90a91f8efd749c031c95788a0e7588feb7bec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153357
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-07-07 11:45:19 +00:00
Alexander Thomas 95f55ab22b [co19] Roll co19 to bbba568b780a48c69a1de8ad1a8527a37cf71fad
2020-07-07 sgrekhov@unipro.ru Fixes 786. LibTest\async\Zone migrated to null safety
2020-07-07 sgrekhov@unipro.ru More leftFutureOr tests added and also generator migrated to null safety
2020-07-06 sgrekhov@unipro.ru Debug output removed and issue number added
2020-07-06 sgrekhov@unipro.ru Language/Statements tests fixed after tryjob run
2020-07-06 sgrekhov@unipro.ru Fixes 784. LibTest\async\Timer migrated to null safety
2020-07-06 sgrekhov@unipro.ru Fixes 783. LibTest\async\StreamTransformer migrated to null safety
2020-07-06 sgrekhov@unipro.ru Fixes 782. LibTest\async\StreamIterator migrated to null safety
2020-07-03 sgrekhov@unipro.ru Fixes 780. StreamConsumer, StreamController and StreamSink tests migrated to null safety
2020-07-03 sgrekhov@unipro.ru Make getter and setter to have the same type
2020-07-02 sgrekhov@unipro.ru Return an expected type from the test

Change-Id: I746333ddb8505f62041da8ec4a80ba223cfe5594
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153353
Reviewed-by: William Hesse <whesse@google.com>
2020-07-07 11:06:20 +00:00
Alexander Thomas 2c98bd5bbf [benchmarks] Update benchmark_harness to null safe version
2020-06-25 athom@google.com Merge pull request 49 from athomas/opt-in
2020-06-23 athom@google.com Migrate result emitter test
2020-06-23 athom@google.com Add dependency overrides for dev dependencies
2020-06-23 athom@google.com Update travis config to test with non-nullable enabled
2020-06-23 athom@google.com Enable non-nullable experiment in analysis options
2020-06-25 athom@google.com Opt-out examples/
2020-06-23 athom@google.com Update SDK dependency to 2.9.0-1
2019-12-26 kevmoo@users.noreply.github.com Fix latest pedantic lints – and a few more (47)
2019-11-08 pq@users.noreply.github.com tidy example (46)

Change-Id: Iabb37217518f437eba63d605735286661f45abc7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153356
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-07-07 10:54:04 +00:00
Jonas Termansen 749d55da18 Roll benchmarks-internal 88af52754f27..d3eff2adacd3
d3eff2adacd3b0378bf3027ceb6caff0df669280 https://dart-internal-review.googlesource.com/c/benchmarks-internal/+/1882

R=athom@google.com

Change-Id: I4694fef4a689a2637565192628b352775b23b32a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153354
Auto-Submit: Jonas Termansen <sortie@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-07-07 10:48:29 +00:00
Clement Skau 494d261a41 [Test] Skips sdk_hash_test for unsupported dartkp-android.
This fixes the currently red CI bot:
vm-kernel-precomp-android-release-arm64 / dartkp-android-release-arm64

Change-Id: I583c59595d029a59e823f62824082982e51f6182
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153350
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2020-07-07 10:45:59 +00:00
Dmitry Stefantsov e196354481 [cfe] Support more Expression nodes in text serialization
The following nodes are now supported:
* SetConcatenation
* MapConcatenation
* FileUriExpression
* BlockExpression
* ListConcatenation
* NullCheck
* Instantiation
* CheckLibraryIsLoaded
* LoadLibrary

Change-Id: Ia269196c36facb211995d0ef8cd8a68cbf836e37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153346
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-07-07 09:32:29 +00:00
Dmitry Stefantsov da8712394b [cfe] Support LabeledStatement and Break in text serialization
In addition to supporting the nodes, the notion of Binder is
reworked.  It doesn't store the computed local distinct name on the
node itself now, as it's not always possible (which is the case of
LabeledStatement), but keep it in a map.

Change-Id: I04c08875cbcac3a547d62afbe5b17f023e6f1035
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153342
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-07-07 09:32:29 +00:00
Johnni Winther 1ed7581898 [cfe] Add test for issue 42540
Closes #42540

Change-Id: I8ea8f03a2682a5b52867787144a2d81c7527ca11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153340
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-07-07 08:55:09 +00:00
Tess Strickland 06cb010247 Revert "Add unawaited to package:meta"
This reverts commit 0d44449aaa.

Reason for revert: Breaks Flutter HHH and the Dart->Flutter roll.

Original change's description:
> Add unawaited to package:meta
> 
> Change-Id: I09df4989591327bd4d148e73a5887b900902576c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152680
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Jake Macdonald <jakemac@google.com>

TBR=brianwilkerson@google.com,jakemac@google.com

Change-Id: I71f491bccc37508a24b7f6f9d051ed914bafeccd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153351
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2020-07-07 08:14:51 +00:00
Jens Johansen 6de0f53e7c [CFE] Set correct async markers in outline phase (2nd try)
This reverts commit b4b44d6b4b.

Change-Id: Iae68e6e84e0fbb214b22e1dec6788057f80a50ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153345
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-07-07 07:49:58 +00:00
Johnni Winther b6a0c50bf6 [dart2js] Support conversion of local function type variables from K to J model
This CL adds support for converting local function type variables from
the K model to the J model. The entity use for the J model type variables
isn't created before the closure classes and closure call methods have
been created. Therefore, the [ClosureData] is now registered
with the [JsToFrontendMap] object, once computed, allowing conversion of
local function type variables. Conversion of [BackendUsage] is moved
after closure creation because [RuntimeTypeUse] can refer to local
function type variables.

Closes #42088

Change-Id: Ifc00e69b5db0dd05710ea97017c41e8c7f5e520e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153080
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-07-07 06:46:21 +00:00
Clement Skau 0ce83987d6 Reland "[SDK] Adds an SDK hash to kernels and the VM."
Note: This is a reland of https://dart-review.googlesource.com/c/sdk/+/150343

Adds a new SDK hash to kernels and the VM which is optionally checked
to verify kernels are built for the same SDK as the VM.
This helps catch incompatibilities that are currently causing
subtle bugs and (not so subtle) crashes.

The SDK hash is encoded in kernels as a new field in components.
The hash is derived from the 10 byte git short hash.

This new check can be disabled via:
  tools/gn.py ... --no-verify-sdk-hash

This CL bumps the min. (and max.) supported kernel format version,
making the VM backwards incompatible from this point back.

This also bumps the min. and current ABI version.

Bug: https://github.com/dart-lang/sdk/issues/41802
Change-Id: I2f85945045a603eb9dcfd1f2c0d0d024bd84a956
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152802
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-07-07 06:08:20 +00:00
Regis Crelier 315ecf2606 Roll benchmarks-internal to 88af52754f272e7a4c5737b7e003c2ed9e8a754f
88af527 Fix typo in previously migrated NBody and NBodySIMD benchmarks
e86edcd Migrate TypedDataCopy benchmark to NNBD
dd8be12 Clean lints in BinarySize benchmark.
ab00e7f Don't duplicate DeltaBlue and Meteor for compilation benchmarking.
05c73ea Migrate Meteor benchmark to NNBD
52ba4cc Migrate NBody and NBodySIMD benchmarks to NNBD
4253c9f Migrate MD5, SHA1, and SHA256 to NNBD
e49b588 Migrate the WordSolver and WordSolverIdentity benchmarks.
ff27bee Migrate the MicroClosure benchmark.

Change-Id: I87b8263c8b150a8f3bdce8cc62a76f956d096473
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153390
Commit-Queue: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Auto-Submit: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-07-07 00:41:50 +00:00
Konstantin Shcheglov 3b25d6ff69 Add DynamicType, NeverType, and VoidType to API.
R=brianwilkerson@google.com

Change-Id: Icf917d999878b3c4d7b1d9425eb8a3c79921ba6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153401
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-07 00:22:40 +00:00
Konstantin Shcheglov 11632ff4d4 Add buildSdkSummary() to analyzer API.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/build/issues/2745#issuecomment-654441549
Change-Id: I144dd99be5e5a210e27f3b5b5b54951659479511
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153384
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-06 23:03:09 +00:00
Jaime Wren 431b57cbbb Add an additional category into completion_metrics.dart: parameter references
Change-Id: Ifed40f0eb0472894be92a41f105a6dfb36bcbb36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153367
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-07-06 22:39:39 +00:00
Nicholas Shahan 4140853675 [dart2js/ddc] Add null checks to with<X|Y|Z|W> methods
Fixes test failures in lib/typed_data/simd_type_null_params_weak_test.

It appears that these methods are intended to retain the null checks
and failures in weak mode based on the discussion in the migration
https://dart-review.googlesource.com/c/sdk/+/132341.

Change-Id: Ieeb1730059a57b2edf1b5d235cd7a4133d4844df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152909
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-07-06 22:06:42 +00:00
Brian Wilkerson 0d44449aaa Add unawaited to package:meta
Change-Id: I09df4989591327bd4d148e73a5887b900902576c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152680
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2020-07-06 21:57:52 +00:00
Sigmund Cherem be0f94b218 [dart2js] include dart:_js_annotations into the platform file by default
Change-Id: I7d93347cc41e344213a5c62f72638d4d2fd18728
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153366
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-07-06 21:41:02 +00:00
Jacob MacDonald d9d4e5ccb3 copy package config changes to the modular_suite_nnbd.dart
Change-Id: Ib2c645c0d94adb60693be85b266d23b811982e70
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153364
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-07-06 20:53:11 +00:00
Nicholas Shahan 9547628ecf [ddc] Compare types with new DartTypeEquivalence
Avoids an assertion failure in the front end.

Change-Id: I7994fa611f82011857750cc60af64a2c89c96bf7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152923
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-07-06 19:39:31 +00:00
Jacob MacDonald f42889fbb8 create package_config.json files in ddc modular test suite
Copies the same changes as were added for dart2js here https://dart-review.googlesource.com/c/sdk/+/152361/9/pkg/compiler/tool/modular_test_suite.dart

Change-Id: I785b275c62c3d3afb9f37c0b0c8c4e4369b4ccf3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153362
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-07-06 19:33:11 +00:00
Mark Zhou b4c60e6e1c [dart2js] Removing switch class restrictions.
From the spec: `It is no longer required that the [case expression] evaluate to instances of the same class.`

Fixes #42409

Change-Id: Ieecd96cb75d683658ffc767d973b0ff2f5e6d834
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153060
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2020-07-06 19:12:51 +00:00
Ryan Macnak 935b69e676 [vm] Increase alignment in the blob container format to 16k.
This accounts for the larger alignment required by mmap on ARM macOS.

Bug: https://github.com/dart-lang/sdk/issues/42534
Change-Id: Ie58732924d5a7287f2736696a6db0ddce7d308c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153382
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2020-07-06 18:08:31 +00:00
Ryan Macnak 901fa79db1 [vm] Prevent bare instructions code from clobbering decisions about which instructions to include.
The ImageWriter is meant to include exactly those instructions passed to GetTextOffset, which isn't necessarily the current Instructions for every Code object.

Bug: https://github.com/dart-lang/sdk/issues/41974
Change-Id: I77f09c70fd45f387f4802b30a86b155506529e29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153043
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-07-06 17:56:51 +00:00
Konstantin Shcheglov 1478b2b71c Prepare to publish analyzer 0.39.12
R=brianwilkerson@google.com

Change-Id: Iea5b9186f6fe89f93b6a95fe2aa2b0045f8a4930
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153381
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-06 17:47:21 +00:00
Jaime Wren 1a60f94fd0 Add two failing tests in the local_reference_contributor_test.dart, after some for(var foo ...) ^, the completion is in the implicit statement which is in the scope of the foo declaration.
I imagine that similar tests could/ should be written for other such ASTs.

Change-Id: Iea059af339e5dec34a937ed2c28fe55fdb072fc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-07-06 17:06:10 +00:00
Jacob MacDonald 1b1fcc0618 update package:test in the sdk
- Fixes an upcoming name conflict with package:meta.

Change-Id: Ia9520a794086a652f2d7e1e32e04899cdf330910
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153380
Commit-Queue: Jake Macdonald <jakemac@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2020-07-06 16:41:51 +00:00
Devon Carew 68bcf1b28a [dartdev] add --enable-experiment support to 'dart test'
Bug: https://github.com/dart-lang/sdk/issues/42339
Change-Id: Ic50493b1e9af5ae626358bee1c0c145f58bb7c2c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153323
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-07-06 16:38:11 +00:00
Danny Tuppeny 34ad5a5908 Don't reuse LSP error code that triggers shutdown for refactor errors
Bug: https://github.com/dart-lang/sdk/issues/42573
Change-Id: I615563ed636cf48b4fe84e7588f49bb7137a4f53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153341
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
2020-07-06 14:35:43 +00:00
Johnni Winther 5d1fbe0497 [cfe] Handle unforseen type parameter intersections
Closes #42089

Change-Id: Ifb0dc0073e004051ae40aed51db24b0d4b10f50d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152646
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-07-06 10:09:00 +00:00
Jens Johansen 878e2cacdd [CFE] Don't issue an initialization error when trying to initialize when not having a platform
This CL would have reduced the number of errors given in
https://github.com/dart-lang/sdk/issues/42378
Namely the
"Warning: Tried to initialize from a previous compilation (build/cache.dill), but couldn't."
part wouldn't have been issued.

Change-Id: I3e7f2f0115a13a23522643b6f4c9ad8c57bc0d5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153141
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-07-06 07:40:00 +00:00
Johnni Winther 34f5c9d0b4 [cfe] Implement new async return rules
Closes #41800
Closes #41900
Closes #42134
Closes #42282
Closes #42236
Closes #42169

Change-Id: Ia994bc07fba4e2342fcb59d44fc77608198a328b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152150
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-07-06 07:04:40 +00:00
Johnni Winther 3a4aad6b87 [cfe] Use test description uri for expectation file location
Previously the first file in the `Component.uriToSource` was used which
didn't work nicely with multifile tests.

Text outline expectations were already using the test description uri.

Change-Id: I0d4a7493cd1fa61beffba41f1ea859ca5e8ad08c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151825
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-07-06 07:02:30 +00:00
Brian Wilkerson fa650e46dd Implement the verbose option for dart analyze
Change-Id: I2186a83ad295ad99a2df09a72f08c2b6f531e982
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153321
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-07-06 04:05:40 +00:00
Jonas Termansen b3c9e89028 Roll benchmarks-internal ee36753c0b4b..e6a5aa28c884
e6a5aa28c884a4124977a37eb8a2e7822ee88ccc https://dart-internal-review.googlesource.com/c/benchmarks-internal/+/1703

R=zichangguo@google.com

Change-Id: If73e4f976a32844151cce0335c44cb998d579d09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153210
Auto-Submit: Jonas Termansen <sortie@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Zichang Guo <zichangguo@google.com>
2020-07-06 03:15:30 +00:00