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

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

Issue 2556073002: Remove Compiler.openWorld (Closed)
Patch Set: Cleanup. Created 4 years 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/exit_code_test.dart ('k') | tests/compiler/dart2js/map_tracer_test.dart » ('j') | 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) 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 options: [ 73 options: [
74 Flags.analyzeOnly, 74 Flags.analyzeOnly,
75 Flags.useKernel, 75 Flags.useKernel,
76 Flags.enableAssertMessage 76 Flags.enableAssertMessage
77 ]); 77 ]);
78 ResolutionWorldBuilderImpl worldBuilder = 78 ResolutionWorldBuilderImpl worldBuilder =
79 compiler.enqueuer.resolution.universe; 79 compiler.enqueuer.resolution.universe;
80 worldBuilder.useInstantiationMap = true; 80 worldBuilder.useInstantiationMap = true;
81 compiler.resolution.retainCachesForTesting = true; 81 compiler.resolution.retainCachesForTesting = true;
82 await compiler.run(entryPoint); 82 await compiler.run(entryPoint);
83 compiler.openWorld.closeWorld(compiler.reporter); 83 compiler.resolverWorld.openWorld.closeWorld(compiler.reporter);
84 84
85 JavaScriptBackend backend = compiler.backend; 85 JavaScriptBackend backend = compiler.backend;
86 // Create a new resolution enqueuer and feed it with the [WorldImpact]s 86 // Create a new resolution enqueuer and feed it with the [WorldImpact]s
87 // computed from kernel through the [build] in `kernel_impact.dart`. 87 // computed from kernel through the [build] in `kernel_impact.dart`.
88 ResolutionEnqueuer enqueuer = new ResolutionEnqueuer( 88 ResolutionEnqueuer enqueuer = new ResolutionEnqueuer(
89 compiler.enqueuer, 89 compiler.enqueuer,
90 compiler.options, 90 compiler.options,
91 compiler.resolution, 91 compiler.resolution,
92 const TreeShakingEnqueuerStrategy(), 92 const TreeShakingEnqueuerStrategy(),
93 compiler.globalDependencies, 93 compiler.globalDependencies,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 135 }
136 // The class cannot itself be instantiated. 136 // The class cannot itself be instantiated.
137 return false; 137 return false;
138 } 138 }
139 return true; 139 return true;
140 }, verbose: arguments.verbose); 140 }, verbose: arguments.verbose);
141 checkClosedWorlds(compiler.closedWorld, closedWorld, 141 checkClosedWorlds(compiler.closedWorld, closedWorld,
142 verbose: arguments.verbose); 142 verbose: arguments.verbose);
143 }); 143 });
144 } 144 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/exit_code_test.dart ('k') | tests/compiler/dart2js/map_tracer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698