| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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.isInterceptedSelector(selector) && |
| 146 !backend.isInterceptedMixinSelector(selector, mask)) { | 146 !backend.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, compiler); | 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 } |
| 157 | 157 |
| 158 HInstruction visitFieldSet(HFieldSet setter) { | 158 HInstruction visitFieldSet(HFieldSet setter) { |
| 159 // Pattern match | 159 // Pattern match |
| 160 // t1 = x.f; t2 = t1 + 1; x.f = t2; use(t2) --> ++x.f | 160 // t1 = x.f; t2 = t1 + 1; x.f = t2; use(t2) --> ++x.f |
| (...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 } | 797 } |
| 798 | 798 |
| 799 // If [thenInput] is defined in the first predecessor, then it is only used | 799 // If [thenInput] is defined in the first predecessor, then it is only used |
| 800 // by [phi] and can be generated at use site. | 800 // by [phi] and can be generated at use site. |
| 801 if (identical(thenInput.block, end.predecessors[0])) { | 801 if (identical(thenInput.block, end.predecessors[0])) { |
| 802 assert(thenInput.usedBy.length == 1); | 802 assert(thenInput.usedBy.length == 1); |
| 803 markAsGenerateAtUseSite(thenInput); | 803 markAsGenerateAtUseSite(thenInput); |
| 804 } | 804 } |
| 805 } | 805 } |
| 806 } | 806 } |
| OLD | NEW |