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

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

Issue 2918623004: Use backend targets to run Kernel transformations in Fasta (Closed)
Patch Set: Remove some overrides of performModularTransformationsOnProgram 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
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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 runVerifier(); 400 runVerifier();
401 } 401 }
402 402
403 if (options['link'] && program.mainMethodName == null) { 403 if (options['link'] && program.mainMethodName == null) {
404 fail('[error] The program has no main method.'); 404 fail('[error] The program has no main method.');
405 } 405 }
406 406
407 // Apply target-specific transformations. 407 // Apply target-specific transformations.
408 if (target != null && canContinueCompilation) { 408 if (target != null && canContinueCompilation) {
409 CoreTypes coreTypes = new CoreTypes(program); 409 CoreTypes coreTypes = new CoreTypes(program);
410 target.performModularTransformations(coreTypes, program); 410 target.performModularTransformationsOnProgram(coreTypes, program);
411 runVerifier(); 411 runVerifier();
412 if (options['link']) { 412 if (options['link']) {
413 target.performGlobalTransformations(coreTypes, program); 413 target.performGlobalTransformations(coreTypes, program);
414 runVerifier(); 414 runVerifier();
415 } 415 }
416 } 416 }
417 417
418 if (options['no-output']) { 418 if (options['no-output']) {
419 return CompilerOutcome.Ok; 419 return CompilerOutcome.Ok;
420 } 420 }
(...skipping 26 matching lines...) Expand all
447 int flushTime = watch.elapsedMilliseconds - time; 447 int flushTime = watch.elapsedMilliseconds - time;
448 print('writer.flush_time = $flushTime ms'); 448 print('writer.flush_time = $flushTime ms');
449 } 449 }
450 450
451 if (options['tolerant']) { 451 if (options['tolerant']) {
452 return CompilerOutcome.Ok; 452 return CompilerOutcome.Ok;
453 } 453 }
454 454
455 return errors.length > 0 ? CompilerOutcome.Fail : CompilerOutcome.Ok; 455 return errors.length > 0 ? CompilerOutcome.Fail : CompilerOutcome.Ok;
456 } 456 }
OLDNEW
« pkg/front_end/lib/src/fasta/kernel/kernel_target.dart ('K') | « pkg/kernel/test/reify/suite.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698