summaryrefslogtreecommitdiff
path: root/deps/v8/src/ic.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/ic.h')
-rw-r--r--deps/v8/src/ic.h31
1 files changed, 28 insertions, 3 deletions
diff --git a/deps/v8/src/ic.h b/deps/v8/src/ic.h
index d545989bf6..7464a57c6b 100644
--- a/deps/v8/src/ic.h
+++ b/deps/v8/src/ic.h
@@ -55,7 +55,8 @@ enum DictionaryCheck { CHECK_DICTIONARY, DICTIONARY_CHECK_DONE };
ICU(LoadPropertyWithInterceptorForLoad) \
ICU(LoadPropertyWithInterceptorForCall) \
ICU(KeyedLoadPropertyWithInterceptor) \
- ICU(StoreInterceptorProperty)
+ ICU(StoreInterceptorProperty) \
+ ICU(BinaryOp_Patch)
//
// IC is the base class for LoadIC, StoreIC, CallIC, KeyedLoadIC,
@@ -93,8 +94,8 @@ class IC {
Code* target() { return GetTargetAtAddress(address()); }
inline Address address();
- // Compute the current IC state based on the target stub and the receiver.
- static State StateFrom(Code* target, Object* receiver);
+ // Compute the current IC state based on the target stub, receiver and name.
+ static State StateFrom(Code* target, Object* receiver, Object* name);
// Clear the inline cache to initial state.
static void Clear(Address address);
@@ -444,6 +445,30 @@ class KeyedStoreIC: public IC {
};
+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_