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

Side by Side Diff: pkg/compiler/lib/src/js_backend/codegen/task.dart

Issue 1486023002: Propagate types of static const variables. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years 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/compiler/lib/src/cps_ir/type_mask_system.dart ('k') | no next file » | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 4
5 /// Generate code using the cps-based IR pipeline. 5 /// Generate code using the cps-based IR pipeline.
6 library code_generator_task; 6 library code_generator_task;
7 7
8 import 'glue.dart'; 8 import 'glue.dart';
9 import 'codegen.dart'; 9 import 'codegen.dart';
10 import 'unsugar.dart'; 10 import 'unsugar.dart';
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 if (cpsIntegrityChecker == null) { 194 if (cpsIntegrityChecker == null) {
195 cpsIntegrityChecker = new CheckCpsIntegrity(); 195 cpsIntegrityChecker = new CheckCpsIntegrity();
196 } 196 }
197 cpsIntegrityChecker.check(node, previousPass); 197 cpsIntegrityChecker.check(node, previousPass);
198 }); 198 });
199 return true; // So this can be used from assert(). 199 return true; // So this can be used from assert().
200 } 200 }
201 201
202 cps.FunctionDefinition optimizeCpsIr(cps.FunctionDefinition cpsFunction) { 202 cps.FunctionDefinition optimizeCpsIr(cps.FunctionDefinition cpsFunction) {
203 cpsOptimizationTask.measure(() { 203 cpsOptimizationTask.measure(() {
204 TypeMaskSystem typeSystem = new TypeMaskSystem(compiler); 204 //TypeMaskSystem typeSystem = new TypeMaskSystem(compiler);
sra1 2015/12/01 05:07:30 Why did we create this shadowing definition?
asgerf 2015/12/01 08:36:57 Looks like a mistake. Please remove it.
205 205
206 applyCpsPass(new RedundantJoinEliminator(), cpsFunction); 206 applyCpsPass(new RedundantJoinEliminator(), cpsFunction);
207 applyCpsPass(new RedundantPhiEliminator(), cpsFunction); 207 applyCpsPass(new RedundantPhiEliminator(), cpsFunction);
208 applyCpsPass(new InsertRefinements(typeSystem), cpsFunction); 208 applyCpsPass(new InsertRefinements(typeSystem), cpsFunction);
209 applyCpsPass(new TypePropagator(compiler, typeSystem, this), cpsFunction); 209 applyCpsPass(new TypePropagator(compiler, typeSystem, this), cpsFunction);
210 applyCpsPass(new RedundantJoinEliminator(), cpsFunction); 210 applyCpsPass(new RedundantJoinEliminator(), cpsFunction);
211 applyCpsPass(new ShrinkingReducer(), cpsFunction); 211 applyCpsPass(new ShrinkingReducer(), cpsFunction);
212 applyCpsPass(new RedundantRefinementEliminator(typeSystem), cpsFunction); 212 applyCpsPass(new RedundantRefinementEliminator(typeSystem), cpsFunction);
213 applyCpsPass(new GVN(compiler), cpsFunction); 213 applyCpsPass(new GVN(compiler), cpsFunction);
214 applyCpsPass(new RemoveRefinements(), cpsFunction); 214 applyCpsPass(new RemoveRefinements(), cpsFunction);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 treeOptimizationTask] 283 treeOptimizationTask]
284 ..addAll(fallbackCompiler.tasks); 284 ..addAll(fallbackCompiler.tasks);
285 } 285 }
286 286
287 js.Node attachPosition(js.Node node, AstElement element) { 287 js.Node attachPosition(js.Node node, AstElement element) {
288 return node.withSourceInformation( 288 return node.withSourceInformation(
289 sourceInformationFactory.createBuilderForContext(element) 289 sourceInformationFactory.createBuilderForContext(element)
290 .buildDeclaration(element)); 290 .buildDeclaration(element));
291 } 291 }
292 } 292 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/type_mask_system.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698