X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=Source%2FJavaScriptCore%2Finterpreter%2FRegister.h;h=deaa68d05447b82f21b0c1547f230f23ea4cf2a9;hb=b96e33af77ac7d81a666d5aa202235b793aeeb21;hp=adad1d77ea8f34e6c1faf6608d1caed73ac4505e;hpb=2632619e54bc9f41ccea7c574710fe213e49212d;p=framework%2Fweb%2Fwebkit-efl.git diff --git a/Source/JavaScriptCore/interpreter/Register.h b/Source/JavaScriptCore/interpreter/Register.h index adad1d7..deaa68d 100755 --- a/Source/JavaScriptCore/interpreter/Register.h +++ b/Source/JavaScriptCore/interpreter/Register.h @@ -71,7 +71,10 @@ namespace JSC { JSPropertyNameIterator* propertyNameIterator() const; ScopeChainNode* scopeChain() const; Instruction* vPC() const; - InlineCallFrame* inlineCallFrame() const; + InlineCallFrame* asInlineCallFrame() const; + int32_t unboxedInt32() const; + bool unboxedBoolean() const; + JSCell* unboxedCell() const; static Register withInt(int32_t i) { @@ -88,6 +91,7 @@ namespace JSC { CodeBlock* codeBlock; Instruction* vPC; InlineCallFrame* inlineCallFrame; + EncodedValueDescriptor encodedValue; } u; }; @@ -165,10 +169,29 @@ namespace JSC { return u.vPC; } - ALWAYS_INLINE InlineCallFrame* Register::inlineCallFrame() const + ALWAYS_INLINE InlineCallFrame* Register::asInlineCallFrame() const { return u.inlineCallFrame; } + + ALWAYS_INLINE int32_t Register::unboxedInt32() const + { + return u.encodedValue.asBits.payload; + } + + ALWAYS_INLINE bool Register::unboxedBoolean() const + { + return !!u.encodedValue.asBits.payload; + } + + ALWAYS_INLINE JSCell* Register::unboxedCell() const + { +#if USE(JSVALUE64) + return u.encodedValue.ptr; +#else + return bitwise_cast(u.encodedValue.asBits.payload); +#endif + } } // namespace JSC