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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 } |
OLD | NEW |