| 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 Interceptors { | 5 class Interceptors { |
| 6 Compiler compiler; | 6 Compiler compiler; |
| 7 Interceptors(Compiler this.compiler); | 7 Interceptors(Compiler this.compiler); |
| 8 | 8 |
| 9 SourceString mapOperatorToMethodName(Operator op) { | 9 SourceString mapOperatorToMethodName(Operator op) { |
| 10 String name = op.source.stringValue; | 10 String name = op.source.stringValue; |
| (...skipping 3179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3190 } else { | 3190 } else { |
| 3191 close(attachPosition(new HReturn(value), node)).addSuccessor(graph.exit); | 3191 close(attachPosition(new HReturn(value), node)).addSuccessor(graph.exit); |
| 3192 } | 3192 } |
| 3193 } | 3193 } |
| 3194 | 3194 |
| 3195 visitThrow(Throw node) { | 3195 visitThrow(Throw node) { |
| 3196 if (node.expression === null) { | 3196 if (node.expression === null) { |
| 3197 HInstruction exception = rethrowableException; | 3197 HInstruction exception = rethrowableException; |
| 3198 if (exception === null) { | 3198 if (exception === null) { |
| 3199 exception = graph.addConstantNull(constantSystem); | 3199 exception = graph.addConstantNull(constantSystem); |
| 3200 compiler.reportError(node, | 3200 compiler.internalError( |
| 3201 'throw without expression outside catch block'); | 3201 'rethrowableException should not be null', node: node); |
| 3202 } | 3202 } |
| 3203 close(new HThrow(exception, isRethrow: true)); | 3203 close(new HThrow(exception, isRethrow: true)); |
| 3204 } else { | 3204 } else { |
| 3205 visit(node.expression); | 3205 visit(node.expression); |
| 3206 close(new HThrow(pop())); | 3206 close(new HThrow(pop())); |
| 3207 } | 3207 } |
| 3208 } | 3208 } |
| 3209 | 3209 |
| 3210 visitTypeAnnotation(TypeAnnotation node) { | 3210 visitTypeAnnotation(TypeAnnotation node) { |
| 3211 compiler.internalError('visiting type annotation in SSA builder', | 3211 compiler.internalError('visiting type annotation in SSA builder', |
| (...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4389 new HSubGraphBlockInformation(elseBranch.graph)); | 4389 new HSubGraphBlockInformation(elseBranch.graph)); |
| 4390 | 4390 |
| 4391 HBasicBlock conditionStartBlock = conditionBranch.block; | 4391 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 4392 conditionStartBlock.setBlockFlow(info, joinBlock); | 4392 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 4393 SubGraph conditionGraph = conditionBranch.graph; | 4393 SubGraph conditionGraph = conditionBranch.graph; |
| 4394 HIf branch = conditionGraph.end.last; | 4394 HIf branch = conditionGraph.end.last; |
| 4395 assert(branch is HIf); | 4395 assert(branch is HIf); |
| 4396 branch.blockInformation = conditionStartBlock.blockFlow; | 4396 branch.blockInformation = conditionStartBlock.blockFlow; |
| 4397 } | 4397 } |
| 4398 } | 4398 } |
| OLD | NEW |