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

Side by Side Diff: pkg/compiler/tool/perf.dart

Issue 2935063002: Add ClosedWorld.elementEnvironment and remove Compiler.elementEnvironment (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « pkg/compiler/lib/src/world.dart ('k') | tests/compiler/dart2js/compiler_helper.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 /// An entrypoint used to run portions of dart2js and measure its performance. 5 /// An entrypoint used to run portions of dart2js and measure its performance.
6 library compiler.tool.perf; 6 library compiler.tool.perf;
7 7
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:io'; 9 import 'dart:io';
10 10
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 // Note: we enqueue everything in the program so we measure generating 358 // Note: we enqueue everything in the program so we measure generating
359 // kernel for the entire code, not just what's reachable from main. 359 // kernel for the entire code, not just what's reachable from main.
360 libraryLoader.libraries.forEach((LibraryEntity library) { 360 libraryLoader.libraries.forEach((LibraryEntity library) {
361 resolutionEnqueuer.applyImpact(computeImpactForLibrary(library)); 361 resolutionEnqueuer.applyImpact(computeImpactForLibrary(library));
362 }); 362 });
363 363
364 if (frontendStrategy.commonElements.mirrorsLibrary != null) { 364 if (frontendStrategy.commonElements.mirrorsLibrary != null) {
365 resolveLibraryMetadata(); 365 resolveLibraryMetadata();
366 } 366 }
367 reporter.log('Resolving...'); 367 reporter.log('Resolving...');
368 processQueue(resolutionEnqueuer, mainFunction, libraryLoader.libraries); 368 processQueue(frontendStrategy.elementEnvironment, resolutionEnqueuer,
369 mainFunction, libraryLoader.libraries);
369 resolutionEnqueuer.logSummary(reporter.log); 370 resolutionEnqueuer.logSummary(reporter.log);
370 371
371 (reporter as CompilerDiagnosticReporter) 372 (reporter as CompilerDiagnosticReporter)
372 .reportSuppressedMessagesSummary(); 373 .reportSuppressedMessagesSummary();
373 374
374 if (compilationFailed) { 375 if (compilationFailed) {
375 // TODO(sigmund): more diagnostics? 376 // TODO(sigmund): more diagnostics?
376 print('compilation failed!'); 377 print('compilation failed!');
377 exit(1); 378 exit(1);
378 } 379 }
379 380
380 backend.onResolutionEnd(); 381 backend.onResolutionEnd();
381 closeResolution(); 382 closeResolution();
382 var program = (backend as dynamic).kernelTask.program; 383 var program = (backend as dynamic).kernelTask.program;
383 print('total libraries: ${program.libraries.length}'); 384 print('total libraries: ${program.libraries.length}');
384 }); 385 });
385 } 386 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/world.dart ('k') | tests/compiler/dart2js/compiler_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698