| 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 action(); | 249 action(); |
| 250 expectedPrecedence = oldPrecedence; | 250 expectedPrecedence = oldPrecedence; |
| 251 endExpression(precedence); | 251 endExpression(precedence); |
| 252 } | 252 } |
| 253 | 253 |
| 254 void preGenerateMethod(HGraph graph) { | 254 void preGenerateMethod(HGraph graph) { |
| 255 new SsaInstructionMerger(generateAtUseSite).visitGraph(graph); | 255 new SsaInstructionMerger(generateAtUseSite).visitGraph(graph); |
| 256 new SsaConditionMerger(generateAtUseSite, | 256 new SsaConditionMerger(generateAtUseSite, |
| 257 controlFlowOperators).visitGraph(graph); | 257 controlFlowOperators).visitGraph(graph); |
| 258 SsaLiveIntervalBuilder intervalBuilder = | 258 SsaLiveIntervalBuilder intervalBuilder = |
| 259 new SsaLiveIntervalBuilder(compiler); | 259 new SsaLiveIntervalBuilder(compiler, generateAtUseSite); |
| 260 intervalBuilder.visitGraph(graph); | 260 intervalBuilder.visitGraph(graph); |
| 261 SsaVariableAllocator allocator = new SsaVariableAllocator( | 261 SsaVariableAllocator allocator = new SsaVariableAllocator( |
| 262 compiler, | 262 compiler, |
| 263 intervalBuilder.liveInstructions, | 263 intervalBuilder.liveInstructions, |
| 264 intervalBuilder.liveIntervals, | 264 intervalBuilder.liveIntervals, |
| 265 generateAtUseSite, | 265 generateAtUseSite, |
| 266 parameterNames); | 266 parameterNames); |
| 267 allocator.visitGraph(graph); | 267 allocator.visitGraph(graph); |
| 268 variableNames = allocator.names; | 268 variableNames = allocator.names; |
| 269 } | 269 } |
| (...skipping 2732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3002 startBailoutSwitch(); | 3002 startBailoutSwitch(); |
| 3003 } | 3003 } |
| 3004 } | 3004 } |
| 3005 | 3005 |
| 3006 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { | 3006 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { |
| 3007 if (labeledBlockInfo.body.start.hasGuards()) { | 3007 if (labeledBlockInfo.body.start.hasGuards()) { |
| 3008 endBailoutSwitch(); | 3008 endBailoutSwitch(); |
| 3009 } | 3009 } |
| 3010 } | 3010 } |
| 3011 } | 3011 } |
| OLD | NEW |