* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * 3. Neither the name of Apple Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
class CodeBlock;
class ExecState;
- class JSActivation;
+ class JSLexicalEnvironment;
class JSObject;
- class JSPropertyNameIterator;
class JSScope;
- struct InlineCallFrame;
- struct Instruction;
-
typedef ExecState CallFrame;
class Register {
Register& operator=(CallFrame*);
Register& operator=(CodeBlock*);
Register& operator=(JSScope*);
- Register& operator=(Instruction*);
- Register& operator=(InlineCallFrame*);
+ Register& operator=(JSObject*);
int32_t i() const;
- JSActivation* activation() const;
+ JSLexicalEnvironment* lexicalEnvironment() const;
CallFrame* callFrame() const;
CodeBlock* codeBlock() const;
- JSObject* function() const;
- JSPropertyNameIterator* propertyNameIterator() const;
+ JSObject* object() const;
JSScope* scope() const;
- Instruction* vPC() const;
- InlineCallFrame* asInlineCallFrame() const;
int32_t unboxedInt32() const;
+ int64_t unboxedInt52() const;
+ int64_t unboxedStrictInt52() const;
bool unboxedBoolean() const;
+ double unboxedDouble() const;
JSCell* unboxedCell() const;
int32_t payload() const;
int32_t tag() const;
return r;
}
- static Register withCallee(JSObject* callee);
-
private:
union {
EncodedJSValue value;
CallFrame* callFrame;
CodeBlock* codeBlock;
- Instruction* vPC;
- InlineCallFrame* inlineCallFrame;
EncodedValueDescriptor encodedValue;
+ double number;
+ int64_t integer;
} u;
};
return *this;
}
- ALWAYS_INLINE Register& Register::operator=(Instruction* vPC)
- {
- u.vPC = vPC;
- return *this;
- }
-
- ALWAYS_INLINE Register& Register::operator=(InlineCallFrame* inlineCallFrame)
- {
- u.inlineCallFrame = inlineCallFrame;
- return *this;
- }
-
ALWAYS_INLINE int32_t Register::i() const
{
return jsValue().asInt32();
return u.codeBlock;
}
- ALWAYS_INLINE Instruction* Register::vPC() const
+ ALWAYS_INLINE int32_t Register::unboxedInt32() const
{
- return u.vPC;
+ return payload();
}
- ALWAYS_INLINE InlineCallFrame* Register::asInlineCallFrame() const
+ ALWAYS_INLINE int64_t Register::unboxedInt52() const
{
- return u.inlineCallFrame;
+ return u.integer >> JSValue::int52ShiftAmount;
}
-
- ALWAYS_INLINE int32_t Register::unboxedInt32() const
+
+ ALWAYS_INLINE int64_t Register::unboxedStrictInt52() const
{
- return payload();
+ return u.integer;
}
ALWAYS_INLINE bool Register::unboxedBoolean() const
return !!payload();
}
+ ALWAYS_INLINE double Register::unboxedDouble() const
+ {
+ return u.number;
+ }
+
ALWAYS_INLINE JSCell* Register::unboxedCell() const
{
#if USE(JSVALUE64)