| 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 /** | 7 /** |
| 8 * A special element for the extra parameter taken by intercepted | 8 * A special element for the extra parameter taken by intercepted |
| 9 * methods. We need to override [Element.computeType] because our | 9 * methods. We need to override [Element.computeType] because our |
| 10 * optimizers may look at its declared type. | 10 * optimizers may look at its declared type. |
| (...skipping 2697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2708 if (element.isSetter()) { | 2708 if (element.isSetter()) { |
| 2709 pushInvokeStatic(location, element, <HInstruction>[value]); | 2709 pushInvokeStatic(location, element, <HInstruction>[value]); |
| 2710 pop(); | 2710 pop(); |
| 2711 } else { | 2711 } else { |
| 2712 value = | 2712 value = |
| 2713 potentiallyCheckType(value, element.computeType(compiler)); | 2713 potentiallyCheckType(value, element.computeType(compiler)); |
| 2714 addWithPosition(new HStaticStore(element, value), location); | 2714 addWithPosition(new HStaticStore(element, value), location); |
| 2715 } | 2715 } |
| 2716 stack.add(value); | 2716 stack.add(value); |
| 2717 } else if (Elements.isErroneousElement(element)) { | 2717 } else if (Elements.isErroneousElement(element)) { |
| 2718 List<HInstruction> arguments = |
| 2719 send == null ? const <HInstruction>[] : <HInstruction>[value]; |
| 2718 // An erroneous element indicates an unresolved static setter. | 2720 // An erroneous element indicates an unresolved static setter. |
| 2719 generateThrowNoSuchMethod( | 2721 generateThrowNoSuchMethod(location, getTargetName(element, 'set'), |
| 2720 location, | 2722 argumentValues: arguments); |
| 2721 getTargetName(element, 'set'), | |
| 2722 argumentNodes: (send == null ? const Link<Node>() : send.arguments)); | |
| 2723 } else { | 2723 } else { |
| 2724 stack.add(value); | 2724 stack.add(value); |
| 2725 // If the value does not already have a name, give it here. | 2725 // If the value does not already have a name, give it here. |
| 2726 if (value.sourceElement == null) { | 2726 if (value.sourceElement == null) { |
| 2727 value.sourceElement = element; | 2727 value.sourceElement = element; |
| 2728 } | 2728 } |
| 2729 HInstruction checked = | 2729 HInstruction checked = |
| 2730 potentiallyCheckType(value, element.computeType(compiler)); | 2730 potentiallyCheckType(value, element.computeType(compiler)); |
| 2731 if (!identical(checked, value)) { | 2731 if (!identical(checked, value)) { |
| 2732 pop(); | 2732 pop(); |
| (...skipping 2822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5555 new HSubGraphBlockInformation(elseBranch.graph)); | 5555 new HSubGraphBlockInformation(elseBranch.graph)); |
| 5556 | 5556 |
| 5557 HBasicBlock conditionStartBlock = conditionBranch.block; | 5557 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 5558 conditionStartBlock.setBlockFlow(info, joinBlock); | 5558 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 5559 SubGraph conditionGraph = conditionBranch.graph; | 5559 SubGraph conditionGraph = conditionBranch.graph; |
| 5560 HIf branch = conditionGraph.end.last; | 5560 HIf branch = conditionGraph.end.last; |
| 5561 assert(branch is HIf); | 5561 assert(branch is HIf); |
| 5562 branch.blockInformation = conditionStartBlock.blockFlow; | 5562 branch.blockInformation = conditionStartBlock.blockFlow; |
| 5563 } | 5563 } |
| 5564 } | 5564 } |
| OLD | NEW |