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

Side by Side Diff: pkg/kernel/tool/dartk.dart

Issue 2918623004: Use backend targets to run Kernel transformations in Fasta (Closed)
Patch Set: Adjust to the recent changes in master 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/kernel/test/reify/suite.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 #!/usr/bin/env dart 1 #!/usr/bin/env dart
2 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 2 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
3 // for details. All rights reserved. Use of this source code is governed by a 3 // for details. All rights reserved. Use of this source code is governed by a
4 // BSD-style license that can be found in the LICENSE file. 4 // BSD-style license that can be found in the LICENSE file.
5 5
6 import 'dart:async'; 6 import 'dart:async';
7 import 'dart:io'; 7 import 'dart:io';
8 8
9 import '../bin/batch_util.dart'; 9 import '../bin/batch_util.dart';
10 import '../bin/util.dart'; 10 import '../bin/util.dart';
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 } 402 }
403 403
404 if (options['link'] && program.mainMethodName == null) { 404 if (options['link'] && program.mainMethodName == null) {
405 fail('[error] The program has no main method.'); 405 fail('[error] The program has no main method.');
406 } 406 }
407 407
408 // Apply target-specific transformations. 408 // Apply target-specific transformations.
409 if (target != null && canContinueCompilation) { 409 if (target != null && canContinueCompilation) {
410 CoreTypes coreTypes = new CoreTypes(program); 410 CoreTypes coreTypes = new CoreTypes(program);
411 ClassHierarchy hierarchy = new ClosedWorldClassHierarchy(program); 411 ClassHierarchy hierarchy = new ClosedWorldClassHierarchy(program);
412 target.performModularTransformations(coreTypes, hierarchy, program); 412 target.performModularTransformationsOnProgram(
413 coreTypes, hierarchy, program);
413 runVerifier(); 414 runVerifier();
414 if (options['link']) { 415 if (options['link']) {
415 target.performGlobalTransformations(coreTypes, program); 416 target.performGlobalTransformations(coreTypes, program);
416 runVerifier(); 417 runVerifier();
417 } 418 }
418 } 419 }
419 420
420 if (options['no-output']) { 421 if (options['no-output']) {
421 return CompilerOutcome.Ok; 422 return CompilerOutcome.Ok;
422 } 423 }
(...skipping 26 matching lines...) Expand all
449 int flushTime = watch.elapsedMilliseconds - time; 450 int flushTime = watch.elapsedMilliseconds - time;
450 print('writer.flush_time = $flushTime ms'); 451 print('writer.flush_time = $flushTime ms');
451 } 452 }
452 453
453 if (options['tolerant']) { 454 if (options['tolerant']) {
454 return CompilerOutcome.Ok; 455 return CompilerOutcome.Ok;
455 } 456 }
456 457
457 return errors.length > 0 ? CompilerOutcome.Fail : CompilerOutcome.Ok; 458 return errors.length > 0 ? CompilerOutcome.Fail : CompilerOutcome.Ok;
458 } 459 }
OLDNEW
« no previous file with comments | « pkg/kernel/test/reify/suite.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698