Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(655)

Unified Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 1431513010: Revert "Normalize type masks to use the least upper instantiated subclass/type." (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/ssa/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 5e89a0080dc550c283301e662a0b37d87323e350..35cf64c929b681008251d77a87edd86be31f7a14 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -3247,7 +3247,7 @@ class SsaBuilder extends ast.Visitor
});
TypeMask type =
- new TypeMask.nonNullExact(closureClassElement, compiler.world);
+ new TypeMask.nonNullExact(coreClasses.functionClass, compiler.world);
push(new HForeignNew(closureClassElement, type, capturedVariables)
..sourceInformation = sourceInformationBuilder.buildCreate(node));
@@ -5074,13 +5074,7 @@ class SsaBuilder extends ast.Visitor
: inferred;
} else if (element.isGenerativeConstructor) {
ClassElement cls = element.enclosingClass;
- if (cls.isAbstract) {
- // An error will be thrown.
- return new TypeMask.nonNullEmpty();
- } else {
- return new TypeMask.nonNullExact(
- cls.thisType.element, compiler.world);
- }
+ return new TypeMask.nonNullExact(cls.thisType.element, compiler.world);
} else {
return TypeMaskFactory.inferredReturnTypeForElement(
originalElement, compiler);
« no previous file with comments | « pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart ('k') | pkg/compiler/lib/src/types/flat_type_mask.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698