Commit Graph

105 Commits

Author SHA1 Message Date
Sam Rawlins e41640d331 Core libs: Introduce 5 new forms of the Deprecated annotation.
Change-Id: I102662244eec205775d5adbed8fa33ffcf702cbd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449582
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2025-09-18 06:34:04 -07:00
Mayank Patke 2bb32ec55a [dart2js] Update pubspec to 3.8 and reformat.
Change-Id: Ib1afd38a7d3694c2e5ed591132f41b147f76d75a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/427560
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2025-05-09 10:34:12 -07:00
Mayank Patke 38ef3748c3 [dart2js] Remove LegacyType.
Bug: #60327
Change-Id: Ia236d1674ba8030da3b91e88ac869e99fe5b8399
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416024
Reviewed-by: Nate Biggs <natebiggs@google.com>
2025-03-18 19:09:54 -07:00
Mayank Patke 1bbbf26434 [dart2js] Refactor FlatTypeMask cache.
As the powerset grows, the cache needs to be keyed on both the base and
the full flags. While we're at it, we ensure that all FlatTypeMask
allocations go via the cache.

Change-Id: Ifdd400bf4ea23a936c4d37be91a5d527102aa3b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/413700
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2025-03-07 04:20:04 -08:00
Johnni Winther 0060b0f665 [cfe] Remove nnbd mode
TEST=existing

Change-Id: I30bbadb74e81c7f4aaa444d1e2f6f5ffc2005d4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412881
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2025-03-04 01:46:51 -08:00
Chloe Stefantsova c32edddf80 [cfe] Report "!" in constant expressions as error
Closes https://github.com/dart-lang/sdk/issues/59800

Change-Id: I06d68eb1d0608a0a865002c88f7665415159f468
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405901
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2025-01-30 02:02:41 -08:00
Mayank Patke c878108cc8 [dart2js] Update pubspec to Dart 3.7 and reformat.
All non-pubspec changes generated by `dart format pkg/compiler`.

Change-Id: Iadaa70974816d96ccb47813fe72d5a2bb83d6bda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400181
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2024-12-13 11:24:50 -08:00
Mayank Patke a001a5e1f1 [dart2js] Enable recommended lints.
Change-Id: I71d30bdf8332ad5200faed8b084ef8888bb98ec8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400163
Reviewed-by: Nate Biggs <natebiggs@google.com>
2024-12-13 11:24:50 -08:00
Mayank Patke 017bda44cf [dart2js] Enable core lints.
Change-Id: Id5a14797e3e5eb8b68bd009d65b474748902fbe0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400162
Reviewed-by: Nate Biggs <natebiggs@google.com>
2024-12-13 11:24:50 -08:00
Mayank Patke 49076fe6f4 [dart2js] Minor fixes before bumping to 3.7
Most of the fixes are to stop using `_` as an identifier now that it's a
wildcard.

Change-Id: I4287d12f4e664b974ad07063e21d04b2d0a61f29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400182
Reviewed-by: Nate Biggs <natebiggs@google.com>
2024-12-13 11:24:50 -08:00
Mayank Patke 88eb64d222 [dart2js] Use enumset API for typemask bits.
Change-Id: I8f513d92d05290dceb53edc5f99a6d84a11a5571
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/399121
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2024-12-10 00:39:52 +00:00
Mayank Patke 723cbc1f73 [dart2js] Change Enumset.operator +/- to Enumset.add/remove.
Change-Id: I92a97911531b699c5fc17cc37d5540c3fc44e63d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396566
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2024-11-21 19:13:50 +00:00
Mayank Patke 0bfa0b05a2 [dart2js] Add Bitset and EnumSetDomain abstractions.
Change-Id: I85b401d7eb13e0d9ba0bfcb37aebdb28e65bc77f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395062
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2024-11-21 19:13:50 +00:00
Lasse R.H. Nielsen f8086c81ae Collect all test-related files in package:expect.
Collects files from `package:async_helper` and `tests/language`
that are generally useful, so that all test-related helpers are
in `package:expect`.

Moves the two libraries from `package:async_helper` into `package:expect`,
and the `tests/language/static_type_helper.dart` file too.

Deprecates `async_minitest.dart`, to follow `minitest.dart`,
expecting the Flutter use of it to have been fixed to not break
on deprecation (I believe Flutter no longer breaks builds on deprecations at all).

Patch 1 is the actual change.
Patch 2+4+8 is changing all existing references to the files.
Patch 6 ignores deprecation in files still using `async_minitest.dart`.

3+5+7+9 are updating this text to make the numbers match.
Then it's just test-expectations and small tweaks from there.

Change-Id: I1b665135b5fef9b9a0c3b340ffe9daf874d0174c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373120
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2024-10-11 16:53:52 +00:00
Mayank Patke 15366a10b7 [dart2js] Convert EnumSet to an extension type.
Because the old EnumSet was a wrapper object, some APIs performed
stateful updates. This CL also ensures that callers are now performing
their own state updates, just as if we were manipulating ints directly.

Change-Id: I305cd42b5e0c9395d1d1dac724a108bf083ab0d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379510
Reviewed-by: Nate Biggs <natebiggs@google.com>
2024-09-06 16:20:37 +00:00
Paul Berry 24a4bf31f9 Remove unreachable default clauses from world_test.dart.
I'm currently working on a fix to the analyzer that will cause
unreachable default clauses to be properly flagged as a warning
(https://github.com/dart-lang/sdk/issues/54575). To avoid a bot
failure when the fix lands, these unreachable default clauses need to
be removed.

Bug: https://github.com/dart-lang/sdk/issues/54575
Change-Id: I35cc2be79d918a8f6ee7b388cf97044f0196b932
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380961
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
2024-08-16 16:45:59 +00:00
Sam Rawlins 5e8ee77772 Support digit separators
Work towards https://github.com/dart-lang/language/issues/2

The feature is well-specified at the issue, but I will also follow
up with a specification to check into the language repo.

This change implements the feature more-or-less from front to back
(because the back is very close to the front in this case :P; no
"backend" work in the VM, etc). Digit separators are made available
via a new experiment, `digit-separators`.

Care is taken to report a single error when an underscore appears in
an unexpected position (see new `separators_error_test.dart`).

Three test files are added:

* `separators_test.dart` is run with the experiment enabled, and has
  no compile-time errors.
* `separators_error_test.dart` is run with the experiment enabled, and
  has many compile-time errors.
* `separators_error_no_experiment_test.dart` is run with the
  experiment _disabled_.

Change-Id: I7f1b1305d28b708b5ddf83f26188cd6e9ce3dd58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/365181
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2024-07-09 14:50:59 +00:00
Mayank Patke 0ddba91190 [dart2js] Convert SubclassResult to a sealed class hierarchy.
Change-Id: I151c2f6f72dcecaff6a6976f058940b9ddf97f47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371461
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2024-06-13 19:25:28 +00:00
Mayank Patke 37345b9f7e [dart2js] Enable strict-inference and strict-raw-types in pkg/compiler.
Change-Id: I4712d32dc37a8cbfa0e1e5bd61659df651c77471
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354140
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2024-02-26 22:41:58 +00:00
Mayank Patke 69df740ea9 [dart2js] Assorted TODO cleanup, bump pubspecs to 3.3.0
Change-Id: I621ac252c5d6f3b157a2f194b7f0b7ad85874e4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352990
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2024-02-21 00:02:13 +00:00
Nate Biggs 76a9d1c724 [dart2js] Remove dependency of ir.StaticTypeContext from element map constant query.
Change-Id: I1ef1d6699af7284b921c00c0faa89f2728f8f38e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348880
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2024-02-07 00:19:33 +00:00
Nate Biggs ccb99e6a5a [dart2js] Replace StrongModeConstraint with simple ClassEntity reference.
Change-Id: I6dbaf848196d6ad512ca366a3a4ec634c05f7fed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348542
Reviewed-by: Mayank Patke <fishythefish@google.com>
2024-02-07 00:19:33 +00:00
Nate Biggs a9fc1efe05 [dart2js] Clean up more code associated with Dart2JS static types.
The `ClassRelation` concept is no longer needed as we are only using the CFE static type. All creations of "exact" and "this" types were already removed in an earlier CL so we are already always following the 'subtype' path.

Change-Id: Iccc3d61737c5b64b3b4217f7f20b34b181cc7db2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348463
Reviewed-by: Mayank Patke <fishythefish@google.com>
2024-02-07 00:19:33 +00:00
Nate Biggs 9d5cb9524e [dart2js] Decouple static type visitor and impact builder.
Change-Id: Ib477d8fdcadb4f9699914aa6a2e6eb4facab61b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347944
Reviewed-by: Mayank Patke <fishythefish@google.com>
2024-02-07 00:19:33 +00:00
Nate Biggs 7512050101 [dart2js] Fix failing CFE constant eval test.
This test has been fluctuating between flaky and passing for a while now but it recently went to failing.

https://dart-ci.web.app/#showLatestFailures=false&test=pkg/compiler/test/model/cfe_constant_evaluation_test&configurations=web-unittest-asserts-linux

These were flaky due to timeouts and then a recent change changed the status to consistently failing. So I've also split this into multiple tests to fix the timeout issue.

Change-Id: Id09815f70f4bf20caa6fdb3df4433245f4ff1eab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349420
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2024-02-01 04:25:28 +00:00
Mayank Patke f79ed9301b [dart2js] Remove remaining language version overrides
Now that dart2js only takes migrated files as input, all tests should
use the current language version.

Change-Id: I6c84850f5786aeac04154b67bd7a3c19083c8bba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345344
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2024-01-23 01:26:09 +00:00
Mayank Patke 4ad4501a16 Remove language version override from frontend constant tests
Now that we no longer expect to compile unmigrated code, we can clean up
tests that use old language versions. This will enable code cleanup in
backends.

Change-Id: If5711b3bf7c97546168b7fbe6949452e84d4bd40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345368
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2024-01-10 10:23:58 +00:00
Robert Nystrom 2ee771a4f6 Remove the legacy "_2" tests. \o/
I also cleaned up a bunch of places that referred to them.

Change-Id: I45f68818c892f8620ea04257885ffa3763374bb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335863
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-11-17 20:17:23 +00:00
Nate Biggs d7fa5f3d89 Reland "[dart2js] Evaluate CFE consts as part of phase 0b (CFE linker)."
This is a reland of commit bebd08746b

Original change's description:
> [dart2js] Evaluate CFE consts as part of phase 0b (CFE linker).
>
> Constants are current evaluated in a few places during closed world generation, primarily as part of the ScopeModelBuilder. The scope visitor was modifying the AST which meant we had to emit a new dill with these evaluated constants along with the closed world results.
>
> This change instead evaluates the constants directly after linking the Kernel as part of the global transformations. This means we can update the ScopeModelBuilder to not mutate the AST at all as all constants are already simplified.
>
> A potential follow up here is to simplify the ScopeModelBuilder since all nodes should already be simplified if they can be, we should be able to avoid visiting some children.
>
> After this change we only directly create a single ConstantEvaluator, the one in `load_kernel`. The const simplifier also creates one and a follow up CL moves this to to run right after this new transformation.
>
> Note: Alternate versions of this CL tried to make the global transformation simpler by either:
> 1) Running the const evaluator indiscriminately on all expressions. This didn't work because it lead to exponential computation on constants set up as a DAG (see tests/language/const/constant_dag_test).
> 2) Only evaluating ConstantExpression nodes to update UnevaluatedConstants. This does not cover all the cases where the ScopeModelBuilder is modifying the tree and lead to a different compiler output.
>
> Change-Id: I746d889b37feddc9ab6c386c6252016dec745e6e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332601
> Reviewed-by: Mayank Patke <fishythefish@google.com>

Change-Id: I53871a57144a3a1bd363af141d8f31c8ffa5ca6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336221
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-11-15 19:15:29 +00:00
Nate Biggs 3fe10c470e Revert "[dart2js] Evaluate CFE consts as part of phase 0b (CFE l..."
Revert submission 332821

Reason for revert: Breaking internal build targets.

Reverted changes: /q/submissionid:332821

Change-Id: Ic81f371c83956027f7e710c663a7eeb432c71d7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336087
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-11-14 19:44:24 +00:00
Nate Biggs bebd08746b [dart2js] Evaluate CFE consts as part of phase 0b (CFE linker).
Constants are current evaluated in a few places during closed world generation, primarily as part of the ScopeModelBuilder. The scope visitor was modifying the AST which meant we had to emit a new dill with these evaluated constants along with the closed world results.

This change instead evaluates the constants directly after linking the Kernel as part of the global transformations. This means we can update the ScopeModelBuilder to not mutate the AST at all as all constants are already simplified.

A potential follow up here is to simplify the ScopeModelBuilder since all nodes should already be simplified if they can be, we should be able to avoid visiting some children.

After this change we only directly create a single ConstantEvaluator, the one in `load_kernel`. The const simplifier also creates one and a follow up CL moves this to to run right after this new transformation.

Note: Alternate versions of this CL tried to make the global transformation simpler by either:
1) Running the const evaluator indiscriminately on all expressions. This didn't work because it lead to exponential computation on constants set up as a DAG (see tests/language/const/constant_dag_test).
2) Only evaluating ConstantExpression nodes to update UnevaluatedConstants. This does not cover all the cases where the ScopeModelBuilder is modifying the tree and lead to a different compiler output.

Change-Id: I746d889b37feddc9ab6c386c6252016dec745e6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332601
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-11-10 20:38:34 +00:00
Nate Biggs 5403dc4927 [dart2js] Remove unused NonConstantValue.
The only constructor invocation of `NonConstantValue` is in the deserializer. Which means we're never creating any of these objects to serialize.

Also remove unused `handleClosureCall` method in `pkg/compiler/lib/src/inferrer/builder.dart`

Change-Id: I04e492bc4824795dd8fc109ee7464be56b27cb93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332500
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-10-28 04:17:16 +00:00
Nate Biggs 43df18a0d2 [dart2js] Use existing J-model entities where possible when converting from kernel to JS entity maps.
Change-Id: I1bcfecb313fab1e7dc03bf1d8c14b8410226f431
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309140
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-06-23 16:02:50 +00:00
Nate Biggs a54d2ec9b8 [dart2js] Use J- instead of K- entities everywhere.
The only entities specific to the K- model are `KLocalFunction` and `KLocalTypeVariable`. I've copied these both (as is) to the J- model.

The only thing we "lose" here is the calls to `checkFamily` in `kernel/element_map_impl.dart`. Given how interchangable the 2 models were, this wasn't adding much value anyway.

Since there is still a distinction between the K- environment and J- environment, we can now think of that conversion as being between a `J` and `J'` environment where the semantics are slightly different (e.g. `J'` has closure conversion applied).

Using the same model also makes it easier to have more intermediate states of the `J` model. For example, we might keep around the `JLocalFunction` nodes until SSA and do closure conversion at that point instead.


Change-Id: If149241725a03b8de6aba6d486506434529b998d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306980
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-06-15 18:12:52 +00:00
Nate Biggs 75be947317 [dart2js] Do some simple null safety clean ups.
- Mostly just removes asserts that are redundant with sound null safety. - Moves 3 classes `ClassRelation`, `DataSink` and `DataSource` back into their original files.
- Removes StrongModeConstraintInterface which was only needed for migration.
- Adds a couple simple late finals.

Change-Id: I921ac84a22cebd509f629f88be6bbb19d3c0a9e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289720
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-03-20 19:14:27 +00:00
Nate Biggs af1c0fe099 [dart2js] Remove usages of FunctionSet from experimental inferrer.
FunctionSet is lazily initialized in the closed world. After this change it is never initialized during global inference. However, it is still used in SSA so we cannot fully remove it given these changes (even after linearized graph becomes the main algorithm).

Also remove unused methods/logic from FunctionSet itself. These are not called from anywhere in the compiler.

Change-Id: I59949499bf70164ff1f879c6ba04a585797067a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288680
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-03-14 20:25:58 +00:00
Mayank Patke bff851ce7e [dart2wasm] Refactor ConstConditionalSimplifier and related classes
This will allow them to be used with other compiler backends, including
dart2wasm.

Change-Id: I42182545eeb035af8a3a6e2eba209ba2601a52d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281923
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jackson Gardner <jacksongardner@google.com>
2023-02-23 18:54:29 +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 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
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 be69e03b95 [dart2js] Migrate test/helpers for null safety migration.
Change-Id: I4ba20f5774838f3b318f108f35df655bc259c42e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279240
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-01-23 06:02:51 +00:00
Johnni Winther 21cc667dca [Reland][cfe] Support external constructor with final fields
This adds support for having a final field and an external constructor
without error, assuming that the external constructor initializes the
final field. This supports the inline class with external members use
case.

Change-Id: I33b78275e967636ed0697d17f7921e9eee30401b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279095
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2023-01-17 17:29:28 +00:00
Johnni Winther deaf9ce16e Revert "[cfe] Support external constructor with final fields"
This reverts commit c70d266270.

Reason for revert: Crash detected

Original change's description:
> [cfe] Support external constructor with final fields
>
> This adds support for having a final field and an external constructor
> without error, assuming that the external constructor initializes the
> final field. This supports the inline class with external members use
> case.
>
> Change-Id: Ie297ccc39b0a0731c146f9ac0698bba3fd83bfeb
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278502
> Reviewed-by: Srujan Gaddam <srujzs@google.com>
> Commit-Queue: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>

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

Change-Id: I339d9008cb84cda8dc20f29d1e103289bb5596b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278820
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-01-10 17:20:01 +00:00
Johnni Winther c70d266270 [cfe] Support external constructor with final fields
This adds support for having a final field and an external constructor
without error, assuming that the external constructor initializes the
final field. This supports the inline class with external members use
case.

Change-Id: Ie297ccc39b0a0731c146f9ac0698bba3fd83bfeb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278502
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-01-06 12:25:21 +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
Josh Soref f9806280de [dart2js] Correct comment
Closes https://github.com/dart-lang/sdk/pull/50752

GitOrigin-RevId: 3a3b147a51994827fdee293a42661bde02a35ec6
Change-Id: I2633abdb469ae666820447af21a1bbe78f7466ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275985
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2022-12-16 09:04:59 +00:00
Nate Biggs 975cb8a9cb [dart2js] Move memory compiler out of test folder.
Change-Id: I4fd3b1fa91582ce19fb16a61a81013d694e0cd59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270540
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-11-18 02:59:15 +00:00
Nate Biggs 271f72422e [dart2js] Add live abstract members into closed world.
Effects of this change are minimal on a large application:
- ~9100 new members being tracked.
- +500KB closed world serialized output (.3% increase)
- No discernible difference in closed world runtime
- Heap space in global inference after closed world deserialization increase is <1MB.
- No change in JS output

These abstract members will be used by the new hierarchy-based dynamic call type graph linearization.

Change-Id: I4ce56d12e039effe0a855fd23f2a5e69d0847025
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264900
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2022-11-15 04:52:01 +00:00
Nate Biggs 56225add77 [dart2js] Clean up js_backend/namer migration files.
Change-Id: I16f4797973d344868943b04f53d86973c163706a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268404
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-11-08 00:59:20 +00:00