Skip to content

Commit 989180a

Browse files
fishythefishcommit-bot@chromium.org
authored andcommitted
[dart2js] Add normalization to RTI.
Change-Id: Ieecb90fbc6fdf13a44373d285fc5da450a9876b3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134960 Commit-Queue: Mayank Patke <[email protected]> Reviewed-by: Sigmund Cherem <[email protected]>
1 parent 1591ddc commit 989180a

File tree

4 files changed

+411
-164
lines changed

4 files changed

+411
-164
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ additional details see the [announcement].
6868
web has been unsupported and prevented by the Dart build systems since Dart
6969
v2.0.0. All known exception cases have been cleaned up. This change makes DDC
7070
and dart2js now issue a compile-time error directly as well.
71+
* **Breaking Change**: Types are now normalized. See [normalization] for the
72+
full specification. Types will now be printed in their normal form, and
73+
mutual subtypes with the same normal form will now be considered equal.
74+
75+
[normalization]: https://github.com/dart-lang/language/blob/master/resources/type-system/normalization.md
7176

7277
#### Linter
7378

pkg/compiler/lib/src/js_backend/runtime_types_new.dart

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@ abstract class RecipeEncoder {
4444
jsAst.Literal encodeMetadataRecipe(ModularEmitter emitter,
4545
InterfaceType declaringType, DartType supertypeArgument);
4646

47-
/// Converts a recipe into a fragment of code that accesses the evaluated
48-
/// recipe.
49-
// TODO(33422): Remove need for this by pushing stubs through SSA.
50-
jsAst.Expression evaluateRecipe(ModularEmitter emitter, jsAst.Literal recipe);
51-
5247
// TODO(sra): Still need a $signature function when the function type is a
5348
// function of closed type variables. See if the $signature method can always
5449
// be generated through SSA in those cases.
@@ -91,13 +86,6 @@ class RecipeEncoderImpl implements RecipeEncoder {
9186
.recipe;
9287
}
9388

94-
@override
95-
jsAst.Expression evaluateRecipe(
96-
ModularEmitter emitter, jsAst.Literal recipe) {
97-
return js('#(#)',
98-
[emitter.staticFunctionAccess(commonElements.findType), recipe]);
99-
}
100-
10189
@override
10290
jsAst.Expression encodeSignature(ModularNamer namer, ModularEmitter emitter,
10391
DartType type, jsAst.Expression this_) {

0 commit comments

Comments
 (0)