Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/ssa/nodes.dart |
| =================================================================== |
| --- sdk/lib/_internal/compiler/implementation/ssa/nodes.dart (revision 19046) |
| +++ sdk/lib/_internal/compiler/implementation/ssa/nodes.dart (working copy) |
| @@ -1309,6 +1309,9 @@ |
| toString() => 'invoke dynamic: $selector'; |
| HInstruction get receiver => inputs[0]; |
| + /** |
| + * Returns whether this call is on an intercepted method. |
| + */ |
| bool get isInterceptorCall { |
| // We know it's a selector call if it follows the interceptor |
| // calling convention, which adds the actual receiver as a |
| @@ -1316,6 +1319,16 @@ |
| return inputs.length - 2 == selector.argumentCount; |
| } |
| + /** |
| + * Returns whether this call is on an interceptor object. |
| + */ |
| + bool get isCallOnInterceptor { |
| + // When the optimizers know this call does not need an |
| + // interceptor, they udpate the receiver of the call to be the |
| + // actual receiver. |
| + return isInterceptorCall && inputs[0] != inputs[1]; |
|
sra1
2013/02/27 05:13:28
Consider a.sb.add(123)
The optimization you mentio
ngeoffray
2013/02/28 10:39:42
inputs[0] can either be a call to getInterceptor o
|
| + } |
| + |
| int typeCode() => HInstruction.INVOKE_DYNAMIC_TYPECODE; |
| bool typeEquals(other) => other is HInvokeDynamic; |
| bool dataEquals(HInvokeDynamic other) { |