Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/ssa/nodes.dart |
| =================================================================== |
| --- sdk/lib/_internal/compiler/implementation/ssa/nodes.dart (revision 15192) |
| +++ sdk/lib/_internal/compiler/implementation/ssa/nodes.dart (working copy) |
| @@ -32,6 +32,7 @@ |
| R visitIndex(HIndex node); |
| R visitIndexAssign(HIndexAssign node); |
| R visitIntegerCheck(HIntegerCheck node); |
| + R visitInterceptor(HInterceptor node); |
| R visitInvokeClosure(HInvokeClosure node); |
| R visitInvokeDynamicGetter(HInvokeDynamicGetter node); |
| R visitInvokeDynamicMethod(HInvokeDynamicMethod node); |
| @@ -291,6 +292,7 @@ |
| visitIndex(HIndex node) => visitInvokeStatic(node); |
| visitIndexAssign(HIndexAssign node) => visitInvokeStatic(node); |
| visitIntegerCheck(HIntegerCheck node) => visitCheck(node); |
| + visitInterceptor(HInterceptor node) => visitInstruction(node); |
| visitInvokeClosure(HInvokeClosure node) |
| => visitInvokeDynamic(node); |
| visitInvokeDynamicMethod(HInvokeDynamicMethod node) |
| @@ -781,7 +783,7 @@ |
| static const int TYPE_GUARD_TYPECODE = 1; |
| static const int BOUNDS_CHECK_TYPECODE = 2; |
| static const int INTEGER_CHECK_TYPECODE = 3; |
| - static const int INVOKE_INTERCEPTOR_TYPECODE = 4; |
| + static const int INTERCEPTOR_TYPECODE = 4; |
| static const int ADD_TYPECODE = 5; |
| static const int DIVIDE_TYPECODE = 6; |
| static const int MODULO_TYPECODE = 7; |
| @@ -1391,7 +1393,6 @@ |
| } |
| class HInvokeStatic extends HInvoke { |
| - bool isSideEffectFree = false; |
| /** The first input must be the target. */ |
| HInvokeStatic(inputs, [HType knownType = HType.UNKNOWN]) : super(inputs) { |
| guaranteedType = knownType; |
| @@ -1416,13 +1417,6 @@ |
| Compiler compiler) { |
| return HType.UNKNOWN; |
| } |
| - |
| - void prepareGvn(HTypeMap types) { |
|
ahe
2012/11/22 13:26:11
What is this change for?
ngeoffray
2012/11/22 13:37:59
This code was temporary, to make sure we did not r
|
| - clearAllSideEffects(); |
| - if (!isSideEffectFree) { |
| - setAllSideEffects(); |
| - } |
| - } |
| } |
| class HInvokeSuper extends HInvokeStatic { |
| @@ -2401,6 +2395,21 @@ |
| bool isCodeMotionInvariant() => !element.isAssignable(); |
| } |
| +class HInterceptor extends HInstruction { |
| + final Set<ClassElement> interceptedClasses; |
| + HInterceptor(this.interceptedClasses, HInstruction receiver) |
| + : super(<HInstruction>[receiver]); |
| + String toString() => 'interceptor on $interceptedClasses'; |
|
ahe
2012/11/22 13:26:11
What is the method name?
ngeoffray
2012/11/22 13:37:59
An interceptor is not necessary on one method call
|
| + accept(HVisitor visitor) => visitor.visitInterceptor(this); |
| + HInstruction get receiver => inputs[0]; |
| + |
| + void prepareGvn(HTypeMap types) { |
| + clearAllSideEffects(); |
| + } |
| + |
| + int typeCode() => HInstruction.INTERCEPTOR_TYPECODE; |
| +} |
| + |
| /** An [HLazyStatic] is a static that is initialized lazily at first read. */ |
| class HLazyStatic extends HStatic { |
| HLazyStatic(Element element) : super(element); |