| 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 '../class_hierarchy.dart'; | 7 import '../class_hierarchy.dart'; |
| 8 import '../core_types.dart'; | 8 import '../core_types.dart'; |
| 9 import '../transformations/continuation.dart' as cont; | 9 import '../transformations/continuation.dart' as cont; |
| 10 import '../transformations/erasure.dart'; | 10 import '../transformations/erasure.dart'; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 if (strongMode) { | 85 if (strongMode) { |
| 86 new Erasure().transform(program); | 86 new Erasure().transform(program); |
| 87 } | 87 } |
| 88 | 88 |
| 89 new SanitizeForVM().transform(program); | 89 new SanitizeForVM().transform(program); |
| 90 } | 90 } |
| 91 | 91 |
| 92 void performTreeShaking(Program program) { | 92 void performTreeShaking(Program program) { |
| 93 var coreTypes = new CoreTypes(program); | 93 var coreTypes = new CoreTypes(program); |
| 94 new TreeShaker(program, | 94 new TreeShaker(program, |
| 95 hierarchy: _hierarchy, | 95 hierarchy: _hierarchy, |
| 96 coreTypes: coreTypes, | 96 coreTypes: coreTypes, |
| 97 strongMode: strongMode, | 97 strongMode: strongMode, |
| 98 programRoots: flags.programRoots) | 98 programRoots: flags.programRoots) |
| 99 .transform(program); | 99 .transform(program); |
| 100 _hierarchy = null; // Hierarchy must be recomputed. | 100 _hierarchy = null; // Hierarchy must be recomputed. |
| 101 } | 101 } |
| 102 } | 102 } |
| OLD | NEW |