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

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

Issue 1364703004: dart2js cps: LICM, GVN, and constify for interceptors in one pass. (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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 applyCpsPass(new RedundantPhiEliminator(), cpsFunction); 178 applyCpsPass(new RedundantPhiEliminator(), cpsFunction);
179 applyCpsPass(new InsertRefinements(typeSystem), cpsFunction); 179 applyCpsPass(new InsertRefinements(typeSystem), cpsFunction);
180 applyCpsPass(new TypePropagator(compiler, typeSystem, this), cpsFunction); 180 applyCpsPass(new TypePropagator(compiler, typeSystem, this), cpsFunction);
181 applyCpsPass(new RemoveRefinements(), cpsFunction); 181 applyCpsPass(new RemoveRefinements(), cpsFunction);
182 applyCpsPass(new ShrinkingReducer(), cpsFunction); 182 applyCpsPass(new ShrinkingReducer(), cpsFunction);
183 applyCpsPass(new ScalarReplacer(compiler), cpsFunction); 183 applyCpsPass(new ScalarReplacer(compiler), cpsFunction);
184 applyCpsPass(new MutableVariableEliminator(), cpsFunction); 184 applyCpsPass(new MutableVariableEliminator(), cpsFunction);
185 applyCpsPass(new RedundantJoinEliminator(), cpsFunction); 185 applyCpsPass(new RedundantJoinEliminator(), cpsFunction);
186 applyCpsPass(new RedundantPhiEliminator(), cpsFunction); 186 applyCpsPass(new RedundantPhiEliminator(), cpsFunction);
187 applyCpsPass(new ShrinkingReducer(), cpsFunction); 187 applyCpsPass(new ShrinkingReducer(), cpsFunction);
188 applyCpsPass(new LoopInvariantCodeMotion(), cpsFunction);
189 applyCpsPass(new ShareInterceptors(), cpsFunction); 188 applyCpsPass(new ShareInterceptors(), cpsFunction);
190 applyCpsPass(new ShrinkingReducer(), cpsFunction); 189 applyCpsPass(new ShrinkingReducer(), cpsFunction);
191 190
192 return cpsFunction; 191 return cpsFunction;
193 } 192 }
194 193
195 tree_ir.FunctionDefinition compileToTreeIr(cps.FunctionDefinition cpsNode) { 194 tree_ir.FunctionDefinition compileToTreeIr(cps.FunctionDefinition cpsNode) {
196 tree_builder.Builder builder = new tree_builder.Builder( 195 tree_builder.Builder builder = new tree_builder.Builder(
197 compiler.internalError); 196 compiler.internalError);
198 tree_ir.FunctionDefinition treeNode = builder.buildFunction(cpsNode); 197 tree_ir.FunctionDefinition treeNode = builder.buildFunction(cpsNode);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 // TODO(sigurdm): Make a better list of tasks. 238 // TODO(sigurdm): Make a better list of tasks.
240 return <CompilerTask>[irBuilderTask]..addAll(fallbackCompiler.tasks); 239 return <CompilerTask>[irBuilderTask]..addAll(fallbackCompiler.tasks);
241 } 240 }
242 241
243 js.Node attachPosition(js.Node node, AstElement element) { 242 js.Node attachPosition(js.Node node, AstElement element) {
244 return node.withSourceInformation( 243 return node.withSourceInformation(
245 sourceInformationFactory.createBuilderForContext(element) 244 sourceInformationFactory.createBuilderForContext(element)
246 .buildDeclaration(element)); 245 .buildDeclaration(element));
247 } 246 }
248 } 247 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698