Index: tests/compiler/dart2js/closure/closure_test.dart |
diff --git a/tests/compiler/dart2js/closure/closure_test.dart b/tests/compiler/dart2js/closure/closure_test.dart |
index 3134d620675a6e5832c5f75c87ccefd5296cc651..335869348213f91478177bbca11811bbff2d2d9d 100644 |
--- a/tests/compiler/dart2js/closure/closure_test.dart |
+++ b/tests/compiler/dart2js/closure/closure_test.dart |
@@ -59,7 +59,7 @@ void computeKernelClosureData( |
MemberDefinition definition = elementMap.getMemberDefinition(member); |
assert(definition.kind == MemberKind.regular, |
failedAt(member, "Unexpected member definition $definition")); |
- new ClosureIrChecker(actualMap, elementMap, member, |
+ new ClosureIrChecker(compiler.reporter, actualMap, elementMap, member, |
localsMap.getLocalsMap(member), closureDataLookup, |
verbose: verbose) |
.run(definition.node); |
@@ -91,7 +91,7 @@ class ClosureAstComputer extends AstDataExtractor with ComputeValueMixin { |
} |
@override |
- String computeNodeValue(ast.Node node, [AstElement element]) { |
+ String computeNodeValue(Id id, ast.Node node, [AstElement element]) { |
if (element != null && element.isLocal) { |
if (element.isFunction) { |
LocalFunctionElement localFunction = element; |
@@ -106,7 +106,7 @@ class ClosureAstComputer extends AstDataExtractor with ComputeValueMixin { |
} |
@override |
- String computeElementValue(covariant MemberElement element) { |
+ String computeElementValue(Id id, covariant MemberElement element) { |
// TODO(johnniwinther,efortuna): Collect data for the member |
// (has thisLocal, has box, etc.). |
return computeObjectValue(element); |
@@ -121,13 +121,14 @@ class ClosureIrChecker extends IrDataExtractor with ComputeValueMixin<ir.Node> { |
final bool verbose; |
ClosureIrChecker( |
+ DiagnosticReporter reporter, |
Map<Id, ActualData> actualMap, |
KernelToElementMapForBuilding elementMap, |
this.member, |
this._localsMap, |
this.closureDataLookup, |
{this.verbose: false}) |
- : super(actualMap) { |
+ : super(reporter, actualMap) { |
pushMember(member); |
} |
@@ -150,15 +151,13 @@ class ClosureIrChecker extends IrDataExtractor with ComputeValueMixin<ir.Node> { |
} |
@override |
- String computeNodeValue(ir.Node node) { |
+ String computeNodeValue(Id id, ir.Node node) { |
if (node is ir.VariableDeclaration) { |
- if (node.parent is ir.FunctionDeclaration) { |
- ClosureRepresentationInfo info = |
- closureDataLookup.getClosureInfo(node.parent); |
- return computeObjectValue(info.callMethod); |
- } |
Local local = _localsMap.getLocalVariable(node); |
return computeLocalValue(local); |
+ } else if (node is ir.FunctionDeclaration) { |
+ ClosureRepresentationInfo info = closureDataLookup.getClosureInfo(node); |
+ return computeObjectValue(info.callMethod); |
} else if (node is ir.FunctionExpression) { |
ClosureRepresentationInfo info = closureDataLookup.getClosureInfo(node); |
return computeObjectValue(info.callMethod); |
@@ -167,7 +166,7 @@ class ClosureIrChecker extends IrDataExtractor with ComputeValueMixin<ir.Node> { |
} |
@override |
- String computeMemberValue(ir.Member node) { |
+ String computeMemberValue(Id id, ir.Member node) { |
return computeObjectValue(member); |
} |
} |