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

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

Issue 1397053002: Introduce DartType.unaliased to avoid use of Resolution in the backend. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 2 months 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
« no previous file with comments | « pkg/compiler/lib/src/resolution/typedefs.dart ('k') | pkg/compiler/lib/src/ssa/nodes.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a461a3a3478adb61c58c4c6233039df3eca12be0..fd597112c4f1b662fda27bf39d1d41587d3c4889 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -1111,9 +1111,6 @@ class SsaBuilder extends ast.Visitor
DiagnosticReporter get reporter => compiler.reporter;
- // TODO(johnniwinther): Avoid the need for this.
- Resolution get resolution => compiler.resolution;
-
@override
SemanticSendVisitor get sendVisitor => this;
@@ -2488,7 +2485,7 @@ class SsaBuilder extends ast.Visitor
DartType type,
int kind) {
if (type == null) return original;
- type = type.unalias(resolution);
+ type = type.unaliased;
assert(assertTypeInContext(type, original));
if (type.isInterfaceType && !type.treatAsRaw) {
TypeMask subtype = new TypeMask.subtype(type.element, compiler.world);
@@ -2524,7 +2521,7 @@ class SsaBuilder extends ast.Visitor
assert(compiler.trustTypeAnnotations);
assert(type != null);
type = localsHandler.substInContext(type);
- type = type.unalias(resolution);
+ type = type.unaliased;
if (type.isDynamic) return original;
if (!type.isInterfaceType) return original;
// The type element is either a class or the void element.
@@ -3820,7 +3817,7 @@ class SsaBuilder extends ast.Visitor
HInstruction buildIsNode(ast.Node node,
DartType type,
HInstruction expression) {
- type = localsHandler.substInContext(type).unalias(resolution);
+ type = localsHandler.substInContext(type).unaliased;
if (type.isFunctionType) {
List arguments = [buildFunctionType(type), expression];
pushInvokeDynamic(
@@ -8992,7 +8989,7 @@ class TypeBuilder implements DartTypeVisitor<dynamic, SsaBuilder> {
}
void visitTypedefType(TypedefType type, SsaBuilder builder) {
- DartType unaliased = type.unalias(builder.compiler.resolution);
+ DartType unaliased = type.unaliased;
if (unaliased is TypedefType) throw 'unable to unalias $type';
unaliased.accept(this, builder);
}
« no previous file with comments | « pkg/compiler/lib/src/resolution/typedefs.dart ('k') | pkg/compiler/lib/src/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698