Commit graph

30 commits

Author SHA1 Message Date
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
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
asiva 5fc031ebc1 [VM/Libraries] Turn on NNBD versions of dart:io and dart:_http libraries
- Turn on NNBD versions of dart:io and dart:_http libraries
- Fix an unimplemented section in Class::InvokeSetter

Change-Id: I3f256526e05299d234cc566c3f05de954deef6ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135203
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2020-02-11 01:16:05 +00:00
Aske Simon Christensen 293c5bec50 Revert "[VM/Libraries] Turn on NNBD versions of dart:io and dart:_http libraries"
This reverts commit b158bf7bd5.

Reason for revert: Changes to Class::InvokeSetter trigger failure of
ASSERT(!other.IsDynamicType()); in Instance::RuntimeTypeIsSubtypeOf.

Original change's description:
> [VM/Libraries] Turn on NNBD versions of dart:io and dart:_http libraries
> 
> - Turn on NNBD versions of dart:io and dart:_http libraries
> - Fix an unimplemented section in Class::InvokeSetter
> 
> Change-Id: I5343a76e62c0bacaddd9b1859bef5119d80bc5ac
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134884
> Commit-Queue: Siva Annamalai <asiva@google.com>
> Reviewed-by: Régis Crelier <regis@google.com>

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

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

Change-Id: Id98204057ff49a28c1ad5e94f8afcdfcb8261e0f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134826
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2020-02-10 13:44:04 +00:00
asiva b158bf7bd5 [VM/Libraries] Turn on NNBD versions of dart:io and dart:_http libraries
- Turn on NNBD versions of dart:io and dart:_http libraries
- Fix an unimplemented section in Class::InvokeSetter

Change-Id: I5343a76e62c0bacaddd9b1859bef5119d80bc5ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134884
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2020-02-08 21:42:07 +00:00
Nicholas Shahan 35cd61819a Remove dart:mirrors library from dart2js and ddc SDKs
A followup change will delete the patches that are no longer needed once
these changes have been "mirrored" :P to the libraries files in the
flutter repos.

Change-Id: I7d255838b97922198248b29311facd4956001e25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134405
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-07 17:34:54 +00:00
asiva f29d9f4fb1 [VM/Libraries] Use the NNBD libraries when building the NNBD sdk.
Change-Id: I06507799f678eeb204fdc8719ef6d97b177cbfd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134112
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-02-07 00:00:07 +00:00
Sigmund Cherem 40a03f472a [dart2js] Make dart:_native_type_data null safe.
This mostly copies the changes from DDC to the dart2js implementation.

Change-Id: Ib56b607a6cea3df0e319e32cd4afa6b5b55b03d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134463
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-02-05 19:34:59 +00:00
Sigmund Cherem 20745941ad [ddc,dart2js] make dart:typed_data the same in dart2js and ddc and opt-in to null safety.
Change-Id: If325a2ea11afef1d784fd01830999d5a4c9d4daf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134049
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2020-02-05 19:29:10 +00:00
Vijay Menon 3bd63c92ec [nnbd] port web patch files for dart:isolate
Change-Id: Icf54d76d264c8e5754023c0cf51d5e28db22d52f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132201
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2020-01-17 23:21:26 +00:00
asiva 7bc25eca34 [VM/developer] Opt libraries dart:developer and dart:nativewrappers into NNBD
Change-Id: Ifb7696d53e03bf77c69b4df7d96691a31e2d01ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131900
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-01-16 17:56:57 +00:00
asiva 1564d596bb [VM/isolate] Migrate 'dart:isolate' and patch files for NNBD
Change-Id: I1e894815599d9b1dbb0551428eb7a679a23edd6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131483
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-01-15 18:09:04 +00:00
Daco Harkes 8ee8f882ea [vm/ffi] Migrate dart:ffi to nnbd
Everything in FFI is nonnullable, because C does not accept null values or return null values (nullptr == 0, not null).
The only thing that needed migration in the FFI api is operator == (dynamic other) --> operator == (Object other).

This CL does not migrate any tests as the VM cannot run any tests yet.

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

Change-Id: I5efc772b61228bd1bd4d95be1b7bcd969f0c9ac8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131380
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2020-01-15 09:47:44 +00:00
Vijay Menon 4a488b16b7 Reland "De-dup js_util between ddc and dart2js"
Fixes the original CL by restoring files temporarily needed by Flutter (until cleaned
up on Flutter side).

Change-Id: I2561339c797e1d5168646e59782ca0fcd10d79af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131582
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2020-01-15 02:08:04 +00:00
Ben Konyi 93c3c28d2b [ VM / dart:vmservice ] Migrate dart:vmservice to NNBD, cleanup outdated code
Change-Id: I84ef4cea95a20171d842ea0f0db668c1dbbe5dae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131480
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-01-15 01:00:34 +00:00
Ryan Macnak e0c366a3c8 [vm] Update dart:mirrors for Dart 3.
Also back-ports all non-type changes to the Dart 2 version for the sake of testing.

Bug: https://github.com/dart-lang/sdk/issues/40045
Change-Id: Idda6b6c5e8508efe4db79f27f41d0a2485b9f197
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131485
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-01-15 00:56:24 +00:00
asiva 7c54ab73ad [Dart/CLI] : Migrate dart:cli for NNBD.
Change-Id: Ic529d8a69e0073123d68d9b3a190b5cfea4a78ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131487
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-01-14 18:23:36 +00:00
Liam Appelbe 6592e8c6ec [vm, library] Migrate dart:wasm to NNBD
Tested by running the wasm tests with nnbd enabled.

Bug: https://github.com/dart-lang/sdk/issues/40043
Change-Id: I5cd6fb95713f513539a39443f8e7906e2936a27b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131421
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-01-14 17:55:55 +00:00
Vijay Menon 43ceb5c6a2 Revert "De-dup js_util between ddc and dart2js"
This reverts commit 2a7789de18.

I forgot to revert the deleted files - this is breaking flutter hhh.  Will reland properly tomorrow.

TBR=sigmund@google.com

Change-Id: I76ff774e34167b3a35315dbf4883b22dd1499837
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131560
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2020-01-14 04:36:54 +00:00
Ben Konyi 83fba7bd54 [ VM ] Move vmservice_io code from runtime/bin to dart:_internal/vm/bin
Change-Id: I3966366268ac88c0bc3b639fc76ae543cde5653c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131502
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-01-14 01:42:14 +00:00
Vijay Menon 2a7789de18 De-dup js_util between ddc and dart2js
Change-Id: I2fc3e676eda71bfb1dce4844fa9a3d16d301fcac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131262
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2020-01-14 00:11:43 +00:00
Vijay Menon 28c335d5a2 Move dart:js to patch format
This is prep for nnbd port to ensure APIs remain consistent across DDC and Dart2JS.

Change-Id: I8ec6c5b152eb87868038570f2275e82af3325fb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131000
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-01-12 01:13:53 +00:00
Nicholas Shahan 598fba0147 [dartdevc] Actually use the libraries from the NNBD fork of the SDK
This change fixes the issues causing build failures when using the
forked NNBD SDK sources and trying to build the dartdevc_kernel_sdk
target.

The end result is a dart_sdk.js file that is known to be incorrect
(missing uses of the legacy and nullable type wrapping) but serves
as a baseline for improvement. Some tests of the runtime directly
will correctly pass.

Following changes will turn on the type wrapping and we can start
diagnosing and fixing the issues that appear.

Fixes: #38665

Change-Id: Iddcf31ef2520fa54bf7d9ae6262c2264636b9b10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127780
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-12-13 17:11:19 +00:00
Nicholas Shahan eb862ca54d [dartdevc] Revert change to libraries.yaml to fix analyzer test bot
This is the simplest fix until we have the DDC build actually working to
make get the analyzer test bot for nnbd working again.

Change-Id: I1357d0ef1509293649f32a01cd83c85398923c1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127540
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-12-07 23:42:55 +00:00
Mark Zhou afdc8caca8 [dartdevc] Finishing migration of dart:_interceptors and dart:_runtime.
Change-Id: I511e0bc701dea8fbccb135802ef79b3f678a3e52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126088
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-12-06 22:24:34 +00:00
Sigmund Cherem d2c63991ae Improve NNBD testing support
The goal of this change is to make it possible to start iterating on nnbd tests
for DDC. This keeps the current philosophy of keeping NNBD and non-NNBD build
configurations separate, except that NNBD builds are allowed to consume library
sources from the non-nnbd sdk.

This change addresses the first set of errors that are encountered when trying
to build a fully NNBD configuration:
  * CFE has issues with type promotion, for that reason we remove
    `--enable-experiment=non-nullable` in vm build rules, and we use a smaller
    training data when creating the dartdevc app-jit snapshot.
  * We'd hit compile-time errors with nnbd libraries with inconsistent
  patchfiles. To avoid that, the libarries.json points to the non-nnbd SDK
  sources for most dart:* libraries.

Change-Id: Ie6226b3bd8a92b4a1632dd84a5db2f04238fd4f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125080
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2019-11-14 18:28:20 +00:00
Devon Carew 3e3406d20e [sdk] remove the dart:_chrome package
Change-Id: I5b62984fb7d4cd5dd9ed6f4a02ed91e08ed71e8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120005
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2019-10-06 23:50:09 +00:00
Devon Carew f2d1e145dc [sdk] remove some metadata references to dart:profiler
Change-Id: I4ef14aad2817ee2d4e51dc5bce8d6006634a3e9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120007
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2019-10-04 19:12:36 +00:00
asiva 7c1821c4aa [NNBD/VM] Restructure VM patch files for the NNBD dart sdk split
- Move all VM patch files from the lib directory to
sdk/lib/_internal/vm/lib
- Move all VM patch files from the bin directory to
sdk/lib/_internal/vm/bin
- Fixed paths for above patch files in libraries.yaml file.
- Created copies of these patch files in sdk_nnbd directory
- Cleaned up *.gni files by removing the unused dart patch files lists.

Change-Id: I3109d22f3b729a073a6b40175a0d29162a455830
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117685
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2019-09-19 03:57:30 +00:00
Paul Berry 004d49bd6b Make a fork of sdk/lib for use by NNBD.
Change-Id: I7f5892d66f9e7bd08ca064fb2df329794a56faf5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116527
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-10 19:20:12 +00:00