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

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

Issue 1353443002: dart2js cps: Add a pass for eliminating bounds checks. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Put "pending statics" error in status file Created 5 years, 2 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) 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 applyCpsPass(new RedundantJoinEliminator(), cpsFunction); 196 applyCpsPass(new RedundantJoinEliminator(), cpsFunction);
197 applyCpsPass(new RedundantPhiEliminator(), cpsFunction); 197 applyCpsPass(new RedundantPhiEliminator(), cpsFunction);
198 applyCpsPass(new InsertRefinements(typeSystem), cpsFunction); 198 applyCpsPass(new InsertRefinements(typeSystem), cpsFunction);
199 applyCpsPass(new TypePropagator(compiler, typeSystem, this), cpsFunction); 199 applyCpsPass(new TypePropagator(compiler, typeSystem, this), cpsFunction);
200 applyCpsPass(new RemoveRefinements(), cpsFunction); 200 applyCpsPass(new RemoveRefinements(), cpsFunction);
201 applyCpsPass(new ShrinkingReducer(), cpsFunction); 201 applyCpsPass(new ShrinkingReducer(), cpsFunction);
202 applyCpsPass(new ScalarReplacer(compiler), cpsFunction); 202 applyCpsPass(new ScalarReplacer(compiler), cpsFunction);
203 applyCpsPass(new MutableVariableEliminator(), cpsFunction); 203 applyCpsPass(new MutableVariableEliminator(), cpsFunction);
204 applyCpsPass(new RedundantJoinEliminator(), cpsFunction); 204 applyCpsPass(new RedundantJoinEliminator(), cpsFunction);
205 applyCpsPass(new RedundantPhiEliminator(), cpsFunction); 205 applyCpsPass(new RedundantPhiEliminator(), cpsFunction);
206 applyCpsPass(new BoundsChecker(typeSystem, compiler.world), cpsFunction);
206 applyCpsPass(new ShrinkingReducer(), cpsFunction); 207 applyCpsPass(new ShrinkingReducer(), cpsFunction);
207 applyCpsPass(new ShareInterceptors(), cpsFunction); 208 applyCpsPass(new ShareInterceptors(), cpsFunction);
208 applyCpsPass(new ShrinkingReducer(), cpsFunction); 209 applyCpsPass(new ShrinkingReducer(), cpsFunction);
209 210
210 return cpsFunction; 211 return cpsFunction;
211 } 212 }
212 213
213 tree_ir.FunctionDefinition compileToTreeIr(cps.FunctionDefinition cpsNode) { 214 tree_ir.FunctionDefinition compileToTreeIr(cps.FunctionDefinition cpsNode) {
214 tree_builder.Builder builder = new tree_builder.Builder( 215 tree_builder.Builder builder = new tree_builder.Builder(
215 reporter.internalError); 216 reporter.internalError);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 treeOptimizationTask] 265 treeOptimizationTask]
265 ..addAll(fallbackCompiler.tasks); 266 ..addAll(fallbackCompiler.tasks);
266 } 267 }
267 268
268 js.Node attachPosition(js.Node node, AstElement element) { 269 js.Node attachPosition(js.Node node, AstElement element) {
269 return node.withSourceInformation( 270 return node.withSourceInformation(
270 sourceInformationFactory.createBuilderForContext(element) 271 sourceInformationFactory.createBuilderForContext(element)
271 .buildDeclaration(element)); 272 .buildDeclaration(element));
272 } 273 }
273 } 274 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/type_propagation.dart ('k') | pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698