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

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

Issue 1803303002: Move all flags to CompilerOptions (first step to stop passing the compiler to (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 void applyTreePass(tree_opt.Pass pass) { 315 void applyTreePass(tree_opt.Pass pass) {
316 treeOptimizationTask.measureSubtask(pass.passName, () { 316 treeOptimizationTask.measureSubtask(pass.passName, () {
317 pass.rewrite(node); 317 pass.rewrite(node);
318 }); 318 });
319 traceGraph(pass.passName, node); 319 traceGraph(pass.passName, node);
320 assert(checkTreeIntegrity(node)); 320 assert(checkTreeIntegrity(node));
321 } 321 }
322 322
323 treeOptimizationTask.measure(() { 323 treeOptimizationTask.measure(() {
324 applyTreePass(new StatementRewriter()); 324 applyTreePass(new StatementRewriter());
325 applyTreePass(new VariableMerger(minifying: compiler.enableMinification)); 325 applyTreePass(new VariableMerger(minifying:
326 compiler.options.enableMinification));
326 applyTreePass(new LoopRewriter()); 327 applyTreePass(new LoopRewriter());
327 applyTreePass(new LogicalRewriter()); 328 applyTreePass(new LogicalRewriter());
328 applyTreePass(new PullIntoInitializers()); 329 applyTreePass(new PullIntoInitializers());
329 }); 330 });
330 331
331 return node; 332 return node;
332 } 333 }
333 334
334 js.Fun compileToJavaScript(CodegenWorkItem work, 335 js.Fun compileToJavaScript(CodegenWorkItem work,
335 tree_ir.FunctionDefinition definition) { 336 tree_ir.FunctionDefinition definition) {
(...skipping 15 matching lines...) Expand all
351 treeOptimizationTask] 352 treeOptimizationTask]
352 ..addAll(fallbackCompiler.tasks); 353 ..addAll(fallbackCompiler.tasks);
353 } 354 }
354 355
355 js.Node attachPosition(js.Node node, AstElement element) { 356 js.Node attachPosition(js.Node node, AstElement element) {
356 return node.withSourceInformation( 357 return node.withSourceInformation(
357 sourceInformationFactory.createBuilderForContext(element) 358 sourceInformationFactory.createBuilderForContext(element)
358 .buildDeclaration(element)); 359 .buildDeclaration(element));
359 } 360 }
360 } 361 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698