Index: pkg/compiler/lib/src/cps_ir/insert_refinements.dart |
diff --git a/pkg/compiler/lib/src/cps_ir/insert_refinements.dart b/pkg/compiler/lib/src/cps_ir/insert_refinements.dart |
index 207753ff2c984fc6013b082be7a5df1659152838..ef291b132bcf58515f776120314afe4d1913a361 100644 |
--- a/pkg/compiler/lib/src/cps_ir/insert_refinements.dart |
+++ b/pkg/compiler/lib/src/cps_ir/insert_refinements.dart |
@@ -74,7 +74,7 @@ class InsertRefinements extends TrampolineRecursiveVisitor implements Pass { |
} |
Primitive unfoldInterceptor(Primitive prim) { |
- return prim is Interceptor ? prim.input.definition : prim; |
+ return prim is Interceptor ? prim.input : prim; |
} |
/// Sets [refined] to be the current refinement for its value, and pushes an |
@@ -128,19 +128,19 @@ class InsertRefinements extends TrampolineRecursiveVisitor implements Pass { |
} |
void visitInvokeStatic(InvokeStatic node) { |
- node.arguments.forEach(processReference); |
+ node.argumentRefs.forEach(processReference); |
_refineArguments(node, |
_getSuccessTypesForStaticMethod(types, node.target)); |
} |
void visitInvokeMethod(InvokeMethod node) { |
// Update references to their current refined values. |
- processReference(node.receiver); |
- node.arguments.forEach(processReference); |
+ processReference(node.receiverRef); |
+ node.argumentRefs.forEach(processReference); |
// If the call is intercepted, we want to refine the actual receiver, |
// not the interceptor. |
- Primitive receiver = unfoldInterceptor(node.receiver.definition); |
+ Primitive receiver = unfoldInterceptor(node.receiver); |
// Do not try to refine the receiver of closure calls; the class world |
// does not know about closure classes. |
@@ -160,10 +160,10 @@ class InsertRefinements extends TrampolineRecursiveVisitor implements Pass { |
} |
void visitTypeCast(TypeCast node) { |
- Primitive value = node.value.definition; |
+ Primitive value = node.value; |
- processReference(node.value); |
- node.typeArguments.forEach(processReference); |
+ processReference(node.valueRef); |
+ node.typeArgumentRefs.forEach(processReference); |
// Refine the type of the input. |
TypeMask type = types.subtypesOf(node.dartType).nullable(); |
@@ -191,11 +191,11 @@ class InsertRefinements extends TrampolineRecursiveVisitor implements Pass { |
} |
void visitBranch(Branch node) { |
- processReference(node.condition); |
- Primitive condition = node.condition.definition; |
+ processReference(node.conditionRef); |
+ Primitive condition = node.condition; |
- Continuation trueCont = node.trueContinuation.definition; |
- Continuation falseCont = node.falseContinuation.definition; |
+ Continuation trueCont = node.trueContinuation; |
+ Continuation falseCont = node.falseContinuation; |
// Sink both continuations to the Branch to ensure everything in scope |
// here is also in scope inside the continuations. |
@@ -204,7 +204,7 @@ class InsertRefinements extends TrampolineRecursiveVisitor implements Pass { |
// If the condition is an 'is' check, promote the checked value. |
if (condition is TypeTest) { |
- Primitive value = condition.value.definition; |
+ Primitive value = condition.value; |
TypeMask type = types.subtypesOf(condition.dartType); |
Primitive refinedValue = new Refinement(value, type); |
pushRefinement(trueCont, refinedValue); |
@@ -246,8 +246,8 @@ class InsertRefinements extends TrampolineRecursiveVisitor implements Pass { |
if (condition is ApplyBuiltinOperator && |
condition.operator == BuiltinOperator.Identical) { |
- refineEquality(condition.arguments[0].definition, |
- condition.arguments[1].definition, |
+ refineEquality(condition.argument(0), |
+ condition.argument(1), |
trueCont, |
falseCont); |
return; |