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

Side by Side Diff: tests/compiler/dart2js/serialization/model_test_helper.dart

Issue 2938203003: Compute KernelClosureRepresentationInfo.variableIsUsedInTryOrSync (Closed)
Patch Set: Merge KernelClosureConversionTask and KernelClosureDataLookup Created 3 years, 6 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library dart2js.serialization_model_test; 5 library dart2js.serialization_model_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'package:async_helper/async_helper.dart'; 8 import 'package:async_helper/async_helper.dart';
9 import 'package:expect/expect.dart'; 9 import 'package:expect/expect.dart';
10 import 'package:compiler/src/closure.dart'; 10 import 'package:compiler/src/closure.dart';
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 }); 157 });
158 } 158 }
159 159
160 void checkElements( 160 void checkElements(
161 Compiler compiler1, Compiler compiler2, Element element1, Element element2, 161 Compiler compiler1, Compiler compiler2, Element element1, Element element2,
162 {bool verbose: false}) { 162 {bool verbose: false}) {
163 if (element1.isAbstract) return; 163 if (element1.isAbstract) return;
164 if (element1.isFunction || 164 if (element1.isFunction ||
165 element1.isConstructor || 165 element1.isConstructor ||
166 (element1.isField && element1.isInstanceMember)) { 166 (element1.isField && element1.isInstanceMember)) {
167 ClosureRepresentationInfo closureData1 = 167 ClosureRepresentationInfo closureData1 = compiler1
168 compiler1.closureDataLookup.getClosureRepresentationInfo(element1); 168 .backendStrategy.closureDataLookup
169 ClosureRepresentationInfo closureData2 = 169 .getClosureRepresentationInfo(element1);
170 compiler2.closureDataLookup.getClosureRepresentationInfo(element2); 170 ClosureRepresentationInfo closureData2 = compiler2
171 .backendStrategy.closureDataLookup
172 .getClosureRepresentationInfo(element2);
171 173
172 checkElementIdentities( 174 checkElementIdentities(
173 closureData1, 175 closureData1,
174 closureData2, 176 closureData2,
175 '$element1.closureEntity', 177 '$element1.closureEntity',
176 closureData1.closureEntity, 178 closureData1.closureEntity,
177 closureData2.closureEntity); 179 closureData2.closureEntity);
178 checkElementIdentities( 180 checkElementIdentities(
179 closureData1, 181 closureData1,
180 closureData2, 182 closureData2,
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 check(outputUnit1, outputUnit2, 'OutputUnit.isMainOutput $message', 292 check(outputUnit1, outputUnit2, 'OutputUnit.isMainOutput $message',
291 outputUnit1.isMainOutput, outputUnit2.isMainOutput); 293 outputUnit1.isMainOutput, outputUnit2.isMainOutput);
292 checkSetEquivalence( 294 checkSetEquivalence(
293 outputUnit1, 295 outputUnit1,
294 outputUnit2, 296 outputUnit2,
295 'OutputUnit.imports $message', 297 'OutputUnit.imports $message',
296 outputUnit1.imports, 298 outputUnit1.imports,
297 outputUnit2.imports, 299 outputUnit2.imports,
298 (a, b) => areElementsEquivalent(a.declaration, b.declaration)); 300 (a, b) => areElementsEquivalent(a.declaration, b.declaration));
299 } 301 }
OLDNEW
« pkg/compiler/lib/src/js_model/js_strategy.dart ('K') | « tests/compiler/dart2js/memory_compiler.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698