X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/2d39b0e377c0896910ee49ae70082ba665faf986..refs/heads/master:/runtime/ClassInfo.h diff --git a/runtime/ClassInfo.h b/runtime/ClassInfo.h index f7cabe5..cb5058c 100644 --- a/runtime/ClassInfo.h +++ b/runtime/ClassInfo.h @@ -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;