Commit Graph

5021 Commits

Author SHA1 Message Date
Kevin Moore 83286de2a8 Allow pub get/upgrade to run on a number of packages in pkg/
Zero runtime affect to these unpublished packages
Allows using standard tools such as dart test, etc
Also allows better checking of dependency constraints

TEST=no effect on SDK build process

Change-Id: Ic6fbe6ce8f57724a87c058eccad64ce8e7473af1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218180
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2021-10-27 23:15:56 +00:00
Joshua Litt 39386e58d4 [dart2js] Create building blocks for programmatic constraint api.
Change-Id: Ida50217c48c39fe222589aa227ac65691a8fc982
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216684
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2021-10-26 19:38:31 +00:00
Kevin Moore 7d8459dc3c dart:_http: apply and fix most of pkg:lints recommended lints
TEST=N/A

Change-Id: I3e3f0cd1d94743fbbe8cfcc5723eb38608be2a8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217503
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
2021-10-21 16:33:15 +00:00
Ahmed Ashour d041cf0478 Remove extra the, be and of
Fixes #https://github.com/dart-lang/sdk/issues/47504

TEST=No tests needed, only comments affected.

Change-Id: Ie096307b5ce314d328fea6780f396aaa226ad3b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216182
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-10-20 09:29:01 +00:00
Stephen Adams d49d5a96f7 [dart2js] Rti-need fix for generic instantiations
The rti-need of an instantiation is not the same as the rti-need of the
instantiated generic function. The generic function might not use its
type arguments but the instantiation still needs the type arguments for
equality.

dart2js implements generic function instantiation by creating instances
of a helper class that is a subclass of `Closure`. The helper class needs
its type parameters since they are used in `==` and `toString()` methods.
The fix for #47054 is to add the dependency of the helper class type
parameters on the instantiation type arguments.

Change-Id: I9ecb18e1b61a8ad6549f35b572476b1ed7ebb88d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212037
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-10-19 23:48:31 +00:00
Stephen Adams 7ca94e913d [dart2js] Enable --csp by default.
`--no-csp` can be used to get the prior behaviour.

Change-Id: I63dc7374f9f856a25e4da4e83b4cb8af9b46c305
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216582
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-10-19 22:50:14 +00:00
Sigmund Cherem 38b5a841de [dart-web] Remove dart:web_sql library.
The WebSQL standard was abandoned more than 10 years ago and is not
supported by many browsers.

The `dart:web_sql` library was marked as deprecated in Dart 2.14. This
CL makes the library inaccesible, removes support for `dart:web_sql` imports,
and removes the `Window.openDatabase` API. The old code for `dart:web_sql` is
still generated by the html generators. Removing that will be handled by a
separate change.

Closes https://github.com/dart-lang/sdk/issues/46316

Change-Id: I892107396b3b227b4f33344377585aa5e5328288
Bug: https://github.com/dart-lang/sdk/issues/46316
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216080
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2021-10-19 01:00:08 +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
Mark Zhou ff26406d72 [dart2js] Representing late/lazy fields with arrow functions.
Change-Id: Ic47077253eb07f5caa60b9409ccbf9bb87f34d4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209856
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2021-10-14 21:04:15 +00:00
Mark Zhou fc868e7ff8 [dart2js] Simplifying arrow functions that return a single expression
expressions like this:
() => { return 0; }
become:
() => 0

May have sourcemap ramifications down the line. See: https://github.com/dart-lang/sdk/issues/47354

Change-Id: I66c2794a73fbe2013c3352250f501abcdb0a002c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210288
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2021-10-14 18:44:45 +00:00
Johnni Winther 56490f9776 [cfe] Add Procedure.signatureType
The added field holds the interface signature type for a Procedure when
this is different from the class signature type (implied by the function
parameters and return type). This is needed for forwarding semi stubs
when its declared type is different from the called super member.

Closes https://github.com/dart-lang/sdk/issues/47072

TEST=pkg/front_end/testcases/general/implement_semi_stub.dart and more

Change-Id: I4a7cdc9d564fb0a59e7b06e83646b5410d8d82f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216420
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <dmitryas@google.com>
2021-10-13 11:31:16 +00:00
Nate Bosch f9c68a5679 Replace a bunch of references to .packages
Most of these arguments are flowing through to a `--packages` argument
which allows passing the `package_config.json` file. In the long term we
should remove the `.packages` file entirely.

TEST=None, the change should have no visible impact.

Change-Id: I60a8b175d5e217a85588bbcb91cc5095514066b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211503
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2021-10-12 20:16:15 +00:00
Joshua Litt 2e0bc4f308 [dart2js] Properly attribute class types in dump_info.
Change-Id: I86d87dfae1bd9a887d0ab123a83d7275a05bb967
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213722
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-10-07 17:53:43 +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
Paul Berry b2c2acee09 Adjust front end nomenclature for error messages.
This change updates the classes Message, MessageCode, Template,
LocatedMessage, and FormattedMessage so that they uniformly refer to
error message text using the terminology `problemMessage` and to
correction suggestions using the terminology `correctionMessage`.
This brings them into alignment with the names we've decided to use to
unify the structure of front_end and analyzer, and makes them match
the names used in the anlayzer and front end's `messages.yaml` files.

Change-Id: Idcbb7ccfff6bb4e99ca22a3ef3c19d83880cf3c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215154
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-10-04 13:32:46 +00:00
Stephen Adams 09b15a583c [dart2js] Move --csp flag handling to 'features'.
Change-Id: Iae6c01c10121023a02f8c850247f41007727ea75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215009
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2021-10-01 04:23:24 +00:00
Mayank Patke 36a2120b73 [dart2js] Use Field.fieldReference in late lowering.
Change-Id: Iead2390ff5a9fffa611e8e4af96ab2ecfa6b93d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214440
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2021-09-30 20:54:54 +00:00
Stephen Adams 091338d7a3 [dart2js] Use Object.assign for populating mixin application
In a subject app, the 'inheritance' phase of the main unit is reduced
from ~40ms to ~20ms.  This improves the pre-main execution after
'CompileScript' from 133ms to 117ms.

Change-Id: I9b426f030c6759274cd84853b99732f43f0968e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214361
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2021-09-28 04:30:05 +00:00
Stephen Adams e0846aa5c6 [dart2js] Reduce switches on enums to switches on indexes
Change-Id: Ie000aae837792067eba869e7849d97226ad04503
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214512
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2021-09-27 22:54:03 +00:00
Stephen Adams 4d5f8a1504 [dart2js] Add HInstruction.replaceInput
Change-Id: I646a06017d9e65ab30cba7eeaa49a308e6479c10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214511
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-27 20:58:03 +00:00
Kevin Moore b85488cedd pkg:compiler - enable and fix null operator lints
Change-Id: I5aaef20fdd61fd6ac9dc69978111fb680c7f99e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211624
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2021-09-24 23:07:19 +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
Johnni Winther 5b7968346d [kernel] Add Field.fieldReference
This adds a third reference to Field declaration, so that we know have
three references, one for each use case:

1) fieldReference used for initialization; in FieldInitializer and as
   the key in the InstanceConstant.fieldValues map.
2) getterReference used for reading; in InstanceGet, StaticGet and
   SuperPropertyGet
3) setterReference used for writing; in InstanceSet, StaticSet and
   SuperPropertySet

TEST=existing

Change-Id: I223f130e808e7f19a831c1fe5e3a4725d1bcdc3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203770
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-09-24 12:01:08 +00:00
Stephen Adams 2ad84a22c8 [dart2js] dart format --fix on remaining lib/src/ files
Change-Id: I09b77a6ba8ed590b3b53ed328c9fc8def444b729
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214001
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-22 20:39:14 +00:00
Stephen Adams f1e6092dd8 [dart2js] More shared_messages.dart cleanup
- Remove references to deleted file.
- Remove message that is unreachable in kernel.

Change-Id: I5fe772a3a6fbd00b31d085f10c47d63778a64217
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214071
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-22 19:20:54 +00:00
Mayank Patke d992af7e9c [dart2js] Preserve "signatures" when lowering late variables.
When we lower an uninitialized static field to a cell, we gives the cell
a mangled name and create a getter/setter pair with the original field
name. The getter/setter simply call the appropriate members on the cell.

This means that other libraries, even ones that haven't been transformed
(e.g. during modular compilation) will still interoperate correctly,
since the transformed library still has the same external signature.

Change-Id: I88edcb71fa5cb910869b4266628a029ad358b77e
Fixes: https://github.com/dart-lang/sdk/issues/45854
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214064
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2021-09-22 16:55:26 +00:00
Johnni Winther 6c4b75237a [kernel] Rename isFieldFormal to isInitializingFormal
+ update ast-to-text, including previous renames of covariant

TEST=existing

Change-Id: Ia29847cba791096ccd9c6c383a1b633a6150cd94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214042
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <dmitryas@google.com>
2021-09-22 15:56:07 +00:00
Lasse R.H. Nielsen 18f37dd8f3 Add extension name getter on Enum.
We use an extension getter instead of an instance getter because
it doesn't conflict with any potential existing or future enums
which want an element named `name`.
Keeping the namespace for enum elements open is a priority.
We currently only reserve `index` and `values`.

BUG: https://github.com/dart-lang/language/issues/1511

Fixes language issue #1511, which is a long-standing request,
and should replace a number of alternative implementations
which are based on parsing the `toString()`.


This version has two fields on the shared superclass, the index
and private name, and has a separate `toString` for each `enum` class
which hard-codes that enum's class name.

An earlier version had both `"name"` and `"ClassName.name"` as fields
to be able to reuse the same `toString` method on all enum classes,
but that cost too much for JS compiled code.
Even having just `ClassName.` as a field and then combining inside
`toString` requires more code to create the enum instances.
Instead this version hardcodes the `ClassName.` string once
in the `toString` method, which means each enum class has its own
toString (which can *potentially* be tree-shaken then.)

This still tree-shakes slightly worse than the previous implementation
where every enum class had its own `index` and `_name` fields
independent of each other, which could then be tree-shaken independently.
However, the `index` was already made an interface member with the
addition of the `Enum` interface, so code which accesses `.index`
on something of the `Enum` supertype could prevent tree-shaking of
all enum classes' `index` fields.
Likewise any general access to the "name" of an enum would necessarily
do the same for the name.
This CL makes up for some of that by sharing more implementation
between enum classes.

DartVM AOT CodeSize impact: ~0.15% regression on gallery (little less on big g3 app)

TEST= New tests added to enum_test.dart

Change-Id: Id25334e6c987f470f558de3c141d0e3ff542b020
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210480
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-09-22 14:20:16 +00:00
Riley Porter 82e8948ddc Add external extension fields, getters, and setters.
CFE transformation to add a function body for external fields,
getters, and setters, routing to the relevant js_util
getProperty and setProperty optimized calls.

Change-Id: Ia3d0f05fda50f20d217c0a67e0fd636bb774000b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213600
Commit-Queue: Riley Porter <rileyporter@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2021-09-21 22:56:18 +00:00
Stephen Adams 5c719b3bd3 [dart2js] Simplify message templates
Change-Id: I8e3f33664a3e7944e1b2d6bcf09bebd74c7b826e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214003
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-09-21 12:45:02 +00:00
Stephen Adams 0071b38172 [dart2js] dart format --fix in kernel/
Change-Id: Iab8c98930c6add208679074c562f129e797af780
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213970
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-21 02:01:08 +00:00
Mayank Patke 35421c5d1a [dart2js] Update MethodTypeInformation to narrow the return type of
_lateReadCheck.

Change-Id: If76a5b34cfd9da9721bfa0d8642b018a4af131dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213901
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2021-09-21 01:59:45 +00:00
Stephen Adams 9872fd192e [dart2js] Modernize allocations in js_emitter/
Change-Id: Iecdde5c8940ede24f4ac428a624984a0b2ca4f97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213963
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2021-09-21 01:05:15 +00:00
Stephen Adams 048dd185c6 [dart2js] Modernize allocations in js_model/
Change-Id: If93776e2f556e8d7adfdbe5e3603f7477e0486f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213902
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-21 00:22:55 +00:00
Stephen Adams a666e5a221 [dart2js] dart format --fix in serialization/
Change-Id: I0e14a6fad41721380fbd406104932c7a8011e4ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213960
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-20 21:28:26 +00:00
Sam Rawlins c260f251a7 Remove redundant imports from compiler
In many files, there is a redundancy in importing

    import 'package:compiler/src/common.dart'
    and
    import 'package:compiler/src/diagnostics/diagnostic_listener.dart'

I chose to remove the latter import.

Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: Ia6c871080bf2d7c637694a4fe5cb1b84e540b789
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213851
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-09-20 19:14:33 +00:00
Stephen Adams cc73b9001f [dart2js] dart format --fix in inferrer/
Change-Id: I105784a65c1f4c0748bab157522af3bcc2aad066
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213862
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-20 19:06:13 +00:00
Joshua Litt dffb06bca9 [dart2js] Address some feedback in algorithm_state.dart.
Change-Id: I9c96ca7294318d7f28f692791ba5ce9518f18f97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212023
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-09-20 19:03:23 +00:00
Stephen Adams 427af76e0b [dart2js] dart format --fix in js_emitter/
Change-Id: Ib4ba65b922ef687adc355c41b3ae23d337659f30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213863
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-20 18:40:13 +00:00
Stephen Adams 552573ac93 [dart2js] dart format --fix on ir/
Change-Id: Iae34547b8ea7840fdd7b6e5c3b95e8ee4ca3e670
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213861
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-20 18:31:25 +00:00
Stephen Adams 6e3de72138 [dart2js] dart format --fix on js_model/
Change-Id: Id06c441e16c2a0d8df96e9d525ce887f269e4e15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213860
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-20 18:24:03 +00:00
Stephen Adams d4385e620d [dart2js] Modernize allocations in js_backend/
- Use `{}` syntax for Maps and Sets
- Remove type arguments on right side of initializations with same
  type arguments.
- A few cases of replacing conditional code with `??`/`??=`.

Change-Id: I1b58a109b1f8ea8458f37a2de256ffb3dc9956b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213853
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-20 18:23:23 +00:00
Stephen Adams 5f7a18b492 [dart2js] dart format --fix in js_backend/
Change-Id: I35f5564601c76ff0c8bb141fa3902484ce8e82bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213842
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-20 01:53:50 +00:00
Stephen Adams 70af0e4c57 [dart2js] Modernize allocations in ssa/
Also:

- fix order of arguments to HBoundsCheck

Change-Id: I4dbcca67dd89f3048a22315d8db2fa862d810774
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213620
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-17 18:47:31 +00:00
Joshua Litt a2d1fa1a33 [dart2js] Support serialization with supplied indices.
Change-Id: I830d084f59281b9dff81f33b72002d709f35c16c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212344
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-09-16 19:33:55 +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
Stephen Adams 63f21ac34c [dart2js] dart format --fix in ssa/
Purely mechanical CL.

Change-Id: I9515670150f3c99b531128e1e3ca71924f2900e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213530
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-16 04:01:35 +00:00
Stephen Adams ff617b9505 [dart2js] Fix bug in load elimination with try-catch-finally
1. Make unwrapException pure. This allows it to be removed if the
exception is unused, and ensures that the catch does not unnecessarily
invalidate locations. This is helpful since, by itself, this change
causes some test failures due to the load elimination bug (#47166).

2. Invalidate locations on entry to catch and finally blocks. This is
a conservative fix for #47166.

Bug: 47166
Change-Id: If3b4113b538978095d59814c16bd8375bbd70696
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213414
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-15 19:34:23 +00:00
Mayank Patke 9cf14f417d [dart2js] Move pkg/compiler/test/kernel/goldens_test testcases to
pkg/front_end/testcases/dart2js.

Change-Id: Iede8f9b03119dab4ee2a3ed6498d6a7e4e19a6a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212260
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2021-09-15 18:34:14 +00:00