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

Side by Side Diff: tests/compiler/dart2js/kernel/compile_from_dill_test.dart

Issue 2960633002: Split KernelToElementMap into sub-interfaces (Closed)
Patch Set: Created 3 years, 5 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) 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 // Partial test that the closed world computed from [WorldImpact]s derived from 5 // Partial test that the closed world computed from [WorldImpact]s derived from
6 // kernel is equivalent to the original computed from resolution. 6 // kernel is equivalent to the original computed from resolution.
7 library dart2js.kernel.compile_from_dill_test; 7 library dart2js.kernel.compile_from_dill_test;
8 8
9 import 'dart:async'; 9 import 'dart:async';
10 import 'dart:io'; 10 import 'dart:io';
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 const {}, 135 const {},
136 [ 136 [
137 Flags.disableTypeInference, 137 Flags.disableTypeInference,
138 Flags.disableInlining, 138 Flags.disableInlining,
139 Flags.enableAssertMessage 139 Flags.enableAssertMessage
140 ], 140 ],
141 printSteps: true, 141 printSteps: true,
142 compilerOutput: collector2); 142 compilerOutput: collector2);
143 143
144 KernelFrontEndStrategy frontendStrategy = compiler2.frontendStrategy; 144 KernelFrontEndStrategy frontendStrategy = compiler2.frontendStrategy;
145 KernelToElementMap elementMap = frontendStrategy.elementMap; 145 KernelToElementMapForBuilding elementMap = frontendStrategy.elementMap;
146 146
147 Expect.isFalse(compiler2.compilationFailed); 147 Expect.isFalse(compiler2.compilationFailed);
148 148
149 KernelEquivalence equivalence = new KernelEquivalence(elementMap); 149 KernelEquivalence equivalence = new KernelEquivalence(elementMap);
150 150
151 ClosedWorld closedWorld2 = 151 ClosedWorld closedWorld2 =
152 compiler2.resolutionWorldBuilder.closedWorldForTesting; 152 compiler2.resolutionWorldBuilder.closedWorldForTesting;
153 153
154 checkBackendUsage(closedWorld1.backendUsage, closedWorld2.backendUsage, 154 checkBackendUsage(closedWorld1.backendUsage, closedWorld2.backendUsage,
155 equivalence.defaultStrategy); 155 equivalence.defaultStrategy);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 } 201 }
202 Map<String, BufferedOutputSink> map2 = collector2.outputMap[outputType]; 202 Map<String, BufferedOutputSink> map2 = collector2.outputMap[outputType];
203 checkSets(map1.keys, map2.keys, 'output', equality); 203 checkSets(map1.keys, map2.keys, 'output', equality);
204 map1.forEach((String name, BufferedOutputSink output1) { 204 map1.forEach((String name, BufferedOutputSink output1) {
205 BufferedOutputSink output2 = map2[name]; 205 BufferedOutputSink output2 = map2[name];
206 Expect.stringEquals(output1.text, output2.text); 206 Expect.stringEquals(output1.text, output2.text);
207 }); 207 });
208 }); 208 });
209 return ResultKind.success; 209 return ResultKind.success;
210 } 210 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698