Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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.vmreify; | 4 library kernel.target.vmreify; |
| 5 | 5 |
| 6 import '../ast.dart' show Program; | 6 import '../ast.dart' show Program; |
| 7 import '../transformations/generic_types_reification.dart' as reify | 7 import '../transformations/generic_types_reification.dart' as reify |
| 8 show transformProgram; | 8 show transformProgram; |
| 9 | 9 |
| 10 import 'targets.dart' show TargetFlags; | 10 import 'targets.dart' show TargetFlags; |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 33 reify.transformProgram(program); | 33 reify.transformProgram(program); |
| 34 } | 34 } |
| 35 | 35 |
| 36 // Disable tree shaking for Generic Types Reification. There are some runtime | 36 // Disable tree shaking for Generic Types Reification. There are some runtime |
| 37 // libraries that are required for the transformation and are shaken off, | 37 // libraries that are required for the transformation and are shaken off, |
| 38 // because they aren't invoked from the program being transformed prior to | 38 // because they aren't invoked from the program being transformed prior to |
| 39 // the transformation. | 39 // the transformation. |
| 40 // TODO(dmitryas): remove this when the libraries are in dart:_internal | 40 // TODO(dmitryas): remove this when the libraries are in dart:_internal |
| 41 @override | 41 @override |
| 42 void performTreeShaking(Program program) {} | 42 void performTreeShaking(Program program) {} |
| 43 | |
| 44 // Here we disable Erasure pass of VmTarget class. The information deleted by | |
|
karlklose
2017/02/24 12:07:23
If you write '[Erasure]' and '[VmTarget]' instead
Dmitry Stefantsov
2017/02/28 11:32:15
Done.
| |
| 45 // the Erasure pass is required for Generic Type Reification. Also, reify | |
| 46 // transformation also performs its own Erasure pass. | |
| 47 @override | |
| 48 void performErasure(Program program) {} | |
| 43 } | 49 } |
| OLD | NEW |