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.performModularTransformationsOnProgram( | 412 target.performModularTransformations(coreTypes, hierarchy, program); |
413 coreTypes, hierarchy, program); | |
414 runVerifier(); | 413 runVerifier(); |
415 if (options['link']) { | 414 if (options['link']) { |
416 target.performGlobalTransformations(coreTypes, program); | 415 target.performGlobalTransformations(coreTypes, program); |
417 runVerifier(); | 416 runVerifier(); |
418 } | 417 } |
419 } | 418 } |
420 | 419 |
421 if (options['no-output']) { | 420 if (options['no-output']) { |
422 return CompilerOutcome.Ok; | 421 return CompilerOutcome.Ok; |
423 } | 422 } |
(...skipping 26 matching lines...) Expand all Loading... |
450 int flushTime = watch.elapsedMilliseconds - time; | 449 int flushTime = watch.elapsedMilliseconds - time; |
451 print('writer.flush_time = $flushTime ms'); | 450 print('writer.flush_time = $flushTime ms'); |
452 } | 451 } |
453 | 452 |
454 if (options['tolerant']) { | 453 if (options['tolerant']) { |
455 return CompilerOutcome.Ok; | 454 return CompilerOutcome.Ok; |
456 } | 455 } |
457 | 456 |
458 return errors.length > 0 ? CompilerOutcome.Fail : CompilerOutcome.Ok; | 457 return errors.length > 0 ? CompilerOutcome.Fail : CompilerOutcome.Ok; |
459 } | 458 } |
OLD | NEW |