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