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

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

Issue 2804993002: Extract ResolutionWorldBuilderBase from ElementResolutionWorldBuilder (Closed)
Patch Set: Fix. Created 3 years, 8 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 // Tests that the closed world computed from [WorldImpact]s derived from kernel 5 // Tests that the closed world computed from [WorldImpact]s derived from kernel
6 // is equivalent to the original computed from resolution. 6 // is equivalent to the original computed from resolution.
7 library dart2js.kernel.closed_world_test; 7 library dart2js.kernel.closed_world_test;
8 8
9 import 'package:async_helper/async_helper.dart'; 9 import 'package:async_helper/async_helper.dart';
10 import 'package:compiler/src/commandline_options.dart'; 10 import 'package:compiler/src/commandline_options.dart';
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 customElementsResolutionAnalysis, 214 customElementsResolutionAnalysis,
215 lookupMapResolutionAnalysis, 215 lookupMapResolutionAnalysis,
216 mirrorsResolutionAnalysis, 216 mirrorsResolutionAnalysis,
217 new TypeVariableResolutionAnalysis( 217 new TypeVariableResolutionAnalysis(
218 elementEnvironment, impacts, backendUsageBuilder), 218 elementEnvironment, impacts, backendUsageBuilder),
219 nativeResolutionEnqueuer, 219 nativeResolutionEnqueuer,
220 deferredLoadTask); 220 deferredLoadTask);
221 } 221 }
222 222
223 ClosedWorld computeClosedWorld(Compiler compiler, ResolutionEnqueuer enqueuer) { 223 ClosedWorld computeClosedWorld(Compiler compiler, ResolutionEnqueuer enqueuer) {
224 JavaScriptBackend backend = compiler.backend;
225
226 enqueuer.open(const ImpactStrategy(), compiler.mainFunction, 224 enqueuer.open(const ImpactStrategy(), compiler.mainFunction,
227 compiler.libraryLoader.libraries); 225 compiler.libraryLoader.libraries);
228 enqueuer.forEach((work) { 226 enqueuer.forEach((work) {
229 MemberElement element = work.element; 227 MemberElement element = work.element;
230 ResolutionImpact resolutionImpact = build(compiler, element.resolvedAst); 228 ResolutionImpact resolutionImpact = build(compiler, element.resolvedAst);
231 WorldImpact worldImpact = compiler.backend.impactTransformer 229 WorldImpact worldImpact = compiler.backend.impactTransformer
232 .transformResolutionImpact(enqueuer, resolutionImpact); 230 .transformResolutionImpact(enqueuer, resolutionImpact);
233 enqueuer.applyImpact(worldImpact, impactSource: element); 231 enqueuer.applyImpact(worldImpact, impactSource: element);
234 }); 232 });
235 return enqueuer.worldBuilder.closeWorld(compiler.reporter); 233 return enqueuer.worldBuilder.closeWorld(compiler.reporter);
236 } 234 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/instantiated_classes_test.dart ('k') | tests/compiler/dart2js/serialization/model_test_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698