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

Side by Side Diff: tests/compiler/dart2js/equivalence/id_equivalence_helper.dart

Issue 3011433002: Revert "Reduce use of getClosureInfoForMember and cleanup closure_test" (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « tests/compiler/dart2js/closure/data/captured_variable.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:io'; 6 import 'dart:io';
7 7
8 import 'package:compiler/src/common.dart'; 8 import 'package:compiler/src/common.dart';
9 import 'package:compiler/src/common_elements.dart'; 9 import 'package:compiler/src/common_elements.dart';
10 import 'package:compiler/src/compiler.dart'; 10 import 'package:compiler/src/compiler.dart';
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 Map<int, String> annotations = <int, String>{}; 119 Map<int, String> annotations = <int, String>{};
120 actualMap.forEach((Id id, ActualData data) { 120 actualMap.forEach((Id id, ActualData data) {
121 annotations[data.sourceSpan.begin] = data.value; 121 annotations[data.sourceSpan.begin] = data.value;
122 }); 122 });
123 return withAnnotations(annotations); 123 return withAnnotations(annotations);
124 } 124 }
125 125
126 String get diffCode { 126 String get diffCode {
127 Map<int, String> annotations = <int, String>{}; 127 Map<int, String> annotations = <int, String>{};
128 actualMap.forEach((Id id, ActualData data) { 128 actualMap.forEach((Id id, ActualData data) {
129 String expected = expectedMap[id] ?? ''; 129 String expected = expectedMap[id];
130 if (data.value != expected) { 130 if (data.value != expected) {
131 expected ??= '---';
131 annotations[data.sourceSpan.begin] = '${expected} | ${data.value}'; 132 annotations[data.sourceSpan.begin] = '${expected} | ${data.value}';
132 } 133 }
133 }); 134 });
134 expectedMap.forEach((Id id, String expected) { 135 expectedMap.forEach((Id id, String expected) {
135 if (!actualMap.containsKey(id)) { 136 if (!actualMap.containsKey(id)) {
136 int offset = compiler.reporter 137 int offset = compiler.reporter
137 .spanFromSpannable( 138 .spanFromSpannable(
138 computeSpannable(elementEnvironment, mainUri, id)) 139 computeSpannable(elementEnvironment, mainUri, id))
139 .begin; 140 .begin;
140 annotations[offset] = '${expected} | ---'; 141 annotations[offset] = '${expected} | ---';
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 id = new NodeId(annotation.offset); 276 id = new NodeId(annotation.offset);
276 expected = text; 277 expected = text;
277 } else { 278 } else {
278 id = new ElementId(text.substring(0, colonPos)); 279 id = new ElementId(text.substring(0, colonPos));
279 expected = text.substring(colonPos + 1); 280 expected = text.substring(colonPos + 1);
280 } 281 }
281 map[id] = expected; 282 map[id] = expected;
282 } 283 }
283 return map; 284 return map;
284 } 285 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/closure/data/captured_variable.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698