OLD | NEW |
(Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 library kernel.target.vm_fasta; |
| 5 |
| 6 import '../ast.dart' show Program, Library; |
| 7 import '../core_types.dart' show CoreTypes; |
| 8 import '../class_hierarchy.dart' show ClassHierarchy; |
| 9 |
| 10 import '../transformations/mixin_full_resolution.dart' as transformMixins |
| 11 show transformLibraries; |
| 12 import '../transformations/continuation.dart' as transformAsync |
| 13 show transformLibraries; |
| 14 import '../transformations/erasure.dart' as tranformErasure |
| 15 show transformLibraries; |
| 16 |
| 17 import 'targets.dart' show TargetFlags; |
| 18 import 'vm.dart' as vm_target; |
| 19 |
| 20 class VmFastaTarget extends vm_target.VmTarget { |
| 21 VmFastaTarget(TargetFlags flags) : super(flags); |
| 22 |
| 23 String get name => "vm_fasta"; |
| 24 |
| 25 void performModularTransformationsOnLibraries( |
| 26 CoreTypes coreTypes, ClassHierarchy hierarchy, List<Library> libraries, |
| 27 {void logger(String msg)}) { |
| 28 transformMixins.transformLibraries(this, coreTypes, hierarchy, libraries); |
| 29 logger?.call("Transformed mixin applications"); |
| 30 |
| 31 // TODO(ahe): Don't generate type variables in the first place. |
| 32 if (!strongMode) { |
| 33 tranformErasure.transformLibraries(coreTypes, libraries); |
| 34 logger?.call("Erased type variables in generic methods"); |
| 35 } |
| 36 |
| 37 // TODO(kmillikin): Make this run on a per-method basis. |
| 38 transformAsync.transformLibraries(coreTypes, libraries); |
| 39 logger?.call("Transformed async methods"); |
| 40 } |
| 41 |
| 42 void performGlobalTransformations(CoreTypes coreTypes, Program program, |
| 43 {void logger(String msg)}) {} |
| 44 } |
OLD | NEW |