Commit Graph

163 Commits

Author SHA1 Message Date
Sigmund Cherem f72782ce9b [dart2js]: require dart2js to be invoked from an approved CLI
The dart2js snapshot is not meant to be invoked directly except from
a limited set of entry points (CLIs and internal build systems).
This change makes it an error to invoke it in unsupported ways.

Note: this change is not expected to be visible to end users.

Fixes #51695

Change-Id: I4013dd00b90bb3d54483e2f112e0ddfb8dc694e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289885
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2023-03-23 01:58:58 +00:00
Nicholas Shahan b4442e92eb [dart2js] Compile modular tests with null safety
The .dill and .js compilation steps in the modular suites now use
sound null safety for the files under test.

Change-Id: I264c39d70d160377b4581f910cff1a611819cfbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289405
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-03-22 20:09:33 +00:00
Nicholas Shahan cf7d78cc2c [dart2js] Run modular steps with sound null safety
Update the dart2js and kernel worker steps themselves to run
with sound null safety. This is separate from the code being compiled
in the step which will be migrated in another change.

Change-Id: Idbaaeb255209e79bb34aa34aedeb020be097c1c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289408
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2023-03-17 16:26:10 +00:00
Nate Biggs 865421c169 [dart2js] Migrate pkg/compiler/tool to null safety.
Change-Id: I800aa4b5af9b9950ece488ed7e59bf98d2fc1c1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282980
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-02-15 04:04:48 +00:00
Alexander Markov a9d9b7395b [kernel] Enable sound null safety in TargetFlags by default
TargetFlags.enableNullSafety is set to true by default and
also renamed to TargetFlags.soundNullSafety to better reflect its
meaning.

TEST=ci

Change-Id: I2c2f30c2af6502fd9a96141dc60e4afbf8c524fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280216
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-02-02 14:54:18 +00:00
Nate Biggs f203815ba4 [dart2js] Migrate tool/graph_isomorphizer and test/tool/graph_isomorphizer for null safety migration.
Change-Id: I9061386d97bed2e366b270e9f70eb5f2e4dff404
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279801
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-02-01 14:30:22 +00:00
Nicholas Shahan c140324e1e [ddc] Rename .dill files
- Makes the names consistent with dart2js and dart2wasm.
- Prepares for the upcoming removal of the weak null safety .dill file.

Change-Id: Idcf694b27cd4731db8f7ed6f0fdab7766ced08a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/277183
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-01-18 01:34:57 +00:00
Nicholas Shahan 1c3a92cdb9 [test] Explicitly pass sound mode flag
Change-Id: I1e6f7fbc96cddbb8a98a5a3f32bfeab792ce1bbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/277041
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-12-21 21:50:48 +00:00
Nicholas Shahan 34b5537c18 [test] Compile .dill file with sound null safety
- Migrate the file being compiled to sound null safety.
- Use sound null safety and the sound SDK outline to compile the
.dill file used in this test.
- Removed the assumption that test runs on an x64 processor.
- Added a simple throw to echo the errors from running the
compile.

Change-Id: Iec6bda8c981c1e69603313e4d74f1eb491734b09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276801
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2022-12-20 22:45:38 +00:00
Josh Soref 419df9d3e5 Spelling pkg compiler
Closes https://github.com/dart-lang/sdk/pull/50774

GitOrigin-RevId: 41028b5de4e2e0719e08f180e32ccc1f2bef8dac
Change-Id: I5e6675d490a44feb0ea008582879266e421939f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276561
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2022-12-20 13:06:29 +00:00
Sigmund Cherem e8906e65e7 [3.0 alpha][dart2js] No longer infer the null-safety mode from sources.
This prepares dart2js to default to sound null safety in Dart 3.0.

The compiler no longer infers the default mode based on the input
program, instead uses sound null safety unless
'--no-sound-null-safety' is specified.

On a separate change, we expect to remove the option of disabling
null safety.

Note: this change should also be reflected in the CHANGELOG, but
we've currently not included it to redeuce merge conflicts, as we plan
to land multiple 3.0-alpha changes in a short window of time

Change-Id: Id87498cc5976548ec89d1f36c60674b72406950a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270860
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-12-07 04:02:13 +00:00
asiva 606a64a743 [3.0 alpha][VM/Runtime] - Flip flag to make strong null safety the default.
- Flip flag to make strong null safety the default
- Remove code that auto detects null safety mode from source files,
  it is necessary to specify --no-strong-null-safety to opt out.
- Retains sniffing of AOT/JIT snapshots and kernel files to determine
  null safety mode, the opt out has to be done when generating these
  file.

TEST=ci

Change-Id: If2c9608eedb7c46d9c3cd85e261ee9640e0d28eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261140
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-12-06 04:04:23 +00:00
Nate Biggs ba662eb4b4 [dart2js] Replace dart2js_dynamic_test with lint and appropriate lint ignores.
See patch 2 for failures coming from this new analysis option.

Change-Id: I6bb10c2eb12431f6c503cc817a9c9bb45ba597a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/269800
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-11-15 21:11:59 +00:00
Lasse R.H. Nielsen 8a883fa54d Change : to = for default values in pkg.
Leaves some in parser test:
 pkg/front_end/parser_testcases/error_recovery/keyword_named_formal_parameter_prime.dart

TEST=Refactoring, covered by existing tests.

Change-Id: I7a83ef95df3cbd283878b3685b5c747bd89a1b16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256125
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-08-24 15:57:16 +00:00
Anis Alibegić 40e18905f2 Fixed various typos in a lot of files
Closes https://github.com/dart-lang/sdk/pull/49478

TEST=Manual

GitOrigin-RevId: f4c9c6869dfe73639295e86574a021523b3d374d
Change-Id: I134a97caed4eec59d70e9cbca16b7e9a472cf2c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251902
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Chisholm <kevinjchisholm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-07-25 12:21:59 +00:00
Nate Biggs 7fd20c724d [dart2js] Add blocked info to null safety candidates tool.
Calculates and prints the number of files blocked by each unmigrated file. Adds he option for a flag to sort by number of blocking files.

Change-Id: I565f565d2d68e6d630bb2c9bb6d7fc46b016e365
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251180
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-07-12 18:39:02 +00:00
Sigmund Cherem 245f7a003c [dart2js] Add a couple scripts to aid our migration.
These are simple scripts to count progress and find migration candidates.

Change-Id: I872d85891001349dadbcf1d67e64ab5aa993d2a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250146
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-07-02 04:25:21 +00:00
Ahmed Ashour 85700570f6 Fix typos
Fixes #49241

TEST=ci

Change-Id: I6117bf816fc8c4613cce66927f952fef75632725
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248120
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-06-15 11:08:28 +00:00
Joshua Litt 43cfa8cea3 [dart2js] Support trimming modular analysis data.
Change-Id: I0e0902813fd71c0bda5de6171487fa0e941f6bad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241246
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-04-20 21:58:29 +00:00
Joshua Litt 9a33643d76 [dart2js] Restore modular analysis test coverage.
Change-Id: Ieb58782c916a5e2c3a8b4797c8f8a49562fdcd5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240906
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-04-13 17:06:22 +00:00
Sigmund Cherem 441a762352 [modular_test] no longer generate .packages within modular test suites
Since the null-safety test migration we've been generating both a .packages file
and a package_config.json file. This deletes the use of the old .packages file
and updates all references to use the new file.

Change-Id: Iecef64ac8ed8579338795ad5327765118d643236
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240650
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-04-09 00:35:13 +00:00
Stephen Adams 5c2ca380a4 [dart2js] Tag all sources with @dart = 2.10
Change-Id: Ie9c7548dc81b58db0c1149124db79e4cf1430cc1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239723
Reviewed-by: Nate Biggs <natebiggs@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-04-06 21:31:45 +00:00
Joshua Litt b1fbe0c01d [dart2js] Support running modular analysis alongside building a dill.
Change-Id: If10385445c5f6267e2de20b090b37e1741b7ace7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237925
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-03-30 23:59:00 +00:00
Stephen Adams 727a35c588 Add szcmp script for comparing sizes of files
Change-Id: I2017b0f1e746e191f0a5de1f047dec8ba19dd395
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/238384
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-03-23 23:59:21 +00:00
Joshua Litt 0ad7f27990 [dart2js] Apply mixin transform globally.
This cl applies the mixin transform only on the full dill. In addition,
this cl also adds a concatenate dills step to more closely match
modular builds in production.

Change-Id: Icb37c5e2180c9e8246334143a6f772a203f80bf9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/238320
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-03-23 18:38:51 +00:00
Joshua Litt da66e1f39a [dart2js] Make info_visitor_test cleanup created test data.
Change-Id: I8f70c5d751b670bde2d2b6f3fcc2c163722edac8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232661
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-02-11 19:41:26 +00:00
Nate Bosch 33e174084a Replace Uri.scheme == with Uri.isScheme
Use `hasScheme` in place of comparing against the empty string, and
`isScheme` to compare against all other schemes.

TEST=No behavior changes.

Change-Id: Ifc9fd13c6cf37933ebd4a754c4b500dedbcb291b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231185
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2022-02-08 21:38:57 +00:00
Stephen Adams 5a291a28e7 [dart2js] Avoid using 'at' as a minified instance method name.
This CL fixes one part of #48118 by no longer accidentally calling
String.prototype.at.

- Update the list of names that should not be used for minified instance
  method names.
- Expand comment.
- Add a script in tools for finding all the names from within a browser.



Bug: 48118
Change-Id: Iac41bd707d7b447a998d0d94a8b37576dc7d1493
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228300
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-01-29 01:03:52 +00:00
Joshua Litt f6ebe80d26 [dart2js] Refactor program split constraint's Fuse node.
This cl makes Fuse an unnamed ordering node, and allows ors / ands
within the fuse. For examples of the benefits of this new Fuse, please
see:
pkg/compiler/test/custom_split/data/fuse_with_and/main.dart
and
pkg/compiler/test/custom_split/data/fuse_with_or/main.dart

Change-Id: I5076abcd617d138b03dc8944737c61645e42e038
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228685
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-01-26 18:03:58 +00:00
Joshua Litt b735151bbc [dart2js] Restore test coverage for modular analysis.
Change-Id: Iedfc6c1779064db469c209545c361e047ee0318c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221026
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2021-11-30 01:02:34 +00:00
Joshua Litt 4f6d813c3c [dart2js] Add '--no-summary' to compute_kernel.
Change-Id: Ie3493137794c95f5061ed7d2918568127c5e15ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221220
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-11-25 23:39:24 +00:00
Joshua Litt 7a277a8979 [dart2js] Cleanup old serialization logic.
Change-Id: Ib43b5d7c5cb4234deb0bf026bfe7aaf7e1fced7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220800
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-11-23 18:37:51 +00:00
Joshua Litt 3d1f6a48b7 [dart2js] Add dart2js target to build summaries.
Change-Id: I1ef0b3f87124333e44cb15001c556b1767ddf28f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219841
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-11-18 00:58:40 +00:00
Mayank Patke 70479beea5 [dart2js] Rename platform files.
This avoids terms like "NNBD" and "strong" in favor of sound/unsound
null safety.

Change-Id: I1c99bea7155f80bc6acf62f46c6f266a29ebf1a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213406
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-10-15 21:40:08 +00:00
Joshua Litt 7e76dd6b28 [dart2js] Select main method manually when compiling from dill.
Change-Id: I45ddca41b9bff49606e49dfd9b6110b7fc7f2283
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215683
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-10-15 16:40:29 +00:00
Joshua Litt a78d0ce047 [dart2js] Reuse serialization ids for codegen.
Impact on CM:

Before(3a):
  Serialized 1,224,950,828 bytes data to 520,676,411 bytes
Before(3b):
  Compiled 1,745,627,239 bytes data to 425,409,433 characters

After(3a):
  Serialized 1,224,950,828 bytes data to 350,134,862 bytes
After(3b):
  Compiled 1,575,085,690 bytes data to 425,409,433 characters


Change-Id: Ie0247e33f7bcccd0492c3d209ad02dc947341098
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215480
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2021-10-05 17:32:30 +00:00
Kevin Moore 70533ae7fa pkg:compiler - enable and fix prefer_final_fields lint
Change-Id: I042f6047c2c10490121398027489217c6291425d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211622
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-09-24 21:37:39 +00:00
Sam Rawlins 5a4921bd76 Remove unnecessary import from compiler
Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: I98e103a1af11794927fc1fe6794e69ec655debf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213424
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2021-09-16 18:03:15 +00:00
Joshua Litt aed53191e7 [dart2js] Add modular analysis logic.
This is an initial step to get the modular analysis in place, it
includes:
 * flag to emit modular data
 * flag to load modular data
 * new modular strategy that uses serialized modular data
 * serialization of part of the modular data
     - currently only impact-builder-data
 * new flag in our modular test suite to play with the new feature. This
   flag is off by default and will not be tested in the bots
   unless we enable it by default or add a test matrix step for it.

(See original https://dart-review.googlesource.com/c/sdk/+/105702)

Change-Id: I951ab68567f907117a1e868aaf673841ae948484
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210061
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-09-08 19:56:03 +00:00
Gabriel Castro 0f04dc651d Added checks to gather method data
Change-Id: I809e05ea3554ae9768d3f9cb25c824bbe36ca2bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203600
Commit-Queue: Gabriel Castro <gabrielmcastro@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2021-08-06 03:59:22 +00:00
Gabriel Castro 53198d4d1c Added check to gather parent class name and classes mixed with
Change-Id: I56f5cae15b0e4a94ade886e317f3974cd3de6532
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203060
Commit-Queue: Gabriel Castro <gabrielmcastro@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2021-08-06 00:59:41 +00:00
Gabriel Castro 9420dfd3ca Initial commit for information collection visitor.
Accepts a .dill and recusivly visits component tree structure.
Added check for super call.

Change-Id: I926700afaeae6efddc9b70ca2121ae6cecdab33a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202880
Commit-Queue: Gabriel Castro <gabrielmcastro@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2021-08-05 19:49:21 +00:00
Joshua Litt d5f3189c91 [dart2js] Extends the graph_isomorphizer with more coverage.
This cl adds support for generating classes, classes used only for
types, mixins, closures, and constants, to the graph_isomorphizer.

Change-Id: I04e5590a9ff903b0b32daf1f4607fb1b0920e0cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189841
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-04-01 17:06:52 +00:00
Joshua Litt 81092839c7 Reland "[dart2js] Avoid reserializing the closed world alongside type inference."
This is a reland of 7b022a7f2f

Original change's description:
> [dart2js] Avoid reserializing the closed world alongside type inference.
>
> This cl adds a temporary flag '--no-closed-world-in-data' in order to
> support serializing global inference results with and without the closed
> world.
>
> This flag only exists to allow us to roll this into google3. Afterwards,
> it will be removed.
>
> Change-Id: I6e9712739edd148edcf43007b6ece35efa688538
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192124
> Commit-Queue: Joshua Litt <joshualitt@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

Change-Id: I47c08edb868f272c7501ae139a9533fa07d4176f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193585
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2021-03-31 16:11:39 +00:00
Joshua Litt 70db4908e4 Revert "[dart2js] Avoid reserializing the closed world alongside type inference."
This reverts commit 7b022a7f2f.

Reason for revert: Missed one of the references to write-data

Original change's description:
> [dart2js] Avoid reserializing the closed world alongside type inference.
>
> This cl adds a temporary flag '--no-closed-world-in-data' in order to
> support serializing global inference results with and without the closed
> world.
>
> This flag only exists to allow us to roll this into google3. Afterwards,
> it will be removed.
>
> Change-Id: I6e9712739edd148edcf43007b6ece35efa688538
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192124
> Commit-Queue: Joshua Litt <joshualitt@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

TBR=johnniwinther@google.com,sigmund@google.com,joshualitt@google.com

Change-Id: Icc8082462f02bc7336953c915ef2203697085358
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193584
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2021-03-30 22:29:03 +00:00
Joshua Litt 7b022a7f2f [dart2js] Avoid reserializing the closed world alongside type inference.
This cl adds a temporary flag '--no-closed-world-in-data' in order to
support serializing global inference results with and without the closed
world.

This flag only exists to allow us to roll this into google3. Afterwards,
it will be removed.

Change-Id: I6e9712739edd148edcf43007b6ece35efa688538
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192124
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-03-30 16:59:41 +00:00
Joshua Litt 20475fe5da [dart2js] Add script to start generating better tests for deferred_loading.
Change-Id: Iffe5b7010ad0ada09a9c99246bef6386f255586c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188841
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-03-08 22:54:03 +00:00
Lasse R.H. Nielsen d352bc28b8 Remove (most) uses of the "non-nullable" experiment flag.
Since the flag is now enabled by default, there should be no mention of it.
There are still some uses in front_end/testcases that are not just removable
(it also uses `no-non-nullable`). There migth be more uses that are not
as easily found as grepping for `--enable-experiment

Removes two VM tests where fixing them meant they were just duplicating
the corresponding non *_2/ tests.
Fixes #44941

TEST= Large number of tests chaged.=(no-)?non-nullable`.

Change-Id: Ief755981ccde9a5482fcdf408c2929c74433a710
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183688
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-02-12 17:16:54 +00:00
Joshua Litt 86e598808f [dart2js] Support reading closed world during codegen.
Change-Id: I6dd82cb7744b7053eac2afc2ef5206d176c2da26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175320
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-12-08 17:49:54 +00:00
Joshua Litt cfccd80ef7 [dart2js] Break out closed world computation from global inference step.
Change-Id: Id743ad11344e94ebc56f732d5580c33ae8e45e46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169123
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-11-09 21:35:14 +00:00