diff options
Diffstat (limited to 'deps/v8/src/ic.h')
-rw-r--r-- | deps/v8/src/ic.h | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/deps/v8/src/ic.h b/deps/v8/src/ic.h index bfccd10a6a..8767f988a2 100644 --- a/deps/v8/src/ic.h +++ b/deps/v8/src/ic.h @@ -771,7 +771,8 @@ class BinaryOpIC: public IC { INT32, HEAP_NUMBER, ODDBALL, - STRING, // Only used for addition operation. + BOTH_STRING, // Only used for addition operation. + STRING, // Only used for addition operation. At least one string operand. GENERIC }; @@ -782,6 +783,10 @@ class BinaryOpIC: public IC { static const char* GetName(TypeInfo type_info); static State ToState(TypeInfo type_info); + + static TypeInfo GetTypeInfo(Handle<Object> left, Handle<Object> right); + + static TypeInfo JoinTypes(TypeInfo x, TypeInfo y); }; @@ -789,11 +794,11 @@ class CompareIC: public IC { public: enum State { UNINITIALIZED, - SMI, - HEAP_NUMBER, - SYMBOL, - STRING, - OBJECT, + SMIS, + HEAP_NUMBERS, + SYMBOLS, + STRINGS, + OBJECTS, KNOWN_OBJECTS, GENERIC }; @@ -804,27 +809,27 @@ class CompareIC: public IC { // Update the inline cache for the given operands. void UpdateCaches(Handle<Object> x, Handle<Object> y); - // Factory method for getting an uninitialized compare stub. static Handle<Code> GetUninitialized(Token::Value op); // Helper function for computing the condition for a compare operation. static Condition ComputeCondition(Token::Value op); + // Helper function for determining the state of a compare IC. + static State ComputeState(Code* target); + + // Helper function for determining the operation a compare IC is for. + static Token::Value ComputeOperation(Code* target); + static const char* GetStateName(State state); private: - static bool HasInlinedSmiCode(Address address); - - State TargetState(State old_state, - State old_left, - State old_right, - bool has_inlined_smi_code, - Handle<Object> x, - Handle<Object> y); + State TargetState(State state, bool has_inlined_smi_code, + Handle<Object> x, Handle<Object> y); bool strict() const { return op_ == Token::EQ_STRICT; } Condition GetCondition() const { return ComputeCondition(op_); } + State GetState() { return ComputeState(target()); } static Code* GetRawUninitialized(Token::Value op); |