| 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 * Replaces some instructions with specialized versions to make codegen easier. | 8 * Replaces some instructions with specialized versions to make codegen easier. |
| 9 * Caches codegen information on nodes. | 9 * Caches codegen information on nodes. |
| 10 */ | 10 */ |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 HInstruction interceptor = node.inputs[0]; | 116 HInstruction interceptor = node.inputs[0]; |
| 117 HInstruction receiverArgument = node.inputs[1]; | 117 HInstruction receiverArgument = node.inputs[1]; |
| 118 | 118 |
| 119 // TODO(15720): The test here should be | 119 // TODO(15720): The test here should be |
| 120 // | 120 // |
| 121 // interceptor.nonCheck() == receiverArgument.nonCheck() | 121 // interceptor.nonCheck() == receiverArgument.nonCheck() |
| 122 // | 122 // |
| 123 if (interceptor == receiverArgument) { | 123 if (interceptor == receiverArgument) { |
| 124 // TODO(15933): Make automatically generated property extraction | 124 // TODO(15933): Make automatically generated property extraction |
| 125 // closures work with the dummy receiver optimization. | 125 // closures work with the dummy receiver optimization. |
| 126 if (!selector.isGetter()) { | 126 if (!selector.isGetter) { |
| 127 Constant constant = new DummyConstant( | 127 Constant constant = new DummyConstant( |
| 128 receiverArgument.instructionType); | 128 receiverArgument.instructionType); |
| 129 HConstant dummy = graph.addConstant(constant, compiler); | 129 HConstant dummy = graph.addConstant(constant, compiler); |
| 130 receiverArgument.usedBy.remove(node); | 130 receiverArgument.usedBy.remove(node); |
| 131 node.inputs[1] = dummy; | 131 node.inputs[1] = dummy; |
| 132 dummy.usedBy.add(node); | 132 dummy.usedBy.add(node); |
| 133 } | 133 } |
| 134 } | 134 } |
| 135 } | 135 } |
| 136 } | 136 } |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 } | 698 } |
| 699 | 699 |
| 700 // If [thenInput] is defined in the first predecessor, then it is only used | 700 // If [thenInput] is defined in the first predecessor, then it is only used |
| 701 // by [phi] and can be generated at use site. | 701 // by [phi] and can be generated at use site. |
| 702 if (identical(thenInput.block, end.predecessors[0])) { | 702 if (identical(thenInput.block, end.predecessors[0])) { |
| 703 assert(thenInput.usedBy.length == 1); | 703 assert(thenInput.usedBy.length == 1); |
| 704 markAsGenerateAtUseSite(thenInput); | 704 markAsGenerateAtUseSite(thenInput); |
| 705 } | 705 } |
| 706 } | 706 } |
| 707 } | 707 } |
| OLD | NEW |