]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/ClassInfo.h
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / runtime / ClassInfo.h
index f7cabe5e319bbb133ddfb79ef6ab8a507274f651..cb5058c2dc062b4db5d682a01617b3778c1404ba 100644 (file)
@@ -82,6 +82,12 @@ struct MethodTable {
     typedef void (*GetPropertyNamesFunctionPtr)(JSObject*, ExecState*, PropertyNameArray&, EnumerationMode);
     GetPropertyNamesFunctionPtr getPropertyNames;
 
+    typedef uint32_t (*GetEnumerableLengthFunctionPtr)(ExecState*, JSObject*);
+    GetEnumerableLengthFunctionPtr getEnumerableLength;
+
+    GetPropertyNamesFunctionPtr getStructurePropertyNames;
+    GetPropertyNamesFunctionPtr getGenericPropertyNames;
+
     typedef String (*ClassNameFunctionPtr)(const JSObject*);
     ClassNameFunctionPtr className;
 
@@ -137,6 +143,9 @@ struct MethodTable {
         &ClassName::getOwnPropertyNames, \
         &ClassName::getOwnNonIndexPropertyNames, \
         &ClassName::getPropertyNames, \
+        &ClassName::getEnumerableLength, \
+        &ClassName::getStructurePropertyNames, \
+        &ClassName::getGenericPropertyNames, \
         &ClassName::className, \
         &ClassName::customHasInstance, \
         &ClassName::defineOwnProperty, \
@@ -154,25 +163,6 @@ struct ClassInfo {
     // nullptrif there is none.
     const ClassInfo* parentClass;
 
-    // Static hash-table of properties.
-    // For classes that can be used from multiple threads, it is accessed via a getter function
-    // that would typically return a pointer to a thread-specific value.
-    const HashTable* propHashTable(ExecState* exec) const
-    {
-        if (classPropHashTableGetterFunction)
-            return &classPropHashTableGetterFunction(exec->vm());
-
-        return staticPropHashTable;
-    }
-
-    const HashTable* propHashTable(VM& vm) const
-    {
-        if (classPropHashTableGetterFunction)
-            return &classPropHashTableGetterFunction(vm);
-
-        return staticPropHashTable;
-    }
-
     bool isSubClassOf(const ClassInfo* other) const
     {
         for (const ClassInfo* ci = this; ci; ci = ci->parentClass) {
@@ -185,17 +175,15 @@ struct ClassInfo {
     bool hasStaticProperties() const
     {
         for (const ClassInfo* ci = this; ci; ci = ci->parentClass) {
-            if (ci->staticPropHashTable || ci->classPropHashTableGetterFunction)
+            if (ci->staticPropHashTable)
                 return true;
         }
         return false;
     }
 
-    bool hasStaticSetterOrReadonlyProperties(VM&) const;
+    bool hasStaticSetterOrReadonlyProperties() const;
 
     const HashTable* staticPropHashTable;
-    typedef const HashTable& (*ClassPropHashTableGetterFunction)(VM&);
-    const ClassPropHashTableGetterFunction classPropHashTableGetterFunction;
 
     MethodTable methodTable;