Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1119)

Side by Side Diff: pkg/kernel/lib/target/flutter.dart

Issue 2904203003: Don't recreate CoreTypes in transformers. Pass it in. (Closed)
Patch Set: Don't create CoreTypes in createOutlines() on InputError. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/kernel/bin/transform.dart ('k') | pkg/kernel/lib/target/targets.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 '../core_types.dart';
7 import '../transformations/continuation.dart' as cont; 8 import '../transformations/continuation.dart' as cont;
8 import '../transformations/erasure.dart'; 9 import '../transformations/erasure.dart';
10 import '../transformations/mixin_full_resolution.dart' as mix;
9 import '../transformations/sanitize_for_vm.dart'; 11 import '../transformations/sanitize_for_vm.dart';
10 import '../transformations/mixin_full_resolution.dart' as mix;
11 import '../transformations/setup_builtin_library.dart' as setup_builtin_library; 12 import '../transformations/setup_builtin_library.dart' as setup_builtin_library;
12 import 'targets.dart'; 13 import 'targets.dart';
13 14
14 class FlutterTarget extends Target { 15 class FlutterTarget extends Target {
15 final TargetFlags flags; 16 final TargetFlags flags;
16 17
17 FlutterTarget(this.flags); 18 FlutterTarget(this.flags);
18 19
19 bool get strongMode => flags.strongMode; 20 bool get strongMode => flags.strongMode;
20 21
(...skipping 21 matching lines...) Expand all
42 'dart:_vmservice', 43 'dart:_vmservice',
43 'dart:_builtin', 44 'dart:_builtin',
44 'dart:nativewrappers', 45 'dart:nativewrappers',
45 'dart:io', 46 'dart:io',
46 47
47 // Required for flutter. 48 // Required for flutter.
48 'dart:ui', 49 'dart:ui',
49 'dart:vmservice_sky', 50 'dart:vmservice_sky',
50 ]; 51 ];
51 52
52 void performModularTransformations(Program program) { 53 void performModularTransformations(CoreTypes coreTypes, Program program) {
53 mix.transformLibraries(this, program.libraries); 54 mix.transformLibraries(this, coreTypes, program.libraries);
54 } 55 }
55 56
56 void performGlobalTransformations(Program program) { 57 void performGlobalTransformations(CoreTypes coreTypes, Program program) {
57 cont.transformProgram(program); 58 cont.transformProgram(coreTypes, program);
58 59
59 // Repair `_getMainClosure()` function in dart:{_builtin,ui} libraries. 60 // Repair `_getMainClosure()` function in dart:{_builtin,ui} libraries.
60 setup_builtin_library.transformProgram(program); 61 setup_builtin_library.transformProgram(program);
61 setup_builtin_library.transformProgram(program, libraryUri: 'dart:ui'); 62 setup_builtin_library.transformProgram(program, libraryUri: 'dart:ui');
62 63
63 if (strongMode) { 64 if (strongMode) {
64 new Erasure().transform(program); 65 new Erasure().transform(program);
65 } 66 }
66 67
67 new SanitizeForVM().transform(program); 68 new SanitizeForVM().transform(program);
68 } 69 }
69 70
70 @override 71 @override
71 Expression instantiateInvocation(Member target, Expression receiver, 72 Expression instantiateInvocation(Member target, Expression receiver,
72 String name, Arguments arguments, int offset, bool isSuper) { 73 String name, Arguments arguments, int offset, bool isSuper) {
73 // TODO(ahe): This should probably return the same as VmTarget does. 74 // TODO(ahe): This should probably return the same as VmTarget does.
74 return new InvalidExpression(); 75 return new InvalidExpression();
75 } 76 }
76 } 77 }
OLDNEW
« no previous file with comments | « pkg/kernel/bin/transform.dart ('k') | pkg/kernel/lib/target/targets.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698