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

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

Issue 2697873007: Merge the work on Generic Types Reification from 'dart-lang/reify' repo (Closed)
Patch Set: Get back parameter erroneously removed by previous commit Created 3 years, 10 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/lib/target/targets.dart ('k') | pkg/kernel/lib/target/vmreify.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.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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 var coreTypes = new CoreTypes(program); 67 var coreTypes = new CoreTypes(program);
68 68
69 if (strongMode) { 69 if (strongMode) {
70 new InsertTypeChecks(hierarchy: _hierarchy, coreTypes: coreTypes) 70 new InsertTypeChecks(hierarchy: _hierarchy, coreTypes: coreTypes)
71 .transformProgram(program); 71 .transformProgram(program);
72 new InsertCovarianceChecks(hierarchy: _hierarchy, coreTypes: coreTypes) 72 new InsertCovarianceChecks(hierarchy: _hierarchy, coreTypes: coreTypes)
73 .transformProgram(program); 73 .transformProgram(program);
74 } 74 }
75 75
76 if (flags.treeShake) { 76 if (flags.treeShake) {
77 new TreeShaker(program, 77 performTreeShaking(program);
78 hierarchy: _hierarchy,
79 coreTypes: coreTypes,
80 strongMode: strongMode,
81 programRoots: flags.programRoots)
82 .transform(program);
83 _hierarchy = null; // Hierarchy must be recomputed.
84 } 78 }
85 79
86 cont.transformProgram(program); 80 cont.transformProgram(program);
87 81
88 // Repair `_getMainClosure()` function in dart:_builtin. 82 // Repair `_getMainClosure()` function in dart:_builtin.
89 setup_builtin_library.transformProgram(program); 83 setup_builtin_library.transformProgram(program);
90 84
91 if (strongMode) { 85 if (strongMode) {
92 new Erasure().transform(program); 86 new Erasure().transform(program);
93 } 87 }
94 88
95 new SanitizeForVM().transform(program); 89 new SanitizeForVM().transform(program);
96 } 90 }
91
92 void performTreeShaking(Program program) {
93 var coreTypes = new CoreTypes(program);
94 new TreeShaker(program,
95 hierarchy: _hierarchy,
96 coreTypes: coreTypes,
97 strongMode: strongMode,
98 programRoots: flags.programRoots)
99 .transform(program);
100 _hierarchy = null; // Hierarchy must be recomputed.
101 }
97 } 102 }
OLDNEW
« no previous file with comments | « pkg/kernel/lib/target/targets.dart ('k') | pkg/kernel/lib/target/vmreify.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698