| 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 part of ssa; | 5 part of ssa; |
| 6 | 6 |
| 7 class Interceptors { | 7 class Interceptors { |
| 8 Compiler compiler; | 8 Compiler compiler; |
| 9 Interceptors(Compiler this.compiler); | 9 Interceptors(Compiler this.compiler); |
| 10 | 10 |
| (...skipping 3670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3681 native.handleSsaNative(this, node.expression); | 3681 native.handleSsaNative(this, node.expression); |
| 3682 return; | 3682 return; |
| 3683 } | 3683 } |
| 3684 assert(invariant(node, !node.isRedirectingFactoryBody)); | 3684 assert(invariant(node, !node.isRedirectingFactoryBody)); |
| 3685 HInstruction value; | 3685 HInstruction value; |
| 3686 if (node.expression == null) { | 3686 if (node.expression == null) { |
| 3687 value = graph.addConstantNull(constantSystem); | 3687 value = graph.addConstantNull(constantSystem); |
| 3688 } else { | 3688 } else { |
| 3689 visit(node.expression); | 3689 visit(node.expression); |
| 3690 value = pop(); | 3690 value = pop(); |
| 3691 if (value is HForeign) { | 3691 value = potentiallyCheckType(value, returnType); |
| 3692 // TODO(6530, 6534): remove this check. | |
| 3693 } else { | |
| 3694 value = potentiallyCheckType(value, returnType); | |
| 3695 } | |
| 3696 } | 3692 } |
| 3697 | 3693 |
| 3698 handleInTryStatement(); | 3694 handleInTryStatement(); |
| 3699 | 3695 |
| 3700 if (!inliningStack.isEmpty) { | 3696 if (!inliningStack.isEmpty) { |
| 3701 localsHandler.updateLocal(returnElement, value); | 3697 localsHandler.updateLocal(returnElement, value); |
| 3702 } else { | 3698 } else { |
| 3703 close(attachPosition(new HReturn(value), node)).addSuccessor(graph.exit); | 3699 close(attachPosition(new HReturn(value), node)).addSuccessor(graph.exit); |
| 3704 } | 3700 } |
| 3705 } | 3701 } |
| (...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4928 new HSubGraphBlockInformation(elseBranch.graph)); | 4924 new HSubGraphBlockInformation(elseBranch.graph)); |
| 4929 | 4925 |
| 4930 HBasicBlock conditionStartBlock = conditionBranch.block; | 4926 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 4931 conditionStartBlock.setBlockFlow(info, joinBlock); | 4927 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 4932 SubGraph conditionGraph = conditionBranch.graph; | 4928 SubGraph conditionGraph = conditionBranch.graph; |
| 4933 HIf branch = conditionGraph.end.last; | 4929 HIf branch = conditionGraph.end.last; |
| 4934 assert(branch is HIf); | 4930 assert(branch is HIf); |
| 4935 branch.blockInformation = conditionStartBlock.blockFlow; | 4931 branch.blockInformation = conditionStartBlock.blockFlow; |
| 4936 } | 4932 } |
| 4937 } | 4933 } |
| OLD | NEW |