Commit Graph

4463 Commits

Author SHA1 Message Date
Sigmund Cherem e26a8109ea [dart2js] Use platform file to enable null safety.
Derive whether legacy and nullable types are emitted based on the
provided sdk libraries and only enable the non-nullable experiment
when building the platform files.

The test matrix continues to enable the experiment temporarily
because test_runner currently doesn't support running with the
ReleaseX64NNBD configuration if it is not enabled in test.py

Change-Id: I7322906e928c68acab77087bcba76f06ef4bf983
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141850
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-04-01 18:19:37 +00:00
Stephen Adams d5e8cf7dbd [dart2js] Specialize is- and as- tests for nullable types
- '_as' is now specialized on first use, like '_is'.
- '_is' specialization on `T?` that uses `T._is`
- recognize legacy versions of simple type tests (e.g. is int*)

The T? specialization makes a 2x improvement on some of the ListCopy
benchmarks on 'spec-mode' dart2js because some iterators have a T?
check.

Change-Id: I434a43de9e1322b34c3a5e11199415a75b7ed2c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140944
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-03-28 02:15:31 +00:00
Johnni Winther 25060e63c6 [cfe] Add tool for updating all id-tests and expectation tests
Change-Id: I191ebe0d59d44055a6818505db0112d3a452bdbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141242
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-03-27 14:52:20 +00:00
Jens Johansen 3e053b7da2 [kernel] Polish toString implementation on AST nodes
Change-Id: I0c21ded156243d8f8ff178d1b31bf0512758ebe1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141101
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-03-27 07:33:38 +00:00
Stephen Adams 4243f45e04 [dart2js] Print non-minified init object as multiline
Change-Id: I4a9a0391b3262e971fe60745b9d4d8029f891972
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141202
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Auto-Submit: Stephen Adams <sra@google.com>
2020-03-27 07:31:38 +00:00
Kevin Moore b3522564d9 Remove unused package-root option and configuration from dart2js
Related to https://github.com/dart-lang/sdk/issues/41197

Change-Id: I4681139b5fe9d2d3d49c69796cf8a3c277753bee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140980
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
2020-03-26 16:49:34 +00:00
Joshua Litt 6ce852bd89 [dart2js] Fix nullability bug in extractTypeArguments.
Change-Id: I2c9e78bb374c7e2b7d46e693440b420e69dbba2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140002
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-03-24 15:39:59 +00:00
Erik Ernst e3af7e724f Update usage of int/String fromEnvironment
Breaking change 40678 requires the constructors int.fromEnvironment and
String.fromEnvironment to get new default values for the named
parameter `defaultValue`. This CL changes usages of these constructors
such that they do not depend on the default value, such that it
becomes a non-breaking change for code in the SDK repo to perform the
change in sdk and in sdk_nnbd.

Change-Id: I82af0e1f92d6cd3618b65c0c50d754ae8c39eb0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140284
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-03-24 11:19:14 +00:00
Mayank Patke 9eaa5321cd [dart2js] Erase *s on type literals at compile-time.
Change-Id: I21437c51b05230d7f464f2d2f021f3c751199cf9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139948
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-21 05:56:06 +00:00
Mayank Patke b69656de41 [dart2js] Clean up some nullabilities in static_type.
Change-Id: I731a4727ef3c74adbc6f7eaa9c05fc9cdeddad82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139962
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-21 05:56:06 +00:00
Stephen Adams ff43aa3285 [dart2js] Handle NullableType from createFromStaticType
A NullableType can be a precise AbstactValue if the base type can be
precise.

The main effect is more lowering of field setters to HFieldSet,
(i.e. for fields with nullable types.

Change-Id: If1f92e1a79da87a73df02da3b9fc8fc3542f7b40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139326
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-03-20 22:22:15 +00:00
Sigmund Cherem 8a4300fe29 [dart2js] fix in normalization
We were accidentally dropping FutureOr on the `FutureOr<NullableR>*?` case. That is we had:

  FutureOr<NullableR>*? => NullableR

instead of:

  FutureOr<NullableR>*? => FutureOr<NullableR>

Change-Id: Idfe2748ccb03a9d4ee18b57022f9bdb7fbb55d42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140243
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-03-20 16:02:19 +00:00
Dmitry Stefantsov dea82cc39a [cfe] Make instantiation-to-bound algorithm NNBD-aware
Closes #40764.

Bug: https://github.com/dart-lang/sdk/issues/40764
Change-Id: Ia9eff062f54632edbdb26937879742d7a813a07c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139643
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-03-20 09:03:41 +00:00
Stephen Adams 37d1d69f61 [dart2js] Remove _CastError and Rti._check
CastError is deprecated and _TypeError now implements CastError, so
it is possible to remove the distinction in generated code.

All checks now go via Rti._as(x) to some _asXXXX method.

Change-Id: I4ce6735b6c904bcbc366de92ed149716caf9ae81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139959
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-03-19 18:43:33 +00:00
Joshua Litt b0221e691d [dart2js] Drop nullability when checking for simple types.
Change-Id: I69b32889b60d79ebf2ce6286d8315c38274152f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139681
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-03-19 16:35:39 +00:00
Stephen Adams afbce123fa [dart2js] Add '--legacy-javascript' flag
dart2js will migrate slowly to modern JavaScript.

The --legacy-javascript flag causes emitted code to be compatible with
IE11, our only supported non-modern target. This is a temporary flag
until IE11 is removed from support.

The negative flag --no-legacy-javascript allows the code to be
incompatible with legacy browsers and, over time, be improved to take
advantage of modern JavaScript features.

Initially --no-legacy-javascript will use some minimal features that
are incompatible with IE11 as a 'trip-wire' to ensure that
--legacy-javascript is always used for IE11.  dart2js analytics can
then be used to assess how much --legacy-javascript is used. (The
'trip-wire' unsupported feature is unguarded use of JavaScript
Symbols.)

The default at this change is --legacy-javascript so that this change
is non-breaking. The default will be changed soon to
--no-legacy-javascript.

Change-Id: Ic13461362a5fa80293fb66b112945d1404a64a03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139867
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-19 02:11:07 +00:00
Joshua Litt 8d308cc30e [dart2js] Create a predicate to treat strong tops as raw for set rti.
Change-Id: I92c8bb540b5f7ab0000cf109002902c9b3e8d004
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139840
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-03-18 16:33:41 +00:00
Mayank Patke 794d2eba4a [dart2js] Normalize X extends Never in generic functions.
Change-Id: I36ddb6514ab8bfc3af70568502ce83d1f7d84d6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139497
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-16 22:03:06 +00:00
Joshua Litt f1d57374ae [dart2js] Move a bunch of references from objectType to topType.
Change-Id: Ia57b3604f26c8a92c53180d58ea5b41265965252
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138613
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-03-16 21:54:21 +00:00
Dmitry Stefantsov 928f9fc932 [cfe] Remove flag --force-nnbd-checks
The checks are now always enabled for the "non-nullable" experiment

Closes #40980.

Bug: https://github.com/dart-lang/sdk/issues/40980
Change-Id: I32a141a93f0ba86ebdab554e1f312c2147927993
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139440
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-03-16 15:01:38 +00:00
Erik Ernst 330ec173a9 Add bool.hasEnvironment constructor and tests
Change-Id: I65ebfcb48bf46292d5ae611ecb7431e0666f753c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139286
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-03-16 11:17:58 +00:00
Sigmund Cherem eff5548a68 [dart2js] remove invalid assertion in dart2js batch runner.
Turns out the invariant is not respected in practice. This is what caused hundreds of flaky failures in the old-rti bot when I added this assert.

The batchArguments include experiments whenever the first test in a shard has an experiment flag. If that happens and most other test in the same shard don't have the experiment, all those tests will appear to crash with this assertion.  Because the assertion is outside the test itself, we get almost no feedback on the test logs.

TBR=fishythefish@google.com

Change-Id: I1230d79ed3cccbe388dddf19b5e8aa18c50f7329
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139566
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-03-15 04:33:56 +00:00
Stephen Adams 5d4dc1d5c4 [dart2js] Default to printLegacyStars for debug printing
Change-Id: I504b6ebc4cc323c229d0aa068a874fe1331ddfbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139562
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-03-14 01:56:27 +00:00
Joshua Litt f42628cccd [dart2js] Handle nullabilities correctly while converting closures.
Change-Id: I8ee97abc0a3ed1b3b72ce7b9d4f6060d24bcd4e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139489
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-03-13 22:16:17 +00:00
Stephen Adams 9375704dd0 [dart2js] Fix -DDUMP_IR
TBR: sigmund@google.com
Change-Id: Ib6e50b20c646e3e0eaecbdf9396596fd5c1a2ce2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139520
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-03-13 22:08:26 +00:00
Joshua Litt 5ab2fd71e1 [dart2js] Remove nullability before modeling type escapes.
Change-Id: I317c367025d5b7ffa9d5c093b65e1da7b470cfb8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139240
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-13 18:42:32 +00:00
Joshua Litt d210b7e631 [dart2js] Drop some nullabilities when computing runtime types.
Change-Id: I1f1f6d8e59cb8eee0c1c18f4353de8d59c7f014e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139324
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-03-13 16:10:42 +00:00
Sigmund Cherem eb9c26bd37 [dart2js] deferred load - gracefully handle missing constants
There is currently a bug in the algorithm that is causing us to miss some constants in the deferred loading table. While I'm investigating, I'm defaulting missing constants to the main output unit. This should prevent downstream errors and unblock users that are hitting this.

Change-Id: I3a7eaf1f9fc98accadba2a494e249002b59eacfc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139311
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-03-13 01:41:41 +00:00
Sigmund Cherem faefc4dccc [dart2js] merge experiment flags when running in batch mode
This issue started when the test_runner started prodiving the experiment flag to all batch runners (https://dart-review.googlesource.com/c/sdk/+/131831). We might want to follow up and change the behavior in the test runner if that's appropriate.

Change-Id: I7fd6f96b1b6f1c310381248399dc3c62b87cd1d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139400
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-03-13 00:40:41 +00:00
Joshua Litt 31e5919ea7 [dart2js] Fix some nullabilities in deferred_load.
Change-Id: Ied2456c48455ca056ea51c30cfeefd0135726b72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139303
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-12 22:09:27 +00:00
Joshua Litt 2972e22f01 [dart2js] Ignore abstract isMemberSignature procedures.
Change-Id: Idaa47742d44fbf10e8053f9049650e9a9d3aca0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139141
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-03-12 14:45:12 +00:00
Joshua Litt 43dafefa15 [dart2js] Fix bug with constant ordering and nnbd.
Change-Id: I8fd1a0b50f793dc3dec4b3a9a1fd127fb6ebb288
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138908
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-03-10 18:30:20 +00:00
Joshua Litt 97674262bc [dart2js] Fix type argument with nnbd and extractTypeArguments.
Change-Id: I2acd8778797301b759b74232406a30b072fe07bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138807
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-03-10 16:10:35 +00:00
Joshua Litt 2ae10b14a3 [dart2js] Fix nullability of native methods.
Change-Id: Ie7228802f7d7c3c8c7be174b60714d232e5bfa81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138604
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-03-09 22:37:40 +00:00
Jens Johansen e8c58a7a3d [CFE] Add ability to compare CompilerOptions
This is (intended to be) a small step towards removing the batch compiler.

Change-Id: I201c56b6d33420f91d2f4b989682670cd8d6a387
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138508
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-03-09 09:11:57 +00:00
Mayank Patke 81c3208c10 [dart2js] Special case null is T.
Change-Id: Iec5212db2d4493797257753f9eaa63799d047253
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138574
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-03-06 21:33:53 +00:00
Mayank Patke de0fcd71d4 [dart2js] Assign the correct type to super tearoffs.
Bug: https://github.com/dart-lang/sdk/issues/40902
Fixes: https://github.com/dart-lang/sdk/issues/40902
Change-Id: Ie2c58e5dab9902cbabd7c2ef9aae5b6c1773c7e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138663
Reviewed-by: Stephen Adams <sra@google.com>
2020-03-06 21:33:53 +00:00
Nate Bosch d3c0d59706 Disallow non-external generative JS constructors
Towards #40434
Towards #38875
Fixes #33834

- Add a shared error message for a non-external constructor.
- Check for non-external non-factory constructors constructors in the JS interop
  checks.
- Remove commented out code in Dart2JS that used to handle this check.
- Clean up skipped tests due to the missing static error. The status in
  `legacy_status_dart2js.csv` has no behavior impact but is removed for
  completeness.
- Add `external` to a few test cases.
- Remove unused dart2js error message.
- Add `annotating` to hardcoded spelling list.
- Ignore missing example for web specific error message.
- Switch some dart2js error expectations to GENERIC since the message is no
  longer defined with other dart2js errors.

Non-external synthetic constructors are ignored for now. An upcoming change will
automatically convert these to external.

Change-Id: I3b4a042392826c528689d81c4255f5369a0a7a90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138043
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-06 17:06:39 +00:00
Sigmund Cherem a410f5bde1 [dart2js] rename null-safety flag and plumb through CFE
The new flag name follows the changes in https://github.com/dart-lang/language/pull/779, the change also is converging on not having each tool infer a default on the input, but rely on build systems to provide the appropriate flag instead.

Fixes https://github.com/dart-lang/sdk/issues/39979

Change-Id: I39c143b7985dbfe6dab5dfd9a7347a7a4420479b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138569
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-03-06 02:22:41 +00:00
Stephen Adams 8ae984c54a [dart2js] Use a Symbol to access JavaScript Array Rti
Use a JavaScript Symbol() for Array rti property. This makes the
property non-enumerable, avoiding making the property visible via
JS-interop.

The code is feature-tested so that IE11 still works with an enumerable
String property.

Bug: 40535
Change-Id: Ic8b64dac5751989fe4b8d023b0626c3db04676c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137245
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-06 01:20:31 +00:00
Joshua Litt 55b4a240a4 [dart2js] Fix type promotion bug in static_type.dart.
Change-Id: I481020289df611ed09fe4093021e875e6c4f6871
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138333
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-03-05 18:56:22 +00:00
Jens Johansen 6b4c4faf28 [CFE] Combine 'inputSummaries' and 'linkedDependencies'
The two fields are already treated the same, so having two is just
confusing.

Change-Id: I649db2a77bced62429dfd94ab300673cf886e367
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138291
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-03-05 12:38:34 +00:00
Mayank Patke 6f4876849b [dart2js] Add flag to enable printing '*' on legacy types.
Change-Id: Ie0b191e6da39fa6e48601caeeadc492699f07045
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138326
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-03-04 20:22:26 +00:00
Joshua Litt 33d6e68719 [dart2js] Fix narrowType to handle NeverType in assert.
Change-Id: Iacd4d07b8a9bbde99e7f33d1f584d5f79d2d6e9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138260
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-04 17:14:45 +00:00
Joshua Litt 159fceed6f [dart2js] Fix type inference with Future.then
Change-Id: I77fa246bce935b162b2047c3dca0a462d4dfaea7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138240
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-03-04 15:22:15 +00:00
Nate Bosch 34f0e654bb Remove unused message for index operator
This message was moved to a shared location in
https://dart-review.googlesource.com/c/sdk/+/130733

Change-Id: Iee0a396389aa75000fb3b0bae974da26ecd6ddcf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138046
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-03 22:17:33 +00:00
Joshua Litt 5cd6b309fb [dart2js] Define type parameters of tearoffs as Object*/Object?
Change-Id: I5fa828b68e3dba398bac322a526af40616266ce5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138102
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-03 20:04:52 +00:00
Nate Bosch f97018bb4a Make some utilities private
I was trying to understand some usage of a bit of code and found it more
difficult than necessary since I had to search across the codebase
instead of a single library, even though it was only used locally.

- Remove `cachedClassFieldNames` since it is not referenced anywhere.
- Make some utilities only used in this library private.

https://dart.dev/guides/language/effective-dart/design#prefer-making-declarations-private

Clean up some trailing whitespace.

Change-Id: I8dd06d961c01ff5ca92d89ece138d3a34e255e90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138181
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2020-03-03 19:46:04 +00:00
Joshua Litt b761f8ef80 [dart2js] Fix nit in impact_transformer.
Change-Id: I97c20f5606523df494a42c03ae8a6356daa740cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138004
Auto-Submit: Joshua Litt <joshualitt@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-03-02 18:38:02 +00:00
Joshua Litt 86845cabb8 [dart2js] Remove nullability before calculating impact.
Change-Id: I8e3d3ee9f99261daad70cf9464083b2c548e89c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137843
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-02 17:41:24 +00:00