| 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 import '../constants/values.dart'; | 5 import '../constants/values.dart'; |
| 6 import '../elements/elements.dart'; | 6 import '../elements/elements.dart'; |
| 7 import '../js_backend/js_backend.dart'; | 7 import '../js_backend/js_backend.dart'; |
| 8 import '../js_backend/interceptor_data.dart'; | 8 import '../js_backend/interceptor_data.dart'; |
| 9 import '../options.dart'; | 9 import '../options.dart'; |
| 10 import '../types/types.dart'; | 10 import '../types/types.dart'; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 // TODO(15933): Make automatically generated property extraction closures | 135 // TODO(15933): Make automatically generated property extraction closures |
| 136 // work with the dummy receiver optimization. | 136 // work with the dummy receiver optimization. |
| 137 if (selector.isGetter) return; | 137 if (selector.isGetter) return; |
| 138 | 138 |
| 139 // This assignment of inputs is uniform for HInvokeDynamic and HInvokeSuper. | 139 // This assignment of inputs is uniform for HInvokeDynamic and HInvokeSuper. |
| 140 HInstruction interceptor = node.inputs[0]; | 140 HInstruction interceptor = node.inputs[0]; |
| 141 HInstruction receiverArgument = node.inputs[1]; | 141 HInstruction receiverArgument = node.inputs[1]; |
| 142 | 142 |
| 143 if (interceptor.nonCheck() == receiverArgument.nonCheck()) { | 143 if (interceptor.nonCheck() == receiverArgument.nonCheck()) { |
| 144 if (_interceptorData.isInterceptedSelector(selector) && | 144 if (_interceptorData.isInterceptedSelector(selector) && |
| 145 !_interceptorData.isInterceptedMixinSelector(selector, mask)) { | 145 !_interceptorData.isInterceptedMixinSelector( |
| 146 selector, mask, _closedWorld)) { |
| 146 ConstantValue constant = new SyntheticConstantValue( | 147 ConstantValue constant = new SyntheticConstantValue( |
| 147 SyntheticConstantKind.DUMMY_INTERCEPTOR, | 148 SyntheticConstantKind.DUMMY_INTERCEPTOR, |
| 148 receiverArgument.instructionType); | 149 receiverArgument.instructionType); |
| 149 HConstant dummy = graph.addConstant(constant, _closedWorld); | 150 HConstant dummy = graph.addConstant(constant, _closedWorld); |
| 150 receiverArgument.usedBy.remove(node); | 151 receiverArgument.usedBy.remove(node); |
| 151 node.inputs[1] = dummy; | 152 node.inputs[1] = dummy; |
| 152 dummy.usedBy.add(node); | 153 dummy.usedBy.add(node); |
| 153 } | 154 } |
| 154 } | 155 } |
| 155 } | 156 } |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 } | 801 } |
| 801 | 802 |
| 802 // If [thenInput] is defined in the first predecessor, then it is only used | 803 // If [thenInput] is defined in the first predecessor, then it is only used |
| 803 // by [phi] and can be generated at use site. | 804 // by [phi] and can be generated at use site. |
| 804 if (identical(thenInput.block, end.predecessors[0])) { | 805 if (identical(thenInput.block, end.predecessors[0])) { |
| 805 assert(thenInput.usedBy.length == 1); | 806 assert(thenInput.usedBy.length == 1); |
| 806 markAsGenerateAtUseSite(thenInput); | 807 markAsGenerateAtUseSite(thenInput); |
| 807 } | 808 } |
| 808 } | 809 } |
| 809 } | 810 } |
| OLD | NEW |