| OLD | NEW |
| 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 class SsaCodeGeneratorTask extends CompilerTask { | 5 class SsaCodeGeneratorTask extends CompilerTask { |
| 6 final JavaScriptBackend backend; | 6 final JavaScriptBackend backend; |
| 7 SsaCodeGeneratorTask(JavaScriptBackend backend) | 7 SsaCodeGeneratorTask(JavaScriptBackend backend) |
| 8 : this.backend = backend, | 8 : this.backend = backend, |
| 9 super(backend.compiler); | 9 super(backend.compiler); |
| 10 String get name() => 'SSA code generator'; | 10 String get name() => 'SSA code generator'; |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 new SsaInstructionMerger(generateAtUseSite).visitGraph(graph); | 253 new SsaInstructionMerger(generateAtUseSite).visitGraph(graph); |
| 254 new SsaConditionMerger(generateAtUseSite, | 254 new SsaConditionMerger(generateAtUseSite, |
| 255 logicalOperations).visitGraph(graph); | 255 logicalOperations).visitGraph(graph); |
| 256 SsaLiveIntervalBuilder intervalBuilder = | 256 SsaLiveIntervalBuilder intervalBuilder = |
| 257 new SsaLiveIntervalBuilder(compiler); | 257 new SsaLiveIntervalBuilder(compiler); |
| 258 intervalBuilder.visitGraph(graph); | 258 intervalBuilder.visitGraph(graph); |
| 259 SsaVariableAllocator allocator = new SsaVariableAllocator( | 259 SsaVariableAllocator allocator = new SsaVariableAllocator( |
| 260 compiler, | 260 compiler, |
| 261 intervalBuilder.liveInstructions, | 261 intervalBuilder.liveInstructions, |
| 262 intervalBuilder.liveIntervals, | 262 intervalBuilder.liveIntervals, |
| 263 generateAtUseSite); | 263 generateAtUseSite, |
| 264 parameterNames); |
| 264 allocator.visitGraph(graph); | 265 allocator.visitGraph(graph); |
| 265 variableNames = allocator.names; | 266 variableNames = allocator.names; |
| 266 } | 267 } |
| 267 | 268 |
| 268 visitGraph(HGraph graph) { | 269 visitGraph(HGraph graph) { |
| 269 preGenerateMethod(graph); | 270 preGenerateMethod(graph); |
| 270 currentGraph = graph; | 271 currentGraph = graph; |
| 271 indent++; // We are already inside a function. | 272 indent++; // We are already inside a function. |
| 272 subGraph = new SubGraph(graph.entry, graph.exit); | 273 subGraph = new SubGraph(graph.entry, graph.exit); |
| 273 beginGraph(graph); | 274 beginGraph(graph); |
| (...skipping 2195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2469 startBailoutSwitch(); | 2470 startBailoutSwitch(); |
| 2470 } | 2471 } |
| 2471 } | 2472 } |
| 2472 | 2473 |
| 2473 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { | 2474 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { |
| 2474 if (labeledBlockInfo.body.start.hasGuards()) { | 2475 if (labeledBlockInfo.body.start.hasGuards()) { |
| 2475 endBailoutSwitch(); | 2476 endBailoutSwitch(); |
| 2476 } | 2477 } |
| 2477 } | 2478 } |
| 2478 } | 2479 } |
| OLD | NEW |