| Index: src/ic.h
|
| ===================================================================
|
| --- src/ic.h (revision 7676)
|
| +++ src/ic.h (working copy)
|
| @@ -53,6 +53,7 @@
|
| ICU(LoadPropertyWithInterceptorForCall) \
|
| ICU(KeyedLoadPropertyWithInterceptor) \
|
| ICU(StoreInterceptorProperty) \
|
| + ICU(TypeRecordingUnaryOp_Patch) \
|
| ICU(TypeRecordingBinaryOp_Patch) \
|
| ICU(CompareIC_Miss)
|
| //
|
| @@ -529,6 +530,32 @@
|
| };
|
|
|
|
|
| +class TRUnaryOpIC: public IC {
|
| + public:
|
| +
|
| + // sorted: increasingly more unspecific (ignoring UNINITIALIZED)
|
| + // TODO(svenpanne) Using enums+switch is an antipattern, use a class instead.
|
| + enum TypeInfo {
|
| + UNINITIALIZED,
|
| + SMI,
|
| + HEAP_NUMBER,
|
| + GENERIC
|
| + };
|
| +
|
| + explicit TRUnaryOpIC(Isolate* isolate) : IC(NO_EXTRA_FRAME, isolate) { }
|
| +
|
| + void patch(Code* code);
|
| +
|
| + static const char* GetName(TypeInfo type_info);
|
| +
|
| + static State ToState(TypeInfo type_info);
|
| +
|
| + static TypeInfo GetTypeInfo(Handle<Object> operand);
|
| +
|
| + static TypeInfo JoinTypes(TypeInfo x, TypeInfo y);
|
| +};
|
| +
|
| +
|
| // Type Recording BinaryOpIC, that records the types of the inputs and outputs.
|
| class TRBinaryOpIC: public IC {
|
| public:
|
|
|