Commit Graph

4483 Commits

Author SHA1 Message Date
Joshua Litt f4bdd68540 [dart2js] Fix small nnbd bug with code generation.
Change-Id: If82cb22b8dfed6bbae7ea531bc6ed0ff925a8579
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145563
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-04-30 15:09:09 +00:00
Mayank Patke 94c81a137b [dart2js] Remove redundant check for Object when printing bounds.
Change-Id: I7e8190ac9d0095cf1bb225f94184eceba00ba887
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145308
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-04-30 00:36:28 +00:00
Mayank Patke 7ac53f1825 [dart2js] Treat Object as a top type in weak mode.
We were only treating Object as a top type if NNBD was disabled. This is
incorrect and we should be treating Object as a top type whenever legacy
subtyping is in effect. In particular, Object acts as a top type in weak
mode.

Change-Id: I76acc25e92fda2b9e2b7872fc72d319161318874
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144689
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-04-28 02:27:26 +00:00
Joshua Litt d7fa9399c3 [dart2js] Minor strong mode fix in inference.
Change-Id: I116ac7b5616735abdbc36548d3b2ff53d2307e5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144983
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-04-27 21:56:26 +00:00
Konstantin Shcheglov eada4d8d65 Implement Factor in flow analysis.
Bug: https://github.com/dart-lang/sdk/issues/40014
Change-Id: I8d21d3c3368495d9d0dbb1cd52317b053657a176
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144804
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-04-27 18:47:08 +00:00
Joshua Litt 02142fe49e [dart2js] Fix two type inference bugs with legacy subtyping.
Change-Id: Ie4ecd82f64b0ebebf65f7e2787881942762862dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144662
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-04-27 18:42:38 +00:00
Mayank Patke 98c62fa2df [dart2js] Fix LUB computation for interop classes.
Previously, we said that the LUB of instantiated subtypes/subclasses for
a JS interop class was JavaScriptObject. This worked in most cases, but
failed when JavaScriptObject was not marked instantiated.

One way this could arise is if the only calls to JS_INTERCEPTOR_CONSTANT
were JS_INTERCEPTOR_CONSTANT(Interceptor). The LUB has to be some
interceptor, but JavaScriptObject (and its interceptor subclasses -
PlainJavaScriptObject, UnknownJavaScriptObject, and JavaScriptFunction)
are not instantiated, so we actually need to go even higher in the type
lattice.

In fact, the class hierarchy already knows how to do this - we need to
assist it a little in going from a JS interop class to JavaScriptObject,
but it can recursively compute LUB(JavaScriptObject) just fine.

Change-Id: I1e08faa42c42a43afc0b1cfafb5a012f5cd69193
Bug: https://github.com/dart-lang/sdk/issues/41330
Fixes: https://github.com/dart-lang/sdk/issues/41330
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144667
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-04-23 22:58:22 +00:00
Stephen Adams e6baa97e9a [dart2js] Fix bug with unused generator type parameters
Ensure that a generator entry point only passes type arguments for
parameters that are not erased.

The generator header was passing too many arguments to the generator
body, causing the element type to be misaligned.

Change-Id: I062df5f7172ed8bb410c81013a3faee35d66ef1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144351
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-04-22 04:58:44 +00:00
Sigmund Cherem 906e1dfae2 [dart2js] include null when checking or trusting the type of operator==
Change-Id: I8f60fd1176062f8341d22fec4dc1c0bbf78ed485
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144081
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-04-20 23:35:05 +00:00
Stephen Adams 7ee0e10bd5 [dart2js] specialize legacy primitive as-checks
Each primitive type T has three variant of 'as' check for 'as T' (strong),
'as T*' (weak) and 'as T?' (nullable).


Change-Id: I6ef3c41d73b384d7d16fa0da0c5b9a1e9791d43f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143884
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-04-18 01:47:37 +00:00
Mayank Patke 4e0c699cc4 [dart2js] Update DartType printing of generic function type parameter
bounds to match runtime behavior.

Change-Id: I745a6a84b6d9fc1e0d9c3cc0ded673bafa6ddcd6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143863
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-04-17 11:14:36 +00:00
Stephen Adams 87bc71fb65 [dart2js] Handle legacy types in _isTestResult
Change-Id: I1e68a9beb9170fc92810c4a2900a7ee218f4ce6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143861
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-04-16 22:40:13 +00:00
Stephen Adams 18541a7c36 [dart2js] Apply is-test specializations to legacy types
Change-Id: I99d72220036335e39b33f3695ffc69389dfb4a20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143680
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-04-16 22:03:43 +00:00
Sigmund Cherem 651cfe9ced [dart2js] handle synthesized parameters in dump-info
Fixes https://github.com/dart-lang/sdk/issues/41459

Change-Id: I70fbe7ebcc79a948d23846cdb756cde77e9db230
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143720
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-04-16 15:15:24 +00:00
Joshua Litt c8b940141c [dart2js] fix for native_wrapping_function3_frog_test in nnbd.
Change-Id: I40811ff96000cec05668e1bc89a95a9853ff0227
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143015
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-04-11 00:59:22 +00:00
Stephen Adams 9e2c8ef000 [dart2js] Add --dump-ssa option
The dart2js option --dump-ssa=pattern outputs the SSA CFGs for methods
with names matching the RegExp 'pattern' to a '.cfg' file alongside
the javascript output, e.g. 'main.js.cfg'.

To dump all CFGs, use --dump-ssa=.

Change-Id: I8227232d9950bf3d30df0c87709b0c24e8944759
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143082
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-04-10 21:02:14 +00:00
Joshua Litt 99385196b3 [dart2js] Fix for native_method_inlining_test with nnbd.
Change-Id: Ia081f2321c90b9a1f7df7032fdbf5beba00fdfd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143013
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-04-10 17:38:14 +00:00
Stephen Adams e6ae2d92f7 [dart2js] Fix CommonMasks.createFromStaticType for variance
Change-Id: I2b05eedb459f80fdd1674123cf033b2bbd949669
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142906
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-04-08 21:28:34 +00:00
Joshua Litt 3ed44b3f2d [dart2js] Always compute platform binaries.
Currently, in order to change experiment flags between tests,
we rebuild the sdk. This is made more complicated by null safety
because now we may want to enable null safety while compiling
the sdk but not while compiling user code.

To simplify things, this cl changes dart2js to always use the
prebuilt sdk, and to assume that no experiment flags require
rebuilding the sdk.

Change-Id: Ia1bbdc88d191f1a71d1688685186457fcfba28aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142703
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-04-08 17:24:23 +00:00
Stephen Adams e4c5289574 [dart2js] createFromStaticType for LegacyType
Two test failures
One failure is preexisting
One failure looks like an impacts bug:
https://github.com/dart-lang/sdk/issues/41330

Change-Id: I270a12cec18fb0e6f5c4bf8446aa79aa99107662
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141960
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-04-07 02:13:38 +00:00
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