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

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

Issue 2716713003: Move main and isolate handling to enqueuer listeners. (Closed)
Patch Set: Created 3 years, 9 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 /// 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 // Note: we enqueue everything in the program so we measure generating 360 // Note: we enqueue everything in the program so we measure generating
361 // kernel for the entire code, not just what's reachable from main. 361 // kernel for the entire code, not just what's reachable from main.
362 libraryLoader.libraries.forEach((LibraryElement library) { 362 libraryLoader.libraries.forEach((LibraryElement library) {
363 enqueuer.resolution.applyImpact(computeImpactForLibrary(library)); 363 enqueuer.resolution.applyImpact(computeImpactForLibrary(library));
364 }); 364 });
365 365
366 if (deferredLoadTask.isProgramSplit) { 366 if (deferredLoadTask.isProgramSplit) {
367 enqueuer.resolution 367 enqueuer.resolution
368 .applyImpact(backend.computeDeferredLoadingImpact()); 368 .applyImpact(backend.computeDeferredLoadingImpact());
369 } 369 }
370 enqueuer.resolution.applyImpact(backend.computeHelpersImpact());
371 resolveLibraryMetadata(); 370 resolveLibraryMetadata();
372 reporter.log('Resolving...'); 371 reporter.log('Resolving...');
373 processQueue(enqueuer.resolution, mainFunction); 372 processQueue(enqueuer.resolution, mainFunction, libraryLoader.libraries) ;
374 enqueuer.resolution.logSummary(reporter.log); 373 enqueuer.resolution.logSummary(reporter.log);
375 374
376 (reporter as CompilerDiagnosticReporter) 375 (reporter as CompilerDiagnosticReporter)
377 .reportSuppressedMessagesSummary(); 376 .reportSuppressedMessagesSummary();
378 377
379 if (compilationFailed) { 378 if (compilationFailed) {
380 // TODO(sigmund): more diagnostics? 379 // TODO(sigmund): more diagnostics?
381 print('compilation failed!'); 380 print('compilation failed!');
382 exit(1); 381 exit(1);
383 } 382 }
384 383
385 closeResolution(); 384 closeResolution();
386 var program = (backend as dynamic).kernelTask.program; 385 var program = (backend as dynamic).kernelTask.program;
387 print('total libraries: ${program.libraries.length}'); 386 print('total libraries: ${program.libraries.length}');
388 }); 387 });
389 } 388 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder_kernel.dart ('k') | tests/compiler/dart2js/compiler_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698