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

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

Issue 1761903002: dart2js cps: Keep interceptors in a separate field. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Rebase 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 applyCpsPass(new ShrinkingReducer(), cpsFunction); 288 applyCpsPass(new ShrinkingReducer(), cpsFunction);
289 applyCpsPass(new OptimizeInterceptors(backend, typeSystem), cpsFunction); 289 applyCpsPass(new OptimizeInterceptors(backend, typeSystem), cpsFunction);
290 applyCpsPass(new BackwardNullCheckRemover(typeSystem), cpsFunction); 290 applyCpsPass(new BackwardNullCheckRemover(typeSystem), cpsFunction);
291 applyCpsPass(new ShrinkingReducer(), cpsFunction); 291 applyCpsPass(new ShrinkingReducer(), cpsFunction);
292 }); 292 });
293 } 293 }
294 294
295 tree_ir.FunctionDefinition compileToTreeIr(cps.FunctionDefinition cpsNode) { 295 tree_ir.FunctionDefinition compileToTreeIr(cps.FunctionDefinition cpsNode) {
296 applyCpsPass(new Finalize(backend), cpsNode); 296 applyCpsPass(new Finalize(backend), cpsNode);
297 tree_builder.Builder builder = new tree_builder.Builder( 297 tree_builder.Builder builder = new tree_builder.Builder(
298 reporter.internalError); 298 reporter.internalError, glue);
299 tree_ir.FunctionDefinition treeNode = 299 tree_ir.FunctionDefinition treeNode =
300 treeBuilderTask.measure(() => builder.buildFunction(cpsNode)); 300 treeBuilderTask.measure(() => builder.buildFunction(cpsNode));
301 assert(treeNode != null); 301 assert(treeNode != null);
302 traceGraph('Tree builder', treeNode); 302 traceGraph('Tree builder', treeNode);
303 assert(checkTreeIntegrity(treeNode)); 303 assert(checkTreeIntegrity(treeNode));
304 return treeNode; 304 return treeNode;
305 } 305 }
306 306
307 bool checkTreeIntegrity(tree_ir.FunctionDefinition node) { 307 bool checkTreeIntegrity(tree_ir.FunctionDefinition node) {
308 treeOptimizationTask.measureSubtask('Check integrity', () { 308 treeOptimizationTask.measureSubtask('Check integrity', () {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 treeOptimizationTask] 351 treeOptimizationTask]
352 ..addAll(fallbackCompiler.tasks); 352 ..addAll(fallbackCompiler.tasks);
353 } 353 }
354 354
355 js.Node attachPosition(js.Node node, AstElement element) { 355 js.Node attachPosition(js.Node node, AstElement element) {
356 return node.withSourceInformation( 356 return node.withSourceInformation(
357 sourceInformationFactory.createBuilderForContext(element) 357 sourceInformationFactory.createBuilderForContext(element)
358 .buildDeclaration(element)); 358 .buildDeclaration(element));
359 } 359 }
360 } 360 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/glue.dart ('k') | pkg/compiler/lib/src/js_backend/codegen/unsugar.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698