Index: src/ic.h |
=================================================================== |
--- src/ic.h (revision 3980) |
+++ src/ic.h (working copy) |
@@ -55,7 +55,8 @@ |
ICU(LoadPropertyWithInterceptorForLoad) \ |
ICU(LoadPropertyWithInterceptorForCall) \ |
ICU(KeyedLoadPropertyWithInterceptor) \ |
- ICU(StoreInterceptorProperty) |
+ ICU(StoreInterceptorProperty) \ |
+ ICU(BinaryOp_Patch) |
// |
// IC is the base class for LoadIC, StoreIC, CallIC, KeyedLoadIC, |
@@ -444,6 +445,30 @@ |
}; |
+class BinaryOpIC: public IC { |
+ public: |
+ |
+ enum TypeInfo { |
+ DEFAULT, // Initial state. When first executed, patches to one |
+ // of the following states depending on the operands types. |
+ HEAP_NUMBERS, // Both arguments are HeapNumbers. |
+ STRINGS, // At least one of the arguments is String. |
+ GENERIC // Non-specialized case (processes any type combination). |
+ }; |
+ |
+ BinaryOpIC() : IC(NO_EXTRA_FRAME) { } |
+ |
+ void patch(Code* code); |
+ |
+ static void Clear(Address address, Code* target); |
+ |
+ static const char* GetName(TypeInfo type_info); |
+ |
+ static State ToState(TypeInfo type_info); |
+ |
+ static TypeInfo GetTypeInfo(Object* left, Object* right); |
+}; |
+ |
} } // namespace v8::internal |
#endif // V8_IC_H_ |