]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/JSVariableObject.h
JavaScriptCore-7600.1.4.16.1.tar.gz
[apple/javascriptcore.git] / runtime / JSVariableObject.h
index 615aa331f52ba56771807f0b0e4587e78c030267..5f98dca853833cc8bbe138a773cb0eabbec4e4d1 100644 (file)
@@ -10,7 +10,7 @@
  * 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. 
  *
 #include "JSSymbolTableObject.h"
 #include "Register.h"
 #include "SymbolTable.h"
-#include <wtf/OwnArrayPtr.h>
 
 namespace JSC {
 
-    class LLIntOffsetsExtractor;
-    class Register;
+class LLIntOffsetsExtractor;
+class Register;
 
-    class JSVariableObject : public JSSymbolTableObject {
-        friend class JIT;
-        friend class LLIntOffsetsExtractor;
+class JSVariableObject : public JSSymbolTableObject {
+    friend class JIT;
+    friend class LLIntOffsetsExtractor;
 
-    public:
-        typedef JSSymbolTableObject Base;
+public:
+    typedef JSSymbolTableObject Base;
 
-        WriteBarrierBase<Unknown>& registerAt(int index) const { return m_registers[index]; }
+    WriteBarrierBase<Unknown>* registers() { return m_registers; }
+    WriteBarrierBase<Unknown>& registerAt(int index) const { return m_registers[index]; }
 
-        WriteBarrierBase<Unknown>* const * addressOfRegisters() const { return &m_registers; }
-        static size_t offsetOfRegisters() { return OBJECT_OFFSETOF(JSVariableObject, m_registers); }
+    WriteBarrierBase<Unknown>* const * addressOfRegisters() const { return &m_registers; }
+    static size_t offsetOfRegisters() { return OBJECT_OFFSETOF(JSVariableObject, m_registers); }
 
-        static const ClassInfo s_info;
+    DECLARE_INFO;
 
-    protected:
-        static const unsigned StructureFlags = Base::StructureFlags;
+protected:
+    static const unsigned StructureFlags = Base::StructureFlags;
 
-        JSVariableObject(
-            VM& vm,
-            Structure* structure,
-            Register* registers,
-            JSScope* scope,
-            SharedSymbolTable* symbolTable = 0
-        )
-            : Base(vm, structure, scope, symbolTable)
-            , m_registers(reinterpret_cast<WriteBarrierBase<Unknown>*>(registers))
-        {
-        }
+    JSVariableObject(
+        VM& vm,
+        Structure* structure,
+        Register* registers,
+        JSScope* scope,
+        SymbolTable* symbolTable = 0)
+        : Base(vm, structure, scope, symbolTable)
+        , m_registers(reinterpret_cast<WriteBarrierBase<Unknown>*>(registers))
+    {
+    }
 
-        WriteBarrierBase<Unknown>* m_registers; // "r" in the stack.
-    };
+    WriteBarrierBase<Unknown>* m_registers; // "r" in the stack.
+};
 
 } // namespace JSC