| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 abstract startThen(HIf node); | 137 abstract startThen(HIf node); |
| 138 abstract endThen(HIf node); | 138 abstract endThen(HIf node); |
| 139 abstract startElse(HIf node); | 139 abstract startElse(HIf node); |
| 140 abstract endElse(HIf node); | 140 abstract endElse(HIf node); |
| 141 | 141 |
| 142 void beginExpression(int precedence) { | 142 void beginExpression(int precedence) { |
| 143 if (precedence < expectedPrecedence) { | 143 if (precedence < expectedPrecedence) { |
| 144 buffer.add('('); | 144 buffer.add('('); |
| 145 } | 145 } |
| 146 } | 146 } |
| 147 |
| 147 void endExpression(int precedence) { | 148 void endExpression(int precedence) { |
| 148 if (precedence < expectedPrecedence) { | 149 if (precedence < expectedPrecedence) { |
| 149 buffer.add(')'); | 150 buffer.add(')'); |
| 150 } | 151 } |
| 151 } | 152 } |
| 152 | 153 |
| 153 visitGraph(HGraph graph) { | 154 visitGraph(HGraph graph) { |
| 154 currentGraph = graph; | 155 currentGraph = graph; |
| 155 indent++; // We are already inside a function. | 156 indent++; // We are already inside a function. |
| 156 subGraph = new SubGraph(graph.entry, graph.exit); | 157 subGraph = new SubGraph(graph.entry, graph.exit); |
| (...skipping 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1431 startBailoutSwitch(); | 1432 startBailoutSwitch(); |
| 1432 } | 1433 } |
| 1433 } | 1434 } |
| 1434 | 1435 |
| 1435 void endElse(HIf node) { | 1436 void endElse(HIf node) { |
| 1436 if (node.elseBlock.hasBailouts()) { | 1437 if (node.elseBlock.hasBailouts()) { |
| 1437 endBailoutSwitch(); | 1438 endBailoutSwitch(); |
| 1438 } | 1439 } |
| 1439 } | 1440 } |
| 1440 } | 1441 } |
| OLD | NEW |