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

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

Issue 2527403002: Further encapsulate Enqueuer (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
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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 impactStrategy = backend.createImpactStrategy( 366 impactStrategy = backend.createImpactStrategy(
367 supportDeferredLoad: deferredLoadTask.isProgramSplit, 367 supportDeferredLoad: deferredLoadTask.isProgramSplit,
368 supportDumpInfo: options.dumpInfo, 368 supportDumpInfo: options.dumpInfo,
369 supportSerialization: serialization.supportSerialization); 369 supportSerialization: serialization.supportSerialization);
370 370
371 phase = Compiler.PHASE_RESOLVING; 371 phase = Compiler.PHASE_RESOLVING;
372 enqueuer.resolution.applyImpact(mainImpact); 372 enqueuer.resolution.applyImpact(mainImpact);
373 // Note: we enqueue everything in the program so we measure generating 373 // Note: we enqueue everything in the program so we measure generating
374 // kernel for the entire code, not just what's reachable from main. 374 // kernel for the entire code, not just what's reachable from main.
375 libraryLoader.libraries.forEach((LibraryElement library) { 375 libraryLoader.libraries.forEach((LibraryElement library) {
376 fullyEnqueueLibrary(library, enqueuer.resolution); 376 enqueuer.resolution.applyImpact(computeImpactForLibrary(library));
377 }); 377 });
378 378
379 if (deferredLoadTask.isProgramSplit) { 379 if (deferredLoadTask.isProgramSplit) {
380 enqueuer.resolution.applyImpact( 380 enqueuer.resolution.applyImpact(
381 backend.computeDeferredLoadingImpact()); 381 backend.computeDeferredLoadingImpact());
382 } 382 }
383 enqueuer.resolution.applyImpact(backend.computeHelpersImpact()); 383 enqueuer.resolution.applyImpact(backend.computeHelpersImpact());
384 resolveLibraryMetadata(); 384 resolveLibraryMetadata();
385 reporter.log('Resolving...'); 385 reporter.log('Resolving...');
386 processQueue(enqueuer.resolution, mainFunction); 386 processQueue(enqueuer.resolution, mainFunction);
387 enqueuer.resolution.logSummary(reporter.log); 387 enqueuer.resolution.logSummary(reporter.log);
388 388
389 (reporter as CompilerDiagnosticReporter) 389 (reporter as CompilerDiagnosticReporter)
390 .reportSuppressedMessagesSummary(); 390 .reportSuppressedMessagesSummary();
391 391
392 if (compilationFailed) { 392 if (compilationFailed) {
393 // TODO(sigmund): more diagnostics? 393 // TODO(sigmund): more diagnostics?
394 print("compilation failed!"); 394 print("compilation failed!");
395 exit(1); 395 exit(1);
396 } 396 }
397 397
398 closeResolution(); 398 closeResolution();
399 var program = (backend as dynamic).kernelTask.program; 399 var program = (backend as dynamic).kernelTask.program;
400 print('total libraries: ${program.libraries.length}'); 400 print('total libraries: ${program.libraries.length}');
401 }); 401 });
402 } 402 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/universe/world_builder.dart ('k') | tests/compiler/dart2js/embedded_category_api_boundary_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698