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

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

Issue 2918623004: Use backend targets to run Kernel transformations in Fasta (Closed)
Patch Set: Remove some overrides of performModularTransformationsOnProgram 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(CoreTypes coreTypes, Program program) { 59 void performModularTransformationsOnLibraries(
60 CoreTypes coreTypes, List<Library> libraries,
61 {void logger(String msg)}) {
60 var mixins = new mix.MixinFullResolution(this, coreTypes) 62 var mixins = new mix.MixinFullResolution(this, coreTypes)
61 ..transform(program.libraries); 63 ..transform(libraries);
62 64
63 _hierarchy = mixins.hierarchy; 65 _hierarchy = mixins.hierarchy;
64 } 66 }
65 67
66 void performGlobalTransformations(CoreTypes coreTypes, Program program) { 68 void performGlobalTransformations(CoreTypes coreTypes, Program program,
69 {void logger(String msg)}) {
67 if (strongMode) { 70 if (strongMode) {
68 new InsertTypeChecks(coreTypes, hierarchy: _hierarchy) 71 new InsertTypeChecks(coreTypes, hierarchy: _hierarchy)
69 .transformProgram(program); 72 .transformProgram(program);
70 new InsertCovarianceChecks(coreTypes, hierarchy: _hierarchy) 73 new InsertCovarianceChecks(coreTypes, hierarchy: _hierarchy)
71 .transformProgram(program); 74 .transformProgram(program);
72 } 75 }
73 76
74 if (flags.treeShake) { 77 if (flags.treeShake) {
75 performTreeShaking(coreTypes, program); 78 performTreeShaking(coreTypes, program);
76 } 79 }
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // this is currently only used in (statically resolved) no-such-method 157 // this is currently only used in (statically resolved) no-such-method
155 // handling, the current approach seems sufficient. 158 // handling, the current approach seems sufficient.
156 return new MethodInvocation( 159 return new MethodInvocation(
157 new ListLiteral(elements)..fileOffset = charOffset, 160 new ListLiteral(elements)..fileOffset = charOffset,
158 new Name("toList"), 161 new Name("toList"),
159 new Arguments(<Expression>[], named: <NamedExpression>[ 162 new Arguments(<Expression>[], named: <NamedExpression>[
160 new NamedExpression("growable", new BoolLiteral(false)) 163 new NamedExpression("growable", new BoolLiteral(false))
161 ])); 164 ]));
162 } 165 }
163 } 166 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698