Commit graph

1519 commits

Author SHA1 Message Date
Nicholas Shahan f27ec2d48f [ddc] Delete dartdevc_test_kernel_local target
I'm curious to see if this breaks anything in any workflow. If it does
you can use dartdevc_test_local instead because they are identical.

Change-Id: I29dc9ad44628a7bc5b222e599da9a787fd64c082
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148600
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-05-19 20:20:00 +00:00
Jacob MacDonald 667e6f96ae add --verbose support to Kernel worker
Change-Id: Ibe4b21980c30b57629bf59520563c5952636127e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148145
Commit-Queue: Jake Macdonald <jakemac@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-05-15 15:18:52 +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
Nicholas Shahan fcb8ac8afe [ddc] Restore self hosted training for snapshot
Early in the null safety feature development compiling ddc with
itself to train the snapshot didn't work. Now it does.

Change-Id: I6b8f35900845a27730cf1bd55559e0d416b706e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148025
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-05-14 21:20:15 +00:00
Ben Konyi 1960d21144 [ VM / DartDev ] Updated build rules for DartDev and exposed create_platform_sdk build target
- DartDev will now be rebuilt when changes in DDS are made
- Building the `create_platform_sdk` target will build all non-web
components of the Dart SDK, allowing for shorter build times when not
developing web tooling.

Change-Id: I605df4893e93010ba0c0bab0593fb840f1859c07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147807
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-05-12 23:37:19 +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
Siva Annamalai 726d3c7725 Revert "[BUILD] - Initial CL to unfork the NNBD Dart SDK"
This reverts commit cab69e7706.

Reason for revert: It was a temporary submit

Original change's description:
> [BUILD] - Initial CL to unfork the NNBD Dart SDK
> NOTE: This is a trial submit and will be reverted immediately.
> 
> - 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: I7d25d9710818af5919c0bb83abe51153172f5886
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144880
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=asiva@google.com

Change-Id: Ib0f99fc1a42c9c7a8b21f8542f4a35dba9105d5c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144900
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-04-27 05:00:10 +00:00
asiva cab69e7706 [BUILD] - Initial CL to unfork the NNBD Dart SDK
NOTE: This is a trial submit and will be reverted immediately.

- 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: I7d25d9710818af5919c0bb83abe51153172f5886
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144880
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-04-27 04:59:26 +00:00
Ben Konyi 43c2d2c6d2 Reland "[ DartDev ] Generate dartdev.dart.snapshot for runtime builds and place it in the root of the build output directory"
This reverts commit 60823bdaf6.

Change-Id: I10a8421cb1fc5738bfb56d3c4e68d05bb3b4edd9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144680
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-04-24 19:59:48 +00:00
Ben Konyi 60823bdaf6 Revert "[ DartDev ] Generate dartdev.dart.snapshot for runtime builds and place it in the root of the build output directory"
This reverts commit 367ee916d6.

Reason for revert: Build failures

Original change's description:
> [ DartDev ] Generate dartdev.dart.snapshot for runtime builds and place it in the root of the build output directory
> 
> VM developers rarely run the create_sdk build as it's significantly
> slower than just building the VM. Since DartDev is coupled to the VM, we
> should build it to ensure that there's no snapshot errors due to old
> snapshots from previous create_sdk builds.
> 
> Change-Id: I7626e0f3c791f2a6e69830641d9abf043ec5138f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144465
> Reviewed-by: Jaime Wren <jwren@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

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

Change-Id: I36754f7830e637313a390218d16869a8528f75ff
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144622
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-04-23 17:28:20 +00:00
Ben Konyi 367ee916d6 [ DartDev ] Generate dartdev.dart.snapshot for runtime builds and place it in the root of the build output directory
VM developers rarely run the create_sdk build as it's significantly
slower than just building the VM. Since DartDev is coupled to the VM, we
should build it to ensure that there's no snapshot errors due to old
snapshots from previous create_sdk builds.

Change-Id: I7626e0f3c791f2a6e69830641d9abf043ec5138f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144465
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-04-23 16:47:09 +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
Johnni Winther 32f82b5852 [CFE] Add NNBD compilation mode into kernel component
Fixes https://github.com/dart-lang/sdk/issues/41311

Change-Id: I2f4345f8ca7a31da705fcae37a28a8b801feb5e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142149
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-04-06 14:00:01 +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
Stephen Adams 1a0df5bc66 [dart2js] Late-binding of 'const String.fromEnvironment'
Defer evaluating 'fromEnvironment' values while building
dart2js_platform.dill.

Future step is to make it work for the Flutter (See https://github.com/flutter/flutter/issues/53284)

Change-Id: Ieef8739364c47540766201332769876cba9f0a35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141467
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-03-31 16:57:40 +00:00
Nicholas Shahan 2db8f06052 [ddc] Cleanup test package workaround
Fixes many of the test failures on the unfork WIP change
https://dart-review.googlesource.com/c/sdk/+/138902.

These packages should now build as expected regardless
of the experiment flag status.

Change-Id: I982daaec200bb25b6fd14753f3aac6975a4f09dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140704
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-03-24 02:14:36 +00:00
Kevin Moore e687aa9a29 Remove unittest from DEPS, .packages, package_config.json
This re-attempts dacd22bdc2
which was reverted in 1e9b55888f

Change-Id: I6c0bb1b7163b89bf64f54838749cdacca2b501bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140562
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-23 16:43:53 +00:00
Kevin Moore 1e9b55888f Revert "Remove unittest from DEPS, .packages, package_config.json"
This reverts commit dacd22bdc2.

For some reason we're still trying to create
Error: Input file not found: out/ReleaseX64/gen/utils/dartdevc/pkg_kernel/unittest.dill.

Which is crashing the dartdevk builders

Change-Id: I364fac28e58c63ce619c9391b5e410096f3d799c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140376
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2020-03-21 01:44:55 +00:00
Kevin Moore dacd22bdc2 Remove unittest from DEPS, .packages, package_config.json
Change-Id: I062667db4bc5fe4b710aad814cce69a3004bb164
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140361
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
2020-03-20 23:24:40 +00:00
Dmitry Stefantsov 928f9fc932 [cfe] Remove flag --force-nnbd-checks
The checks are now always enabled for the "non-nullable" experiment

Closes #40980.

Bug: https://github.com/dart-lang/sdk/issues/40980
Change-Id: I32a141a93f0ba86ebdab554e1f312c2147927993
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139440
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-03-16 15:01:38 +00:00
Dmitry Stefantsov 25d7331443 Pass --force-nnbd-checks whenever NNBD experiment is enabled
This is a preliminary step before removing the flag completely.

Bug: https://github.com/dart-lang/sdk/issues/40980
Change-Id: Ib2135180aa0f30dd301beaacb842105096f8948c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139289
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-03-13 15:08:11 +00:00
asiva e33d023fa0 [BUILD] - Format gn files, this is being done to ensure the unfork CL
doesn't show these formatting changes as diffs.

Change-Id: I69ccbf4adabc66d88371cece785a2c1bce60f133
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138962
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-03-10 21:56:11 +00:00
Devon Carew c2fc5f9756 [dart migrate] tweak the verbiage for dart migrate
Bug: https://github.com/dart-lang/sdk/issues/40881
Change-Id: Ie5b63410a926462352858f8d4341e79a8c332be5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138480
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-03-05 16:51:04 +00:00
Jens Johansen 6b4c4faf28 [CFE] Combine 'inputSummaries' and 'linkedDependencies'
The two fields are already treated the same, so having two is just
confusing.

Change-Id: I649db2a77bced62429dfd94ab300673cf886e367
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138291
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-03-05 12:38:34 +00:00
Vijay Menon 067c1e0210 [nnbd/dartdevc] enforce cfe checking on sdk
Change-Id: Ia45390374adcb1fd141e62563bc4369d4bd9404f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138100
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2020-03-04 13:48:25 +00:00
Devon Carew 8e3850395a [dartdev] refactor the dartdev pub command - delegate to the pub snapshot
Change-Id: If0221ba6472271a186fc8628416ddca73e951a80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137653
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-02-28 23:22:30 +00:00
Mayank Patke f1609405b4 [dart2js] Fix type variable conversion bug.
Change-Id: I1f1f55267442a7ca475724d25b8bab21eb4d1c00
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137728
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-02-28 13:18:01 +00:00
Mayank Patke 01064e7b6c [dart2js] Migrate DartTypes to use a wrapper representation for
nullability instead of a field/getter.

Change-Id: I2ca61d1b3a789f2ee4f34a99f66ae237bf9687ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137283
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-27 09:08:47 +00:00
asiva bf34450953 Remove workaround introduced for issue #40486, that issue
appears to be fixed now.
Closes https://github.com/dart-lang/sdk/issues/40486

Change-Id: I6c7901a45caf87c0766750f403bb9cf6a127609b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137246
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-02-26 03:26:25 +00:00
Jaime Wren 52472a4e10 Add dartdev as a pkg/ utility that should have a snapshot generated and added in the Dart SDK
The formatting churn is from being prompted with the required `git cl format` command

Change-Id: Ic2582f720e30f5d9a35fad05709455dad1068ad6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136842
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-02-25 07:16:10 +00:00
Joshua Litt 2596c20486 [dart2js] Fix a bug with substitution of type variables and NNBD.
Change-Id: I5c5f6152b2f1c25a1ba0b3800023b550b8fabca0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136981
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-24 22:17:09 +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
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
asiva ac27627dd7 Do not opt-in to NNBD when building application snapshots for kernel service and other tools like dartjs, dart analyzer etc. We should enable this only when all the tools are ready to opt-in.
Change-Id: If7f507d101d006a9e103118c9f989dc9f1b145d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133481
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-01-28 19:33:00 +00:00
Konstantin Shcheglov b663ef5cc4 Build non-nullable or legacy SDK summary.
Bug: https://github.com/dart-lang/sdk/issues/38666
Change-Id: I24f6f36b5ed1dbef64588dd787aaf2abbd62f53c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132800
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-22 18:02:08 +00:00
Jacob MacDonald 4460f95782 Updates frontend_server javascript bundler to be based on import uri instead of file uri.
Converts `package:` import uris into `/packages/` modules.

Also renames the output modules to append `.lib.js` instead of just `.js`. This allows us to distinguish between modules and applications based on extension.

Updates DDC source map code to be able to convert absolute file uris in sources so that they are relative to the source map.

Bug: https://github.com/dart-lang/webdev/issues/865
Change-Id: I55d70aa3761f10cc8bd7e92f5b567478040660de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132300
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jonah Williams <jonahwilliams@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2020-01-21 17:41:02 +00:00
Sigmund Cherem f910a7575f dart2js nnbd setup
- fixes check_nnbd_sdk.dart to run on dart2js patch files
- splits golden file used by that script by target
- adds it to the old-rti bot (until we get the new nnbd bot)
- adds a suite that runs legacy tests in nnbd weak mode

Change-Id: I0a89534dcd1cf7338849d59ab3e5d989d2ecf3d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131885
Reviewed-by: Vijay Menon <vsm@google.com>
2020-01-21 06:22:51 +00:00
Martin Kustermann c0ca187f26 Revert "Create the frontend_server snapshot as a part of the sdk"
This reverts commit 24a0601d5b.

Reason for revert: This breaks the flutter build because flutter has
a build target producing the same "gen/frontend_server.dart.snapshot" file and is therefore conflicting.

See e.g. head-head-head bot failure:

    https://ci.chromium.org/p/dart/builders/ci.sandbox/flutter-engine-linux/9747


Original change's description:
> Create the frontend_server snapshot as a part of the sdk
> 
> This will allow us to use it from webdev, as it now supports DDC output.
> 
> Change-Id: I4b82d1c45d2c058abb062dddd2a2c41cc6318c45
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130134
> Reviewed-by: Keerti Parthasarathy <keertip@google.com>
> Reviewed-by: Jonah Williams <jonahwilliams@google.com>
> Reviewed-by: Vijay Menon <vsm@google.com>
> Commit-Queue: Jake Macdonald <jakemac@google.com>

TBR=keertip@google.com,jakemac@google.com,vsm@google.com,jonahwilliams@google.com

Change-Id: Ib2d782560cc005416ece429f9506dca055bffd9b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130377
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-01-07 15:10:23 +00:00
Jacob MacDonald 24a0601d5b Create the frontend_server snapshot as a part of the sdk
This will allow us to use it from webdev, as it now supports DDC output.

Change-Id: I4b82d1c45d2c058abb062dddd2a2c41cc6318c45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130134
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Jonah Williams <jonahwilliams@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2020-01-06 22:05:19 +00:00
asiva 122e9424b8 [SDK/BUILD] Pass --enable-experiment=non-nullable to the gen_kernel when it is used to compile the sdk tools.
Change-Id: Ie43018e55a4fb5e571a0753b31ab7561d26482bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128378
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2019-12-14 01:04:45 +00:00
Sigmund Cherem 35bc105c45 Whitelist all packages in the .packages file as opt-out from nnbd.
Change-Id: Ic52130d4853a32664ab0fe9db32be12e55d763db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128421
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-12-13 21:19:54 +00:00
Liam Appelbe 3166b7d976 [vm] Enable nnbd experiment when building the SDK with --nnbd
This is necessary as of https://dart-review.googlesource.com/c/sdk/+/127961
to use the experiment flag in the VM.

Tested: Late modifier tests that had stopped building now pass again.

Change-Id: I49a5f1e99f40c6e8d785b28a333b44e6fac67eca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127984
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2019-12-13 20:13:20 +00:00
Sigmund Cherem 679b005946 fix nnbd bots: build step broke when tests were moved
TBR=rnystrom@google.com

Change-Id: I241cfcccdeb5abfdb3ee07977d8ca211069f985f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128103
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-12-11 21:29:58 +00:00
Nicholas Shahan 7974f3f899 [dartdevc] Reduce the number of SDK libraries in the platform
We are temporarily building a smaller SDK platform to make progress building
applications against the forked sdk_nnbd sources. This is because some of the
libraries have not yet been ported and they don't compose well.

I needed to thread the status of the non-nullable experiment through the front
end entry point and into the target options, and native types.

Also includes some standardization of the flag name in DDC.

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

Change-Id: I4bdd503be694b28d7f95828d4af28d1d5fb3691f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127486
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-12-09 22:25:48 +00:00
Nicholas Shahan 2015c55277 [dartdevc] Remove ability to run analyzer based DDC
This is the first step in deleting legacy DDC!
* Default all invocations of DDC to run the kernel version.
* Disable all tests that run analyzer DDC.
* Detect the most likely case when invoked with an analyzer
  summary and print instruction to update build_web_compilers
  dependency.

I will follow up with deletions, and a rename of the test configurations/
builders to reclaim the names (ddc vs ddk, dartdevc vs dartdevk).

Issue #38777

Change-Id: I1477f0274b6b7f345a5e19d2b3f93797c454a09e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127067
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-12-09 22:11:22 +00:00
Sigmund Cherem 42ec44a6a4 Reland "Revamp patch_sdk.dart mainly to use libraries.json."
This is a reland of 3c9e924073

Original change's description:
> Revamp patch_sdk.dart mainly to use libraries.json.
> 
> This will make it possible to use the script to create a patched sdk
> for dart2js and the vm (some followup needed), which will be useful
> to migrate their libraries to nnbd.
> 
> In the future, we should be able to leverage this new logic to
> write tests that ensure our sdk is warning-free (there are > 80 real
> warnings today even on the non-nnbd sdk)
> 
> In detail, this CL includes:
> 
> * loading the libraries data from libraries.json, this removes the need for a
>    hand-crafted libraries.dart that replicates the data in libraries.json.
> 
> * auto-generates a libraries.dart in the patched sdk that can be used to run
>  dartanalyzer or to compile an sdk with dartdevc-legacy.
> 
> * script simplifications in patch_sdk.dart
>     * removed tracking of modification stamps. This didn't appeared to be
>       used by the ninja rules. I believe it was used to reduce local
>       iteration cycles when we were first developing the sdk itself.
> 
>     * use Uri directly instead of package:path - this simplifies things,
>       especially since the libraries_specification is Uri-based as well.
> 
>     * switch to use package:args for parsing options
> 
>  * added an option to merge part files in a single file. I've noticed that the
>  analyzer provides some false positive errors in part files, but once merged
>  they are no longer shown. In particular, we are clearly hitting limitations of
>  dartanalyzer on the patched sdk. At this time the old patch-script generated
>  an sdk with 1500 warnings, this new script reduces it to 500 (not sure why),
>  with merging of part files it goes down to 80.
> 
> 
> Change-Id: I6bbaf92ef4554f00c8bf6b38d19bf79d44fb3e94
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125780
> Reviewed-by: Nicholas Shahan <nshahan@google.com>
> Commit-Queue: Sigmund Cherem <sigmund@google.com>

Change-Id: Ifcb9dbef36452e41e8e96e086761d76b5a3d988e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125998
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Auto-Submit: Sigmund Cherem <sigmund@google.com>
2019-11-26 01:40:53 +00:00
Sigmund Cherem 603fd7881f (ddc) Fix deps tracking for the ddc sdk.
The compile_platform template assumes that the output will be in the root-out-dir, and because of that the generated .deps file contains relative paths that only work if the output is in that folder.

It would be nice to fix compile_platform to be more flexible about this, but for now moving the output up fixes the issue that modifications in the sdk were not triggering a rebuild.

Change-Id: Ifc1e7adb23d6911a9f71c341b7968e0a9b1d4973
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126122
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-11-23 00:21:58 +00:00
Vijay Menon 8295efc541 Revert "Revamp patch_sdk.dart mainly to use libraries.json."
This reverts commit 3c9e924073.

This CL was breaking the internal build.

Change-Id: Ic4e6df070f2a87ac88ef97f0e6b07d53c13ceadc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125925
Auto-Submit: Vijay Menon <vsm@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
Reviewed-by: David Morgan <davidmorgan@google.com>
2019-11-21 14:36:55 +00:00
Sigmund Cherem 3c9e924073 Revamp patch_sdk.dart mainly to use libraries.json.
This will make it possible to use the script to create a patched sdk
for dart2js and the vm (some followup needed), which will be useful
to migrate their libraries to nnbd.

In the future, we should be able to leverage this new logic to
write tests that ensure our sdk is warning-free (there are > 80 real
warnings today even on the non-nnbd sdk)

In detail, this CL includes:

* loading the libraries data from libraries.json, this removes the need for a
   hand-crafted libraries.dart that replicates the data in libraries.json.

* auto-generates a libraries.dart in the patched sdk that can be used to run
 dartanalyzer or to compile an sdk with dartdevc-legacy.

* script simplifications in patch_sdk.dart
    * removed tracking of modification stamps. This didn't appeared to be
      used by the ninja rules. I believe it was used to reduce local
      iteration cycles when we were first developing the sdk itself.

    * use Uri directly instead of package:path - this simplifies things,
      especially since the libraries_specification is Uri-based as well.

    * switch to use package:args for parsing options

 * added an option to merge part files in a single file. I've noticed that the
 analyzer provides some false positive errors in part files, but once merged
 they are no longer shown. In particular, we are clearly hitting limitations of
 dartanalyzer on the patched sdk. At this time the old patch-script generated
 an sdk with 1500 warnings, this new script reduces it to 500 (not sure why),
 with merging of part files it goes down to 80.


Change-Id: I6bbaf92ef4554f00c8bf6b38d19bf79d44fb3e94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125780
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-11-20 22:51:42 +00:00
Sigmund Cherem bcc77d8605 (ddc) Generate the sdk.js files by reading a dill file directly
This is to align how we pipeline each step in the build with other tools. It
will also help with caching and incremental rebuilds when doing local development
in ddc.

Change-Id: I8ff9988927d5632301926fca173c01dd281f923f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125447
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2019-11-19 00:24:48 +00:00
Sigmund Cherem 19144db89f Use compile_platform to build the sdk.dill
This moves ddc to use the same logic to compile the sdk.dill as all other
backends. This will also enable us in a subsequent CL to generate the dart_sdk.js
files from a precompiled .dill file, and hence improve overall caching on local
rebuilds.


Change-Id: I02e178baa5497a5bee2de42e3423176ca97ceaef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125446
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-11-19 00:24:48 +00:00
Sigmund Cherem 01614788c8 (ddc) split rule that compiles packages into separate rules for each package
This allows us to compile each package in parallel (for those with no deps), and
will make it possible to enable nnbd on a subset of them (expect, async_helper,
js, meta)

Change-Id: I032bafe3e43b14340ee35509d1f228d18571f524
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125484
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-11-18 22:59:00 +00:00
Sigmund Cherem 99f88806ec (ddc) split call to build_pkgs: create packages for dartdevc-legacy and dartdevc separately
We still have a single `dartdevc_test` rule that invokes both, but now they can
run in parallel and this unblocks a subsequent change to build each pacakge
separately under kernel.

Depending on the timing of deleting dartdevc-legacy, we may want to consider
adding a `dartdevc_legacy_test` vs `dartdevc_kernel_test` to keep the two more
separate/siloed.

Change-Id: Icc3f8fd21248aa09b553c41df708452d21b39b2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125500
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-11-18 21:22:05 +00:00
Sigmund Cherem 557ed605de Temporarily do not enable nnbd when building packages for ddc tests
This will make the nnbd-ddc bot green again. To properly support compiling these
packages in the future, we need to either migrate them or add to the CFE the
machanism to select whether a package is opt-out.

Change-Id: Ia8c5fa1a8000e233af20c87e877e2c666cb4354e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125420
Auto-Submit: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-11-15 17:49:43 +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
Jacob MacDonald 4551080062 Add retry logic for incremental compiler initialization.
Problem:

We have been having a lot of reports of failures when initializing the incremental compiler
(see https://github.com/dart-lang/sdk/issues/38102).

These appear to be the result of empty kernel files but we have added other logic to check
for that when kernel files are written, which has had zero reports of throwing from users
(https://github.com/dart-lang/build/pull/2387).

We also use the same mechanism for temp directory management as we did with analyzer, but only
see this problem with the switch to kernel, and specifically the incremental compiler.

Solution:

Add retry logic and see if that fixes the problem. Any time there is a retry log a warning
so that we don't just silently do retries all the time.

This is a general defensive mechanism to cover a broad spectrum of potential failures with the
incremental compiler in the wild. I don't intend to remove it as it isn't harmful, and the
warning logs should be enough to encourage issues to be filed if it is happening often.

I have no direct reason to believe this will actually solve the particular linked problem other
than that we only see this issue when the incremental compiler is enabled.

Bug: https://github.com/dart-lang/sdk/issues/39122, https://github.com/dart-lang/sdk/issues/38102
Change-Id: Iaabb4497d6da69684692c1d7b9c030c59ebc6072
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123001
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2019-10-31 16:57:44 +00:00
Nicholas Shahan 5706d13c06 [dartdevc] Update URI for libraries.json to use multi-root
I confirmed that this prevents the local paths from leaking into the ddc_sdk.dill
file created by this build target.

Change-Id: I777482f5aea6d70106072f070ab48233ec302682
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122178
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-10-21 20:40:28 +00:00
Robert Nystrom ed0cc81e81 Get DDC and DDK test builds working with the forked NNBD SDK.
With these changes, I can run:

  ./tools/build.py -m release --nnbd dartdevc_test

In a checkout that also includes a migrated core library that uses
NNBD features.

I haven't verified if the resulting JS is *correct*, but the build
doesn't error out.

Change-Id: I7d89efe5da8c46e2a9805743e4e61858da8097dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122280
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2019-10-21 17:19:59 +00:00
Robert Nystrom 064c3c7cf7 Get the DDK build working with NNBD.
When use_nnbd is set, make the build steps for generating the DDK SDK
summary and JS use the forked SDK directory and enable the non-nullable
experiment flag.

Change-Id: Ia483a621dccd40245cdf5e2c1f7fd86b9bc1e266
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122162
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2019-10-18 22:59:21 +00:00
Jacob MacDonald 22e249d4d5 update kernel worker to support -D environment defines
Change-Id: Ic73cfcc8dc0bd8b721733e0696b028aa572125e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121927
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2019-10-18 14:33:08 +00:00
Devon Carew c6c79e529e [analyzer] add more inputs to the analysis server GN build
Change-Id: I421941e5051f968763c94faeedb4acf149c2afce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121883
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2019-10-16 22:43:59 +00:00
Keerti Parthasarathy 6d468d1377 Add a script and target to run dartfix
Change-Id: I68df635359b898ef4b6054292f6523d81f46448a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121149
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2019-10-14 15:50:21 +00:00
Nicholas Shahan 50d972bba0 Build DDC targets with forked SDK sources when building with --nnbd flag
Issue: #38665

Change-Id: I42eb4e97f3269f7d1a53abeac62f9293a003ae60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120400
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2019-10-09 23:24:21 +00:00
jonahwilliams 13fbf569f6 [flutter] split frontend_server from vm package
To support JavaScript compilation, the frontend_server will require a dependency on the dev_compiler. To avoid conflating this with the vm specific functionality, the frontend server will be split from its current location.

This change will require a small corresponding update in flutter/engine, documented in the patches directory
Change-Id: I47923765546f7f6fa43e36ef38f8f466d3a7b2fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120321
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2019-10-08 05:32:59 +00:00
Teagan Strickland 785ae930d3 [gardening] Fix NNDB flag use for Flutter HHH build.
Our //build/config/BUILDCONFIG.gn isn't used for Flutter, so we must
put the default version where the Flutter build can see it.

Change-Id: I99afc99209b3721c48aa56ef413910d34df1bb8c
Cq-Include-Trybots: luci.dart.try:flutter-engine-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120580
Reviewed-by: Teagan Strickland <sstrickl@google.com>
Commit-Queue: Teagan Strickland <sstrickl@google.com>
2019-10-07 09:47:02 +00:00
Mark Zhou 36e4d5e3c2 Reland "[dartdevc] cleaning up unused web files"
This is a reland of e866f043cf

Original change's description:
> [dartdevc] cleaning up unused web files
>
> Dependent on these google3 changes: https://critique.corp.google.com/#review/272749649
>
> Change-Id: I9e89142cd5b2a619acfc35badb9cf3c549b3be9c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119587
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Mark Zhou <markzipan@google.com>

Change-Id: I7e01fb4ad60e47808721fa49b3ca3498e7aeaf46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120200
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-10-05 00:27:22 +00:00
Robert Nystrom 8e2649b357 Revert https://dart-review.googlesource.com/c/sdk/+/117681.
Built the revert CL by hand because it conflicts with other changes.

Change-Id: I50fed06e9b5311d38b0f242f8207d5c51c795783
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120360
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2019-10-04 22:46:52 +00:00
Jens Johansen 05c75c096d [CFE] Merge DDC and bazel incremental modular entrypoint code
Change-Id: Ia6ff627d50131fb55817e0d1adf2bc15240aeec1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119338
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-01 13:56:32 +00:00
Alexander Aprelev 34087a61ba [build] Remove dart_host_toolchain.
Consensus seems to be that there should be different mechanism to support host-targeting-host vs host-targeting-target configuration: comparing toolchains names won't work for that.
Also, dart_host_toolchain was set up to be used by Fuchsia, but it is no longer being used.

Change-Id: Ic2e63d8cef00b18bf6866122199027459eaf32c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118910
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2019-09-27 21:14:11 +00:00
Jens Johansen ff778d1cb4 [bazel] Sort certain things when compiling in incremental mode (take 2)
Not doing it can lead to the same input producing "different" outputs.
Note that this is a follow-up to cdcec63569
where I forgot about the incremental summary-only case.

Change-Id: Idf76c3839f46c468a62350968b353be7235d91b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118287
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-20 13:12:55 +00:00
Jens Johansen b0f7cba35e [VM] Kernel service dill should not include full paths
It is included in the 'dart' binary thus making it change depending on
where it is compiled.

Change-Id: I6f3ad8cf8f8da386ada7809402b4711c4fcab3ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117728
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-19 09:01:32 +00:00
Jens Johansen cdcec63569 [bazel] Sort certain things when compiling in incremental mode
Not doing it can lead to the same input producing "different" outputs.

Change-Id: I31fa1d728c2d26cbf1ad008472ea8fce4310794f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117725
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-19 09:01:17 +00:00
Ryan Macnak 6a27310b87 Reland "[build] Speed up debug and simulator builds by running steps on the prebuilt VM."
Change-Id: I7878f369ccbf05551aa7c0f6546544f8adb801c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117660
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-09-18 02:53:44 +00:00
Alexander Aprelev b0fa0aebb7 [build] Ensure kernel service trains on the source.
This is follow-up to https://dart-review.googlesource.com/c/sdk/+/117286.

Fixes dartbug.com/38427.

Change-Id: I8e3227addf459577e5126e9c48d1cb95b170157a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117464
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-09-17 17:18:09 +00:00
Clement Skau b87c9afb82 Revert "Reland "[build] Speed up debug and simulator builds by running steps on the prebuilt VM.""
This reverts commit 46f2603781.

Reason for revert: Broke Flutter 3H:
https://ci.chromium.org/p/dart/builders/ci.sandbox/flutter-engine-linux/8899

Original change's description:
> Reland "[build] Speed up debug and simulator builds by running steps on the prebuilt VM."
> 
> This reverts commit d9489622be.
> 
> Reason for revert: flutter/engine@04f567bdde
> 
> Original change's description:
> > Revert "[build] Speed up debug and simulator builds by running steps on the prebuilt VM."
> > 
> > This reverts commit 74cff6c7df as it
> > introduces a breakage of flutter build process.
> > 
> > Revert "[build] Fix application_snapshot.gni for uses outside of utils/xyz."
> > 
> > This reverts commit 351acd155d as a
> > collateral damage.
> > 
> > Change-Id: Ic175c464c78e76a0adf176b41294344901bfe798
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117063
> > Commit-Queue: Alexander Aprelev <aam@google.com>
> > Reviewed-by: Ryan Macnak <rmacnak@google.com>
> 
> TBR=aam@google.com,rmacnak@google.com
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Change-Id: Ie27eb455eddd3e60b96eb65bb3dad888b369baf6
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117286
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

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

Change-Id: I519a7330efa3a84b8b0a19b5f8d5e476d6ca96cd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117541
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2019-09-17 09:05:33 +00:00
Ryan Macnak 46f2603781 Reland "[build] Speed up debug and simulator builds by running steps on the prebuilt VM."
This reverts commit d9489622be.

Reason for revert: flutter/engine@04f567bdde

Original change's description:
> Revert "[build] Speed up debug and simulator builds by running steps on the prebuilt VM."
> 
> This reverts commit 74cff6c7df as it
> introduces a breakage of flutter build process.
> 
> Revert "[build] Fix application_snapshot.gni for uses outside of utils/xyz."
> 
> This reverts commit 351acd155d as a
> collateral damage.
> 
> Change-Id: Ic175c464c78e76a0adf176b41294344901bfe798
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117063
> Commit-Queue: Alexander Aprelev <aam@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

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

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

Change-Id: Ie27eb455eddd3e60b96eb65bb3dad888b369baf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117286
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-09-16 19:36:40 +00:00
Alexander Markov 4aa820bbf5 Reland "[vm/bytecode] Switch kernel service dill to bytecode if building Dart SDK with --bytecode"
This is a reland of https://dart-review.googlesource.com/c/sdk/+/113123
after stack overflow in the interpreter was fixed in https://dart-review.googlesource.com/c/sdk/+/117061

Original change's description:

Temporary setting of FLAG_enable_interpreter is avoided in the VM unit tests as
this flag is global and used by kernel service isolate while running tests.
Flipping this flag causes assertion failures in kernel isolate's background compiler
or infinite loop between LazyCompile stub and CompileFunction as AttachBytecode
doesn't set entry point to InterpretCall.

The less intrusive way to ensure compilation of functions in unit tests is to set
FLAG_compilation_counter_threshold to 0.

Change-Id: Ibbcf4b5bb0df558851c80cfa40a9a54f949dd187
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117122
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-09-13 16:38:17 +00:00
Jens Johansen 25401964ab Pass proper file URI under both Windows and not
Before this CL the kernel service was during the build trained with
an attempt at a full file uri for dart2js.
There was a suddle bug though: Under non-Windows the uri would become
something like "file:////full/path/to/dart2js.dart" (i.e. have 4 slashes)
whereas under Windows it would look something like
"file:///C:/full/path/to/dart2js.dart" (i.e. correctly with 3 slashes).

Mostly, having 4 slashes instead of 3 doesn't matter much:
Everything will just look weird and have 4 slashes instead of 3,
but when at the same time giving the compiler a relative .packages file
(so it will be translated according to the current directory and become
a uri with 3 slashes) with relative uris in it (so those uris also get
3 slashes in them) and then doing a sub-string match to - in some
cases - interpreting the input as a package uri things go awry.
"file:///path/to/whatever" is not a substring of
"file:////path/to/whatever" and thus the interpreting the input as a
package uri doesn't happen, which can cause weird compilation errors
when mixing relative and package uri imports, e.g.:

file:////b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/common/codegen.dart:439:38: Error: The argument type 'MemberEntity/*1*/' can't be assigned to the parameter type 'MemberEntity/*2*/'.
 - 'MemberEntity/*1*/' is from 'file:////b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/elements/entities.dart'.
 - 'MemberEntity/*2*/' is from 'package:compiler/src/elements/entities.dart' ('file:///b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/elements/entities.dart').
Try changing the type of the parameter, or casting the argument to 'MemberEntity/*2*/'.
    return _functionCompiler.compile(member);
                                     ^
Change-Id: I4c6b5ea2e7e2e4a75331847138a79708ac365769
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103126
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-13 14:11:32 +00:00
Alexander Aprelev d9489622be Revert "[build] Speed up debug and simulator builds by running steps on the prebuilt VM."
This reverts commit 74cff6c7df as it
introduces a breakage of flutter build process.

Revert "[build] Fix application_snapshot.gni for uses outside of utils/xyz."

This reverts commit 351acd155d as a
collateral damage.

Change-Id: Ic175c464c78e76a0adf176b41294344901bfe798
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117063
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-09-12 22:01:49 +00:00
Ryan Macnak 351acd155d [build] Fix application_snapshot.gni for uses outside of utils/xyz.
Cf. 74cff6c7df

Change-Id: I7af53019bbe4bfe3eba8fc3a4648ec70a26cbc90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117013
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-09-12 20:42:42 +00:00
Ryan Macnak 74cff6c7df [build] Speed up debug and simulator builds by running steps on the prebuilt VM.
Only generating a snapshot really requires running the VM produced during the build.

Change-Id: Ic07bf8b61609c39c9e2dc910737ed56e64decd43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116749
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-09-12 16:43:51 +00:00
Sarah Zakarias 6512f5563d Revert "Revert "Add dart2native tool for building either an aot file or a stand-alone executable.""
This reverts commit 54fdd559d8.

Trying to reland this after https://dart-review.googlesource.com/c/sdk/+/115364 hopefully fixes the issue leading to the revert.

Change-Id: If3c49bea9d791aa3d569003490c1cbe8b325f2e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115705
Commit-Queue: Sarah Zakarias <zarah@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2019-09-05 14:46:43 +00:00
Ben Konyi 54fdd559d8 Revert "Add dart2native tool for building either an aot file or a stand-alone executable."
This reverts commit a6141ff5c9.

Reason for revert: Blocking Dart SDK -> Flutter engine roll. See logs here: https://github.com/flutter/engine/pull/11836/checks?check_run_id=210988794

Original change's description:
> Add dart2native tool for building either an aot file or a stand-alone executable.
> 
> *dart2aot has been rewritten in Dart accompanied by a trampoline script.
> *dart2exec is still missing implementation.
> 
> Change-Id: I4b662ce86c7365fa4d043b48a691881c8ef08a8c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108601
> Commit-Queue: Sarah Zakarias <zarah@google.com>
> Reviewed-by: Clement Skau <cskau@google.com>

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

Change-Id: I4c5946ce0f0a66484e243b98cdcb7e2b24e2d705
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115340
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-09-04 00:40:20 +00:00
Sarah Zakarias a6141ff5c9 Add dart2native tool for building either an aot file or a stand-alone executable.
*dart2aot has been rewritten in Dart accompanied by a trampoline script.
*dart2exec is still missing implementation.

Change-Id: I4b662ce86c7365fa4d043b48a691881c8ef08a8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108601
Commit-Queue: Sarah Zakarias <zarah@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2019-09-03 09:36:50 +00:00
Jens Johansen 8a670d773b [CFE/bazel/DDC] Match 'tags' to reuse compiler state
This CL introduces 'tags' as a way to distinguish different setups and
be able to throw away previous state when it cannot be used.
These tags are - for now - basically filled up with the roots used for
the multi root filesystem, the idea being, that if they have changed we
cannot reuse the old state.

Change-Id: I19e069513ce3836f5bc6abf047e4359836fc7e09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114945
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-30 12:06:41 +00:00
Jens Johansen 3f0f66cabc [DDC,bazel] Allow no digest when not in worker mode
Change-Id: Id4d2b385bc00e7dc4e20aefea9ba38e4839bbaca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114065
Reviewed-by: David Morgan <davidmorgan@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-22 11:15:19 +00:00
Jens Johansen 976877974b [bazel] Don't require empty linked inputs for incremental mode
Before this CL one could ask to use the incremental compiler, but not
actually get the incremental compiler because one supplied linked inputs
(and not just summary inputs).

This is an artificial limitation, and inside the compiler there are no
real difference between "linked" and "summary" inputs. "Summaries" are
marked as "external" but that's a historical hack to mark it as something
we don't want to serialize --- something that is not used in this package.

Generally, the distinction and hack should go away entirely.
Considering there is no difference in this package, a good start would be
to remove the distinction in this package, but as this package is used
both internally and externally, this CL won't do that, but will just treat
the two 'different' input types the same.

Change-Id: I11a3962d22424387eca83212d08f535da350bd1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113022
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-22 08:31:47 +00:00
Alexander Markov ea7348c5f0 Revert "[vm/bytecode] Switch kernel service dill to bytecode if building Dart SDK with --bytecode"
This reverts commit beee442625.

Reason for revert: StackOverflow on language_2/deep_nesting_expression_test/01 in interpreted mode.

Original change's description:
> [vm/bytecode] Switch kernel service dill to bytecode if building Dart SDK with --bytecode
> 
> Temporary setting of FLAG_enable_interpreter is avoided in the VM unit tests as
> this flag is global and used by kernel service isolate while running tests.
> Flipping this flag causes assertion failures in kernel isolate's background compiler
> or infinite loop between LazyCompile stub and CompileFunction as AttachBytecode
> doesn't set entry point to InterpretCall.
> 
> The less intrusive way to ensure compilation of functions in unit tests is to set
> FLAG_compilation_counter_threshold to 0.
> 
> Change-Id: Ia46ff8d03d66ab8b147b9d89336548c4a9c29f5d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113123
> Commit-Queue: Alexander Markov <alexmarkov@google.com>
> Reviewed-by: Régis Crelier <regis@google.com>

TBR=rmacnak@google.com,alexmarkov@google.com,regis@google.com

Change-Id: I67cd03a56f9a2d29aa6597d38779e77ca3a16b18
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113480
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-08-16 22:39:52 +00:00
Alexander Markov beee442625 [vm/bytecode] Switch kernel service dill to bytecode if building Dart SDK with --bytecode
Temporary setting of FLAG_enable_interpreter is avoided in the VM unit tests as
this flag is global and used by kernel service isolate while running tests.
Flipping this flag causes assertion failures in kernel isolate's background compiler
or infinite loop between LazyCompile stub and CompileFunction as AttachBytecode
doesn't set entry point to InterpretCall.

The less intrusive way to ensure compilation of functions in unit tests is to set
FLAG_compilation_counter_threshold to 0.

Change-Id: Ia46ff8d03d66ab8b147b9d89336548c4a9c29f5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113123
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2019-08-16 20:53:10 +00:00
Alexander Markov 1644d4b178 [vm/bytecode] Train kernel service with bytecode generation
If Dart SDK is built with --bytecode, kernel service will generate
bytecode, so it should be trained with bytecode generation as well.

Change-Id: I1a7914c78dfcbd51425585b5600b299fee4c6506
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113381
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-08-16 19:31:00 +00:00
Jens Johansen 23a956c7a8 [bazel] Fix serialization when not doing summary
Before this CL, if using the incremental compiler in bazels
kernel_worker, did not do summaries and did ask to "exclude-non-sources"
one would still get the entire thing (including loaded summaries etc)
(i.e. it would behave as if "exclude-non-sources" wasn't set).

This CL fixes it and makes it serialize as in the non-incremental case.

Change-Id: I396b53664a3d1ac32a243e903c8ff5c049fca453
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113021
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2019-08-15 16:31:30 +00:00
Jens Johansen aeb864a43f Allow bazels kernel_worker to output used inputs
This change basically consists of these steps:
* Enable the incremental compiler to trace used inputs.
* Translate used libraries into used dill inputs.
* Output the list of used dills.

Bug: #37788
Change-Id: I08cffe299166cf10e990c9e261f190afd25da8b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112384
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2019-08-13 08:28:09 +00:00
Vijay Menon 45591cd123 [dartdevc] fix sdk source map paths
Change-Id: I5d508d64b8cb9e8cc9ca764ab34f57aebcc9146a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109020
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-07-15 16:11:04 +00:00
Vijay Menon 11da803fe9 [dartdevc] build the ddk sdk with dartdevc
This:
(1) Uses dartdevc and kernel_worker directly to build ddk artifacts.

(2) Generates an outline file instead of a full dill file for ddc_sdk.dill.

(3) Fixes source maps in the shipped sdk so that urls from dart_sdk.js.map
have correct relative paths to dart files in the sdk.  This won't work with
webdev/build as that copies and serves dart_sdk.js, but it will now be
able to build the sdk directly.

Change-Id: I7b9470fe18cac9b4343c7c520fe6ffd7bd9246b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104842
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-07-11 02:05:37 +00:00
Mark Zhou 9a07c4a817 [dartdevc] Properly encode Windows-style paths and paths with spaces for source maps
Change-Id: I32a28d7327a35c245a67343c91fdc74d6026d810
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108503
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2019-07-10 16:49:22 +00:00
Jacob MacDonald 279c1da42d Use absolute paths as canonical paths for inputs digest maps
Change-Id: I9a6c5efe22d4ef1f46393e2983084fe0b8a4652b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107682
Reviewed-by: David Morgan <davidmorgan@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2019-07-01 16:02:14 +00:00
Vyacheslav Egorov d35358426c [tools] Remove patch_sdk tool which is no longer used.
This tool has not been used ever since Fasta learned to parse and apply
patch files directly.

Change-Id: Idfa2a65d106279f208e48ece9967d39d72b6faeb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106911
Auto-Submit: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2019-06-25 11:46:37 +00:00
Vijay Menon 8a94b6f8b0 [dartdevc] don't gen source maps for helper code compiled with dart2js
Change-Id: If1108ce6f8adf6673abeaafe8f060833284b516d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106020
Commit-Queue: Jake Macdonald <jakemac@google.com>
Auto-Submit: Vijay Menon <vsm@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2019-06-21 14:20:46 +00:00
David Morgan 0a57ce3f23 Make KernelWorker support running in an isolate.
Change-Id: I9a6ab96bbd7901b3f61b3769b40c76fd36b90071
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106340
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2019-06-17 16:23:59 +00:00
Vijay Menon 3b5a187726 [dartdevc] move ddc internal libraries under sdk
Note, this has the effect of including all DDC Dart sources with the
shipped SDK: we ship everything under sdk/lib.

This should enable https://github.com/dart-lang/build/issues/2262

Change-Id: If66bc7c620034e7f2acf7d2c3e9524a408417681
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104383
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-06-04 13:47:29 +00:00
Vijay Menon 1b95819e3d [dartdevc] Train ddc on dill file instead of analyzer summary
Change-Id: I5560e309cac8e7ba4e4807af683bd64c6d0f63ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104040
Auto-Submit: Vijay Menon <vsm@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2019-05-29 16:17:10 +00:00
Jens Johansen ec3cd7ffe0 Workaround for dartbug.com/36983 also when not in incremental compiler
When invoking the kernel worker in worker mode, reusing previous state,
but not using the incremental compiler, we will currently leak,
see dartbug.com/36983.
This was previously fixed in the incremental compiler case, but this CL
moves the fix outside the if to fix it in every configuration.

Change-Id: I993fecbcc053d2bca64af9e65d270f75411f2e68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103626
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-05-27 10:46:18 +00:00
Sigmund Cherem 64ed4bf664 Changes to bazel worker to support modular testing.
This includes:
 * accepting null values like sdk-summary or .packages (which are not used when building kernel for the sdk itself)
 * allow enabling language experiments
 * only exclude-non-sources on the non-incremental code path if that's requested

Change-Id: I08eeb643676f1f1406f0f3030c341d68179d42a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103574
Reviewed-by: Nate Bosch <nbosch@google.com>
2019-05-24 19:09:12 +00:00
Jens Johansen 2bbb6aae9b Fixes to incremental DDK/blaze
This CL fixes a number of issues:
* Semi-leaking old components when starting over
  (i.e. when loading a new sdk)
* Setting new filesystem not really working because the old one was
  cached in the ProcessedOptions
* Leaking old state because of an apparent VM bug (http://dartbug.com/36983)

Change-Id: Ib124257c456b019941e253409c1ef56eedcf66b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103121
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-05-21 09:10:58 +00:00
Jens Johansen 6b730e8203 [bazel/kernel_worker] Only workers use incremental compiler; require digest
Change-Id: Iff4b45ffba79a05ce829ed73d952937ae55624d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101282
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2019-05-21 08:13:58 +00:00
Jens Johansen 099af47a69 [kernel] add ability to disable offsets for bazel worker to use
This is a lightly modified version of Jennys CL @
https://dart-review.googlesource.com/100275

Change-Id: I46a1665d84d04602af1f338cf963bc25b4e6b25c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101280
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-05-21 07:55:10 +00:00
Jacob Richman e2976acd22 Add --track-widget-creation flag to frontend_server.
This is needed to activate the kernel transformer embedded with the kernel package from the flutter engine.

Change-Id: I3253e01723b662eb48b4b3743ac5bcc1b44c7d46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102920
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Jacob Richman <jacobr@google.com>
2019-05-20 22:47:28 +00:00
Aske Simon Christensen 8754351283 [CFE] Run widget transformer before constant evaluation.
Change-Id: I51ded35ecb95cb5cfbac5ecf8967e0918a48269a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101987
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
2019-05-10 11:02:49 +00:00
Aske Simon Christensen 1179467a5e Move widget transformer to kernel package
Change-Id: I7f9ece029e181d380f37028ed04f97d4fdfb12b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101985
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-05-10 11:02:49 +00:00
Ryan Macnak 3ad32e4287 [vm] Revert 1db1ac4863.
This feature was for Goma work that has been marked obsolete.

Bug: FL-48
Change-Id: I9997f8aefbe1d55f86cff2ab377166a0bce1ed53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101925
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-05-08 23:52:29 +00:00
Chingjun Lau 51730db51b Add flutter track widget creation transform to bazel kernel worker
Had to do a few changes to make this happen:
1. Restored some of the code removed in the transformer, making class
hierarchy optional.
2. Split the "compile" method in bazel_worker.dart into two, since we
need the intermediate Component object in one of the case.

Change-Id: I0ee004467e76dff0025f7979834c62b9db328ecc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100480
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
2019-05-06 19:20:08 +00:00
Jens Johansen ed8e4255a4 Proposed fix to #36644
TL;DR: Unbind canonical names doesn't do what you think it does and
probably shouldn't (ever) be used. This CL stops using it in a few places.

Longer version:

When loading a dill file it:
- First loads the table of canonical names. These have no references yet.
- When a canonical name is asked for its reference it creates one if it
  doesn't yet have one.
- When loading, for instance, a library, it asks for the reference.

When unbinding a canonical name:
- It removes itself (the canonical name) from the reference
- It removes the reference in itself
- Note: Whatever has a pointer to the reference keeps it, and the
  reference points to whatever node it already pointed to.

This also means, that if we have a dill file that's split in two and:
- Load #1
- Load #2
that works fine, but if we
- Load #1
- Unbind canonical names
- Binds canonical names
- Load #2
stuff is not bound correctly (and an error is thrown).

And - the cause of this bug:
- Load #1
- Load #2
everything is fine
- Unbind canonical names
- Binds canonical names
- Load #2'
stuff is not bound correctly --- references points to stuff loaded as #2,
not as #2'. On top of being weird, wrong and confusing it also caused wrong
things to be but into the class hierarchy which ultimatly caused the crash.

This CL fixes it by not calling unbind and force loading of dill files
(at specific call sites) to create new libraries
(and in the process overwriting references ".node").

Revert "[dartdevc] Retry ddc incremental compile on crash"

This reverts commit ecdbdf00b8.

Revert "[kernel_worker] retry on failure"

This reverts commit 43eebea5a3.

Fixes #36644

Bug: #36644
Change-Id: Id8f548179e6a409b01f2ebfa3219f94cb64b1c05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100380
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-04-26 07:18:28 +00:00
Chingjun Lau 2c4dc7a431 Support targetting flutter and flutter_runner in kernel_worker
Change-Id: I87745f48ba09a0ac8629ae6518b7dad883733447
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100180
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2019-04-23 20:06:45 +00:00
Vijay Menon 43eebea5a3 [kernel_worker] retry on failure
Workaround for https://github.com/dart-lang/sdk/issues/36644

See similar for dartdevc: https://dart-review.googlesource.com/c/sdk/+/99442

Change-Id: Id02549a7bd8110b4691a724fa8930ede477464f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99735
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2019-04-17 23:36:01 +00:00
Nate Bosch d8a0d68bd6 Rename devcompiler to ddc
The value 'devcompiler' is never being passed to this argument so this
will not break any known use cases. The name 'ddc' has better
consistency with how we label SDK platforms in `build_runner`.

Bug: https://github.com/dart-lang/build/issues/2174
Change-Id: I95f6cb75ec86c2f276298781443203d201550815
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99704
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2019-04-17 21:42:51 +00:00
Jacob MacDonald edc6f88168 Use compiler context when serializing components and performing transformations.
Without this, if an error occurs during serialization you get this message:

```
Internal problem: Compiler cannot run without a compiler context.

```

Instead of the real error.

Change-Id: I016ec0923a2e01b68f850988724be9d30179f78d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98740
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2019-04-10 06:26:33 +00:00
Clement Skau 907c514c89 [SDK] Adds build targets, wrappers and SDK builds for Dart AOT.
Adds:
- dart2aot, a script similar to dart2js which compiles my.dart to my.dart.aot.
- dartaotruntime, a minimal Dart runtime that only runs AOT blobs.
- some extra tooling like gen_kernel and gen_snapshot used by the above.
- build rules for all of the above, including adding it to the full SDK builds.

Bug:https://github.com/dart-lang/sdk/issues/27596
Change-Id: Ic35f832b2b86be959212b8d21cfc5a082da5ced4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97627
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2019-04-05 13:23:44 +00:00
Jens Johansen b7f69e24a2 dartdevc and bazel worker can use incremental compiler
This allows dartdevc and the bazel worker to user
the incremental compiler with kernel.
Use --reuse-compiler-result --use-incremental-compiler to run in this mode.

Change-Id: I9189ce5f1a51320d9d96e071f8c95c80fe6fca84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95386
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2019-03-29 12:07:42 +00:00
Liam Appelbe 89f00ab25f Add a build rule for bytecode version of kernel_service.dill
Bug: https://github.com/dart-lang/sdk/issues/36047
Change-Id: Ifc95ff270c33cce13699bda23c1b7c8fb6139e2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96835
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-03-19 21:29:29 +00:00
Jacob MacDonald d267fb6bf3 change the SummaryTarget to extend the DevCompilerTarget
Change-Id: I2ebd09e35b8ba8a254a318103102d33291f006a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97003
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2019-03-15 20:50:25 +00:00
Sigmund Cherem 74a23b96b0 Add support for dart2js targets to kernel_worker
This includes a `--target` flag (that in the future we can use for other targets
too) and a flag to accept the libraries.json file (currently needed to properly
compute constants of the form `bool.fromEnvironment('dart.library.io')`.

Change-Id: I8beea48610f0e1e721b7c76e545c9f662e3255ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96849
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2019-03-15 18:02:10 +00:00
Zach Anderson 8332fb0631 [vm] Adds an API call to dump the CPU profile to the timeline
Used in https://fuchsia-review.googlesource.com/c/topaz/+/258655

Change-Id: I79b102e0d318d7be3bae44fb88f81bb8086a10d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94400
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2019-03-07 21:28:26 +00:00
Ryan Macnak 30b47d24e6 [sdk] Remove unused --packages flag no longer recognized by gen_snapshot.
Change-Id: Ibcb27b11ed550724c2e8bac1b68801a2d3eb4892
Reviewed-on: https://dart-review.googlesource.com/c/94001
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-02-22 19:48:51 +00:00
jonahwilliams 3e304def65 switch dartdevc to kernel and fix path in rules.
The flutter engine needs to switch to the full SDK to include web support. As written, the dartdevc rules do not work outside of the sdk repo


Bug: https://github.com/dart-lang/sdk/issues/35834
Change-Id: I3b7711cf1920d86b82ddc4f0959b447207f54751
Reviewed-on: https://dart-review.googlesource.com/c/93760
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-02-22 01:02:05 +00:00
Ben Konyi 4cff5a4fd6 [ VM / Service ] Dynamically load source from linked-in platform kernel
- Added `Dart_SetDartLibrarySourcesKernel` to the Dart embedding API.
- vm_platform_strong.dill now contains the Dart SDK sources
- If vm_platform_strong.dill is linked into the Dart binary, the first
  request for a Dart SDK Script object from the VM service will load the
  sources for the script from the linked in kernel buffer.

Change-Id: I664abe31f9378d25ec79c21edce0b237a278495d
Reviewed-on: https://dart-review.googlesource.com/c/93375
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-02-21 18:22:39 +00:00
Jenny Messerly 3d6acab3e7 [dartdevc] remove unused dartdevk binary, fixes #35483
It's simply an alias for `dartdevc --kernel`, and now that build_runner
is switching to that, there's no reason to keep it around anymore.

Change-Id: I43d30a582314a236bcfa2e3a0b50bb48ddac79f8
Reviewed-on: https://dart-review.googlesource.com/c/88281
Auto-Submit: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2019-01-04 17:19:52 +00:00
Kevin Millikin d0c2cdcd4c [Kernel] Remove the syncAsync flag
This flag was always true so we can remove it and specialize the
remaining code that used it.  The only code that used it was in the
Dart VM's async transformation.

Specializing that code led to some unused fields in the async helper
class which were removed.  This triggered me to look at core types
which seems to have a lot of unused stuff.

Change-Id: I7da800ca17ac05478149f4c90337a38d2c2b1459
Reviewed-on: https://dart-review.googlesource.com/c/87960
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-12-21 10:07:04 +00:00
Jenny Messerly d3c3341b8a [dartdevc] fix conditional imports in kernel backend
Change-Id: I694b67624dff65099ca8cb8147d2b56a3532cd6c
Reviewed-on: https://dart-review.googlesource.com/c/85880
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-12-04 18:39:46 +00:00
Sigmund Cherem b484aada21 Remove library-root option - replace it with a libraries-spec option instead
Change-Id: Ie1df52cdaa7ab4381a4c1b94c61a1210f0f31b5f
Reviewed-on: https://dart-review.googlesource.com/c/83641
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-11-09 22:40:28 +00:00
Jacob MacDonald 8f4e379665 update kernel worker to enable sync-async
Bug: https://github.com/dart-lang/sdk/issues/34852
Change-Id: I80a6209fd241aec455c67a9eb1893bf3c4c70e47
Reviewed-on: https://dart-review.googlesource.com/c/80561
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2018-10-18 16:07:18 +00:00
Peter von der Ahé 0a6d960d66 Update bazel_worker to onDiagnostic
Change-Id: If1e0f3977f9d70ae74cfb589aeddcb96ce1fafc1
Reviewed-on: https://dart-review.googlesource.com/c/78041
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-10-15 14:06:55 +00:00
Bob Nystrom f6ca2c1d8f Remove the Dart 1 tests.
This deletes:

tests/co19
tests/corelib
tests/html
tests/isolate
tests/language
tests/lib

It does not delete tests/standalone because apparently there are tests
in there that are not in standalone_2. (I assume they were added after
the test migration. I don't know why they were added there.)

I have tried to remove references to the old tests from various scripts
and tools but may have missed some. (As you can imagine, grepping for
"lib" does not have the best signal-to-noise ratio.)

"It was a pleasure to burn. It was a special pleasure to see things
eaten, to see things blackened and changed. With the brass nozzle in his
fists, with this great python spitting its venomous kerosene upon the
world, the blood pounded in his head, and his hands were the hands of
some amazing conductor playing all the symphonies of blazing and burning
to bring down the tatters and charcoal ruins of history."

- Ray Bradbury, Fahrenheit 451

Change-Id: If3db4a50e7a5ee25aff8058b1483e2ce8e68424e
Reviewed-on: https://dart-review.googlesource.com/c/75420
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Terry Lucas <terry@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-10-11 23:45:18 +00:00
Peter von der Ahé 8c872e0e3a Remove TargetFlags.strongMode
Change-Id: Ibf8661e5444d16666c54f1d81c626893b000521a
Reviewed-on: https://dart-review.googlesource.com/c/78986
Commit-Queue: Jens Johansen <jensj@google.com>
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-10-10 12:11:41 +00:00
Peter von der Ahé ee97806084 Replace strongMode with legacyMode in CompilerOptions
Also, remove --strong and --strong-mode flags (use --legacy-mode
flag to enable legacy mode).

Change-Id: I577ab5f755a2bee88f0f4d63915a6e852e792f06
Reviewed-on: https://dart-review.googlesource.com/c/79000
Commit-Queue: Jens Johansen <jensj@google.com>
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-10-10 12:04:26 +00:00
Ivan Naydonov ed6c557d1a Add cli parameters to kernel_sdk.dart to get all paths explicitly
To allow ddc sdk kernel generation internally, add a way to provide
paths to dependent files explicitly, instead of assuming relative from
Platform.script.

Also remove .packages file parameter. We don't have this file internally
and sdk shouldn't depend on any of packages anyway, so it just work
without this option.

Change-Id: Iec892cbb640d35e64d107c6af36d214632815bae
Reviewed-on: https://dart-review.googlesource.com/c/77485
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Auto-Submit: Ivan Naydonov <inayd@google.com>
2018-10-09 22:15:06 +00:00
asiva 30aa464f77 [VM] Remove 'corelib' and 'dart-io' sources generation into C++ arrays
- Remove all code that generates the corelib and dart:io library sources into C++ arrays and link them into dart_bootstrap
- Remove the executable dart_bootstrap and all uses of it
- Remove bootstrap_nolib.cc and builtin_nocore.cc
- Remove the Dart 1 code in core lib bootstrap path

Change-Id: Ifd33496204285a08b42fe09e39428e7a92b416b6
Reviewed-on: https://dart-review.googlesource.com/c/77241
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-10-02 23:27:05 +00:00
Ryan Macnak 4a51268890 [gen_snapshot] Restore support for --snapshot_kind=vm-aot-assembly; update docs.
Disable broken analyzer training runs.

Bug: https://github.com/dart-lang/sdk/issues/34616
Change-Id: Ib2bb022f5b095bcd29451741aa4ed557d2f78c17
Reviewed-on: https://dart-review.googlesource.com/77228
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-09-28 21:43:04 +00:00
Ryan Macnak 2f25dcda16 [vm] Remove script snapshots.
Change-Id: I5bc692b754c0909de4aa5f05af81b074578b16f4
Reviewed-on: https://dart-review.googlesource.com/76706
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-09-26 22:49:27 +00:00
asiva 355c73d4ee [VM] Remove support for option --no-preview-dart-2
- option --no-preview-dart-2 will now result in an error
- change aot-assembly build rule to generate AOT snapshot using Dart 2
- generate coresnapshot using Dart 2 (this snapshot is not used yet, next CL which switch the isolate create code to use this snapshot)
- by pass all Dart1 test runs in the status file
- change the default compiler setting in test.py to use dartk
- have test.py not pick up any configuration for --no-preview-dart-2

Change-Id: Ia136943ebfd0fed0c52683b330745b3e2c7a7ce6
Reviewed-on: https://dart-review.googlesource.com/75820
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-09-24 20:38:08 +00:00
Zach Anderson 0bbdd8f7d9 [build] Correctly rebase kernel-service output for depfile
Otherwise ninja thinks kernel-service is always dirty.

Change-Id: I40fdddf25bddeb4546e520e7d8f0137eedf87bfd
Reviewed-on: https://dart-review.googlesource.com/75780
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-09-20 17:59:50 +00:00
Devon Carew 2c427d33fc Train the dartanalyzer on less source.
Change-Id: I6d8ff52839b0178cbc7d72ab8a1638bae5065993
Reviewed-on: https://dart-review.googlesource.com/75626
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-09-19 23:37:52 +00:00
asiva a0776096b9 Cleanup some of the build rules to not use Dart 1 mode.
Change-Id: I799ae7e910b90047a76151e47fc4c46d20f46ff7
Reviewed-on: https://dart-review.googlesource.com/74493
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
2018-09-19 22:23:33 +00:00
Devon Carew 7df4900a94 Train the dartanalyzer tool on generating summaries.
Change-Id: Ic887eb2135161b5795a2456d38677f016bbe3643
Reviewed-on: https://dart-review.googlesource.com/75561
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-09-19 17:43:46 +00:00
Stephen Adams 96a190020e Remove dart2js non-strong platforms
Since dart2js is now strong-mode-only and ignores the --strong flag, I don't see the point in having 'strong' in the platform name.

Removed:
  dart2js_platform
  dart2js_server_platform
renamed:
  dart2js_platform_strong --> dart2js_platform
  dart2js_server_platform_strong --> dart2js_server_platform

Change-Id: If74ef31a17acc15a23a5338e5f53e820fc66b0dd
Reviewed-on: https://dart-review.googlesource.com/71425
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-09-18 16:33:19 +00:00
Jens Johansen 1e4b3e9754 Train kernel-service on Windows
Now, on Windows:
hello.dart (hello world script): ~0.33s, ~0.33s, ~0.29s, ~0.28s, ~0.29s
pkg\complier\bin\dart2js.dart --help: ~3.37s, ~3.36s, ~3.40s, ~3.50s, ~3.41s

Before, on Windows:
hello.dart (hello world script): ~0.85s, ~0.87s, ~0.86s, ~0.90s, ~0.91s
pkg\complier\bin\dart2js.dart --help: ~6.12s, ~6.20s, ~6.26s, ~6.13s, ~6.04s

So...:
hello.dart (hello world script): -65.3759% +/- 4.15274% at 95.0% confidence
pkg\complier\bin\dart2js.dart --help: -44.5854% +/- 1.68273% at 95.0% confidence

Change-Id: I6679a7fff68c146390ef70832278ece6eb120c7c
Reviewed-on: https://dart-review.googlesource.com/73921
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-09-07 14:31:03 +00:00
Paul Berry d04d304909 Stop using/generating spec.sum file.
For some time now, this file has had the same contents as strong.sum.
There's no point in keeping it around.

Change-Id: I793a41ca6cb1c47c68357f549d299fa95b96c4c5
Reviewed-on: https://dart-review.googlesource.com/71701
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-08-30 12:32:52 +00:00
asiva a6d20e6df4 Fix dependence on kernel-service in the application snapshot rule.
Change-Id: I8cc047ed3bcb1fbd9144ca3f1c9192f63b99a10b
Reviewed-on: https://dart-review.googlesource.com/71421
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-08-24 18:03:30 +00:00
asiva d1bd887d03 [VM/SDK] Switch kernel isolate to run in Dart 2 mode
- Switch the kernel isolate to run in Dart2 mode
- Refactor build rules so bootstrapping of the front end happens
  with a prebuilt dart sdk
- Refactor application snapshot build rules so the kernel application
  snapshot rule does not get into a cyclic dependency during the
  bootstrap stage

Change-Id: Iccca3233f6cb8d6b307b4cf1ca3262f293f794a6
Reviewed-on: https://dart-review.googlesource.com/70841
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-08-21 20:28:06 +00:00
Vyacheslav Egorov 032037681e Revert "[VM/SDK] Switch kernel isolate to run in Dart 2 mode"
This reverts commit 499761f0da.

Reason for revert: crashes when building SDK, red bots, broken Flutter 3xHEAD bot

Original change's description:
> [VM/SDK] Switch kernel isolate to run in Dart 2 mode
> 
> - Switch the kernel isolate to run in Dart2 mode
> - Refactor build rules so bootstrapping of the front end happens
>   with a prebuilt dart sdk
> - Refactor application snapshot build rules so the kernel application
>   snapshot rule does not get into a cyclic dependency during the
>   bootstrap stage
> 
> Change-Id: I067c5f1165fb93811dcc8e390a8bf381db721e5b
> Reviewed-on: https://dart-review.googlesource.com/70461
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>

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

Change-Id: Ibf6d526fb5132b766f063fcf873cde661ae895d7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/70516
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-08-19 19:58:32 +00:00