Commit Graph

5217 Commits

Author SHA1 Message Date
Sigmund Cherem 3add88c955 [dart2js] cleanup element_map_impl
Small follow up cleanup in element_map_impl addressing comments from the
previous code review.

Change-Id: I1eea8bba35575b953de4686351e60f0cbf353d84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260066
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-09-20 20:09:05 +00:00
Sigmund Cherem 755f124fcd [dart2js] prepare to migrate kernel/env.dart
This makes kernel/env.dart fully ready for migration.

Change-Id: I1baa5bc7280236e5e2dfdfb060525752eb68c2d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260067
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-09-20 20:08:37 +00:00
Nate Biggs a263aeee33 [dart2js] Add methods to closed world for call graph generation.
Change-Id: I22240a93e785eea0505d3594fbc41306890e24ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260241
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2022-09-20 19:54:35 +00:00
Nate Biggs e96a0f6c98 [dart2js] Use experimental type strategy from compiler based on flag.
Change-Id: I3b79750691792f8f4cc7a8c09d2d4cc9b142f074
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260240
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-09-20 19:54:35 +00:00
Sigmund Cherem 7d46dac715 [dart2js] improve nullsafe API for a few _find* methods
A few private methods in common/elements.dart are used to lookup classes
and members. This is a step in normalizing these methods, so that we use
different APIs when the values are required and when they are not.

Ideally this is a change we'd do more generally in our APIs (e.g. the env APIs
should be split).


Change-Id: Iacc2f012f6f60ae960c61d8897630f6a7f1d60e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260080
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-09-20 16:34:45 +00:00
Sigmund Cherem 026f253075 [dart2js] migreate js_model/element_map_impl
Change-Id: Ie490c4b592a9caa155d22eefe24af1a2816414df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259640
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-09-20 04:14:52 +00:00
Nate Biggs 27f4d280b7 [dart2js] Rename inferrerExperimental to inferrer_experimental
Change-Id: Ia951e055c4ecd30843a76aa7a84dde091c2fc73d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259940
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2022-09-19 18:19:11 +00:00
Srujan Gaddam 8a081b95c6 [pkg:js] Add type/conformance checking for createStaticInteropMock
Bug: https://github.com/dart-lang/sdk/issues/49351

Adds checks for the following cases:
- Type arguments to createStaticInteropMock are correct
- No missing members in implementing class
- Inherited and non-overridden @staticInterop members are implemented
- Dart class can implement through inheritance and mixins
- Implemented members are correct subtypes of @staticInterop members
- Potential extension member conflicts that are attempted to be
resolved through subtyping rules

Change-Id: Iacbe5846040ba7fab41459aa19be77351cf1efca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255761
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Riley Porter <rileyporter@google.com>
2022-09-16 20:13:30 +00:00
Ahmed Ashour 5fe480b788 Fix typos
Fix #49864

TEST=ci

Change-Id: I9a7e06d604cd0b4f56f2ac229ab3fc9f01cb9d76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256824
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-09-16 19:35:00 +00:00
Nate Biggs 433c9eb4ee [dart2js] Add member applies to sets and builder.
Will be used during call hierarchy analysis in combination with explicit call graph construction.

Currently typemasks do not support the `difference` operation and so we cannot fully narrow the type cones based on the call hierarchy. An implementation is included here of the applies-to set with subtraction of overrides.

Change-Id: I3f6c113787a4d26e9751added482791365c12832
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259560
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2022-09-16 02:54:10 +00:00
Nate Biggs 9a91ff88fe [dart2js] Add experimental inferrer to Dart2JS.
Changes to experimental inferrer include:
- Subtyping the experimental results classes so that they can be passed around in place of the base results classes.
- Leave out 'abstract_value_domain.dart' and 'abstract_value_strategy.dart'. All references to these in the experimental inferrer refer to the version in the base inferrer. These AbstractValue* types leak out of the inferrer and require more significant changes to duplicate. If necessary we can revisit these down the road.

Change-Id: I91ff44336c0471cb64ad4e0d36d727a38caea2fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259261
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2022-09-15 20:02:19 +00:00
Mayank Patke 581db69c7a [dart2js] Avoid adding empty type rules.
The fragment emitter already tries to skip the call to `addRules` if the
ruleset is empty, but this occurs too early. The ruleset encoder strips
tautologies like `T <: T` and `InterfaceType <: Object`, but this occurs
after the empty check.

This CL removes the preprocessing from the encoder and instead performs
checks when entries are added to the ruleset, fixing the issue.

Change-Id: I62f937e0ff6abac12973f82b2c89d8ea6f3162b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258040
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2022-09-08 19:25:43 +00:00
Sigmund Cherem ed5587dc2d [dart2js] add env_interfaces to prepare for migrating element_impl
Change-Id: Ic6c69a97e1e11a72e96ba1aeef7f6861568b9d52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257481
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-09-06 20:24:36 +00:00
Sigmund Cherem 34ce99b003 [dart2js] prepare to migrate js_model/element_map_impl.dart
Change-Id: I9912ef4abbf9800f34231cc4d4c8b35af63252ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257462
Reviewed-by: Nate Biggs <natebiggs@google.com>
2022-09-06 20:24:36 +00:00
Sigmund Cherem 42d3625e70 [dart2js] Migrate jsmodel/element_map.dart
Change-Id: I577ccf256704412d1da26a9233b29e2771e4709d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257461
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2022-09-06 20:24:36 +00:00
Sigmund Cherem eee6efc1f8 [dart2js] migrate closure.dart
Likely we can merge back closure_migrated into closure, but I'll keep them
separate to make the review process simpler.

Change-Id: I505a5b758f866fb9280a3453e57818be09ce8150
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257163
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-09-01 19:21:52 +00:00
Johnni Winther 02c47b6de0 [cfe] Support const records
Change-Id: I3c0724e18a405ec0fe2d3a60e2722d78f9e3bed6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256666
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-08-31 21:47:01 +00:00
Sigmund Cherem 7393f9f9d6 [dart2js] migrate env.dart to null safety
There is a cycle between env and closure, so this also pulls out a subset
of closure to closure_migrated.dart

Change-Id: I7350c6a6efcb58c8343d93da93712e387925ca15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256967
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2022-08-31 21:35:59 +00:00
Kevin Moore 460075336b pkg:compiler - enable and fix use_super_parameters lint
Change-Id: I2d8ae1db222fc70729fda9eeb62296285de9da33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256760
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-08-29 22:56:27 +00:00
Kevin Moore 677cb7fb3e Eliminate more dynamic invocations in pkg/compiler
Change-Id: Ic1d3b118ccb80ea41197c464348f98f962b1ae67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256741
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2022-08-29 22:51:46 +00:00
Chloe Stefantsova ddff459c7f [cfe] Add RecordType, RecordLiteral, and associated nodes
TEST=Covered by upcoming language and co19 tests.

Change-Id: Ibe8ecfb7f854adce5646125f6909066e27424665
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256066
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2022-08-25 10:33:35 +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
Srujan Gaddam 9f10a3bc16 [pkg:js] Add JsInteropChecks to Wasm backend
Also cleans up and unifies some behavior across the backends:

- avoiding reinstantiating JsInteropChecks for every library
- having the native classes as a member instead of recomputing on dart2js

Now that these checks exist, we can add lib/js/static_interop_test to
the test directories the wasm trybot runs.

Change-Id: I912aae988afe7915e80cc13d00b8c47818dfa520
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255760
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2022-08-19 17:48:38 +00:00
Nate Biggs 876fb36c82 [dart2js] Apply correct readers and lookups for deserializing cached entities.
Since we are reading data in the context of a different reader, we should make sure that we use that reader's helpers.

Change-Id: Id7fbf3662104d131c1b31bff080a171bd3d38a88
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255800
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2022-08-19 16:55:06 +00:00
Nate Biggs 4b78f1b6c7 Reland "[dart2js] Enable flag (canary -> shipping) to intern dart type values."
This reverts commit 0e1d24ae80.

Reason for revert: Interning bug fixed by https://dart-review.googlesource.com/c/sdk/+/255257

Original change's description:
> Revert "[dart2js] Enable flag (canary -> shipping) to intern dart type values."
>
> This reverts commit e833510bc5.
>
> Reason for revert: breaks many tests in G3, see b/242822389
>
> Original change's description:
> > [dart2js] Enable flag (canary -> shipping) to intern dart type values.
> >
> > Change-Id: Iebac3a7c57665eccd100146f892b891a4591f554
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255201
> > Reviewed-by: Stephen Adams <sra@google.com>
> > Commit-Queue: Stephen Adams <sra@google.com>
>
> TBR=sra@google.com,natebiggs@google.com
>
> Change-Id: I9b2be8fc119f84f33181245cdfce416d13660daf
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255401
> Reviewed-by: Ilya Yanok <yanok@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>
> Commit-Queue: Ilya Yanok <yanok@google.com>

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

Change-Id: I51336c2e53dd58fed6216e9a5c818f05e8795a8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255663
Reviewed-by: Nate Biggs <natebiggs@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2022-08-18 21:30:54 +00:00
Nate Biggs 61d7200840 [dart2js] Add == override to Dart2JS ir.InterfaceType subclasses.
These subtypes were previously colliding with instances of the base ir.InterfaceType class in the interner map.

Change-Id: Iec6b53fa82e0994142c408a0a2be1ddd045898e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255257
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2022-08-18 20:12:44 +00:00
Nate Biggs 7ddee84e78 [dart2js] Update SSA/Codegen inlining metrics.
Add several more inlining metrics to SSA:
- getters (ellisions vs. inlines)
- setters (ellisions vs. inlines)
- intercepted length calls
- if conditions
- is checks
- late sentinel checks

After digging these are all the opportunities for optimization that I saw that I thought might be affected by changes in global inference. Open to feedback on whether any of these are unnecessary or if there's any other things worth tracking.

Change-Id: I70ff279a797f71b39b2bc02c00fbb3f6e149cb2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255202
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2022-08-18 19:23:54 +00:00
Chloe Stefantsova 1611fe6f45 [cfe] Separate out IntersectionType from TypeParameterType
TEST=Covered by existing tests

Change-Id: Ie7b99b1c109edff5198cfbf5d22e1cfb1dc130d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253665
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-08-18 08:47:29 +00:00
Nate Biggs 8f5983b3c3 Revert "[dart2js] Defer deserialized CodegenResults by members."
This reverts commit a547cfc096.

Reason for revert: With 15 shards this ends up holding too much serialized data and causes an increase in memory usage.

Original change's description:
> [dart2js] Defer deserialized CodegenResults by members.
>
> For large applications only ~60% of these objects are used. This defers their deserializtion until they're accessed in the codegen member map.
>
> In local testing on large applications this saved ~200MB of memory usage in the linker phase.
>
> Change-Id: I8ff87803fc23ef2d3f954646687e3fc67b68a4f7
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254600
> Commit-Queue: Nate Biggs <natebiggs@google.com>
> Reviewed-by: Joshua Litt <joshualitt@google.com>

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

Change-Id: I51d292531be30b358a025d7c472f25e8aba4dc3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255283
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-08-18 01:28:53 +00:00
Ilya Yanok 0e1d24ae80 Revert "[dart2js] Enable flag (canary -> shipping) to intern dart type values."
This reverts commit e833510bc5.

Reason for revert: breaks many tests in G3, see b/242822389

Original change's description:
> [dart2js] Enable flag (canary -> shipping) to intern dart type values.
>
> Change-Id: Iebac3a7c57665eccd100146f892b891a4591f554
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255201
> Reviewed-by: Stephen Adams <sra@google.com>
> Commit-Queue: Stephen Adams <sra@google.com>

TBR=sra@google.com,natebiggs@google.com

Change-Id: I9b2be8fc119f84f33181245cdfce416d13660daf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255401
Reviewed-by: Ilya Yanok <yanok@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ilya Yanok <yanok@google.com>
2022-08-17 12:29:03 +00:00
Nate Biggs e833510bc5 [dart2js] Enable flag (canary -> shipping) to intern dart type values.
Change-Id: Iebac3a7c57665eccd100146f892b891a4591f554
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255201
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-08-17 02:50:42 +00:00
Nate Biggs 094ba2cdb3 [dart2js] Add inline measurement via new SsaMetrics.
Measures inlines (and skipped opportunities) during SSA and records them within the metric framework.

This can hopefully be used as a signal into the effectiveness of changes to the global analysis phase.

Change-Id: I9da5bad5792db8b089dbfc8725664ec13d32ab1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255200
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-08-16 21:18:03 +00:00
Nate Biggs 7f00006975 Handle nullable metrics on compiler tasks.
Some tasks have nullable metrics (e.g. https://github.com/dart-lang/sdk/blob/main/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart#L61) and so we should just skip processing those tasks.

Change-Id: Ie1f4e1042ef4b5d4a95a76085c37da088e885369
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255160
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-08-16 20:26:52 +00:00
Nate Biggs 4d5ac43514 [dart2js] Change default values for dependencies in js_backend/runtime_type_resolution.dart
Default value of `dependencies` should be `const {}` (and narrow field type) so that VM can devirtualize calls to the `_CompactLinkedHashSet` when iterating.

Change-Id: I112d9cd9a3cd060a38e292bc1a3c54a8a2847dfe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252301
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-08-16 15:54:48 +00:00
Sigmund Cherem fead8b897e [dart2js] remove support for reading sources from http (tech-debt)
Long ago the compiler had logic for reading sources via an http
connection. This is not a supported use case and there is no need to
keep this around anymore.

Change-Id: Ic59c154def264a52d9310133f76b153c9972899c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251701
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-08-16 00:01:26 +00:00
Nate Biggs a547cfc096 [dart2js] Defer deserialized CodegenResults by members.
For large applications only ~60% of these objects are used. This defers their deserializtion until they're accessed in the codegen member map.

In local testing on large applications this saved ~200MB of memory usage in the linker phase.

Change-Id: I8ff87803fc23ef2d3f954646687e3fc67b68a4f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254600
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-08-15 16:13:46 +00:00
Johnni Winther 50ac2500a1 [dart2js] Handle private names correctly in K/J-model
The library wasn't taken into account when handling computing class
members in the K/J-model and not handled correctly when computing
applicable selectors. This made dart2js unable to handle members with
a name private to a different library than the enclosing library.

Fixes #33732
Fixes #49226

Change-Id: I5ba143d87662bbd42e0ff02355054e4a937be8f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252665
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2022-08-11 06:56:32 +00:00
Stephen Adams 5e267854e1 [dart2js] Disentangle instance field setter and static field initializer
A FieldEntity is used as the entity for generating the setter of an
instance field (when a check is required), and as the entity for the
initializer expression for a static or top-level field.

I think it is a bit clearer to have a separate method for each case
rather than one method with conditional paths.

Change-Id: I32e63c3f3566a63e3d38315cab17d613f006405e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253562
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-08-03 17:06:28 +00:00
Mayank Patke e9ee4621cb [dart2js] Update async compiler invocation.
Addresses comments in
https://dart-review.googlesource.com/c/sdk/+/252843.

Change-Id: I4014f9b6a9f33f8e2e93404d5265a7c4b860d6d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253341
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-08-01 22:13:04 +00:00
Srujan Gaddam 61abaeda3f [CFE/web] Move static interop erasure and remove outline stubber
Deletes the outline stubber as it's not necessary on any backend.
DDC should compile the entire sources and outline dill in one step.
dart2wasm operates similarly, and so only needs the modular transformer.
dart2js moves the erasure to a global transform.

Also, this CL reverts now unnecessary plumbing that was needed for the
outline stubber.

Change-Id: Ic085c4fad5a6bdfc7d6916f7fa575c6ef9b20110
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253000
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2022-08-01 18:17:44 +00:00
Stephen Adams 4abf0e494b [dart2js] Fix #49502
Fields in mixin applications are copies of the fields from the
mixed-in class. As such, they don't need a getter or setter in the
mixin application.

Change-Id: I62a5779355e4ec57ad4b138bc17a29e42e903f79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253021
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-07-29 22:16:52 +00:00
Sigmund Cherem 6407b674e3 [dart2js] Steps to prepare js_model/env.dart for migration
env.dart and closure.dart have a circular dependency that is a bit
hard to break, but this is a step towards starting migrating them.
It may be worth migrating the cycle of env and closure together
in one go.

That said, the definitions moved from closure.dart to
element_map_migrated.dart (e.g. ClassDefinition) seem to match
other definitions already in the latter file
(e.g. MemberDefinition)

Change-Id: Ifa8114b992e75ec6662db702fa1dd51b31112276
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252964
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-07-29 01:34:51 +00:00
Sigmund Cherem b7581c00ce [dart2js] Migrate kernel_impact.dart to null safety
Change-Id: I26e35b22035d22dcc8b46432af1dc8f45f185dc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252963
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-07-29 01:12:55 +00:00
Sigmund Cherem 10ed38fa3b [dart2js] Migrate abstract value strategy to null safety
Change-Id: Iae8a77663b3e87f7d05f7faa0c85bb8cf3bdfc9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253003
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-07-29 01:04:52 +00:00
Stephen Adams dc5dbbae4c [dart2js] test for #49502
Change-Id: I2f33db918476271e77befcc3466271da80ad9504
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252868
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-07-28 04:18:40 +00:00
Mayank Patke 1015134a83 [dart2js] Fix metrics reporting.
Because the compilation wasn't `await`ed properly, metrics reporting was
failing immediately rather than first waiting for the compilation to
occur. This fixes the issue and uses the `async`/`await` API instead of
`Future` methods, which should be easier to follow.

Change-Id: I2438a2de333a91c6918e5a286342448ff11f6823
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252843
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2022-07-27 22:19:10 +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
Stephen Adams f503281917 [dart2js] Document some dart2js @pragma annotations
Also add `never-inline` and `prefer-inline` aliases.

Change-Id: If5d932e3b86b78b2177abac79ac6c49fb9b8ed6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252500
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-07-22 19:45:07 +00:00
Mayank Patke 92bd9a4604 [dart2js] Clean up inferrer support for indirect dynamic calls.
Change-Id: Ibc2a84e959886b02024847d315a4cbc83885b79a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252407
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-07-22 19:29:47 +00:00
Sigmund Cherem 27a8e17f52 [dart2js] Migrate world builder
Change-Id: I365fec81299e6fe1ee7217f307ff41934fd75067
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252414
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-07-22 17:58:56 +00:00