| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 library kernel.target.vm; | 4 library kernel.target.vm; |
| 5 | 5 |
| 6 import '../ast.dart'; | 6 import '../ast.dart'; |
| 7 import '../core_types.dart'; | 7 import '../core_types.dart'; |
| 8 import '../transformations/continuation.dart' as cont; | 8 import '../transformations/continuation.dart' as cont; |
| 9 import '../transformations/erasure.dart'; | 9 import '../transformations/erasure.dart'; |
| 10 import '../transformations/insert_covariance_checks.dart'; | 10 import '../transformations/insert_covariance_checks.dart'; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 if (strongMode) { | 64 if (strongMode) { |
| 65 new InsertTypeChecks(hierarchy: hierarchy, coreTypes: coreTypes) | 65 new InsertTypeChecks(hierarchy: hierarchy, coreTypes: coreTypes) |
| 66 .transformProgram(program); | 66 .transformProgram(program); |
| 67 new InsertCovarianceChecks(hierarchy: hierarchy, coreTypes: coreTypes) | 67 new InsertCovarianceChecks(hierarchy: hierarchy, coreTypes: coreTypes) |
| 68 .transformProgram(program); | 68 .transformProgram(program); |
| 69 } | 69 } |
| 70 | 70 |
| 71 if (program.mainMethod != null) { | 71 if (program.mainMethod != null) { |
| 72 new TreeShaker(program, | 72 new TreeShaker(program, |
| 73 hierarchy: hierarchy, coreTypes: coreTypes, | 73 hierarchy: hierarchy, |
| 74 strongMode: strongMode) | 74 coreTypes: coreTypes, |
| 75 strongMode: strongMode, |
| 76 programRoots: flags.programRoots) |
| 75 .transform(program); | 77 .transform(program); |
| 76 } | 78 } |
| 77 | 79 |
| 78 cont.transformProgram(program); | 80 cont.transformProgram(program); |
| 79 | 81 |
| 80 // Repair `_getMainClosure()` function in dart:_builtin. | 82 // Repair `_getMainClosure()` function in dart:_builtin. |
| 81 setup_builtin_library.transformProgram(program); | 83 setup_builtin_library.transformProgram(program); |
| 82 | 84 |
| 83 if (strongMode) { | 85 if (strongMode) { |
| 84 new Erasure().transform(program); | 86 new Erasure().transform(program); |
| 85 } | 87 } |
| 86 | 88 |
| 87 new SanitizeForVM().transform(program); | 89 new SanitizeForVM().transform(program); |
| 88 } | 90 } |
| 89 } | 91 } |
| OLD | NEW |