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

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: Created 5 years, 3 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 TypePropagator typePropagator = 180 TypePropagator typePropagator =
181 new TypePropagator(compiler, typeSystem, this); 181 new TypePropagator(compiler, typeSystem, this);
182 applyCpsPass(typePropagator); 182 applyCpsPass(typePropagator);
183 dumpTypedIR(cpsNode, typePropagator); 183 dumpTypedIR(cpsNode, typePropagator);
184 applyCpsPass(new RemoveRefinements()); 184 applyCpsPass(new RemoveRefinements());
185 applyCpsPass(new ShrinkingReducer()); 185 applyCpsPass(new ShrinkingReducer());
186 applyCpsPass(new ScalarReplacer(compiler)); 186 applyCpsPass(new ScalarReplacer(compiler));
187 applyCpsPass(new MutableVariableEliminator()); 187 applyCpsPass(new MutableVariableEliminator());
188 applyCpsPass(new RedundantJoinEliminator()); 188 applyCpsPass(new RedundantJoinEliminator());
189 applyCpsPass(new RedundantPhiEliminator()); 189 applyCpsPass(new RedundantPhiEliminator());
190 applyCpsPass(new BoundsChecker(typeSystem, compiler.world));
190 applyCpsPass(new ShrinkingReducer()); 191 applyCpsPass(new ShrinkingReducer());
191 applyCpsPass(new LoopInvariantCodeMotion()); 192 applyCpsPass(new LoopInvariantCodeMotion());
192 applyCpsPass(new ShareInterceptors()); 193 applyCpsPass(new ShareInterceptors());
193 applyCpsPass(new ShrinkingReducer()); 194 applyCpsPass(new ShrinkingReducer());
194 195
195 return cpsNode; 196 return cpsNode;
196 } 197 }
197 198
198 tree_ir.FunctionDefinition compileToTreeIR(cps.FunctionDefinition cpsNode) { 199 tree_ir.FunctionDefinition compileToTreeIR(cps.FunctionDefinition cpsNode) {
199 tree_builder.Builder builder = new tree_builder.Builder( 200 tree_builder.Builder builder = new tree_builder.Builder(
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 // TODO(sigurdm): Make a better list of tasks. 243 // TODO(sigurdm): Make a better list of tasks.
243 return <CompilerTask>[irBuilderTask]..addAll(fallbackCompiler.tasks); 244 return <CompilerTask>[irBuilderTask]..addAll(fallbackCompiler.tasks);
244 } 245 }
245 246
246 js.Node attachPosition(js.Node node, AstElement element) { 247 js.Node attachPosition(js.Node node, AstElement element) {
247 return node.withSourceInformation( 248 return node.withSourceInformation(
248 sourceInformationFactory.createBuilderForContext(element) 249 sourceInformationFactory.createBuilderForContext(element)
249 .buildDeclaration(element)); 250 .buildDeclaration(element));
250 } 251 }
251 } 252 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698