OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |