summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/runtime/JSVariableObject.h
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-05 14:34:32 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-05 14:34:32 -0800
commit635860845790a19bf50bbc51ba8fb66a96dde068 (patch)
treeef6ad9ff73a5b57f65249d4232a202fa77e6a140 /JavaScriptCore/runtime/JSVariableObject.h
parent8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2 (diff)
downloadexternal_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.zip
external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.gz
external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.bz2
auto import from //depot/cupcake/@136594
Diffstat (limited to 'JavaScriptCore/runtime/JSVariableObject.h')
-rw-r--r--JavaScriptCore/runtime/JSVariableObject.h32
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));