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

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

Issue 1322403002: dart2js cps: Change interceptor pipeline. (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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 assert(checkCpsIntegrity(cpsNode)); 170 assert(checkCpsIntegrity(cpsNode));
171 } 171 }
172 172
173 applyCpsPass(new RedundantJoinEliminator()); 173 applyCpsPass(new RedundantJoinEliminator());
174 applyCpsPass(new RedundantPhiEliminator()); 174 applyCpsPass(new RedundantPhiEliminator());
175 applyCpsPass(new InsertRefinements(compiler.typesTask, compiler.world)); 175 applyCpsPass(new InsertRefinements(compiler.typesTask, compiler.world));
176 TypePropagator typePropagator = new TypePropagator(compiler, this); 176 TypePropagator typePropagator = new TypePropagator(compiler, this);
177 applyCpsPass(typePropagator); 177 applyCpsPass(typePropagator);
178 dumpTypedIR(cpsNode, typePropagator); 178 dumpTypedIR(cpsNode, typePropagator);
179 applyCpsPass(new RemoveRefinements()); 179 applyCpsPass(new RemoveRefinements());
180 applyCpsPass(new LoopInvariantCodeMotion()); 180 applyCpsPass(new ShrinkingReducer());
181 applyCpsPass(new ShareInterceptors());
182 applyCpsPass(new ScalarReplacer(compiler)); 181 applyCpsPass(new ScalarReplacer(compiler));
183 applyCpsPass(new ShrinkingReducer());
184 applyCpsPass(new MutableVariableEliminator()); 182 applyCpsPass(new MutableVariableEliminator());
185 applyCpsPass(new RedundantJoinEliminator()); 183 applyCpsPass(new RedundantJoinEliminator());
186 applyCpsPass(new RedundantPhiEliminator()); 184 applyCpsPass(new RedundantPhiEliminator());
187 applyCpsPass(new ShrinkingReducer()); 185 applyCpsPass(new ShrinkingReducer());
188 applyCpsPass(new LetSinker()); 186 applyCpsPass(new LoopInvariantCodeMotion());
187 applyCpsPass(new ShareInterceptors());
188 applyCpsPass(new ShrinkingReducer());
189 189
190 return cpsNode; 190 return cpsNode;
191 } 191 }
192 192
193 tree_ir.FunctionDefinition compileToTreeIR(cps.FunctionDefinition cpsNode) { 193 tree_ir.FunctionDefinition compileToTreeIR(cps.FunctionDefinition cpsNode) {
194 tree_builder.Builder builder = new tree_builder.Builder( 194 tree_builder.Builder builder = new tree_builder.Builder(
195 compiler.internalError); 195 compiler.internalError);
196 tree_ir.FunctionDefinition treeNode = builder.buildFunction(cpsNode); 196 tree_ir.FunctionDefinition treeNode = builder.buildFunction(cpsNode);
197 assert(treeNode != null); 197 assert(treeNode != null);
198 traceGraph('Tree builder', treeNode); 198 traceGraph('Tree builder', treeNode);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // TODO(sigurdm): Make a better list of tasks. 237 // TODO(sigurdm): Make a better list of tasks.
238 return <CompilerTask>[irBuilderTask]..addAll(fallbackCompiler.tasks); 238 return <CompilerTask>[irBuilderTask]..addAll(fallbackCompiler.tasks);
239 } 239 }
240 240
241 js.Node attachPosition(js.Node node, AstElement element) { 241 js.Node attachPosition(js.Node node, AstElement element) {
242 return node.withSourceInformation( 242 return node.withSourceInformation(
243 sourceInformationFactory.createBuilderForContext(element) 243 sourceInformationFactory.createBuilderForContext(element)
244 .buildDeclaration(element)); 244 .buildDeclaration(element));
245 } 245 }
246 } 246 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/type_propagation.dart ('k') | pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698