Normal dart2js invocations will continue using the existing abstract
value domains with `emptyType` as the initial type for type graph nodes.
When an appropriate debug flag is passed, all abstract values will be
wrapped so that the underlying empty type is only used when a value is
known to be empty. Abstract values which have not yet been computed will
print as "[uncomputed]" in order to aid in debugging but will otherwise
behave like the empty type during type graph construction.
Change-Id: I1ec41e42e8b566a0a6bfe969c2ff96f4e53d5f4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243844
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
This now breaks the cycle in this folder, so all libraries can be migrated in a
specific order.
Change-Id: Ib76d813804e2d0eac485bbeb84a1e0aac0027e7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264360
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Creates an external createDartExport function in js_util.
Adds a number of checks for the annotation:
- Classes with the annotation should not have value in the annotation
- Classes with the annotation should have at least one instance member
somewhere in the hierarchy
- There are no export name collisions that are unresolvable accounting
for overrides
- Members with this annotation are instance members with a body only
Also adds checks to createDartExport:
- Checks that the type is a Dart class
- Checks that the type is marked as exportable
Change-Id: I52f27275966e9603e88921ce7897b7615178c4d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259511
Reviewed-by: Riley Porter <rileyporter@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
`catchError` in http_impl also handles SocketExceptions.
Change-Id: I865bdd6bde4272f6cb657a86a1c78734e4ee331c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263183
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Now that type parameters can occur nested within type literals there
is no reason to special-case type parameters. Now that we don't
consider type literals to be always constant, it is safe to remove
this extra check and handle type parameters the same as a generic
type literal containing a type parameter.
Change-Id: I887d162e20fd29f3285d73149927e51e1f1d1753
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264894
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Long ago Dart didn't support generic type literals and the deferred
loading algorithm assumed that in the ConstantCollector visitor. Now that Dart supports them, we need to ignore them if they get encountered.
Fixes#49851
Change-Id: I637f70a74bbe5ca8fc76c2f8ff79e97eeac19182
Fixed: 49851
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264884
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
This also fixes a couple nullability signatures in world.dart and class_set.dart
Change-Id: I11b383c312a2320ae4ea7bac36c46c3f80fb7e0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264341
Reviewed-by: Nate Biggs <natebiggs@google.com>
This seems to speed up inferrer by 5-10%
Change-Id: I733159e9ec79212821444b4e502b28aa2bf81bdd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263220
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
This is to avoid confusion as we implement the records language feature.
Change-Id: I35aee0d88a42b7b4960332c3d81c0551d6e3ebde
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262506
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
The correct normalization should only normalize FutureOr<Never>
when Never is non-nullable.
Change-Id: I592f3a4856c219b33a8f1ac8377567a956e1148c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261000
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Add RecordType to the dart2js DartType hierarchy.
The RecordShape is made explicit so that processing the record type usually means processing the list of field types.
This pattern of shape + combined-fields will be used elsewhere, e.g. constants.
Filled out some uses of ir.RecordType until it gets converted to a dart2js DartType.
Change-Id: I6aa4d4a920cbb0e4f37e7079bc4d9d10e366a849
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261581
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Also prepare some ssa/ files by importing world_iterfaces.dart
Change-Id: Ifa1c61d27a32619baec60ab7835f66e36dee3bf5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261283
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
This reapplies f740b500e2
The change is not that different from the original, except that a
few changes have landed in between to address the failure
encountered by the SDK roll last time. Namely, the map lookup on
`resolvedUri` is normalized, so that the lookup will always match
how the store operation is done, and hence will succeed when copying
cache entries between resolvedUri and uri (see also
https://dart-review.googlesource.com/c/sdk/+/250440).
Change-Id: Ic3ad778a3e9ea465b515de9800f296c71683970c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260081
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>