| 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 3654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3665 } | 3665 } |
| 3666 condition = new HIs(type, unwrappedException, nullOk: true); | 3666 condition = new HIs(type, unwrappedException, nullOk: true); |
| 3667 push(condition); | 3667 push(condition); |
| 3668 } | 3668 } |
| 3669 } | 3669 } |
| 3670 } | 3670 } |
| 3671 | 3671 |
| 3672 void visitThen() { | 3672 void visitThen() { |
| 3673 CatchBlock catchBlock = link.head; | 3673 CatchBlock catchBlock = link.head; |
| 3674 link = link.tail; | 3674 link = link.tail; |
| 3675 localsHandler.updateLocal(elements[catchBlock.exception], | 3675 if (catchBlock.exception !== null) { |
| 3676 unwrappedException); | 3676 localsHandler.updateLocal(elements[catchBlock.exception], |
| 3677 unwrappedException); |
| 3678 } |
| 3677 Node trace = catchBlock.trace; | 3679 Node trace = catchBlock.trace; |
| 3678 if (trace != null) { | 3680 if (trace != null) { |
| 3679 pushInvokeHelper1(interceptors.getTraceFromException(), exception); | 3681 pushInvokeHelper1(interceptors.getTraceFromException(), exception); |
| 3680 HInstruction traceInstruction = pop(); | 3682 HInstruction traceInstruction = pop(); |
| 3681 localsHandler.updateLocal(elements[trace], traceInstruction); | 3683 localsHandler.updateLocal(elements[trace], traceInstruction); |
| 3682 } | 3684 } |
| 3683 visit(catchBlock); | 3685 visit(catchBlock); |
| 3684 } | 3686 } |
| 3685 | 3687 |
| 3686 void visitElse() { | 3688 void visitElse() { |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4138 new HSubGraphBlockInformation(elseBranch.graph)); | 4140 new HSubGraphBlockInformation(elseBranch.graph)); |
| 4139 | 4141 |
| 4140 HBasicBlock conditionStartBlock = conditionBranch.block; | 4142 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 4141 conditionStartBlock.setBlockFlow(info, joinBlock); | 4143 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 4142 SubGraph conditionGraph = conditionBranch.graph; | 4144 SubGraph conditionGraph = conditionBranch.graph; |
| 4143 HIf branch = conditionGraph.end.last; | 4145 HIf branch = conditionGraph.end.last; |
| 4144 assert(branch is HIf); | 4146 assert(branch is HIf); |
| 4145 branch.blockInformation = conditionStartBlock.blockFlow; | 4147 branch.blockInformation = conditionStartBlock.blockFlow; |
| 4146 } | 4148 } |
| 4147 } | 4149 } |
| OLD | NEW |