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

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

Issue 1383503002: Add Resolution and Parsing interfaces for computeType, ensureResolved and parseNode. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Add TODOs. Created 5 years, 3 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/serialization/modelz.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 0273c969ddf450dedc7195540157dd857cb3073a..40ed4ccd2ffd8b9e48af788ef03b2e50e4984a38 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -1105,6 +1105,9 @@ class SsaBuilder extends ast.Visitor
work.element.implementation);
}
+ // TODO(johnniwinther): Avoid the need for this.
+ Resolution get resolution => compiler.resolution;
+
@override
SemanticSendVisitor get sendVisitor => this;
@@ -2479,7 +2482,7 @@ class SsaBuilder extends ast.Visitor
DartType type,
int kind) {
if (type == null) return original;
- type = type.unalias(compiler);
+ type = type.unalias(resolution);
assert(assertTypeInContext(type, original));
if (type.isInterfaceType && !type.treatAsRaw) {
TypeMask subtype = new TypeMask.subtype(type.element, compiler.world);
@@ -2515,7 +2518,7 @@ class SsaBuilder extends ast.Visitor
assert(compiler.trustTypeAnnotations);
assert(type != null);
type = localsHandler.substInContext(type);
- type = type.unalias(compiler);
+ type = type.unalias(resolution);
if (type.isDynamic) return original;
if (!type.isInterfaceType) return original;
// The type element is either a class or the void element.
@@ -3810,7 +3813,7 @@ class SsaBuilder extends ast.Visitor
HInstruction buildIsNode(ast.Node node,
DartType type,
HInstruction expression) {
- type = localsHandler.substInContext(type).unalias(compiler);
+ type = localsHandler.substInContext(type).unalias(resolution);
if (type.isFunctionType) {
List arguments = [buildFunctionType(type), expression];
pushInvokeDynamic(
@@ -8984,7 +8987,7 @@ class TypeBuilder implements DartTypeVisitor<dynamic, SsaBuilder> {
}
void visitTypedefType(TypedefType type, SsaBuilder builder) {
- DartType unaliased = type.unalias(builder.compiler);
+ DartType unaliased = type.unalias(builder.compiler.resolution);
if (unaliased is TypedefType) throw 'unable to unalias $type';
unaliased.accept(this, builder);
}
« no previous file with comments | « pkg/compiler/lib/src/serialization/modelz.dart ('k') | pkg/compiler/lib/src/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698