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

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

Issue 2777163002: Make codegen and optimizations depend more directly on data objects. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/codegen_helpers.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 import 'dart:math' as math; 5 import 'dart:math' as math;
6 import '../common.dart'; 6 import '../common.dart';
7 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; 7 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem;
8 import '../common/tasks.dart' show CompilerTask; 8 import '../common/tasks.dart' show CompilerTask;
9 import '../compiler.dart' show Compiler; 9 import '../compiler.dart' show Compiler;
10 import '../constants/constant_system.dart'; 10 import '../constants/constant_system.dart';
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 */ 311 */
312 push(js.Expression expression) { 312 push(js.Expression expression) {
313 expressionStack.add(expression); 313 expressionStack.add(expression);
314 } 314 }
315 315
316 js.Expression pop() { 316 js.Expression pop() {
317 return expressionStack.removeLast(); 317 return expressionStack.removeLast();
318 } 318 }
319 319
320 void preGenerateMethod(HGraph graph) { 320 void preGenerateMethod(HGraph graph) {
321 new SsaInstructionSelection(compiler, closedWorld).visitGraph(graph); 321 new SsaInstructionSelection(closedWorld, backend.interceptorData)
322 .visitGraph(graph);
322 new SsaTypeKnownRemover().visitGraph(graph); 323 new SsaTypeKnownRemover().visitGraph(graph);
323 new SsaTrustedCheckRemover(compiler).visitGraph(graph); 324 new SsaTrustedCheckRemover(compiler.options).visitGraph(graph);
324 new SsaInstructionMerger(generateAtUseSite, compiler).visitGraph(graph); 325 new SsaInstructionMerger(generateAtUseSite, backend).visitGraph(graph);
325 new SsaConditionMerger(generateAtUseSite, controlFlowOperators) 326 new SsaConditionMerger(generateAtUseSite, controlFlowOperators)
326 .visitGraph(graph); 327 .visitGraph(graph);
327 SsaLiveIntervalBuilder intervalBuilder = new SsaLiveIntervalBuilder( 328 SsaLiveIntervalBuilder intervalBuilder =
328 compiler, generateAtUseSite, controlFlowOperators); 329 new SsaLiveIntervalBuilder(generateAtUseSite, controlFlowOperators);
329 intervalBuilder.visitGraph(graph); 330 intervalBuilder.visitGraph(graph);
330 SsaVariableAllocator allocator = new SsaVariableAllocator( 331 SsaVariableAllocator allocator = new SsaVariableAllocator(
331 compiler, 332 backend.namer,
332 intervalBuilder.liveInstructions, 333 intervalBuilder.liveInstructions,
333 intervalBuilder.liveIntervals, 334 intervalBuilder.liveIntervals,
334 generateAtUseSite); 335 generateAtUseSite);
335 allocator.visitGraph(graph); 336 allocator.visitGraph(graph);
336 variableNames = allocator.names; 337 variableNames = allocator.names;
337 shouldGroupVarDeclarations = allocator.names.numberOfVariables > 1; 338 shouldGroupVarDeclarations = allocator.names.numberOfVariables > 1;
338 } 339 }
339 340
340 void handleDelayedVariableDeclarations(SourceInformation sourceInformation) { 341 void handleDelayedVariableDeclarations(SourceInformation sourceInformation) {
341 // If we have only one variable declaration and the first statement is an 342 // If we have only one variable declaration and the first statement is an
(...skipping 2638 matching lines...) Expand 10 before | Expand all | Expand 10 after
2980 return closedWorld.anyStrictSubclassOf(cls, (ClassEntity subclass) { 2981 return closedWorld.anyStrictSubclassOf(cls, (ClassEntity subclass) {
2981 return !backend.rtiSubstitutions.isTrivialSubstitution(subclass, cls); 2982 return !backend.rtiSubstitutions.isTrivialSubstitution(subclass, cls);
2982 }); 2983 });
2983 } 2984 }
2984 2985
2985 @override 2986 @override
2986 void visitRef(HRef node) { 2987 void visitRef(HRef node) {
2987 visit(node.value); 2988 visit(node.value);
2988 } 2989 }
2989 } 2990 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/codegen_helpers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698