| 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 SsaCodeGeneratorTask(Compiler compiler) : super(compiler); | 6 SsaCodeGeneratorTask(Compiler compiler) : super(compiler); |
| 7 String get name() => 'SSA code generator'; | 7 String get name() => 'SSA code generator'; |
| 8 | 8 |
| 9 String generate(WorkItem work, HGraph graph) { | 9 String generate(WorkItem work, HGraph graph) { |
| 10 return measure(() { | 10 return measure(() { |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 abstract startThen(HIf node); | 143 abstract startThen(HIf node); |
| 144 abstract endThen(HIf node); | 144 abstract endThen(HIf node); |
| 145 abstract startElse(HIf node); | 145 abstract startElse(HIf node); |
| 146 abstract endElse(HIf node); | 146 abstract endElse(HIf node); |
| 147 | 147 |
| 148 void beginExpression(int precedence) { | 148 void beginExpression(int precedence) { |
| 149 if (precedence < expectedPrecedence) { | 149 if (precedence < expectedPrecedence) { |
| 150 buffer.add('('); | 150 buffer.add('('); |
| 151 } | 151 } |
| 152 } | 152 } |
| 153 |
| 153 void endExpression(int precedence) { | 154 void endExpression(int precedence) { |
| 154 if (precedence < expectedPrecedence) { | 155 if (precedence < expectedPrecedence) { |
| 155 buffer.add(')'); | 156 buffer.add(')'); |
| 156 } | 157 } |
| 157 } | 158 } |
| 158 | 159 |
| 159 visitGraph(HGraph graph) { | 160 visitGraph(HGraph graph) { |
| 160 currentGraph = graph; | 161 currentGraph = graph; |
| 161 indent++; // We are already inside a function. | 162 indent++; // We are already inside a function. |
| 162 subGraph = new SubGraph(graph.entry, graph.exit); | 163 subGraph = new SubGraph(graph.entry, graph.exit); |
| (...skipping 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1444 startBailoutSwitch(); | 1445 startBailoutSwitch(); |
| 1445 } | 1446 } |
| 1446 } | 1447 } |
| 1447 | 1448 |
| 1448 void endElse(HIf node) { | 1449 void endElse(HIf node) { |
| 1449 if (node.elseBlock.hasBailouts()) { | 1450 if (node.elseBlock.hasBailouts()) { |
| 1450 endBailoutSwitch(); | 1451 endBailoutSwitch(); |
| 1451 } | 1452 } |
| 1452 } | 1453 } |
| 1453 } | 1454 } |
| OLD | NEW |