Commit graph

6448 commits

Author SHA1 Message Date
Srujan Gaddam 45595624f1 [dart:html] Add secure context logic to mdnreader
Bug: https://github.com/dart-lang/sdk/issues/41944

Note that the compatibility data on secure contexts is fairly
sparse and has missing information. There are only two APIs that
have secure context info on them and they're already marked as
incompatible.

Change-Id: Iaf9ecb7a916c8ac20b32e1ea92ed44981f675659
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152044
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-07-01 22:06:34 +00:00
Srujan Gaddam aff77e7ed7 [dart:html] Incorporate MDN compatibility data
Bug: https://github.com/dart-lang/sdk/issues/41905

Uses MDN information in the generator script to get a better idea
of which attributes are compatible and are not. mdnreader.py is
introduced to parse the data present in third_party.

Change-Id: I330ccf918cb42deb4c09ab97db5f3d2f0c432d99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149800
Reviewed-by: Stephen Adams <sra@google.com>
2020-07-01 22:06:34 +00:00
Jacob MacDonald 51ac86c753 update collection dep, and add flutter-engine patch
Change-Id: I5e8b0eb2b161b71734feebb6e13d039082ad6bc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152860
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2020-07-01 20:50:38 +00:00
Srujan Gaddam ff8f128a76 [dart:html] Update console interface
Closes https://github.com/dart-lang/sdk/issues/42213

Adds nullability to Console, adds missing methods and cleans
cleans existing ones up, and removes a stale template. Most
modifications are derived from https://console.spec.whatwg.org/
and the rest are derived from the MDN.

Change-Id: I26a099b15e53a4748afb61c7532bdbf64d7c4d6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151091
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-06-30 23:32:27 +00:00
Devon Carew fc1999de15 [dartdev] Implement --enable-experiments for dart run and dart pub run.
Related to https://github.com/dart-lang/sdk/issues/42339.

Change-Id: I3fdeee33dcad0ca031f483e2e3692be300392958
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152960
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-06-30 23:22:42 +00:00
Alexander Markov e2e1820c33 Bump ABI version
Fixes https://github.com/dart-lang/sdk/issues/42516

Change-Id: Id6bd07ad1d8ea2e151b0d908edfc98f24dc3a791
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153001
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-06-30 18:33:54 +00:00
Daco Harkes 585fa217a1 [benchmarks/ffi] Migrate benchmarks to NNBD
Change-Id: I36568f4f4d59c0a337aab82b6ca15d40495cb269
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152850
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2020-06-30 14:44:27 +00:00
Clement Skau 34dbe66e7d [SDK] Clean up tools/utils.py. Style; Py2/3 compatible;
- Imports __future__.print_function to make printing consistent and
  robust across Python versions.
- Removes do-nothing os.path.join()s.
- Replaces all " with ' for consistency.
- Further gathers all "consts" and helpers at the top.
- Replaces old-style modulo formatting operator with new-style .format().
- Removes redundant if-return-else-return patterns for readability.
- Parameterises several subprocess cwd instead of hardcoded values.
  This should make it easier to use with other paths (g3 builds).
- Adds decode()'ing to process output to convert bytes to strs.
  This stops json.dump crashing in Py3. As well as Golem crashing in gn.
- Style, formatting, etc., etc.

Change-Id: I2bd7136aa18b12c4b18d9260f1539f16630065a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152842
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2020-06-30 13:22:30 +00:00
Jonas Termansen 5001e461ea [benchmark] Test null safe options.
TBR=athom@google.com

Change-Id: Ic3ea7969ea486f646669e0cff6bb59385bc927c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151843
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-06-30 10:31:26 +00:00
Clement Skau 46bd867651 [SDK] Clean up tools/utils.py. Order consts, helpers.
This refactoring is being done to make it easier to integrate
this code into internal builds.

It has the added benefit of cleaning up some really wonderful code.

Change-Id: I30f22785cc1f3dec00e01fb809115344284375c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152840
Auto-Submit: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2020-06-29 15:05:23 +00:00
William Hesse eb1bc0c6be Revert "[build] Use Goma from depot_tools instead of $HOME/goma"
This reverts commit 7fc61e77e2.

Reason for revert: An internal build is now trying to use goma
  when it shouldn't, and failing. There is no easy way to override
  this setting in build.py, and there should be.

Original change's description:
> [build] Use Goma from depot_tools instead of $HOME/goma
> 
> Goma will only be distributed with depot_tools in the future.
> 
> Change-Id: Ia7a7faf76f2562bde97d4f88cfe5db02ba76b561
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152652
> Reviewed-by: Alexander Thomas <athom@google.com>
> Commit-Queue: Alexander Thomas <athom@google.com>

TBR=karlklose@google.com,athom@google.com,whesse@google.com

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

Change-Id: I754e4a9d93090e014a995e86c46422989cf536d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152800
Reviewed-by: William Hesse <whesse@google.com>
2020-06-29 08:02:57 +00:00
William Hesse 7fc61e77e2 [build] Use Goma from depot_tools instead of $HOME/goma
Goma will only be distributed with depot_tools in the future.

Change-Id: Ia7a7faf76f2562bde97d4f88cfe5db02ba76b561
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152652
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2020-06-26 21:34:58 +00:00
Jacob MacDonald 25d8ae53c1 add fixnum deps patch for flutter hhh bots
Change-Id: Ib028d99923c52d06a7b43f223d3abfe469820b20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152611
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2020-06-26 19:16:10 +00:00
asiva bb8d145616 Revert "[SDK] Adds an SDK hash to kernels and the VM."
This reverts commit edde575dcd.

Reason for revert: Breaks the Dart to Flutter roll and golem

Original change's description:
> [SDK] Adds an SDK hash to kernels and the VM.
>
> 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.
>
> Bug: https://github.com/dart-lang/sdk/issues/41802
> Change-Id: I3cbb2d481239ee64dafdaa0e4aac36c80281931b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150343
> Commit-Queue: Clement Skau <cskau@google.com>
> Reviewed-by: Jens Johansen <jensj@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

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

Change-Id: I34cc7d378e2babdaaca4d932d19c19d0f35422fc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/41802
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152703
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-06-26 18:54:17 +00:00
Clement Skau edde575dcd [SDK] Adds an SDK hash to kernels and the VM.
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.

Bug: https://github.com/dart-lang/sdk/issues/41802
Change-Id: I3cbb2d481239ee64dafdaa0e4aac36c80281931b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150343
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-06-26 13:35:42 +00:00
Karl Klose 99144ed84d [infra] Remove support for approvals from compare_results
Change-Id: I41d80e8d21da0e272c0410f6f1d1e943bf4ae2d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152640
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2020-06-26 11:26:55 +00:00
Karl Klose 718df630ea [infra] Support posting results to staging in post_results_to_pubsub
This adds the option '-s' to select posting the results to the
staging system instead of the production system.

Change-Id: I990a39c7db3d0379935b69007ebc9477da5cc051
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151528
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2020-06-26 06:28:55 +00:00
Alexander Thomas 0a77a1f63e [infra] Add VM/fuchsia builder to the test matrix
Change-Id: I9afdd14957b660ad5366f7fb58e5f341f21effee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152145
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-06-25 07:20:48 +00:00
Alexander Aprelev d33e51df3c [build] Support --clang when building dart sdk on Windows.
It relies on flutter copy of clang distribution, same one that is used to build flutter/engine.

It addressed several deprecated warnings from clang compiler for functions like strdup, unlink, etc.

It allows few warnings still since they are triggered in third_party sources.

Change-Id: Ieb13792c011438d46dbbc0fa030e1b5e4ea14315
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142704
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-06-25 03:36:41 +00:00
Jens Johansen 4291a81a02 Add 'alternative-invalidation-strategy' as an experiment
To be used to enable the alternative invalidation strategy for
incremental compilation.

Change-Id: Ie4b140825d90f98aed8209eb3a5da8f2fa4dc192
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150341
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-06-24 07:18:41 +00:00
Srujan Gaddam b5470ae013 [dart:html] Modify scripts to always use NNBD
Since the sdk has been unforked, scripts should be updated to
generate files by always using NNBD. As such, nnbd_src has been
moved to src and the old src has been deleted. This does not address
the nnbd tokens e.g. $NULLABLE. That will be done in a future CL.

Change-Id: I00bead16a9d19569b07ad0601f581fc14400fdce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151864
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-06-23 23:17:35 +00:00
Robert Nystrom 4993179a62 Correctly run legacy tests.
Feels a little weird to be improving a script that will hopefully be
gone in less than a week, but the current behavior is definitely wrong.

Change-Id: I43e8606b82b95f071d359ab348261e85bc4cbe7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152220
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-06-23 23:06:05 +00:00
David Morgan 6bdf55f31f Revert "[vm, service, observatory] Bang Bang (My Type System Shot Me Down)."
This reverts commit 65e3c9d3b1.

Reason for revert: package:logging, package:stack_trace and package:usage need to be migrated first.

Original change's description:
> [vm, service, observatory] Bang Bang (My Type System Shot Me Down).
> 
> Port the service tests and Observatory to Dart 3.
> 
> Changes from the original landing:
> 
>  - The old tests are copied to observatory_2 / service_2 so the service can still be tested when running a legacy mode program
>  - The test harness is taught about 'service_2'
>  - Observatory's package is added to front end's opt-in list
>  - Fixed some places in the bot configuration matrix so ensure 'service' runs on legacy bots and 'service_2' on weak-mode bots
> 
> The ported tests themselves are not changed.
> 
> Change-Id: I1d7e5cc61cdc044e1985e851bea7fd8a18f7d810
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149720
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Ben Konyi <bkonyi@google.com>

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

Change-Id: I43b72f149d8d7e9fe06006cdd8593fed1726aa3a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152004
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-06-23 08:06:00 +00:00
Ryan Macnak 65e3c9d3b1 [vm, service, observatory] Bang Bang (My Type System Shot Me Down).
Port the service tests and Observatory to Dart 3.

Changes from the original landing:

 - The old tests are copied to observatory_2 / service_2 so the service can still be tested when running a legacy mode program
 - The test harness is taught about 'service_2'
 - Observatory's package is added to front end's opt-in list
 - Fixed some places in the bot configuration matrix so ensure 'service' runs on legacy bots and 'service_2' on weak-mode bots

The ported tests themselves are not changed.

Change-Id: I1d7e5cc61cdc044e1985e851bea7fd8a18f7d810
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149720
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-06-23 02:12:46 +00:00
Joshua Litt 77db092507 [dart2js] Stop running dart2js_2 suite when running unittests.
Change-Id: Icb16045bade65712dc2a8e18e960696077582f8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152040
Auto-Submit: Joshua Litt <joshualitt@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-06-22 21:28:31 +00:00
Karl Klose dbefbc3753 [infra] Empty SDK commit to validate recipe changes
TBR=athom@google.com

Change-Id: I119d97af610b2ca28517717fb1fb29760ab41c49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151845
Reviewed-by: Karl Klose <karlklose@google.com>
2020-06-22 04:54:21 +00:00
Liam Appelbe 4f1294e495 Fix bug in utils.py, causing SDK bots to fail
https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8877199214187649920/+/steps/upload_sdk/0/stdout

Change-Id: I08d70c64d8ea17645c5071f58aeafd0d81073137
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151780
Auto-Submit: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-06-18 18:21:36 +00:00
Liam Appelbe 764e72800f Reland "Revert "Add an --os=fuchsia option to build.py:""
This reverts commit d39d4d0d55.

Reason for revert: Relanding with fix

Change-Id: I6d6911b6cdc578a3b576b237db94c7f1db9824b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151600
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-06-18 00:24:31 +00:00
Jonas Termansen 4a7e14a025 [benchmark] Add .dart_tool/package_config.json to builds.
Change-Id: I8043c207a95492f00442750e4cb31700495b799d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151513
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-17 19:35:23 +00:00
Joshua Litt d14ab0779a [dartdevc] Migrate tests/compiler/dartdevc_native to tests/dartdevc_2.
Change-Id: I9c486f29f3bcf8a6ecf481eb25ea61d0468049b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150667
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-06-17 18:14:00 +00:00
Martin Kustermann 168539d61d Reland "[vm] Build dart2native dependencies with the normal "create_sdk" target"
The flutter engine DEPS got new icu/boringssl so this CL can safely
land and roll into engine. A small change is made in Patchset 1..3.

This removes special logic for creating the `dart-sdk` we distribute
which used to build release and product mode and copied some binaries
from the latter into the former, before the SDK was actuallly ready to
test and distribute.

This changes the GN build rules to build the necessary
gen_snapshot/dart_precompiled_runtime product binaries during the normal
release build.

Normally during --mode=product builds the global build config in
//build/config/BUILDCONFIG.gn will set `-fvisibility=false`.

=> Doing so results in much smaller binaries - because only explicitly
   exported symbols are visible, the rest can be tree shaken by the linker.

Since we are building --mode=release, the `-fvisibility=false` will not
be set. In order to set the flag for the 2 special product-mode binaries
we need to add -fvisibility=hidden manually, in:

  * dart_product_config: Which is used for compiling VM sources.
  * 3rd party double-conversion library
  * 3rd party boringssl library
  * 3rd party icu library

The upstream CLs are:

  * BoringSSL: https://dart-review.googlesource.com/c/boringssl_gen/+/150482
  * ICU: https://chromium-review.googlesource.com/c/chromium/deps/icu/+/2236407

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

Change-Id: I8d9b37acbb5eb94e44d97652f838948a946fd372
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151505
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-17 16:12:26 +00:00
Alexander Thomas 1046888b1b [build] Also default to use a sysroot when the HOST_OS is linux
Previously, gn.py would not enable the sysroot when building for android
on Linux. However, the build also uses the host toolchain to create
tools and these need to be built with the sysroot. Otherwise, the new
goma backend refuses to run the build actions.

b/144018396

Change-Id: Ifda03ac82ce7d4cc8289198924a8316ab6751f45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151389
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2020-06-17 06:53:40 +00:00
Leaf Petersen d44457f79d [Core Libraries] Eliminate the fork in the core libraries.
Move the nnbd core libraries from sdk_nnbd to sdk, and updates
references in build files and elsewhere accordingly.

Change-Id: I09760fe1e006657aacdfe80f3b22fdf6f7e30a9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151121
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-06-16 23:37:36 +00:00
Martin Kustermann 21222b64c4 Revert "[vm] Build dart2native dependencies with the normal "create_sdk" target"
This reverts commit a88a328b7f.

Reason for revert: Auto roller hasn't rolled previous changes from
Dart yet. Those changes updated DEPS for icu/boringssl. We have to
wait with this CL until the DEPS changes have been done in the engine.

Original change's description:
> [vm] Build dart2native dependencies with the normal "create_sdk" target
> 
> This removes special logic for creating the `dart-sdk` we distribute
> which used to build release and product mode and copied some binaries
> from the latter into the former, before the SDK was actuallly ready to
> test and distribute.
> 
> This changes the GN build rules to build the necessary
> gen_snapshot/dart_precompiled_runtime product binaries during the normal
> release build.
> 
> Normally during --mode=product builds the global build config in
> //build/config/BUILDCONFIG.gn will set `-fvisibility=false`.
> 
> => Doing so results in much smaller binaries - because only explicitly
>    exported symbols are visible, the rest can be tree shaken by the linker.
> 
> Since we are building --mode=release, the `-fvisibility=false` will not
> be set. In order to set the flag for the 2 special product-mode binaries
> we need to add -fvisibility=hidden manually, in:
> 
>   * dart_product_config: Which is used for compiling VM sources.
>   * 3rd party double-conversion library
>   * 3rd party boringssl library
>   * 3rd party icu library
> 
> The upstream CLs are:
> 
>   * BoringSSL: https://dart-review.googlesource.com/c/boringssl_gen/+/150482
>   * ICU: https://chromium-review.googlesource.com/c/chromium/deps/icu/+/2236407
> 
> Issue https://github.com/dart-lang/sdk/issues/42230
> 
> Change-Id: I3e47664d9fadb9ed1ad033bb17d46e769442f741
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150524
> Commit-Queue: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>
> Reviewed-by: Zach Anderson <zra@google.com>

TBR=kustermann@google.com,zra@google.com,athom@google.com,asiva@google.com

Change-Id: Ied0f2f5b58dceb2b59bc2ac6e11e5fd717c8885e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151382
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-06-16 10:41:27 +00:00
Joshua Litt 09ea885dcd [testing] Rename dart2js filesets more generically.
Change-Id: I00b2cea7bad20837940334dadf1862b1511fd698
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151342
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-06-16 01:20:26 +00:00
George Wright d39d4d0d55 Revert "Add an --os=fuchsia option to build.py:"
This reverts commit 4ce18ab931.

Reason for revert: bad merge, caused build breakages in flutter/engine

Original change's description:
> Add an --os=fuchsia option to build.py:
> 
> tools/build.py --os=fuchsia runtime create_sdk
> 
> This is analogous to --os=android. It cross compiles from Linux x64 to
> Fuchsia.
> 
> A lot of the build rules are just slightly different between the existing
> Fuchsia build rules used by Flutter, and the ones added by GN SDK. For
> example "$fuchsia_sdk_root/pkg:fdio" is now "$fuchsia_sdk_root/pkg/fdio".
> So to support this I had to add a new variable, using_fuchsia_gn_sdk,
> analogous to using_fuchsia_sdk. Flutter will need to set this to false.
> 
> Change-Id: Ief275d65f30a42a801607de93cf2d27a1fe825dd
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150689
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Liam Appelbe <liama@google.com>

TBR=rmacnak@google.com,asiva@google.com,liama@google.com,kaushikiska@google.com,matthewcarroll@google.com

Change-Id: If01ee34eba906c55f2d56ba650748a86e81e701c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151321
Auto-Submit: George Wright <wrightgeorge@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2020-06-15 23:01:53 +00:00
Alexander Markov badc77239a [vm/aot] Avoid unbinding canonical names in AOT transformations
AOT transformations (mixin deduplication and TFA tree shaker) were
using CanonicalName.unbind() in order to make sure that kernel
writer will not be able to write dangling references to the deleted
classes or members (to detect such dangling references earlier).

This conflicts with lazy reading from a kernel file if --from-dill
option is used: lazy reader may read a reference to such class after
unbind() and it creates a new Reference object for such canonical name.
This causes crash later when the fresh Reference is used as it doesn't
have Class node filled in.

The solution is to avoid calling CanonicalName.unbind().
Instead, it is enough to nullify node.reference.canonicalName, which
won't break CanonicalName.reference used by lazy reader.

This crash can be reproduced on tests/language_2/vm/regress_flutter_55345_test.dart
if it is compiled in AOT mode using 2-step kernel generation.

Bug: b/158853113
Change-Id: Ib2004dbbbda85d9f56adc56b48882f4ef08869a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151120
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-06-15 22:00:42 +00:00
Liam Appelbe 4ce18ab931 Add an --os=fuchsia option to build.py:
tools/build.py --os=fuchsia runtime create_sdk

This is analogous to --os=android. It cross compiles from Linux x64 to
Fuchsia.

A lot of the build rules are just slightly different between the existing
Fuchsia build rules used by Flutter, and the ones added by GN SDK. For
example "$fuchsia_sdk_root/pkg:fdio" is now "$fuchsia_sdk_root/pkg/fdio".
So to support this I had to add a new variable, using_fuchsia_gn_sdk,
analogous to using_fuchsia_sdk. Flutter will need to set this to false.

Change-Id: Ief275d65f30a42a801607de93cf2d27a1fe825dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150689
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-06-15 20:05:16 +00:00
Martin Kustermann a88a328b7f [vm] Build dart2native dependencies with the normal "create_sdk" target
This removes special logic for creating the `dart-sdk` we distribute
which used to build release and product mode and copied some binaries
from the latter into the former, before the SDK was actuallly ready to
test and distribute.

This changes the GN build rules to build the necessary
gen_snapshot/dart_precompiled_runtime product binaries during the normal
release build.

Normally during --mode=product builds the global build config in
//build/config/BUILDCONFIG.gn will set `-fvisibility=false`.

=> Doing so results in much smaller binaries - because only explicitly
   exported symbols are visible, the rest can be tree shaken by the linker.

Since we are building --mode=release, the `-fvisibility=false` will not
be set. In order to set the flag for the 2 special product-mode binaries
we need to add -fvisibility=hidden manually, in:

  * dart_product_config: Which is used for compiling VM sources.
  * 3rd party double-conversion library
  * 3rd party boringssl library
  * 3rd party icu library

The upstream CLs are:

  * BoringSSL: https://dart-review.googlesource.com/c/boringssl_gen/+/150482
  * ICU: https://chromium-review.googlesource.com/c/chromium/deps/icu/+/2236407

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

Change-Id: I3e47664d9fadb9ed1ad033bb17d46e769442f741
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150524
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2020-06-15 15:17:35 +00:00
sgrekhov 68e17083b9 [co19] Enable Subtyping tests
* Skip tests that use type aliases on analyzer configurations.
* Shard co19 test more on VM AOT builder (to avoid shard timeouts).

Change-Id: I5834091e91f229242329ee9e7456ca822d18c0b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151223
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-15 15:14:41 +00:00
William Hesse fa68d27ef7 [infra] Add explanation to ABI test logs
Change-Id: I96ba3fe6bfd294a6b9864973e5e2e9dea20417ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150981
Reviewed-by: Karl Klose <karlklose@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2020-06-12 15:58:25 +00:00
Daco Harkes 6544c69e23 [vm/ffi] Convert Objects to Dart_Handles in FFI calls
This includes support for calling Dart_PropagateError in native code
when doing FFI calls, and catching uncaught exceptions with Dart_IsError
when doing FFI callbacks.

The support for Dart_PropagateError adds a catch entry to the FFI
trampoline, which prevents inlining these trampolines in AOT. This
regresses the FfiCall benchmarks by 1-2% in AOT.

In addition, Dart_PropagateError requires maintaining a bit whether we
entered native/VM code from generated code through FFI or not. That way
we can do the proper transition on the exception path. When entering
generated code, we store this bit on the stack, right after the entry
frame.

Design: http://go/dart-ffi-handles

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

Change-Id: Idfd7ff69132fb29cc730931a4113d914d4437396
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-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-nnbd-linux-debug-x64-try,analyzer-nnbd-linux-release-try,front-end-nnbd-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145591
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-06-12 11:14:22 +00:00
Alexander Thomas bf3166be17 [infra] Shard VM and CFE nnbd builders more
These builders were quite slow:

80min->30min for vm-kernel-nnbd-linux-debug-x64-try
50min->45min for front-end-nnbd-linux-release-x64-try
40min->18min for vm-kernel-nnbd-linux-release-x64-try

Change-Id: I3d772264d82a864a5d278ada2987eadb0cb45bc2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150983
Reviewed-by: William Hesse <whesse@google.com>
2020-06-12 10:34:12 +00:00
Srujan Gaddam a39a3cd141 [dart:html] Add rename/metadata for some attributes
Some fields that were changed to native getters/setters should include
renaming/metadata whenever possible to account for name differences.
While this is already the case with most fields, this CL adds it to
some places that missed it. Annotations for
AnimationEffectTiming.duration are changed to be accurate as well.

Change-Id: Idb8b94a9b916086d127753f868e97f1a1b9db53f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148464
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-06-12 00:52:46 +00:00
Srujan Gaddam 5af38092e3 [dart:html] Add track event to RTCPeerConnection
trackEvents and onTrack were not being generated by the event
generation and should be added to the allowlist.

Change-Id: I5bc6bcc17c56b26d7fc43e69e4867532ab1b80a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151043
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-06-12 00:42:36 +00:00
Aske Simon Christensen e35ca30ca5 Reland "[vm] MemoryCopy instruction for copying between typed data and strings."
This is a reland of 6ecd8a10ea

Original change's description:
> [vm] MemoryCopy instruction for copying between typed data and strings.
> 
> Used for copying the bytes from the Uint8List to the _OneByteString in
> String.fromCharCodes and the pure-ASCII case of UTF-8 decoding.
> 
> Issue https://github.com/dart-lang/sdk/issues/42072
> Closes https://github.com/dart-lang/sdk/issues/41703
> 
> Change-Id: I1ae300222877d1c6e64e32c2f40b8fb187a584c0
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149500
> Commit-Queue: Aske Simon Christensen <askesc@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

Change-Id: Ia231c521e5f2db168cfc6094dfc7322327dedc6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150925
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2020-06-11 12:29:19 +00:00
Alexander Thomas 6e82beea2e [infra] Remove remaining GSUtil.GSUTIL_IS_SHELL_SCRIPT reference
TBR=whesse@google.com

Change-Id: I09d8fd079acfd9aeca01d8af86394e2bb79beae8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150744
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-11 05:29:33 +00:00
Alexander Thomas 1e5b0182ca [infra] Remove obsolete buildbot paths/terms
https://github.com/dart-lang/sdk/issues/42247

Change-Id: Ia0b19677c655bc768f00be77df8b0162ac9e7bea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150629
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-06-10 20:59:46 +00:00
Alexander Thomas 64a6cc6ee0 [infra] Remove some unused files
The information in these files is now in the test_matrix.json instead.

Change-Id: I5ab3d038155c3201f564822bd4b6f23fdeb45307
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150741
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-06-10 15:26:47 +00:00
Jonas Termansen f40875bf1b [benchmark] Test dart2 implementations in try_benchmarks
Change-Id: Ic2d893f5a58a2c758f317084bb1b1fabed2ae857
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150621
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-10 09:36:53 +00:00
Joshua Litt f9f1ca6171 [dart2js] Create tests/dart2js for nnbd.
Change-Id: Ib8721cf976803d8d1b9d723b7e691e344c768b67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149881
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-06-09 16:53:15 +00:00
Liam Appelbe 4d29f507f7 [vm] Bump the ABI version
Change-Id: Ifcacc4921e67373ec8221c8fcb39c5b5764dc0ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150502
Commit-Queue: Liam Appelbe <liama@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Auto-Submit: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-06-08 20:49:25 +00:00
Alexander Thomas dd2de24516 [infra] Shard the VM AOT NNBD builder more to prevent timeouts
It was close to the 3 hour timeout and sometimes exceeded it.

Change-Id: I01cca72f64bc88ec6aeb921358a46ce209c1598b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150105
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2020-06-08 12:26:23 +00:00
Martin Kustermann d7e2f9ba3b [infra] Remove wheezy left overs from SDK
Also removes some dart editor related code which is unused nowadays.

Related https://dart-review.googlesource.com/c/sdk/+/150104

Change-Id: I97f91a35e82af09ac715a4eb93a945f335a71d5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150106
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-06-04 18:32:29 +00:00
Joshua Litt 451694e855 [dart2js] Move dart2js_native to dart2js/native.
Change-Id: I2f879fe18376b8c1b82fc201d488425dc154d2b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149341
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-06-04 18:11:49 +00:00
Robert Nystrom 9eef0a1ea9 Print a count of how many language subdirectories have been migrated.
Change-Id: Id38ff08fd069db6f636a098d0d2d0351c10a8115
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149788
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-06-03 22:56:40 +00:00
Alexander Markov 1d14868685 [vm/nnbd] Finish migration of vm/cc tests to NNBD
Also, vm/cc tests are enabled on NNBD bots.

Issue: https://github.com/dart-lang/sdk/issues/41314
Change-Id: Iddfa68de3de041436a009dd3426431211471b4dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149780
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-06-03 18:09:39 +00:00
Robert Nystrom 97954adac0 Add an option to the migration test runner to compare legacy results.
Change-Id: I006e917011e174ee1db418a974fab8224f615e94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149683
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-06-03 17:27:00 +00:00
Joshua Litt 05ca544f15 [dart2js] Move tests/compiler/dart2js_extra to tests/dart2js_2.
Change-Id: Iaa0ca2b4f2d1b15f79ddca37834d3ed2497bc068
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149242
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-06-03 15:15:30 +00:00
Alexander Markov f9eb40cc79 [vm/nnbd] Migate runtime/tests/vm/dart/* tests to NNBD
This change actually migrates vm/dart/* tests to NNBD by fixing
compile-time errors and adjusting tests where needed.

vm/dart/null_float32x4_simd_ops_test and vm/dart/null_float64x2_simd_ops_test
are deleted as they are superseded by static type checks.

vm/dart/regress_40462_test.dart is a huge source code auto-generated
by fuzzer and migrating and maintaining this source doesn't have much
value, so it is deleted.

There are still failures in strong mode due to dependencies on
the packages which are not migrated yet (https://github.com/dart-lang/sdk/issues/42146).

Migrated vm/dart/null_checks_with_dwarf_stack_traces_test fails both in
weak and strong mode due to https://github.com/dart-lang/sdk/issues/42149.

Issue: https://github.com/dart-lang/sdk/issues/41314
Change-Id: I5561f1c8705ec16def0c4e0efa495d15f4ea7259
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149493
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-06-02 22:49:09 +00:00
Michael Thomsen 91e4856905 Move extension methods experiment to shipped list
Closes https://github.com/dart-lang/sdk/pull/42157
https://github.com/dart-lang/sdk/pull/42157

GitOrigin-RevId: 8280428d9fb4d4c436cd5fcf87c89137d3966551
Change-Id: I99b1747d6cc43e858b6e1b9f6a05178fb823d53f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149686
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2020-06-02 12:43:21 +00:00
Alexander Aprelev d315f906de Revert "[vm, service, observatory] Bang Bang (My Type System Shot Me Down)."
This reverts commit d806959461.

Reason for revert: multiple failures on service and other tests on various buildbots

Original change's description:
> [vm, service, observatory] Bang Bang (My Type System Shot Me Down).
> 
> Port the service tests and Observatory to Dart 3.
> 
> Change-Id: Ia43b169a110e5209a9770aeda1b9a4007427f064
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143381
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Ben Konyi <bkonyi@google.com>

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

Change-Id: Id22f40dafa8c0fc3fb8c3052321629a48cb7dbc3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149684
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2020-06-02 03:03:57 +00:00
Ryan Macnak d806959461 [vm, service, observatory] Bang Bang (My Type System Shot Me Down).
Port the service tests and Observatory to Dart 3.

Change-Id: Ia43b169a110e5209a9770aeda1b9a4007427f064
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143381
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-06-02 01:20:08 +00:00
Alexander Markov dd6dc29c21 [vm/nnbd] Prepare to migrate runtime/tests/vm/dart to NNBD
This change mechanically copies

  runtime/tests/vm/dart -> runtime/tests/vm/dart_2

in preparation for the migration of runtime/tests/vm/dart to NNBD.

Corresponding statuses in vm.status are duplicated.

Added vm_nnbd builder tag for NNBD bots.
vm/dart/* tests are allowed to run only on vm_nnbd builders.
vm/dart_2/* tests are allowed to run only on non-vm_nnbd builders.

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

Change-Id: I079da92da17960605f37c1c0e28e48362b236739
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149485
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-06-01 17:57:27 +00:00
Srujan Gaddam ad53668be0 Force copy_dart.py to use python2.7
Default `python` installation has been switched to python3.7 on
Mac. copy_dart.py has not been migrated and therefore should
stay as 2.7.

Change-Id: I33991e01850e65f33987a278545babb1f905a94d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149523
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Auto-Submit: Srujan Gaddam <srujzs@google.com>
2020-05-29 22:57:27 +00:00
Janice Collins 83277a4f37 Enable the non-nullable experiment for dartdoc.
For Dartdoc 0.32.1 this will only impact generated docs for the 'dev'
branch -- 'edge', 'be' and other builds will still generate legacy
documentation.  This may change with future versions as the SDK
allow-list feature gets pipelined through the analyzer to dartdoc.

Depends on https://dart-review.googlesource.com/c/sdk/+/149363
(will result in undefined behavior if applied to 0.32.0 or earlier).

Change-Id: Idf7d37f5b06deec1c4e02708d24029f47a869df2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149344
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-05-29 12:55:05 +00:00
Alexander Thomas 42c3d21756 [infra] Run all migrated co19 tests on nnbd configurations
co19 test migration has started, and these tests will be unskipped
folder by folder now.

Change-Id: I7dad1a97d1a676042512a8a19e1403849e039f97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149002
Reviewed-by: William Hesse <whesse@google.com>
2020-05-29 11:35:04 +00:00
Robert Nystrom cbfb0bb92a Run DDC tests in the right mode with the migration test script.
Change-Id: I3af1a56d439acc3cfcb3c62fc27d9806da13ffc8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149342
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-05-28 21:49:45 +00:00
Joshua Litt 20faaa5d94 [dart2js] Move dart2js unit tests to pkg/compiler/test.
Change-Id: Ib18f554c1076f27a3f7c0df5a36410da41a1f467
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148784
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-05-28 18:51:11 +00:00
Alexander Thomas 04243fcd05 [infra] Bump chrome to 81.0.4044.138
Change-Id: I3a1a4bc97f077871d28e5c7d39a5a8f9e784de6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148533
Reviewed-by: Karl Klose <karlklose@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2020-05-21 05:49:40 +00:00
Srujan Gaddam c10b8dc5b2 [dart:html] Use JS name for promise call
Generated code uses the html_name, which could be a Dart rename,
in the JS call instead of the JS name associated with it.

Change-Id: I7362abf0e089705be5e532b5281f326305c96246
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148180
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-05-19 19:47:38 +00:00
Robert Nystrom e417987305 Ignore hints when comparing analyzer errors in the migration script.
Change-Id: Ia4967f5a08c863bc1177b2854f46e21a568e9aec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148284
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-05-18 09:47:56 +00:00
Clement Skau f599b7951f [SDK] Clean up compile_flutter.sh a bit for readability and robustness.
Change-Id: If45661582f108c64dbf08b7f9e755ad6bff10344
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147910
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-05-18 09:25:34 +00:00
Srujan Gaddam 34bf6742d4 [dart:html] Make browser-incompatible attributes nullable
Bug: https://github.com/dart-lang/sdk/issues/41905

Addresses browser incompatibilities for attributes that are
blocking dart2js tests.

Change-Id: I2c7af57e236ba6122cce4c0e98efc04d5e11b525
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148320
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-05-16 03:47:12 +00:00
Srujan Gaddam aa018d90f3 [dart:html] Add back static attributes to getters/setters
Closes https://github.com/dart-lang/sdk/issues/41911

Fields were translated to native getters/setters, but static attributes
did not maintain their static modifier. This fixes that.

Change-Id: I52b75ecbf40c4f39d301c6aaedd2492ce7deae5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148239
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-05-16 01:00:32 +00:00
Ryan Macnak ffd6f54473 [infra] Define a GCC builder configuration.
Change-Id: I5218e5f0858279589ac3b3b71fb27daccb3095c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146697
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-05-16 00:26:32 +00:00
William Hesse 2fd798ed5c Change flutter builder to build flutter libraries in weak mode
The flutter libraries are not yet null-safe, and the --null-agnostic
flag gives the error:
flutter/lib/ui/ui.dart:12:1: Error: A library can't opt out of non-nullable by default, when in nnbd-strong mode.

Change-Id: I3cc64205a1c7ae2e77a0ff2ae88f9187d1880926
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148125
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-05-15 07:13:50 +00:00
Mayank Patke 9b63a072f2 [dart2js] Change --(no-)null-safety to --(no-)sound-null-safety.
Change-Id: I18d9cb237ba1bafda1a0f3cdc64fe43c22889311
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148222
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-05-15 06:03:25 +00:00
Mayank Patke e16b45c550 [dart2js] Add --nnbd-strong SDK.
Change-Id: I31bfdfd3f2cfe04a940bc9374d88da53dbfc0090
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148150
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-05-15 00:37:45 +00:00
Karl Klose 22f09f16b4 [infra] Remove unused builder configurations for analyzer-stable branch
Change-Id: Ic6a5ea5071512901b923ebe4781cec6d62832971
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148060
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2020-05-14 08:54:11 +00:00
Robert Nystrom 29c00e28f3 Don't look for the forked SDK in the migration script.
Now that we're unforked, this is no longer needed.

Change-Id: I7016d34e11138ff21bcdb4af2795f7d4faa3e0fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147817
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-05-13 17:28:32 +00:00
Jonas Termansen 8b5224733a [benchmark] Add sdk_nnbd directory to benchmark builds.
Change-Id: I0dfcc0d7c8f51945ad7c64baaa8c0c2129b1e561
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147908
Reviewed-by: Alexander Thomas <athom@google.com>
2020-05-13 16:53:42 +00:00
Jens Johansen 658feaca7c Fix flutter-frontend bot by updating script to NNBD
Change-Id: I733674466f0dfd91ae96d0246a804a7d06335824
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147904
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-05-13 14:12:41 +00:00
Srujan Gaddam d1a100012c [dart:html] Label Navigator.deviceMemory as nullable
Navigator.deviceMemory is not supported on some browsers and
therefore the native call returns null on undefined.

Change-Id: I529ae29cf8c875d8c62146e7f59c173c3c3523ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147810
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-05-13 00:21:47 +00:00
Nicholas Shahan 429c2f1bc6 [ddc] Run co19 nnbd tests in weak mode
Adjusted the shard count for the "_2" suites running in weak mode
from 6 to 5. Gave the co19 tests 2 shards since there are far fewer
tests in that suite right now.

Compared to another from earlier today the total execution time
appears to be roughly the same except for the deflaking of the
new and failing tests.

Change-Id: I71122af8ba84138e8044a57550302f3b37b6671b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147821
Reviewed-by: Riley Porter <rileyporter@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-05-12 23:08:09 +00:00
Alexander Markov 2b57c77c0a Bump ABI version after a breaking change
ABI version is increased to make vm-dartkb-linux-release-x64-abi bot
happy after https://dart-review.googlesource.com/c/sdk/+/146784.

Change-Id: I815633ca41c77fa288dc9428310cb4feaa322659
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147805
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-05-12 19:06:11 +00:00
Kevin Moore 3aa7484f6a Remove references to removed tools/gardening
Follow-up to 84ca34bf8b

Change-Id: I87d2bf0a77dc70f15a378a149dc95be6f33ee3c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147803
Commit-Queue: Kevin Moore <kevmoo@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Karl Klose <karlklose@google.com>
2020-05-12 18:42:30 +00:00
Srujan Gaddam 0afd7a6907 [dart:html] Unsuppress MediaDevices.getUserMedia
Bug: https://github.com/dart-lang/sdk/issues/35253

This API was suppressed initially due to issues with conversions
between promises and futures. Now that that has been resolved, this
should be unsuppressed. Tests have been refactored to use both
navigator.getUserMedia and navigator.mediaDevices.getUserMedia.

Change-Id: Ia131b303192c7eaa3f08475cf700a53665ab3584
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147640
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-05-12 16:59:49 +00:00
Karl Klose 84ca34bf8b [infra/tools] Delete scripts in tools/gardening
These scripts were written for dealing with status files and failure
logs in the old testing workflow and seem no longer useful.

Change-Id: Ic01291bdb34a14c12c32b977532eea520782314d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147543
Auto-Submit: Karl Klose <karlklose@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-05-12 10:01:49 +00:00
Johnni Winther dc0fcc7472 [tool] Update tool/generate_package_config to work on Windows
Change-Id: I39f69162857f1477df117e0c25601846ddd0a507
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147480
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-05-12 09:24:19 +00:00
Ryan Macnak cb46dbb237 [infra] Recognize the exit code for UBSAN failures.
This seems to only affect the bots and not local runs of test.py.

Bug: https://github.com/dart-lang/sdk/issues/39427
Change-Id: I3d80fc662a29585416a61f454b21f977853c0e71
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147621
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2020-05-12 09:03:59 +00:00
Karl Klose 052c642151 [presubmit] Add presubmit check for valid test matrix
This change adds a rule to the SDK PRESUBMIT.py to validate that the
test matrix used by the CI/CQ builders does not contain errors.

Change-Id: Ie967e71dda76677f4db84c1e9e613d702b57069f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147547
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-05-12 05:48:22 +00:00
Ryan Macnak fcf56eafff [vm] Disable thread leak detection in TSAN build.
Bug: https://github.com/dart-lang/sdk/issues/41811
Change-Id: I576985c45969bbd379f3f55ab41aa79a8ce77b6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147328
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-05-08 16:30:24 +00:00
Sigmund Cherem 576dcc6450 [dart2js] add testing for prennbd sdk and cleanup nnbd enabled tests.
* repurposes the rti bot to test the prennbd sdk (temporary, while we allow using it).
* change to only run prennbd suites, like language_2, in the regular bots (which
use a weak-style semantics, but have non-nullable experiment disabled)
* change to run migrated suites, like language, are only in the nnbd bots under
both weak and strong semantics.

Change-Id: Ic52c0e3544944cd0ec7150e5381649ba8b157711
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147200
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2020-05-08 03:59:14 +00:00
Joshua Litt be0c78a7cc [dart2js] Fix platform-binaries on bots.
Change-Id: I2133f2432329d2d8b9e52896b74cbf619a047420
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147327
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2020-05-07 23:15:50 +00:00
asiva 03ce33f80c [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: I729630a7bd36ea7ae38134f9285b44e93c283c68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138902
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2020-05-07 21:12:47 +00:00
Ryan Macnak 2707880f1b [vm] Fix various UBSan failures.
Bug: https://github.com/dart-lang/sdk/issues/39427
Change-Id: I74e0eee623d88005fb2893d03e284a87daa09260
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146696
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-05-07 19:40:18 +00:00
Clement Skau 560331d985 [SDK] Adds documentation about updating ABI_VERSION
Change-Id: I1b9e9cc03c08112517491c441de28bc77d1cce4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146761
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2020-05-07 12:33:37 +00:00
Alexander Thomas 968c25cc8d [release] Allow promotion from one channel to another
The Travis `beta` channel can break when a new stable release is
published and packages use that release as minimum SDK constraint.
Therefore, we want to publish stable releases to beta if the current
beta is less than the current stable release. This change adds a
`--source-channel` option to promote.py that allows publishing a release
across channels.

Example (will promote the `2.8.1` stable release to beta):
```
$ python promote.py promote \
  --dry --channel=beta --source-channel=stable --version=2.8.1
```

Change-Id: Ieac4c33dfe17d4b38060e10ff3aff44494aae40a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146787
Reviewed-by: William Hesse <whesse@google.com>
2020-05-06 11:55:39 +00:00
Srujan Gaddam efdb1c5cd6 [dart:html] Use 'null' when html is null
createContextualFragment accepts a non-nullable string, so if html
is null, it's called with 'null'.

Change-Id: If11a4c397c939017f501707130385d967ee05910
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146691
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-05-06 02:18:12 +00:00