Commit graph

6374 commits

Author SHA1 Message Date
Joshua Litt 430b11670a [dart2js] add unit tests to nnbd bot.
Change-Id: I5ba15f4a43ede211608f6789edaf5c42247f8ea0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144200
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-04-21 20:38:25 +00:00
Johnni Winther d690a0c7c4 [cfe] Handle nullability of typedefs
Closes #41496
Closes #41498
Closes #41499
Closes #41501
Closes #41505

Change-Id: I425b6137f9ea41d01c95332ef1f7d43ca7afb5a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143811
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-04-20 07:03:55 +00:00
Siva Annamalai 63a92a3b00 Revert "This is a trial submit of the unfork CL, it will be reverted immediately."
This reverts commit 393468dc89.

Reason for revert: This was a trial submit and so reverting it.

Original change's description:
> This is a trial submit of the unfork CL, it will be reverted immediately.
> This commit is being done so we can roll it into Flutter and run some device lab testing to see the effect this CL will have on Flutter.
> 
> [BUILD] - Initial CL to unfork the NNBD Dart SDK
> 
> - Flips the flag from --nnbd to --no-nnbd so that by default it builds
>   the NNBD version
> - using the --no-nnbd flag results in the SDK being built in a
>   directory which has the 'Legacy' suffix added to it
>   (e.g: out/DebugX64Legacy)
> - the '--enable-experiment=non-nullable' flag still needs to be passed
>   in during execution so that CFE runs in that mode. This is different
>   from the 'null_safety' flag
> 
> Change-Id: I83c813aee2a5b61ad876d8a7b0988705bb24c839
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144082
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=asiva@google.com,liama@google.com

Change-Id: I7b50fae71764eceb17893338d1981e40ea2de520
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144083
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-04-20 03:50:49 +00:00
asiva 393468dc89 This is a trial submit of the unfork CL, it will be reverted immediately.
This commit is being done so we can roll it into Flutter and run some device lab testing to see the effect this CL will have on Flutter.

[BUILD] - Initial CL to unfork the NNBD Dart SDK

- Flips the flag from --nnbd to --no-nnbd so that by default it builds
  the NNBD version
- using the --no-nnbd flag results in the SDK being built in a
  directory which has the 'Legacy' suffix added to it
  (e.g: out/DebugX64Legacy)
- the '--enable-experiment=non-nullable' flag still needs to be passed
  in during execution so that CFE runs in that mode. This is different
  from the 'null_safety' flag

Change-Id: I83c813aee2a5b61ad876d8a7b0988705bb24c839
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144082
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-04-20 03:46:06 +00:00
Ben Konyi 5b19445d9c Reland "[ Service / package:dds ] Add stream support to package:dds and enable DDS for VM service tests"
This reverts commit cccddf3530.

Change-Id: Iabde3542d5be33ffabf50efd9226597aef876ab7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143961
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-04-17 21:12:44 +00:00
Alexander Aprelev cc8cc92c52 [gardening] Confirm all neccessary approvals were granted.
cccddf3530 required large number of approvals - confirm that all were granted

Change-Id: I1595bc2fadbd998a82f175ad7003d4759b900404
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143882
Reviewed-by: Alexander Aprelev <aam@google.com>
2020-04-17 02:37:34 +00:00
Alexander Aprelev cccddf3530 Revert "Reland "[ Service / package:dds ] Add stream support to package:dds and enable DDS for VM service tests""
This reverts commit e5b85792da as it seems to have broken service/pause_on_start_and_exit_with_child_test/service https://ci.chromium.org/p/dart/builders/ci.sandbox/app-kernel-linux-debug-x64/5877

Change-Id: Idb9df51816eebfb58137c449c6461731c77409f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143881
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-04-16 23:37:25 +00:00
Zichang Guo 4f44e186c8 [sanitizer] bots should skip nnbd tests
Change-Id: Ied6305b32c05b0e276e94e31eda6996af482ea40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143841
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2020-04-16 20:47:05 +00:00
Ben Konyi e5b85792da Reland "[ Service / package:dds ] Add stream support to package:dds and enable DDS for VM service tests"
Fixes buildbot failures by running VM service and DDS service tests in
separate test processes.

This reverts commit 1f0c90868c.

Change-Id: I0ad9b2e6ccea4d5468dd4dcdde0e286bcbf820ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142902
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-04-16 17:59:25 +00:00
Sigmund Cherem 0f23b91670 [bots] Increase timeout for dart2js-hostasserts-(weak|strong) configurations
Change-Id: I3f254ff4f062014677430c75bff17b836bba0a7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143722
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-04-16 14:42:34 +00:00
Alexander Thomas 5900a0ac49 [beta] Move channel name to the end of the version string
This changes the version names on dev and beta from x.y.z-dev.m.n to
x.y.z-m.n.(dev|beta).

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

Change-Id: I890c38c14edf059447eb1f82afcf9da468911d6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143585
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
2020-04-16 12:26:41 +00:00
Joshua Litt 555d6fbb93 [dart2js] Change test suite on strong bot.
Not all co19 tests are migrated yet, so switch to a curated list.

Change-Id: I8f51c610382369216d50a3e9cb16a55cf2a06907
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143600
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-04-16 06:24:10 +00:00
Ryan Macnak 7f49939c62 [observatory] Use current versions of dependencies.
Once upon a time, Observatory was built via pub and needed to cache the result of `pub get` to have stable / reproducible builds. Now it is built directly with dart2js and no longer uses any old packages, so the copies of packages brought in via DEPS are fine.

Change-Id: I7b32910570cd21fbf42cae6ac25b57c72a134c81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143403
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-04-16 00:16:43 +00:00
Alexander Thomas 3c85da7778 [release] Bump version to 2.9
Change-Id: I2fc393cbb7a9111f4c09db6a2a7a202eeb88992c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142996
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-04-15 18:36:42 +00:00
Karl Klose d1dbc9a475 [infra] Make configuration name for run_abi_tests a parameter
Change-Id: I5b5a19b298412f01902e4efde89f85fc091bfc9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141243
Reviewed-by: Alexander Thomas <athom@google.com>
2020-04-14 10:57:33 +00:00
William Hesse 3e43a3dcad [infra] Remove unsatisfactory link to results feed from status output
The link placed in the results step from the recipe is better,
filtering on configurations rather than configuration groups.
So this link is replaced by the better link, which is also
placed more prominently.

Change-Id: I82f7bf808bc99087e5a1c4e20c3822376f93eec2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142151
Reviewed-by: Karl Klose <karlklose@google.com>
2020-04-14 06:11:37 +00:00
Joshua Litt 4aa896464a [dart2js] Add new nnbd strong bots.
Change-Id: I8a40fcc74bcf5f6161831f3c1da857955d624a63
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142220
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-04-14 00:58:32 +00:00
Srujan Gaddam 2bd4858d40 [dart:html] Use TreatNullAs attribute in nullability
Closes https://github.com/dart-lang/sdk/issues/41419

Uses the external attribute TreatNullAs to allow nullable setters
and parameters.

Change-Id: I5182ac6dcfdcf78e84f204079a782aebbf128a78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143185
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-04-14 00:37:41 +00:00
Robert Nystrom ed0f2ae768 Change test script to prefer a named configuration when possible.
The VM requires some special options that are only provided by the test
matrix when running using a named config, so try to use a named
configuration when possible.

Change-Id: Ie725cbcfea5b02a35885b0601dc0c78f81e3917e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142940
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-04-09 00:24:46 +00:00
Robert Nystrom 5ca5919fb4 Oops. Make "--legacy" actually do something.
Change-Id: Id372184d2544f68f4b6778d582c0f90be5313520
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142800
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-04-08 23:15:36 +00:00
Srujan Gaddam 5ed1850933 [dart:html] Add SubmitEvent to Event native annotation
Bug: https://github.com/dart-lang/sdk/issues/40901

Allows SubmitEvent to be treated like an Event.

Change-Id: I86d31b73eda5a0009fbd18aa4e993d0f52165d83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142882
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Auto-Submit: Srujan Gaddam <srujzs@google.com>
2020-04-08 20:27:34 +00:00
Ryan Macnak fd9d99d527 [infra] Reduce duplication in configuring the sanitizer bots.
Reduce the suites run by AOT ASAN/MSAN to "vm" and "standalone"; the full set of suites takes longer than the bot timeout.

Change-Id: I29cb0cfc19d429d63229f2123fe7f6ddfad93cd0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142566
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-04-08 20:26:33 +00:00
Nicholas Shahan aa47d74666 [ddc] Run modular test suite in weak mode
Preparation to unfork the SDK.

- Added the test suite to run in weak mode. Need to assess how we
  want to migrate these tests in the future.
- Updated one test to be legacy/nnbd agnostic.
- Update step names from DDK to DDC.

Change-Id: I0d2f1218c9acad82ab70dd525b0a0ad3cdc2ca92

Issue: https://github.com/dart-lang/sdk/issues/40266
Change-Id: If92e7778984de6a5a049faaf421a069c6f492b36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142557
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-04-08 18:25:14 +00:00
Ryan Macnak a90b845444 [infra] Fix AOT sanitizer bots to build everything they need.
Apparently `runtime_precompiled` does not include the platform dill.

Bug: https://github.com/dart-lang/sdk/issues/41382
Change-Id: Ieacaa445330520933fb27f31b05ca95b2e02245c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142804
Reviewed-by: Zichang Guo <zichangguo@google.com>
2020-04-08 02:14:00 +00:00
Ben Konyi 1f0c90868c Revert "[ Service / package:dds ] Add stream support to package:dds and enable DDS for VM service tests"
This reverts commit 6b2419ddaf.

Reason for revert: Failures on bots. Reverting.

Original change's description:
> [ Service / package:dds ] Add stream support to package:dds and enable DDS for VM service tests
> 
> This change adds stream forwarding to the Dart Development Service,
> allowing for clients to subscribe to service protocol streams with DDS
> instead of the VM service directly. DDS will maintain a single
> subscription for each stream as long as at least one client is listening
> to that stream. A DDS stream subscription will be closed when the last
> client listening to that stream either disconnects or calls
> streamCancel.
> 
> This change also enables DDS for most of the Observatory services tests,
> excluding thoses which utilize:
> 
> - Service extensions
> - Client naming
> - Client isolate resume synchronization
> 
> Change-Id: I5641e879a7626fcd5e4d28434ed480dd72fc7659
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142083
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

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

Change-Id: I185e63eabca54a3dff49d4f5a8a126795cadfa80
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142820
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-04-08 00:07:38 +00:00
Ben Konyi 6b2419ddaf [ Service / package:dds ] Add stream support to package:dds and enable DDS for VM service tests
This change adds stream forwarding to the Dart Development Service,
allowing for clients to subscribe to service protocol streams with DDS
instead of the VM service directly. DDS will maintain a single
subscription for each stream as long as at least one client is listening
to that stream. A DDS stream subscription will be closed when the last
client listening to that stream either disconnects or calls
streamCancel.

This change also enables DDS for most of the Observatory services tests,
excluding thoses which utilize:

- Service extensions
- Client naming
- Client isolate resume synchronization

Change-Id: I5641e879a7626fcd5e4d28434ed480dd72fc7659
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142083
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-04-07 23:18:45 +00:00
Robert Nystrom 2471ee5133 Add a little script to run migrated (and unmigrated) tests.
Change-Id: I1c64b96e79084d2b45d97ae7fcb6c0f0eddb6f3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142561
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2020-04-07 19:11:26 +00:00
Srujan Gaddam b96cd6d755 [dart:html] Add nullability to item type for lists
Needed to type nullability for List parameters correctly.

Change-Id: I55732a34f9e221324a15312985cb83b49a6811a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142211
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-04-06 21:37:44 +00:00
Jonas Termansen fd97153cdb [benchmark] Remove dart-ast, dart-aot-ast, and dart-bytecode targets.
Change-Id: I71fd758d5bca134d6cea36d40d4564bd7d6ad1c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142027
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-04-03 19:44:18 +00:00
Alexander Thomas 12f09896db [homebrew] Modify the version string when updating the version
This is a follow-up to a96b4f6 which changed the script but introduced
the bug that it no longer updated the version string in the formula.

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

Change-Id: I272d21d2c4a44161f697ba52da6bb74b1cc7c5f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142147
Reviewed-by: William Hesse <whesse@google.com>
2020-04-03 10:32:34 +00:00
Robert Nystrom 3e79a47fa8 Add a "fork" command to the migration tool.
It combines the "branch" and "copy" steps (which are still supported if
you want to do things manually) and also automatically commits the
change.

Just trying to make things a little less manual.

Change-Id: Ibf48759c486998251710244ade3355e59451cb7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142206
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-04-02 21:08:29 +00:00
Srujan Gaddam 544fc4627f [dart:html] Add insertAll to ChildrenElementList
Bug: https://github.com/dart-lang/sdk/issues/41275

insertAll should be unimplemented. It was previously relying
on a call to ChildrenElementList.length in the List mixin to
throw an UnsupportedError.

Change-Id: Ie8e5b126ea75a538e9db8b939bff0be012814efb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142201
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-04-02 20:16:39 +00:00
Srujan Gaddam 0764c70cd9 [dart:html] Remove nullability from CssClassSet funcs
Pre-nnbd, add and toggle were allowed to return null, but with the
change in the Set interface, they must return a non-nullable bool.

Change-Id: I1dfcb43d8c816f46f847d22d6f62507c6a77e4a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141500
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-04-02 19:29:09 +00:00
Srujan Gaddam bc65eafd3b [dart:html] Fix nullability for vars with null checks
There are several instances where there are non-nullable
variables with null checks associated with them that should
be converted back to nullable. Attribute functions in Element
are clarified as well.

Change-Id: I23cf020f02f3d4b512e041f0339daafb46fdd7f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140909
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-04-02 19:28:59 +00:00
Ryan Macnak 65e608d115 [infra] Create bot configurations for AOT + sanitizers.
Bug: https://github.com/dart-lang/sdk/issues/39611
Change-Id: I1f242515e00b8de934986b1b430cc99e1466b1b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141660
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-04-01 19:34:38 +00:00
Sigmund Cherem e26a8109ea [dart2js] Use platform file to enable null safety.
Derive whether legacy and nullable types are emitted based on the
provided sdk libraries and only enable the non-nullable experiment
when building the platform files.

The test matrix continues to enable the experiment temporarily
because test_runner currently doesn't support running with the
ReleaseX64NNBD configuration if it is not enabled in test.py

Change-Id: I7322906e928c68acab77087bcba76f06ef4bf983
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141850
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-04-01 18:19:37 +00:00
Jonas Termansen eea9717938 [infra] Instruct people to contact dart-engprod.
Change-Id: Ie1f5a6e887ad527bfaf2f69bc210e05b4686f621
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141883
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2020-04-01 08:55:31 +00:00
Martin Kustermann 2f3748934c [infra] Update tools/test.py and test matrix for running tests with arm64-qemu
Change-Id: I0dc2cdd98f2c2211f14509655e79798b89085837
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141888
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-03-31 11:06:20 +00:00
Karl Klose 5cd1cc0274 [infra] Remove unused bot script
Change-Id: Ic143e9d107d5e990c08a8db3a6d5d99b4a6d92c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141881
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2020-03-31 09:11:29 +00:00
Karl Klose 5507e3bd32 [infra] Remove creation of unused file
Change-Id: Ie13367008cbd64dcacd06ca7e8f5c76fea9aa795
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141601
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-03-31 05:11:29 +00:00
Srujan Gaddam 61adacd71d [dart:html] Add bool type to supportsTypedData
Allows it to be used as a boolean expression.

Change-Id: Id638eba4d1b0f745bfabc038f92fe930b5f454f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141641
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-03-30 23:33:54 +00:00
Srujan Gaddam b213b4ff58 [dart:html] Nullability fixes based on JS call
Changes types of return values depending on if the
call allows a Null type.

Change-Id: Id9b3d69eee1008d46a6b3b16f217a6b9c892fc6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141260
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-03-30 22:06:01 +00:00
Sigmund Cherem 889a0318b2 [dart2js] Update test-matrix to specify the libraries.json to dart2js batch runner
When multiple experiments are specified, we need to compile the sdk from sources
and the default libraries.json points to the legacy sdk.

Change-Id: I92904e422eb5225372e109ccb4f06b4a54030496
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141161
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-03-27 17:33:30 +00:00
Alexander Thomas a96b4f6dfe [homebrew] Add support for the beta channel formula
This changes to the homebrew tooling to modify instead of replace the
formulas. The formulas can now be changed by editing them in the
dart-lang/homebrew-dart repo, rather than in the release tooling.

Also adds a dry-run mode for local testing.

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

Change-Id: Ibed90894800e4d84fac3c4558e6f08d629baed62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141244
Reviewed-by: William Hesse <whesse@google.com>
2020-03-27 14:17:40 +00:00
Karl Klose 7387682bec [infra] Handle test steps with no tested configuration
Change-Id: I95543f88a64884bf2334165baa986d381bbf7872
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141241
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Karl Klose <karlklose@google.com>
2020-03-27 07:09:37 +00:00
Daco Harkes 445d279ff3 [vm] Add Reachability Fence Instruction
The reachability fence keeps a value alive and reachable.

Required for finalizers: https://github.com/dart-lang/sdk/issues/35770

Design: go/dart-ffi-finalizers (See "Premature Cleanup (Single Object)".)

Change-Id: I9742889f0f8d8b15bbcb5dca47f2a4231899dd59
Cq-Include-Trybots: luci.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-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-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-kernel-nnbd-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136188
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2020-03-26 18:30:44 +00:00
Srujan Gaddam fcc43457b3 [dart:html] Add nullability to EventTarget conversion
initMouseEvent uses this conversion to call the native function,
and it is allowed for the EventTarget to be null in the native
call.

Change-Id: I345e82fa00f4cca72e15f713cd7a271d306b7d37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141040
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-26 16:36:14 +00:00
Karl Klose f6acefa078 [infra] Ensure configuration names for custom test-runner steps are valid
Change-Id: I1bf57a3258aeb37f5fee485bde9a74a2ff3af8ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139803
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-03-26 07:01:27 +00:00
Jonas Termansen 188ab04445 [infra] Delete approve_results.
Change-Id: I43346ff69e6b82f700a06b52bdff891122d38572
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128551
Reviewed-by: Alexander Thomas <athom@google.com>
2020-03-25 10:27:40 +00:00
Leaf Petersen 72086df689 Bump ABI version for runZoneGuarded.
New API (runZonedGuarded) was added to the core libraries.

Bug: https://github.com/dart-lang/sdk/issues/41192
Change-Id: Iae56be055bf1e23051fdc93b07ac2db2902c9bd7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140880
Auto-Submit: Leaf Petersen <leafp@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-03-25 03:43:19 +00:00
Ryan Macnak b5d657c3f0 [vm] Fix memory leaks during ELF generation.
Change-Id: I8c7d5506a91a4e2190951e083438fee652b736ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140371
Reviewed-by: Teagan Strickland <sstrickl@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-03-24 01:09:35 +00:00
Srujan Gaddam ed41036d2f [dart:html] Migrate NodeValidator fix to NNBD
Addresses failure in api_dynamic_test, and copies the
vulnerability fix from src to nnbd_src.

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

Change-Id: Ic1c6766c066174f4d0504e429ed70f1ce0a487e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140645
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-03-24 00:46:55 +00:00
Kevin Moore 6a5d73dfe7 Address a vulnerability in node validator
Related to DOM clobbering of previousSibling

Change-Id: Ib4ed1cdba4217c351804b0689a999b73713f79ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140622
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-23 20:01:58 +00:00
Liam Appelbe b3c89f4b92 [tools] Fix addlatexhash.dart in NNBD mode
The List() constructor isn't allowed anymore, so switched to [].

This fixes addlatexhash_test.dart in weak NNBD mode.

Change-Id: I8070c6d1ea74b58e75db02aead8905f42f555156
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140662
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-03-23 19:47:52 +00:00
Alexander Thomas 8350f423ee [vm] Add the channel name to the VM/dart:io version string
Dev and beta version strings will look very look very similar, so adding
the channel name will make it easy for users to see if they are on be,
dev, beta, or stable. This will change both the output of
`dart --version` as well as the value of `Platform.version`.

This also removes the Flutter stable release version hack.

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

Change-Id: Iceb8e84a9cf4d0bfb7659669878e42d0a59febc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140287
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2020-03-23 10:00:03 +00:00
asiva 1a8d6ad16e [VM] Bump ABI version to 30
Change-Id: Icb60b5ea76a6cbb053d0841be65616b416aaa122
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140260
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Auto-Submit: Siva Annamalai <asiva@google.com>
2020-03-20 04:59:50 +00:00
Ben Konyi a74e877104 [ package:dds ] Initial commit of the Dart Development Service, package:dds
- Defined initial interface
- Currently can spawn an HTTP server and forward websocket and HTTP
requests to the VM service
- Simple smoke tests
- Initial documentation in dds_protocol.md and other book keeping
- Enabled analysis on bots

Change-Id: Ia11e9e33fd10b0b4700b704a29e2977341441cec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139542
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-03-19 23:36:45 +00:00
asiva a980fb1849 [Tests/NNBD] - Migrate initial set of isolate tests for NNBD.
Fix all warnings/errors when running with --enable-experiment=non-nullable flag

Change-Id: I7673aa34466273d623f7a429d96b0ccd6b612dae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139980
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-03-19 20:07:58 +00:00
Alexander Thomas 97afe8410a [beta] Support the beta channel in SDK scripts
Fixes https://github.com/dart-lang/sdk/issues/40992

Change-Id: Icc6888c94517667a184931d3e690db2fe67cc0ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139814
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2020-03-19 07:49:38 +00:00
Joshua Litt 44669206b3 [dart2js] Fix html_dart2js to handle null argument.
Change-Id: I711261840fd733ecf640586b82da54d6f61c6bb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139746
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-03-17 17:11:36 +00:00
Alexander Thomas c816525c29 [infra] Add support for the beta channel to promote.py
Closes https://github.com/dart-lang/sdk/issues/40984

Change-Id: I0459b3709cc008890d4d66c3b0f98cc5b4fd6b36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139281
Reviewed-by: William Hesse <whesse@google.com>
2020-03-13 10:53:26 +00:00
asiva c3673bdca4 [VM/Testing] - Turn on testing in strong NNBD mode.
Change-Id: I272de0ca65afb4327d9ec6457c7e514fb1c73449
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139030
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-03-11 04:04:49 +00:00
Sigmund Cherem bff20985ce [cfe] remove whitelist of opt-out packages
Closes https://github.com/dart-lang/sdk/issues/40775

Change-Id: Ib713494edf34046bbf7de43811659863fbc5884e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138901
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-03-11 03:19:59 +00:00
asiva 7617e327a1 [VM/Testing] - Turn on co19_2 legacy testing in NNBD bots.
Change-Id: I5592a5a8d6dfd068e45ecf9b4ec2d12fbe67b4a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138621
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-03-09 16:24:07 +00:00
William Hesse a4f6479998 [infra] Print details of unapproved (new or previous) failures in build failure message
Change-Id: Ic9f9151f5884b636b902b5ba6b7d2c35cec6417b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138287
Reviewed-by: Karl Klose <karlklose@google.com>
2020-03-09 15:11:40 +00:00
Karl Klose 7bdc910670 [infra] Remove unused bot script
Change-Id: Id65295b28642c0faf3db89aa383696bd8c8e8ccd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138292
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2020-03-09 07:29:00 +00:00
Sigmund Cherem a410f5bde1 [dart2js] rename null-safety flag and plumb through CFE
The new flag name follows the changes in https://github.com/dart-lang/language/pull/779, the change also is converging on not having each tool infer a default on the input, but rely on build systems to provide the appropriate flag instead.

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

Change-Id: I39c143b7985dbfe6dab5dfd9a7347a7a4420479b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138569
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-03-06 02:22:41 +00:00
Sigmund Cherem 800f4b10d4 run co19 and lib2 on dart2js nnbd bots
Change-Id: I7e458f0d2351a31a4c5cb1afc2fcb4d7ffce0378
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138420
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-03-05 01:41:33 +00:00
Ryan Macnak df5036eb6e [vm] Require only an isolate group, not an isolate, in Dart_Delete[Weak]PersistentHandle.
Remove the now-misleading isolate parameter of Dart_DeleteWeakPersistentHandle.

Bug: https://github.com/dart-lang/sdk/issues/40836
Change-Id: I784f1ecf564484b59f60ebef53ddb975aff1bd23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138015
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-03-04 18:56:16 +00:00
Alexander Thomas 800008ba64 [infra] Run more migrated tests on the analyzer-nnbd builder
Change-Id: I03a070bc09c9e90cf1f27bacdfe8489a1bcf7846
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138090
Reviewed-by: Paul Berry <paulberry@google.com>
2020-03-04 09:36:00 +00:00
Alexander Thomas 38cc00cd2c [infra] Balance the number shards on the AOT builder with co19_2 tests
The regular test shards run in about half the time. Therefore, we can
use less shards for overall efficiency without sacrificing cycle time.

TBR=asiva@google.com
Change-Id: Ib8b58a03f9c40d0e8f288cde6e148a54fc1ed1e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138300
Reviewed-by: Alexander Thomas <athom@google.com>
2020-03-04 09:07:55 +00:00
asiva 23106da62e [VM/Testing] - Added co19_2 tests to vm-precompiled-linux-release-x64 builds
Change-Id: I93b799c0c3db12a3e4755ee8c55006ec77855301
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138052
Reviewed-by: Alexander Thomas <athom@google.com>
2020-03-04 09:07:55 +00:00
Régis Crelier 5701c4fd3b [VM/nnbd] Remove propagation of library mode to runtime after spec change.
On 1/27/20, the nnbd specification changed weak and strong mode instance checks
to make them behave uniformly across legacy and opted-in libraries.
Therefore, it is not necessary anymore to propagate the library mode in
generated code to the runtime.

Change-Id: I42d3ddc6e9a921899aeac21be6374c7893a6d27c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138111
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2020-03-03 20:30:32 +00:00
Paul Berry d0826bdbd5 Add current-version field to tools/experimental_features.yaml.
Previously, each top level key/value pair in the file represented a
feature, so in order to make room for the new field, these were all
moved under a "features:" header.

Code generators have been updated to produce the same result as they
did before; in future CLs I'll update them to generate code based on
the new field.

Change-Id: Ia2266dd0d92796f15460127742eb2b56f64438e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138101
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-03-03 19:25:44 +00:00
Alexander Thomas 817d0650b9 [infra] Add ffi-qemu builder to the test matrix
Change-Id: Ic6d2547fc144bf0452d6b32ffa754d858ebacec7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137967
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2020-03-03 13:33:29 +00:00
Srujan Gaddam 5b23373f7e Modify fields in some abstract and native classes
Since we transitioned to natives for dart:html, manually written native
fields should be rewritten. Similarly, if there are fields in abstract
classes that represent interfaces, they should be converted. Fields in
abstract classes that are used in that class are left alone.

Change-Id: I924363639a4430b88b810b7348815bbc3f040e7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137642
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-02-29 01:29:35 +00:00
Srujan Gaddam 9f79dfc37d Address analyzer errors in golden files in dart:html
New analyzer errors are reported for dart:html around nullability.
Non-nullable fields are translated to native getters and setters if part
of a concrete class and normal getters and setters if abstract.

Change-Id: I2fd87803a08872b2a7eae4de0af704f184997c7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137481
Reviewed-by: Stephen Adams <sra@google.com>
2020-02-29 01:29:35 +00:00
Srujan Gaddam 80f84e1942 Change all fields to native getters/setters
Bug: https://github.com/dart-lang/sdk/issues/40772

Attributes are translated to native getters and setters regardless of
NNBD. Some logic was removed for fields that no longer apply due to this
change.

Change-Id: Ia1a05778ff8c6f082506a1c95a3057a7c5f7f896
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136880
Reviewed-by: Stephen Adams <sra@google.com>
2020-02-29 01:29:35 +00:00
Srujan Gaddam 3ec6ec2a2d Change getters/setters to native for nnbd
NNBD fields that were non-nullable or final were transformed to getters
so that they were compilable. They need to be transformed to natives now
for performance.

Change-Id: Ice0082f9468c542098a6d12083a826438d15eba4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135860
Reviewed-by: Stephen Adams <sra@google.com>
2020-02-29 01:29:35 +00:00
Robert Nystrom 4f01e01d1f Sort the tests needing migration work.
Got tired of hopping around the lists of tests randomly.

Change-Id: If8e5f915b7871d8ae916e565d9d4e787a44c6a50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137724
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-02-28 01:00:34 +00:00
Ryan Macnak 60c86a4009 [vm, gc] Fix races related to Scavenger::AddAbandonedInBytes and UsedInWords.
[infra] Run fewer tests under TSAN. TSAN has a significantly higher overhead than the other sanitizers.

Change-Id: I92b69923e93fa4634168352bdbe30d6ee7e7f72d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137402
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-02-27 18:01:13 +00:00
Robert Nystrom 4b7ba5a72f Add a script to generate a package_config.json for the SDK.
Also include the generated output.

Change-Id: Ic2818f544972c737f69913122e366ea48375e950
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135795
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2020-02-27 17:52:23 +00:00
Sigmund Cherem 5055c98bee [dart2js] switch bot to use hostaserts once again
This changes how we used String.fromEnvironment to enable tracing.
With null-safety http://dartbug.com/40678 means that these constants are
never null, so we were accidentally enabling tracing by default.

I was only able to see this when running dart2js from source
(which affects the hostasserts configuration), but I wasn't seeing this
when running from snapshot. We need to investigate that separately.

Change-Id: Ic362967d2f0daf5f9c0e1659c6a024ca9a44358f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137286
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-02-26 21:41:47 +00:00
William Hesse fb9efd4b68 [infra] Send a tryjob's base commit hash when publishing results to pubsub
Change-Id: I2813a6a180d8be8e55c1c49f2686e53e533c6bc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137105
Reviewed-by: Alexander Thomas <athom@google.com>
2020-02-26 09:55:59 +00:00
Alexander Thomas f304dac144 [infra] Add strong mode testing to the CFE builder
Change-Id: I0add8fdb5aeb768c52f6140f838ee2987ac4d132
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137060
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-02-26 01:48:57 +00:00
Alexander Markov 55cc495451 [vm/nnbd] Rename --strong-non-nullable-type-checks to --null-safety and pass it to CFE
Issue: https://github.com/dart-lang/sdk/issues/38845
Change-Id: I9baeb4a384a6b2de79df9f97e82c127ae4f611c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137120
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2020-02-25 20:05:39 +00:00
Alexander Markov aa2c1a4950 [vm/nnbd] Add --null-safety option to VM's kernel compilers
This change adds --null-safety option to the front-end server and
gen_kernel tools. This option is forwarded to CFE via
CompilerOptions.nnbdMode.

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

Change-Id: I410b1d5466d93d9514cb7571bf37b32c848f136c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137106
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-02-25 19:04:43 +00:00
Martin Kustermann 767943850f [vm] Enable check_initialization_order for ASAN, ensure tools/test.py always passes ASAN options, make Random be initialized during VM startup
Running tools/test.py locally behaves differently than on the bots
because the bots will have special environment variables set.

=> We want also local runs of tools/test.py to report ASAN errors, so
   this CL moves the setting of environment variables to tools/test.py

Furthermore we enable "additional check_initialization_order=true" asan
option to detect ordering issues when initializing global state.

Make the IsolateGroup::isolate_group_random_ heap allocated on VM
startup to avoid initialization ordering issue (turns out our `Random`
can depend on embedder entropy source callback being available)

Also add locking around assigning of isolate group ids -- without it we
could have two threads racing and possibly getting the same id.

See b/149978682

Change-Id: I41b9a34c66934dcc0d3804233f5acf09004ba3bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136630
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2020-02-25 10:32:01 +00:00
Clement Skau 6a90bf5d54 [Cleanup] Removes deprecated --(no-)enable-malloc-hooks from test_matrix.json.
Change-Id: I5d7d9b3e75b878d78e905934afed8b9327863766
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136200
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2020-02-25 09:34:40 +00:00
Nicholas Shahan 330711ab69 [tests] Add dart2js nnbd SDK analysis test to analyzer bot
Run this test on the dart2js patched SDK too until the CFE
starts reporting all errors.

Change-Id: Ib943d6516382a3edc5dfe9906d4d0d6fb97fe076
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136808
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-02-24 22:47:58 +00:00
Ryan Macnak 73f6d15665 [build] Update clang and gn to match Fuchsia.
This new version has functional TSAN.

Bug: https://github.com/dart-lang/sdk/issues/39611
Change-Id: Ia9835fb6ad6de73f43faea695f893ed0c62fffa7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136380
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-02-24 21:04:18 +00:00
Alexander Markov 070f67a05b [gardening] Remove obsolete Flutter HHH patch
This change was submitted into Flutter/flutter already
(6f9ed76faf),
so removing this patch as it cannot be applied anymore and causes
Flutter HHH to fail.

Change-Id: Ic1b44f0ec0c85b9d343079f8a067cd59ebf37170
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137040
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-02-24 20:34:46 +00:00
Samir Jindel 17ec4a8433 [vm] Fix 3xH bot.
The corresponding Flutter change is made in https://github.com/flutter/flutter/pull/51330.

Change-Id: Ib3f233cd4153c04b22ba10e30eb532186fc9fb97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136961
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2020-02-24 11:37:37 +00:00
Srujan Gaddam 55f4b1294e Change setProperty to take in nullable |value|
IDL allows |value| to be nullable.

Change-Id: I1db4a7929f0a83c4772e1a11384afb70ead53501
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136722
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-02-22 02:22:21 +00:00
Srujan Gaddam 6d051311b6 Add back in null assertions for legacy weak mode
These assertions need to be added back into the nnbd sdk in order to be
compatible with weak mode.

Change-Id: Ie774fffda1fb0e79dbc7fe13cb75b9d28e4268fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136720
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-02-21 19:13:31 +00:00
Joshua Litt 5aeb1a3f11 [dart2js] Update libraries.yaml with migrated dart2js.
Change-Id: Ibd70ce90d3b965d438a153654efb5e5bff94a201
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135798
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-02-21 18:37:40 +00:00
Alexander Markov 0ce382363d [nnbd/test] Add test configurations for NNBD strong mode for the VM/AOT on x64
Change-Id: If285e4a43b57fa3ef27dcc46be31e7982fc11f2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136713
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-02-21 18:26:00 +00:00
Alexander Thomas 24fb5350c7 [infra] Add VM AOT NNBD builders to the test matrix
* Fix formatting and sharding for the VM JIT NNBD builders.

Change-Id: Iaf11da2e4acf906cdf0908e1bff771366dc3a083
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136640
Reviewed-by: Régis Crelier <regis@google.com>
2020-02-21 17:19:56 +00:00
Jonas Termansen a739002cfa Analyze both nnbd and non-nnbd concurrently when migrating tests.
Only write out the tests if the source files changed, so editors
don't reload files that didn't actually change.

Change-Id: Ifd8621e36aab88b6f0740881a6289bc392a0f52f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134841
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-02-21 13:55:58 +00:00
Johnni Winther 5829fc7829 [analyzer,cfe,dart2js] Add marker.options files to automate running id tests on all configurations
Change-Id: Ib5eb7f3967634721047f8dcc57b9e6c350b91a41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136226
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-02-21 08:34:26 +00:00
Srujan Gaddam a42c072017 Remove unnecessary null check in getPropertyValue
CSSStyleDeclaration.getPropertyValue returns a non-nullable string.
It will also return an empty string if the property is not found. Since
getPropertyValue returns the value of the native getPropertyValue, the
null check should be removed.

Change-Id: I9846553d3f9fcd68cbd15b9c39d2104cab594b7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136413
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-02-20 20:49:26 +00:00
Alexander Markov dc1e57c2df [nnbd/test tool] Add test configurations for NNBD strong mode for the VM
Change-Id: I893d47262947492d743a2079d82d59c0e9e4e1f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136707
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-02-20 20:43:55 +00:00
Srujan Gaddam 2109617eb2 Fix multi-line error handling in analyze.dart
Preexisting comments on multi-line errors modify the length of the error
reported from the analyzer since it includes the comments in between. So
the error length increases every time you run this script, making the
error comments unwieldly.

Change-Id: Iaeab9118710738f3ebf534d85b7fd08be0bf302f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136526
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-02-20 19:12:11 +00:00
Kevin Moore b801e603d3 update_homebrew: fix single audit error
Found via `brew audit --strict --online dart`

Change-Id: Ib38873f51b169526bf10253422ddf79804930984
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136703
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-02-20 18:33:19 +00:00
Kevin Moore 7784ed1b9e update_homebrew: fix Dart homepage url
Follow-up to https://github.com/dart-lang/homebrew-dart/pull/72

Change-Id: I79fb0e7cea714974fd63e7516f11e2c55e3af1ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136702
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-02-20 18:24:18 +00:00
Robert Nystrom 156c503620 Change indexOf() and lastIndexOf() back to Object.
In the legacy SDK these two methods in ListMixin take Object, not E.
When I migrated them to NNBD, I changed them to E to match the
declaration of the methods in List. This was an unintended breaking
change.

Fix that by changing them to "Object?", which is the NNBD equivalent of
the declarations in the legacy SDK.

Change-Id: I2a75e9f26a8198e4f51cb32a55055d5e64a69ed1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136412
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2020-02-20 09:00:17 +00:00
Srujan Gaddam 59370f29c5 Fix html methods without returns
Several method bodies did not return a value conditionally or at all.

Change-Id: I01ca87e2e0501597bacb49bcddd10668b59026b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135626
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-19 20:43:34 +00:00
Clement Skau 84644e20d6 [SDK] Adds IndirectGoto implementation of sync-yield.
Sets a threshold of five continuations determining if the old
if-else or the new igoto-based implementation will be used.
Informal benchmarking on x64 and arm_x64 point towards the overhead
of the igoto-based impl. dropping off around this point.

Benchmarks of this CL (threshold=5) show drastic improvement in
Calls.IterableManualIterablePolymorphicManyYields of about ~35-65%
across {dart,dart-aot}-{ia32,x64,armv7hf,armv8}.

Note: This is a second revision of a CL landed and reverted from:
https://dart-review.googlesource.com/c/sdk/+/133586
The fix for the previous revert was swapping the parameters to
BuildIndirectEntry(int, int) in kernel_binary_flowgraph.cc.

Bug: https://github.com/dart-lang/sdk/issues/37754
Change-Id: If035235ce8aa660af2ea7f8cfbc8066cde6329b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136126
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-18 13:24:09 +00:00
Jens Johansen 8652404193 [flutter-frontend-test] Run flutter-frontend compile tests in custom test runner
Change-Id: Iecf2f40dd1bc8c0fffd877911e81ccd6055d9dc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136121
Reviewed-by: Karl Klose <karlklose@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-02-18 10:58:59 +00:00
Lasse R.H. Nielsen 3f28a3496c Change SDK to use package_config v1.9 (unreleased).
Change-Id: I405ac5e59d0b330c6fc6c63fab48d2d303734e59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136123
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-02-18 10:56:59 +00:00
Clement Skau 82f3f81fc8 Revert "[SDK] Adds IndirectGoto implementation of sync-yield."
This reverts commit 7ed1690b4e.

Reason for revert: Crashes precomp.

Original change's description:
> [SDK] Adds IndirectGoto implementation of sync-yield.
> 
> Sets a threshold of five continuations determining if the old
> if-else or the new igoto-based implementation will be used.
> Informal benchmarking on x64 and arm_x64 point towards the overhead
> of the igoto-based impl. dropping off around this point.
> 
> Benchmarks of this CL (threshold=5) show drastic improvement in
> Calls.IterableManualIterablePolymorphicManyYields of about ~35-65%
> across {dart,dart-aot}-{ia32,x64,armv7hf,armv8}.
> 
> Bug: https://github.com/dart-lang/sdk/issues/37754
> Change-Id: I6e113f1f98e9ab0f994cf93004227d616e9e4d07
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133586
> Commit-Queue: Clement Skau <cskau@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

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

Change-Id: Ie212fae88bc1977e34e4d791c644b77783a8deb1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/37754
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136125
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2020-02-17 12:17:25 +00:00
Samir Jindel 1fbc71da0f Re-land "[vm] AOT blobs snapshots are obsolete. Remove dead code."
Original change is in Patchset 1. I erroneously assumed DART_PRECOMPILER
was only used AOT compilation (it is also used for JIT snapshots).

Change-Id: I77f6c463db7f2b482c9b098f353dc28f0676ea0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135900
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2020-02-17 11:12:15 +00:00
Clement Skau 7ed1690b4e [SDK] Adds IndirectGoto implementation of sync-yield.
Sets a threshold of five continuations determining if the old
if-else or the new igoto-based implementation will be used.
Informal benchmarking on x64 and arm_x64 point towards the overhead
of the igoto-based impl. dropping off around this point.

Benchmarks of this CL (threshold=5) show drastic improvement in
Calls.IterableManualIterablePolymorphicManyYields of about ~35-65%
across {dart,dart-aot}-{ia32,x64,armv7hf,armv8}.

Bug: https://github.com/dart-lang/sdk/issues/37754
Change-Id: I6e113f1f98e9ab0f994cf93004227d616e9e4d07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133586
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-17 09:59:25 +00:00
Ryan Macnak 29c50c6ebe Fix list_files.py so it is python3-compatible.
Cf. 86fe7ca75c

Change-Id: I17bb00b6e39fe27c725a2026a4ced824ad360a4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135624
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-02-15 00:12:50 +00:00
William Hesse af7270cb23 [infra] Construct 'not run' records in results.json when tests disappear
Cloud functions and test results app need to handle these new results
before the CL can be landed.

Bug: https://github.com/dart-lang/dart_ci/issues/72
Change-Id: I64d9238767f0a5aea41e4b7524120bd58a5bf625
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134324
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-02-14 13:25:25 +00:00
Siva Annamalai edd64e6d5c Revert "[vm] AOT blobs snapshots are obsolete. Remove dead code."
This reverts commit bcc0900e6a.

Reason for revert: This CL is breaking the Fuchsia Flutter build see https://github.com/flutter/engine/pull/16604/checks?check_run_id=445155807 

Original change's description:
> [vm] AOT blobs snapshots are obsolete. Remove dead code.
> 
> Change-Id: I35cf4befbe66b92197dcd659172f90be3de30f8e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134840
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

TBR=rmacnak@google.com,sjindel@google.com

Change-Id: I9dd32a71bf43907f59ed766b98bf453bab99ea3c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135881
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-02-14 06:40:31 +00:00
Robert Nystrom 40d544bc26 Always count non-core libs when tracking migration progress.
Now that they're farther along, there's little need to keep them
separate.

Change-Id: I3dedcf34b97cf5f0645fe429b357a459850d65d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135740
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-02-13 23:05:29 +00:00
Paul Berry 4ca3d267ee Run legacy co19 tests in analyzer-asserts-weak configuration.
This will allow us to see whether any legacy co19 tests are expected
to fail when we unfork the SDK.

Change-Id: If3c1b86a86094e4754e0cff44238edd6d0c5f752
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135623
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-02-13 19:08:58 +00:00
asiva 0838c9ebc2 Enable co19_2 legacy tests in the NNBD bots.
Change-Id: I9ddcf7314e9f1f1b59e29320b53addd594733297
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135501
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-02-13 16:45:08 +00:00
Samir Jindel bcc0900e6a [vm] AOT blobs snapshots are obsolete. Remove dead code.
Change-Id: I35cf4befbe66b92197dcd659172f90be3de30f8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134840
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-02-13 14:16:49 +00:00
Karl Klose c90fca7188 [infra] Inline content of cloud epiloque file into approval script
Change-Id: Ifdbe1297e30dc6ed4e44d3fc9ba62c3faf0d8bde
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133986
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2020-02-13 12:02:21 +00:00
Vyacheslav Egorov c096f9d6e5 [gardening] Fix 3H patching logic with respect to newly added dependencies.
Dependency might reside in path with one name but come from a repository
with completely different name.

Change-Id: Ic96ba2d5e32a8a5eeb3fdc44cae732ae35eac22d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135643
Reviewed-by: Jens Johansen <jensj@google.com>
2020-02-13 09:05:36 +00:00
Jens Johansen 0a8484ca20 [CFE/VM] Add patch after 'Use package config v2'
After 81d4ac07d4 ([CFE] Use package config v2)
landed the HHH bot hasn't been able to compile.
Hopefully this CL fixes that issue.

Change-Id: Ia3bb983f5a2ccf2539e59452b58058970bb6af1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135641
Reviewed-by: Jens Johansen <jensj@google.com>
2020-02-13 08:19:57 +00:00
Paul Berry f57f1eb56b Add an analyzer test step to test legacy code using the unforked SDK
Change-Id: I7a06dbeacbf389ecfb343528652c9ec2ba545745
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134340
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-02-12 21:32:49 +00:00
Robert Nystrom 86f8e3438a Migrate language_2/async_nested to NNBD.
Change-Id: I16f1be4e17fa87aa94b294f281dfe14ea0129eb3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134904
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-02-12 20:46:37 +00:00
William Hesse 31de73f074 [infra] Publish results messages to pub/sub at a slower rate
We have seen scaling issues when processing many pub/sub messages
in cloud functions simultaneously, so we will limit the results messages
from a builder to 1 every 2 seconds.

Change-Id: I31fd9da24d2d5c3bc0afe30b3b165ee65494f29d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135312
Reviewed-by: Alexander Thomas <athom@google.com>
2020-02-12 15:25:25 +00:00
asiva a6001fae29 Turn on first set of legacy testing for the VM NNBD bots.
This turns on lib_2, corelib_2m language_2 and ffi_2

Change-Id: I0bf018cde6bfd8fafcf3df5bd40f5560be3cb93e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135361
Reviewed-by: Alexander Thomas <athom@google.com>
2020-02-11 23:57:50 +00:00
Sigmund Cherem 74f523a186 Add separate libraries.json file to help migrate dart2js libraries.
This temporarily:
* sets back to opt-out all libraries in the sdk_nnbd folder until
the migration is further along
* changes the bot to use the check_nnbd_sdk script with a different libraries
file that tracks the migration progress.

Change-Id: I096df232d23e2fb41265b6a51c486fb44f9b228c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135221
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2020-02-11 22:49:15 +00:00
Srujan Gaddam e2ff83724b Fix nullability for some templates
Addresses discrepancies between IDL and template files for some
operations. There's probably more I'm missing since this was
from a cursory check through all the templates.

Change-Id: Id79710b343f4a5fe0b5529f64c341d4f63d69b9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135222
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-02-11 20:28:54 +00:00
Srujan Gaddam e7ee11a95b Fix input and output for conversions
Fixes tests lib_2/html/event_customerevent_test
            co19_2/LibtTest/html/Document/window_A01_t01

JS inline incorrectly uses the converted html name for attributes for
getters. Similarly, dynamics do not need to be marked as nullable as
they are already nullable. This also fixes some of the nullability logic
for conversion input and output.

Change-Id: I77efde95a4e5d52461b3412f8650578e967ca5cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135201
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-02-11 00:27:05 +00:00
Srujan Gaddam 5e74472449 Handle optionals in DOM scripts for NNBD
Optionals were being ignored for some methods and for optionals that
have a default of Undefined or None, they should be marked nullable in
Dart syntax regardless of whether they are in the IDL.

Change-Id: Icc71300dc7d8e06fef640a5ca8d502b093c0580c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134765
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-10 22:26:35 +00:00
Srujan Gaddam cd53f4ffe1 Add null-safety to html_common
Bug: https://github.com/dart-lang/sdk/issues/37931

Change-Id: I454ffd0cbd090d5f4ff0aa4f2a778710eea7c5b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133860
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-10 19:14:34 +00:00
Srujan Gaddam 9af1ffc558 Don't generate getters/setters for read only promises
Bug: https://github.com/dart-lang/sdk/issues/40530

For attributes that return promises and are read only, we
use promiseToFuture casts that should be maintained.

Change-Id: I02e23fc9c47321ced64a152c245cbdccd7337033
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134902
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-02-10 18:55:35 +00:00
Robert Nystrom 21758fe93c Create a package_config.json file for the generated multitests.
Change-Id: Ic603d2827184aa88c0b3d78032966591516094e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134873
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-02-10 15:46:54 +00:00
Sigmund Cherem 4310f50edc Switch dart2js nnbd bot: use a sdk-built configuration with no assertions
This is a temporary measure to help run the bots faster (the hostasserts
configuration seems to be timing out periodically)

See also https://github.com/dart-lang/sdk/issues/40521

Change-Id: Iba06626388124c146fbde8e78f3edc0a62f089f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134885
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-02-08 00:32:00 +00:00
Srujan Gaddam 8c0d72db1d Fix how composedPath is called
Bug: b/149075352

Event.path should call composedPath if the result of the inline is
True. As it is, it only calls it if the result is null, which is
erroneous.

Change-Id: Idacc9ccddafc4374aca10de84265bf82cfbd0ab9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134887
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-07 23:25:22 +00:00
Jonas Termansen 3433d8cfc3 [nnbd] Migrate standalone/io to NNBD.
The tests are also now dartfmt.

Bug: https://github.com/dart-lang/sdk/issues/40040
Change-Id: I8dece8097b37b70d47a5374dae2f3fadb0fc4b90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134338
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-02-07 14:41:36 +00:00
Clement Skau d765d23746 [Tools] Makes build.py --arch more case-tolerant.
This allows us to do both:
  tools/build.py -a ia32
and
  tools/build.py -a IA32,ARMx64,x64

Also fixes missing arch option in utils.py.

Change-Id: I6f911397dbf52437f5347d41d71cdd3254a29476
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134700
Reviewed-by: Teagan Strickland <sstrickl@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
Auto-Submit: Clement Skau <cskau@google.com>
2020-02-07 08:26:35 +00:00
Srujan Gaddam dae60008ab DOM script changes to handle nnbd
-Adds field for type nullability for IDL operations
-Adds field for conversions to reflect input and output type nullability
--based on implementation
-Corrects generic object types to include nullability
-Changes 'any' types to dynamics
-Adds nullability to types in various operations
-Converts finals and non-initialized non-nullable fields to getters and
setters
--TODO: convert these to native instead of JS inline
-Modifies nullability for annotations and removes annotations from
setters

Change-Id: Iab19830fd1d7f37b170a4da8672f922c3f9b0863
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132967
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-07 01:05:14 +00:00
Srujan Gaddam 3776313e65 Change dart:html templates to generate null-safe code
Introduces NULLASSERT token and NNBD condition to allow code to
conditionally compile with NNBD.

Change-Id: Ib71e439f32c793e69b66c328cd7c9900358d886e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134045
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-06 23:18:24 +00:00
Alexander Thomas c66b15139a [infra] Bump number of test results per pubsub message to 100
99th percentile execution time is at 20s, so with twice as many results
we should still be well below the 60s timeout.

This should reduce the likelihood of lock contention on updating the
chunk count resulting in fewer builds failing to get test results.

Change-Id: I4eff0c854ca1fa091431d47017ce995110178e77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134331
Commit-Queue: Alexander Thomas <athom@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-02-05 13:18:39 +00:00
Martin Kustermann a5bb8b666a [infa] Respect --sanitizer flag in tools/test.py when running GN
Change-Id: I0c9fdc26983381111021bf1265ef58f31deb8ae2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134296
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-02-04 18:45:26 +00:00
Srujan Gaddam 851912cc1d Change nnbd_src files to be null-safe
Translates the forked nnbd_src files to address analyzer issues.

Change-Id: Ida21988bff63a6c5a037b548d0c8b11208317b3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130131
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-04 01:57:39 +00:00
Sigmund Cherem 07675de0c0 Fix type error within _EventStream.onData
The constructor was wrapping the onData handler to hide the type-mismatch. This
copies the same logic to the onData handler.

In non-nnbd code this code was not exercised. The migration of dart:async
made this code reachable on our tests. That's because Stream.first used to
do:

  var subscription;
  this.listen(() => ... cancel subscription here, ...)

it now avoids making subscription nullable by registering the onData handler
later:

  var subscrition = stream.listen(null, ...);
  subscription.onData(() => ... cancel subscription here);

This change fixes the following 6 html tests under nnbd:
html/history_test/history/history
html/transferables_test
html/transition_event_test
html/websocket_test
html/worker_test/functional/functional
html/xhr_test


Change-Id: I095ea8d545e65b047504af0367586884bba84d72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134120
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2020-02-02 05:58:24 +00:00
Vijay Menon 7a85c7c895 [dartdevc/nnbd] enable co19_2 tests for legacy mode
Change-Id: Iaf1cd9f6833554a622ea8c97a7fefb7e09a9cd51
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134089
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-01-31 21:42:13 +00:00
William Hesse 4e38df4255 [infra] Print correct configuration groups in failures link
We were printing groups of builder names, not configurations

Change-Id: Ia9a6791fbd25939f71a1aa227bc288197c838bd6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133991
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-01-31 14:19:00 +00:00
Karl Klose 77d50308dd [infra] Use pkg/smith's test matrix support in test.dart
Change-Id: I193651bc471191b9d45345dead9af1b428ceb3a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133239
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2020-01-31 11:47:31 +00:00
asiva f24c0f0837 [VM/tests] Second step of porting dart:cli tests for NNBD
Turn on the dart:cli tests in the nnbd bot.

Change-Id: I2c521b217300839deb7ad47a820768172b8f0e26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133866
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-01-30 02:42:11 +00:00
Srujan Gaddam 28917d8b1d Handle invalid overrides in template and src dart files
Several functions did not override their parents' function signatures
correctly for nnbd.

Change-Id: Ibd935ffa39b3175db65bb43d15396134700d2f78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129143
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-01-29 22:22:50 +00:00
Srujan Gaddam 0863218e02 Move changes to src .dart files to nnbd_src
https://dart-review.googlesource.com/c/sdk/+/128376 renamed some dart
files to darttemplates to handle nnbd in src. Instead of modifying
those files, those changes are reflected here.

Change-Id: Ib87dcb357f38e9fb5c56f543b6208931d0fdb63a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130130
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-01-29 22:22:50 +00:00