diff options
Diffstat (limited to 'JavaScriptCore/runtime/JSVariableObject.h')
-rw-r--r-- | JavaScriptCore/runtime/JSVariableObject.h | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/JavaScriptCore/runtime/JSVariableObject.h b/JavaScriptCore/runtime/JSVariableObject.h index 1194517..9bf5c4f 100644 --- a/JavaScriptCore/runtime/JSVariableObject.h +++ b/JavaScriptCore/runtime/JSVariableObject.h @@ -41,10 +41,12 @@ namespace JSC { class Register; class JSVariableObject : public JSObject { + friend class JIT; + public: SymbolTable& symbolTable() const { return *d->symbolTable; } - virtual void putWithAttributes(ExecState*, const Identifier&, JSValue*, unsigned attributes) = 0; + virtual void putWithAttributes(ExecState*, const Identifier&, JSValuePtr, unsigned attributes) = 0; virtual bool deleteProperty(ExecState*, const Identifier&); virtual void getPropertyNames(ExecState*, PropertyNameArray&); @@ -72,18 +74,13 @@ namespace JSC { Register* registers; // "r" in the register file. OwnArrayPtr<Register> registerArray; // Independent copy of registers, used when a variable object copies its registers out of the register file. - static inline ptrdiff_t offsetOf_registers() - { - return OBJECT_OFFSET(JSVariableObjectData, registers); - } - private: JSVariableObjectData(const JSVariableObjectData&); JSVariableObjectData& operator=(const JSVariableObjectData&); }; - JSVariableObject(PassRefPtr<StructureID> structureID, JSVariableObjectData* data) - : JSObject(structureID) + JSVariableObject(PassRefPtr<Structure> structure, JSVariableObjectData* data) + : JSObject(structure) , d(data) // Subclass owns this pointer. { } @@ -93,21 +90,10 @@ namespace JSC { bool symbolTableGet(const Identifier&, PropertySlot&); bool symbolTableGet(const Identifier&, PropertySlot&, bool& slotIsWriteable); - bool symbolTablePut(const Identifier&, JSValue*); - bool symbolTablePutWithAttributes(const Identifier&, JSValue*, unsigned attributes); + bool symbolTablePut(const Identifier&, JSValuePtr); + bool symbolTablePutWithAttributes(const Identifier&, JSValuePtr, unsigned attributes); JSVariableObjectData* d; - - public: - static inline ptrdiff_t offsetOf_d() - { - return OBJECT_OFFSET(JSVariableObject, d); - } - - static inline ptrdiff_t offsetOf_Data_registers() - { - return JSVariableObjectData::offsetOf_registers(); - } }; inline bool JSVariableObject::symbolTableGet(const Identifier& propertyName, PropertySlot& slot) @@ -131,7 +117,7 @@ namespace JSC { return false; } - inline bool JSVariableObject::symbolTablePut(const Identifier& propertyName, JSValue* value) + inline bool JSVariableObject::symbolTablePut(const Identifier& propertyName, JSValuePtr value) { ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this)); @@ -144,7 +130,7 @@ namespace JSC { return true; } - inline bool JSVariableObject::symbolTablePutWithAttributes(const Identifier& propertyName, JSValue* value, unsigned attributes) + inline bool JSVariableObject::symbolTablePutWithAttributes(const Identifier& propertyName, JSValuePtr value, unsigned attributes) { ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this)); |