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

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

Issue 1376863004: Avoid eager enqueueing from resolution (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix deferred+mirrors bug. Created 5 years, 2 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 9 import 'package:compiler/compiler.dart' show
10 DiagnosticHandler; 10 DiagnosticHandler;
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 compiler.mirrorSystemGetNameFunction = 238 compiler.mirrorSystemGetNameFunction =
239 cachedCompiler.mirrorSystemGetNameFunction; 239 cachedCompiler.mirrorSystemGetNameFunction;
240 compiler.symbolImplementationClass = 240 compiler.symbolImplementationClass =
241 cachedCompiler.symbolImplementationClass; 241 cachedCompiler.symbolImplementationClass;
242 compiler.symbolValidatedConstructor = 242 compiler.symbolValidatedConstructor =
243 cachedCompiler.symbolValidatedConstructor; 243 cachedCompiler.symbolValidatedConstructor;
244 compiler.mirrorsUsedConstructor = cachedCompiler.mirrorsUsedConstructor; 244 compiler.mirrorsUsedConstructor = cachedCompiler.mirrorsUsedConstructor;
245 compiler.deferredLibraryClass = cachedCompiler.deferredLibraryClass; 245 compiler.deferredLibraryClass = cachedCompiler.deferredLibraryClass;
246 246
247 Iterable cachedTreeElements = 247 Iterable cachedTreeElements =
248 cachedCompiler.enqueuer.resolution.resolvedElements; 248 cachedCompiler.enqueuer.resolution.processedElements;
249 cachedTreeElements.forEach((element) { 249 cachedTreeElements.forEach((element) {
250 if (element.library.isPlatformLibrary) { 250 if (element.library.isPlatformLibrary) {
251 compiler.enqueuer.resolution.registerResolvedElement(element); 251 compiler.enqueuer.resolution.registerProcessedElement(element);
252 } 252 }
253 }); 253 });
254 254
255 // One potential problem that can occur when reusing elements is that there 255 // One potential problem that can occur when reusing elements is that there
256 // is a stale reference to an old compiler object. By nulling out the old 256 // is a stale reference to an old compiler object. By nulling out the old
257 // compiler's fields, such stale references are easier to identify. 257 // compiler's fields, such stale references are easier to identify.
258 cachedCompiler.scanner = null; 258 cachedCompiler.scanner = null;
259 cachedCompiler.dietParser = null; 259 cachedCompiler.dietParser = null;
260 cachedCompiler.parser = null; 260 cachedCompiler.parser = null;
261 cachedCompiler.patchParser = null; 261 cachedCompiler.patchParser = null;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 createDiagnosticHandler(diagnosticHandler, provider, showDiagnostics); 330 createDiagnosticHandler(diagnosticHandler, provider, showDiagnostics);
331 331
332 List<Uri> libraries = <Uri>[]; 332 List<Uri> libraries = <Uri>[];
333 memorySourceFiles.forEach((String path, _) { 333 memorySourceFiles.forEach((String path, _) {
334 libraries.add(new Uri(scheme: 'memory', path: path)); 334 libraries.add(new Uri(scheme: 'memory', path: path));
335 }); 335 });
336 336
337 return analyze(libraries, libraryRoot, packageRoot, 337 return analyze(libraries, libraryRoot, packageRoot,
338 provider, handler, options); 338 provider, handler, options);
339 } 339 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/analyze_unused_dart2js_test.dart ('k') | tests/compiler/dart2js/minimal_resolution_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698