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.flutter; | 4 library kernel.target.flutter; |
5 | 5 |
6 import '../ast.dart'; | 6 import '../ast.dart'; |
| 7 import '../class_hierarchy.dart'; |
7 import '../core_types.dart'; | 8 import '../core_types.dart'; |
8 import '../transformations/continuation.dart' as cont; | 9 import '../transformations/continuation.dart' as cont; |
9 import '../transformations/erasure.dart'; | 10 import '../transformations/erasure.dart'; |
10 import '../transformations/mixin_full_resolution.dart' as mix; | 11 import '../transformations/mixin_full_resolution.dart' as mix; |
11 import '../transformations/sanitize_for_vm.dart'; | 12 import '../transformations/sanitize_for_vm.dart'; |
12 import '../transformations/setup_builtin_library.dart' as setup_builtin_library; | 13 import '../transformations/setup_builtin_library.dart' as setup_builtin_library; |
13 import 'targets.dart'; | 14 import 'targets.dart'; |
14 | 15 |
15 class FlutterTarget extends Target { | 16 class FlutterTarget extends Target { |
16 final TargetFlags flags; | 17 final TargetFlags flags; |
(...skipping 26 matching lines...) Expand all Loading... |
43 'dart:_vmservice', | 44 'dart:_vmservice', |
44 'dart:_builtin', | 45 'dart:_builtin', |
45 'dart:nativewrappers', | 46 'dart:nativewrappers', |
46 'dart:io', | 47 'dart:io', |
47 | 48 |
48 // Required for flutter. | 49 // Required for flutter. |
49 'dart:ui', | 50 'dart:ui', |
50 'dart:vmservice_sky', | 51 'dart:vmservice_sky', |
51 ]; | 52 ]; |
52 | 53 |
53 void performModularTransformations(CoreTypes coreTypes, Program program) { | 54 void performModularTransformations( |
54 mix.transformLibraries(this, coreTypes, program.libraries); | 55 CoreTypes coreTypes, ClassHierarchy hierarchy, Program program) { |
| 56 mix.transformLibraries(this, coreTypes, hierarchy, program.libraries); |
55 } | 57 } |
56 | 58 |
57 void performGlobalTransformations(CoreTypes coreTypes, Program program) { | 59 void performGlobalTransformations(CoreTypes coreTypes, Program program) { |
58 cont.transformProgram(coreTypes, program); | 60 cont.transformProgram(coreTypes, program); |
59 | 61 |
60 // Repair `_getMainClosure()` function in dart:{_builtin,ui} libraries. | 62 // Repair `_getMainClosure()` function in dart:{_builtin,ui} libraries. |
61 setup_builtin_library.transformProgram(program); | 63 setup_builtin_library.transformProgram(program); |
62 setup_builtin_library.transformProgram(program, libraryUri: 'dart:ui'); | 64 setup_builtin_library.transformProgram(program, libraryUri: 'dart:ui'); |
63 | 65 |
64 if (strongMode) { | 66 if (strongMode) { |
65 new Erasure().transform(program); | 67 new Erasure().transform(program); |
66 } | 68 } |
67 | 69 |
68 new SanitizeForVM().transform(program); | 70 new SanitizeForVM().transform(program); |
69 } | 71 } |
70 | 72 |
71 @override | 73 @override |
72 Expression instantiateInvocation(Member target, Expression receiver, | 74 Expression instantiateInvocation(Member target, Expression receiver, |
73 String name, Arguments arguments, int offset, bool isSuper) { | 75 String name, Arguments arguments, int offset, bool isSuper) { |
74 // TODO(ahe): This should probably return the same as VmTarget does. | 76 // TODO(ahe): This should probably return the same as VmTarget does. |
75 return new InvalidExpression(); | 77 return new InvalidExpression(); |
76 } | 78 } |
77 } | 79 } |
OLD | NEW |