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

Unified Diff: tests/compiler/dart2js/inference/inference_test_helper.dart

Issue 3007903002: Support annotations on assignment and postfix operations (Closed)
Patch Set: Updated cf. comments Created 3 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
Index: tests/compiler/dart2js/inference/inference_test_helper.dart
diff --git a/tests/compiler/dart2js/inference/inference_test_helper.dart b/tests/compiler/dart2js/inference/inference_test_helper.dart
index 5c25aec7d86bfcc49ca6f369427af150e05e1415..50581ed32c45fabdfac219966a31a5df7ce8afa6 100644
--- a/tests/compiler/dart2js/inference/inference_test_helper.dart
+++ b/tests/compiler/dart2js/inference/inference_test_helper.dart
@@ -65,7 +65,7 @@ class TypeMaskComputer extends AstDataExtractor
super(reporter, actualMap, resolvedAst);
@override
- String computeElementValue(AstElement element) {
+ String computeElementValue(Id id, AstElement element) {
if (element.isParameter) {
ParameterElement parameter = element;
return getParameterValue(parameter);
@@ -79,11 +79,11 @@ class TypeMaskComputer extends AstDataExtractor
}
@override
- String computeNodeValue(ast.Node node, [AstElement element]) {
+ String computeNodeValue(Id id, ast.Node node, [AstElement element]) {
if (node is ast.Send) {
return getTypeMaskValue(result.typeOfSend(node));
} else if (element != null && element.isLocal) {
- return computeElementValue(element);
+ return computeElementValue(id, element);
}
return null;
}
@@ -100,6 +100,7 @@ void computeMemberIrTypeMasks(
GlobalLocalsMap localsMap = backendStrategy.globalLocalsMapForTesting;
MemberDefinition definition = elementMap.getMemberDefinition(member);
new TypeMaskIrComputer(
+ compiler.reporter,
actualMap,
elementMap,
member,
@@ -119,6 +120,7 @@ class TypeMaskIrComputer extends IrDataExtractor
final ClosureDataLookup<ir.Node> _closureDataLookup;
TypeMaskIrComputer(
+ DiagnosticReporter reporter,
Map<Id, ActualData> actualMap,
this._elementMap,
MemberEntity member,
@@ -126,15 +128,15 @@ class TypeMaskIrComputer extends IrDataExtractor
this.results,
this._closureDataLookup)
: result = results.resultOfMember(member),
- super(actualMap);
+ super(reporter, actualMap);
@override
- String computeMemberValue(ir.Member node) {
+ String computeMemberValue(Id id, ir.Member node) {
return getMemberValue(_elementMap.getMember(node));
}
@override
- String computeNodeValue(ir.TreeNode node) {
+ String computeNodeValue(Id id, ir.TreeNode node) {
if (node is ir.VariableDeclaration && node.parent is ir.FunctionNode) {
Local parameter = _localsMap.getLocalVariable(node);
return getParameterValue(parameter);
« no previous file with comments | « tests/compiler/dart2js/inference/data/super_set.dart ('k') | tests/compiler/dart2js/jumps/data/simple_loops.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698