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

Side by Side Diff: tests/compiler/dart2js/memory_compiler.dart

Issue 2558013002: Move handling of regular static use from ResolutionEnqueuer to ResolutionWorldBuilderImpl (Closed)
Patch Set: Updated cf. comments. 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/kernel/closed_world_test.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) 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 library dart2js.test.memory_compiler; 5 library dart2js.test.memory_compiler;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:compiler/compiler.dart' show DiagnosticHandler; 9 import 'package:compiler/compiler.dart' show DiagnosticHandler;
10 import 'package:compiler/compiler_new.dart' 10 import 'package:compiler/compiler_new.dart'
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 // this call. 179 // this call.
180 compiler.onLibrariesLoaded(new MemoryLoadedLibraries(copiedLibraries)); 180 compiler.onLibrariesLoaded(new MemoryLoadedLibraries(copiedLibraries));
181 181
182 compiler.backend.constantCompilerTask 182 compiler.backend.constantCompilerTask
183 .copyConstantValues(cachedCompiler.backend.constantCompilerTask); 183 .copyConstantValues(cachedCompiler.backend.constantCompilerTask);
184 184
185 Iterable cachedTreeElements = 185 Iterable cachedTreeElements =
186 cachedCompiler.enqueuer.resolution.processedEntities; 186 cachedCompiler.enqueuer.resolution.processedEntities;
187 cachedTreeElements.forEach((element) { 187 cachedTreeElements.forEach((element) {
188 if (element.library.isPlatformLibrary) { 188 if (element.library.isPlatformLibrary) {
189 compiler.enqueuer.resolution.registerProcessedElement(element); 189 compiler.enqueuer.resolution.registerProcessedElementInternal(element);
190 } 190 }
191 }); 191 });
192 192
193 // One potential problem that can occur when reusing elements is that there 193 // One potential problem that can occur when reusing elements is that there
194 // is a stale reference to an old compiler object. By nulling out the old 194 // is a stale reference to an old compiler object. By nulling out the old
195 // compiler's fields, such stale references are easier to identify. 195 // compiler's fields, such stale references are easier to identify.
196 cachedCompiler.scanner = null; 196 cachedCompiler.scanner = null;
197 cachedCompiler.dietParser = null; 197 cachedCompiler.dietParser = null;
198 cachedCompiler.parser = null; 198 cachedCompiler.parser = null;
199 cachedCompiler.patchParser = null; 199 cachedCompiler.patchParser = null;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 handler = (Uri uri, int begin, int end, String message, Diagnostic kind) { 244 handler = (Uri uri, int begin, int end, String message, Diagnostic kind) {
245 diagnosticHandler(uri, begin, end, message, kind); 245 diagnosticHandler(uri, begin, end, message, kind);
246 formattingHandler(uri, begin, end, message, kind); 246 formattingHandler(uri, begin, end, message, kind);
247 }; 247 };
248 } 248 }
249 } else if (diagnosticHandler == null) { 249 } else if (diagnosticHandler == null) {
250 handler = (Uri uri, int begin, int end, String message, Diagnostic kind) {}; 250 handler = (Uri uri, int begin, int end, String message, Diagnostic kind) {};
251 } 251 }
252 return handler; 252 return handler;
253 } 253 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/kernel/closed_world_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698