Commit Graph

5749 Commits

Author SHA1 Message Date
Nate Biggs 6548bf12ed [dart2js] Implement a bucketed work queue for the inferrer.
The bucket indexing can be made more complex but for now this simple change of processing CallSiteTypeInformations separately has shown an improvement in inference execution time (~5% on a big program).

Change-Id: If029906ca0c51d67939776732e0a25dcab7f6af1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284400
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-02-21 23:25:23 +00:00
Nate Biggs 318f5b09c8 [dart2js] Merge diffs from inferrer/ into inferrer_experimental/
Change-Id: Iae08eaad674ec2aa0113cf832fdcdb1895c19024
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284040
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-02-21 23:25:23 +00:00
Nate Biggs 671b7e3c77 [dart2js] Fix handling of dynamic calls in linearized algorithm.
Change-Id: Ibeb285ee293fe522c4e32fedb91d3deee92f091a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284320
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-02-21 23:24:40 +00:00
Stephen Adams 19ac93da32 [dart2js] Allow constant record Types to be named
Change-Id: Ib1ba362ea3f91329f2b2357597bc0e874a2c4d04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284280
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-02-21 20:01:50 +00:00
Ömer Ağacan 7c6423cb32 Revert "[kernel] Remove unused RecursiveVisitor type parameter"
This reverts commit a329e05684.

Reason for revert: Broke internal projects

Original change's description:
> [kernel] Remove unused RecursiveVisitor type parameter
>
> TEST=ci
>
> Change-Id: I523282e933b955389c950c1942253d2d66a51f3f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283821
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Commit-Queue: Ömer Ağacan <omersa@google.com>

TBR=johnniwinther@google.com,omersa@google.com,dart-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: Iad30e34ce0a491711b0daa1991c69de1796f8846
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284023
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-02-18 10:52:39 +00:00
Ömer Sinan Ağacan a329e05684 [kernel] Remove unused RecursiveVisitor type parameter
TEST=ci

Change-Id: I523282e933b955389c950c1942253d2d66a51f3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283821
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2023-02-18 07:31:18 +00:00
Mayank Patke e53188ae52 [dart2js] Make UnevaluatedConstantFinder extend
ComputeOnceConstantVisitor.

This ensures that sub-constants are visited only once, avoiding
an exponential number of visits in the worst case.

Change-Id: I6a96a787d09bd0db6909cc78f32b21576369719c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283962
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2023-02-17 23:30:29 +00:00
Mayank Patke bfcaa60b6a [dart2js] Remove replaceImplicitConstant.
This option is unused, and it was slow/error-prone anyway.

Change-Id: Ic351227bd8bb52ee8f7eed5f17e51c0e299faedd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283961
Reviewed-by: Nate Biggs <natebiggs@google.com>
2023-02-17 23:30:29 +00:00
Mayank Patke 2860ba107c [dart2js] Remove exception handling from Dart2jsConstantEvaluator.
The CFE constant evaluator was rewritten to no longer throw if constant
evaluation fails, so we can get rid of the try/catch. Internally, the
CFE constant evaluator returns an AbortConstant, which is processed by
`evaluate` into an UnevaluatedConstant containing an InvalidExpression,
which is why our existing handling is sufficient.

Change-Id: I1ddc3b7dce3081b37177dd3384c5fc19c9b28be6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283960
Reviewed-by: Nate Biggs <natebiggs@google.com>
2023-02-17 23:30:29 +00:00
Stephen Adams b840922ca5 [dart2js] Avoid replacing implicit constants after scope visitor
Change-Id: I12d93df222ec6711b1b1db01a3ea0bf8476370fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283540
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-02-16 22:18:25 +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
Nate Biggs a560f96987 [dart2js] Update pkg/compiler/test with small changes prior to enabling sound null safety.
Change-Id: I3937815c9a3f01c0113e2b6edc93bb3cf8eb85b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283000
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-02-15 04:04:48 +00:00
Nate Biggs 545ee13cd4 [dart2js] Clean up usages of 'new' keyword.
Change-Id: I193e19581d29a9c4b343ae0a681d1ff530cfce1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281309
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-02-14 02:36:38 +00:00
Mayank Patke 61b2ec77e1 [dart2js] Automatically set dart.web.assertions_enabled=true.
When (user) assertions are enabled in dart2js, we automatically update
the environment as if -Ddart.web.assertions_enabled=true were
passed. This allows dev-only code to be gated behind
`const bool.fromEnvironment('dart.web.assertions_enabled')` without
having to supply a redundant option manually.

Change-Id: I40d670b6fe87d5e27b2b8d50599261cca8a79a42
Bug: b/254543452
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270301
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-02-14 01:35:05 +00:00
Mayank Patke 9c49b0d175 Reland "[dart2js] Extend const simplifier to local/static reads and invocations."
This reverts commit 090a1ea4e8.

Reason for revert: Relanding with fixes

Original change's description:
> Revert "[dart2js] Extend const simplifier to local/static reads and invocations."
>
> This reverts commit 826df3415a.
>
> Reason for revert: Causes failures in some Angular Dart applications
>
> Original change's description:
> > [dart2js] Extend const simplifier to local/static reads and invocations.
> >
> > We now attempt to evaluate
> > - final local variables with initializers
> > - final statics with initializers
> > - static or local function invocations if they just return an expression
> > by attempting to const-evaluate the initializer/returned expression.
> >
> > Change-Id: I976863d950ba1609c5d8e6a21884ca56af0d2b4b
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275145
> > Reviewed-by: Sigmund Cherem <sigmund@google.com>
> > Commit-Queue: Mayank Patke <fishythefish@google.com>
>
> TBR=sigmund@google.com,fishythefish@google.com,dart-scoped@luci-project-accounts.iam.gserviceaccount.com
>
> Change-Id: I32900085f52219a2dc5add161376ddbe9e733277
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281800
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: William Hesse <whesse@google.com>
> Auto-Submit: William Hesse <whesse@google.com>


Change-Id: I46847d45084718633c332954dc6b39b181869983
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281861
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2023-02-13 22:16:19 +00:00
Devon Carew 21ab29fef6 [deps] rev package:source_maps to the latest
Change-Id: Ic0926143ea98bc3bc1eebfaca0d20c3f5578154a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282808
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-02-13 21:18:37 +00:00
Joshua Litt 40cc0bd479 [dart2js] Ensure JavaScriptObject's interceptor is emitted.
Bug: #51307
Change-Id: I2aab631cabc659e882e4bf998bcf287c7dc76465
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281872
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2023-02-13 20:35:59 +00:00
Srujan Gaddam e6e1040afc [dart:js_interop] Expose dart:_js_interop
Types still need to be sealed, so this library is exposed with a
disclaimer that users should not subtype any types.

CoreLibraryReviewExempt: Backend-specific library for JS and Wasm.
Change-Id: I2ed8b0db6b2de60932a551047c6c9eae4a34ce2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281343
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-02-10 01:41:50 +00:00
Stephen Adams 6b5a0215db [dart2js] Fix serialization error with maps keyed with Records Kernel accessors
Change-Id: I81fe905978c3f81e8e5e72f2dcaa18e1a307ca55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281873
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-02-10 00:31:20 +00:00
Stephen Adams a0fce7be4d [dart2js] Dynamic calls to record getters.
Added synthetic getters for records that are attached to the shape class.

It is a bit clunky since there are assumptions that a method came from something defined in Kernel.

- There is no source information for the synthetic method
- There are assumptions that some information can be derived by reference to Kernel definitions.

We do get a lot for free doing it this way, e.g. tree-shaking of unused getters and call-through stubs of getters used as a dynamic method invocation.

Added a test that (1) uses names that require the interceptor calling convention and (2) requires dart2js to generate call-through stubs.

Issue: #49718

Change-Id: I682c1f005e87765b0e3bf7e6550c945d30b56b8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280960
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-02-08 23:13:07 +00:00
William Hesse 090a1ea4e8 Revert "[dart2js] Extend const simplifier to local/static reads and invocations."
This reverts commit 826df3415a.

Reason for revert: Causes failures in some Angular Dart applications

Original change's description:
> [dart2js] Extend const simplifier to local/static reads and invocations.
>
> We now attempt to evaluate
> - final local variables with initializers
> - final statics with initializers
> - static or local function invocations if they just return an expression
> by attempting to const-evaluate the initializer/returned expression.
>
> Change-Id: I976863d950ba1609c5d8e6a21884ca56af0d2b4b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275145
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Commit-Queue: Mayank Patke <fishythefish@google.com>

TBR=sigmund@google.com,fishythefish@google.com,dart-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I32900085f52219a2dc5add161376ddbe9e733277
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281800
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: William Hesse <whesse@google.com>
Auto-Submit: William Hesse <whesse@google.com>
2023-02-08 19:05:18 +00:00
Joshua Litt bd79be0e19 [js] Move allowInterop functions to dart:js_util.
CoreLibraryReviewExempt: Has core library owners approval.
Change-Id: Iea2f2e707c69c9082e158b48b50dcaf4a7b01067
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279740
Reviewed-by: Ömer Ağacan <omersa@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2023-02-08 17:16:20 +00:00
Mayank Patke 826df3415a [dart2js] Extend const simplifier to local/static reads and invocations.
We now attempt to evaluate
- final local variables with initializers
- final statics with initializers
- static or local function invocations if they just return an expression
by attempting to const-evaluate the initializer/returned expression.

Change-Id: I976863d950ba1609c5d8e6a21884ca56af0d2b4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275145
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2023-02-07 20:07:57 +00:00
Mayank Patke 397ed8673c [dart2js] Add phase 1 kernel transformer to simplify const conditionals.
Suppose we have code like

if (isDevMode) {
  // do foo
} else {
  // do bar
}

where isDevMode is const (or can be evaluated as const). In particular,
isDevMode can be controlled by compile-time options, like
bool.fromEnvironment.

We currently eliminate the dead branch during SSA, but that means we do
the work of compiling dead code in the previous phases. Instead, we can
recognize that the condition is const (or effectively const) and
eliminate the dead AST subtree directly.

Change-Id: Ia91da5ebc7fa496a1b963308c6e02d572cab936e
Bug: b/254543452
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270281
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-02-07 20:07:57 +00:00
Mayank Patke b028da6407 [dart2js] Add a 'FALSE' JS_GET_FLAG.
There are a few places in our runtime libraries where we have some code
guarded by `if (false)`. This is to ensure that the guarded code is
marked as used and compiled, but not emitted unless rewritten during
SSA. This pattern is somewhat brittle - a kernel
optimization/transformation which eliminates dead code may discard the
code.

Instead, we can write `if (JS_GET_FLAG('FALSE'))`, which will only be
written to `if (false)` and then discarded during SSA.

Change-Id: I8edc2b24e5fbeece1f042ff3d0c87d58e939bf84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271800
Reviewed-by: Stephen Adams <sra@google.com>
2023-02-07 20:07:57 +00:00
Srujan Gaddam 08feb43d6c [dart2js] Add support for InlineTypes in visitors and serialization
This is mostly to get the test bots running for tests that use
inline classes. It's possible there are other visitors that need
to be modified that this CL does not touch.

Change-Id: I9359f41a8dd51c290304126510122cc565902d98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280402
Reviewed-by: Stephen Adams <sra@google.com>
2023-02-07 18:47:23 +00:00
Joshua Litt 4dc19b6bfb [dart2js] Ensure JavaScriptFunction gets emitted for allowInterop
Change-Id: I320653a46da31cfb626c41a3a2307b1d1626173a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280205
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2023-02-06 21:59:29 +00:00
Joshua Litt 99a9f3d516 [js_types] MVP of JS types.
Change-Id: Ic329146a270ff32fc2cdb32febc6f574bc81792f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280131
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2023-02-02 21:29:01 +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 3257cc8f1d [dart2js] Migrate test/model for null safety migration. (2/2)
Change-Id: Ida98d003243a27368b5cb4ba961d4cf440883cb0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280220
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-02-02 04:21:58 +00:00
Nate Biggs f3927aa025 [dart2js] Migrate test/model for null safety migration. (1/2)
Change-Id: I558a5396f791c420856ce24c1571e9d69b2ac038
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279841
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-02-02 04:21:58 +00:00
Nate Biggs 5dc018df0c [dart2js] Migrate sourcemaps/helpers/diff.dart for null safety migration.
Change-Id: I718c831272e369ba9df2b19474f4765ba085b9f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279840
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-02-02 04:21:58 +00:00
Nate Biggs 1add1a8522 [dart2js] Migrate test/codegen for null safety migration.
This change seems fairly large but most of the files only contain a change to remove the language comment.

Change-Id: I36d7fcc327172101a61ff97b7d49b168911b6e01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279820
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-02-02 04:21:58 +00:00
Stephen Adams 4acbe13414 [dart2js] Fix assert on records in type rule generator.
Change-Id: Ia2c623b3d79b12d3d25b0ea49ef22c08b778e25c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280210
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-02-01 23:33:26 +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
Nate Biggs 9bd27993e8 [dart2js] Migrate test/codesize/swarm/swarm_ui_lib for null safety migration.
Change-Id: I0c798d47b8e2611b704f74da6e1fbd2b3f22ad22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279800
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-02-01 14:30:22 +00:00
Nate Biggs fd2dcca9e1 [dart2js] Migrate test/codesize/swarm/swarm_ui_lib/view for null safety migration.
Change-Id: I98be16243f97e84251322bc9eabbc85fbc4da828
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279781
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-02-01 14:30:22 +00:00
Nate Biggs 9dfdd3c45c [dart2js] Migrate test/codesize/swarm/swarm_ui_lib/touch for null safety migration.
Change-Id: I5cd5cb1aed032007370ce79b083b6fe60d774f68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279780
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-02-01 14:30:22 +00:00
Stephen Adams 18cee8078a [dart2js] Implement get runtimeType for records.
Change-Id: I5befb8a499e0bfc9acd884189317f4da19fab750
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280046
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-01-31 19:44:48 +00:00
Josh Soref 77978889eb Spelling
Closes https://github.com/dart-lang/sdk/pull/51143

GitOrigin-RevId: 9e21c99a222d588e4fc95980725a2f8c9784965c
Change-Id: If0870e8936c7649935dce7e23cd783d62aa5610c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279916
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-01-30 18:29:59 +00:00
Ahmed Ashour 63180b95ed Remove superfluous words.
Fixes #51095

TEST=ci

CoreLibraryReviewExempt: There are no API changes, just removal of superfluous words in the comments.
Change-Id: Ib1020c62fe6baed5ca68f0074323f025cc90e9f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279500
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-01-30 15:58:38 +00:00
Lasse R.H. Nielsen bee7ab2b32 Make record positional field getters start at $1.
An update for co19 is available at https://github.com/dart-lang/co19/pull/1759

TEST=Existing tests run after change, two new tests for edge cases.

Change-Id: I408e398d532ba2c2e8e60777bb4f7bd0057e27fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278912
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2023-01-30 08:14:28 +00:00
Stephen Adams a7d87375a3 [dart2js] Implement is-tests on records.
A `RecordsCodegen` class collects the instantiated classes for
representing records of various shapes in the codegen queue.  Later,
this is used to emit functions that test a record type by checking the
shape (using `instanceof`) and then testing the field values.

Future work will consider how to make this work with deferred loading.

Change-Id: I497a80b0db3a10129f15838eaa72c3a2320632b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279759
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-01-27 20:24:20 +00:00
Nate Biggs 9944232752 [dart2js] Migrate test/sourcemaps for null safety migration.
Change-Id: Ieacc99cdb4593bf291a366b3544a8eddabb2e116
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279589
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-01-27 00:24:47 +00:00
Nate Biggs 7b9470edbf [dart2js] Migrate test/sourcemaps/tools for null safety migration.
Change-Id: I6a130dc27f31ac795f276a1b1e4d8699678b8dcb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279588
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-01-27 00:24:47 +00:00
Nate Biggs e6df56399f [dart2js] Migrate test/sourcemaps/helpers for null safety migration.
Change-Id: I4405287e4304b2918fe0d613914d4d63178701e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279587
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-01-27 00:24:47 +00:00
Nate Biggs 29b39f5e9c [dart2js] Migrate test/dump_info for null safety migration.
Change-Id: Iccac408dd95c1bc404012b424c03e0f6f169c1d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279586
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-01-27 00:24:47 +00:00
Nate Biggs 97dc119d4b [dart2js] Migrate test/rti for null safety migration.
Change-Id: I0852a179250b0007a0134dc8d145ae2925f84397
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279585
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-01-27 00:24:47 +00:00
Nate Biggs a4e4761339 [dart2js] Migrate test/serialization for null safety migration.
Change-Id: If2338b67b207c9fffc8f09be399e99bbd5119fd7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279584
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-01-27 00:24:47 +00:00
Josh Soref 01b28894e7 Spelling pkg dev compiler
Closes https://github.com/dart-lang/sdk/pull/50861

GitOrigin-RevId: 71005e6f5bf5a151cb5c1aefb6a2a300fc40f592
Change-Id: Iadfafb5787a62e9a379437f6a3763d31f99ba7c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/277743
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-01-26 09:12:41 +00:00