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

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

Issue 2919003003: Reapply "Use backend targets to run Kernel transformations in Fasta" (Closed)
Patch Set: Follow dartanalyzer suggestions 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
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.vm; 4 library kernel.target.vm;
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 'dart:typed_data', 49 'dart:typed_data',
50 'dart:vmservice_io', 50 'dart:vmservice_io',
51 'dart:_vmservice', 51 'dart:_vmservice',
52 'dart:_builtin', 52 'dart:_builtin',
53 'dart:nativewrappers', 53 'dart:nativewrappers',
54 'dart:io', 54 'dart:io',
55 ]; 55 ];
56 56
57 ClassHierarchy _hierarchy; 57 ClassHierarchy _hierarchy;
58 58
59 void performModularTransformations( 59 void performModularTransformationsOnLibraries(
60 CoreTypes coreTypes, ClassHierarchy hierarchy, Program program) { 60 CoreTypes coreTypes, ClassHierarchy hierarchy, List<Library> libraries,
61 {void logger(String msg)}) {
61 var mixins = new mix.MixinFullResolution(this, coreTypes, hierarchy) 62 var mixins = new mix.MixinFullResolution(this, coreTypes, hierarchy)
62 ..transform(program.libraries); 63 ..transform(libraries);
63 64
64 _hierarchy = mixins.hierarchy; 65 _hierarchy = mixins.hierarchy;
65 } 66 }
66 67
67 void performGlobalTransformations(CoreTypes coreTypes, Program program) { 68 void performGlobalTransformations(CoreTypes coreTypes, Program program,
69 {void logger(String msg)}) {
68 if (strongMode) { 70 if (strongMode) {
69 new InsertTypeChecks(coreTypes, _hierarchy).transformProgram(program); 71 new InsertTypeChecks(coreTypes, _hierarchy).transformProgram(program);
70 new InsertCovarianceChecks(coreTypes, _hierarchy) 72 new InsertCovarianceChecks(coreTypes, _hierarchy)
71 .transformProgram(program); 73 .transformProgram(program);
72 } 74 }
73 75
74 if (flags.treeShake) { 76 if (flags.treeShake) {
75 performTreeShaking(coreTypes, program); 77 performTreeShaking(coreTypes, program);
76 } 78 }
77 79
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 // this is currently only used in (statically resolved) no-such-method 154 // this is currently only used in (statically resolved) no-such-method
153 // handling, the current approach seems sufficient. 155 // handling, the current approach seems sufficient.
154 return new MethodInvocation( 156 return new MethodInvocation(
155 new ListLiteral(elements)..fileOffset = charOffset, 157 new ListLiteral(elements)..fileOffset = charOffset,
156 new Name("toList"), 158 new Name("toList"),
157 new Arguments(<Expression>[], named: <NamedExpression>[ 159 new Arguments(<Expression>[], named: <NamedExpression>[
158 new NamedExpression("growable", new BoolLiteral(false)) 160 new NamedExpression("growable", new BoolLiteral(false))
159 ])); 161 ]));
160 } 162 }
161 } 163 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698