| 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 '../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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 'dart:_vmservice', | 44 'dart:_vmservice', |
| 45 'dart:_builtin', | 45 'dart:_builtin', |
| 46 'dart:nativewrappers', | 46 'dart:nativewrappers', |
| 47 'dart:io', | 47 'dart:io', |
| 48 | 48 |
| 49 // Required for flutter. | 49 // Required for flutter. |
| 50 'dart:ui', | 50 'dart:ui', |
| 51 'dart:vmservice_sky', | 51 'dart:vmservice_sky', |
| 52 ]; | 52 ]; |
| 53 | 53 |
| 54 void performModularTransformations( | 54 void performModularTransformationsOnLibraries( |
| 55 CoreTypes coreTypes, ClassHierarchy hierarchy, Program program) { | 55 CoreTypes coreTypes, ClassHierarchy hierarchy, List<Library> libraries, |
| 56 mix.transformLibraries(this, coreTypes, hierarchy, program.libraries); | 56 {void logger(String msg)}) { |
| 57 mix.transformLibraries(this, coreTypes, hierarchy, libraries); |
| 57 } | 58 } |
| 58 | 59 |
| 59 void performGlobalTransformations(CoreTypes coreTypes, Program program) { | 60 void performGlobalTransformations(CoreTypes coreTypes, Program program, |
| 61 {void logger(String msg)}) { |
| 60 cont.transformProgram(coreTypes, program); | 62 cont.transformProgram(coreTypes, program); |
| 61 | 63 |
| 62 // Repair `_getMainClosure()` function in dart:{_builtin,ui} libraries. | 64 // Repair `_getMainClosure()` function in dart:{_builtin,ui} libraries. |
| 63 setup_builtin_library.transformProgram(program); | 65 setup_builtin_library.transformProgram(program); |
| 64 setup_builtin_library.transformProgram(program, libraryUri: 'dart:ui'); | 66 setup_builtin_library.transformProgram(program, libraryUri: 'dart:ui'); |
| 65 | 67 |
| 66 if (strongMode) { | 68 if (strongMode) { |
| 67 new Erasure().transform(program); | 69 new Erasure().transform(program); |
| 68 } | 70 } |
| 69 | 71 |
| 70 new SanitizeForVM().transform(program); | 72 new SanitizeForVM().transform(program); |
| 71 } | 73 } |
| 72 | 74 |
| 73 @override | 75 @override |
| 74 Expression instantiateInvocation(Member target, Expression receiver, | 76 Expression instantiateInvocation(Member target, Expression receiver, |
| 75 String name, Arguments arguments, int offset, bool isSuper) { | 77 String name, Arguments arguments, int offset, bool isSuper) { |
| 76 // TODO(ahe): This should probably return the same as VmTarget does. | 78 // TODO(ahe): This should probably return the same as VmTarget does. |
| 77 return new InvalidExpression(); | 79 return new InvalidExpression(); |
| 78 } | 80 } |
| 79 } | 81 } |
| OLD | NEW |