| 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 '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; | 5 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; |
| 6 import '../common/names.dart' show Selectors; | 6 import '../common/names.dart' show Selectors; |
| 7 import '../common/tasks.dart' show CompilerTask; | 7 import '../common/tasks.dart' show CompilerTask; |
| 8 import '../compiler.dart' show Compiler; | 8 import '../compiler.dart' show Compiler; |
| 9 import '../constants/constant_system.dart'; | 9 import '../constants/constant_system.dart'; |
| 10 import '../constants/values.dart'; | 10 import '../constants/values.dart'; |
| (...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1159 // All intercepted classes extend `Interceptor`, so if the receiver can't | 1159 // All intercepted classes extend `Interceptor`, so if the receiver can't |
| 1160 // be a class extending `Interceptor` then it can be called directly. | 1160 // be a class extending `Interceptor` then it can be called directly. |
| 1161 if (new TypeMask.nonNullSubclass( | 1161 if (new TypeMask.nonNullSubclass( |
| 1162 _helpers.jsInterceptorClass, _closedWorld) | 1162 _helpers.jsInterceptorClass, _closedWorld) |
| 1163 .isDisjoint(input.instructionType, _closedWorld)) { | 1163 .isDisjoint(input.instructionType, _closedWorld)) { |
| 1164 var inputs = <HInstruction>[input, input]; // [interceptor, receiver]. | 1164 var inputs = <HInstruction>[input, input]; // [interceptor, receiver]. |
| 1165 HInstruction result = new HInvokeDynamicMethod( | 1165 HInstruction result = new HInvokeDynamicMethod( |
| 1166 selector, | 1166 selector, |
| 1167 input.instructionType, // receiver mask. | 1167 input.instructionType, // receiver mask. |
| 1168 inputs, | 1168 inputs, |
| 1169 toStringType)..sourceInformation = node.sourceInformation; | 1169 toStringType) |
| 1170 ..sourceInformation = node.sourceInformation; |
| 1170 return result; | 1171 return result; |
| 1171 } | 1172 } |
| 1172 return null; | 1173 return null; |
| 1173 } | 1174 } |
| 1174 | 1175 |
| 1175 return tryConstant() ?? tryToString() ?? node; | 1176 return tryConstant() ?? tryToString() ?? node; |
| 1176 } | 1177 } |
| 1177 | 1178 |
| 1178 HInstruction visitOneShotInterceptor(HOneShotInterceptor node) { | 1179 HInstruction visitOneShotInterceptor(HOneShotInterceptor node) { |
| 1179 return handleInterceptedCall(node); | 1180 return handleInterceptedCall(node); |
| (...skipping 1656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2836 | 2837 |
| 2837 keyedValues.forEach((receiver, values) { | 2838 keyedValues.forEach((receiver, values) { |
| 2838 result.keyedValues[receiver] = | 2839 result.keyedValues[receiver] = |
| 2839 new Map<HInstruction, HInstruction>.from(values); | 2840 new Map<HInstruction, HInstruction>.from(values); |
| 2840 }); | 2841 }); |
| 2841 | 2842 |
| 2842 result.nonEscapingReceivers.addAll(nonEscapingReceivers); | 2843 result.nonEscapingReceivers.addAll(nonEscapingReceivers); |
| 2843 return result; | 2844 return result; |
| 2844 } | 2845 } |
| 2845 } | 2846 } |
| OLD | NEW |