| Index: src/ic.h
|
| ===================================================================
|
| --- src/ic.h (revision 3964)
|
| +++ 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,
|
| @@ -93,8 +94,8 @@
|
| 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 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_
|
|
|