Changeset 201448 in webkit


Ignore:
Timestamp:
May 27, 2016, 12:09:35 AM (9 years ago)
Author:
barraclough@apple.com
Message:

Static table property lookup should not require getOwnPropertySlot override.
https://bugs.webkit.org/show_bug.cgi?id=158059

Reviewed by Darin Adler.

Currently JSObject does not handle property lookup of entries in the static
table. Each subclass with static properties mut override getOwnPropertySlot,
and explicitly call the lookup functions. This has the following drawbacks:

  • Performance: for any class with static properties, property acces becomes virtual (via method table).
  • Poor encapsulation: implementation detail of static property access is spread throughout & cross projects, rather than being contained in JSObject.
  • Code size: this results in a great many additional functions.
  • Inconsistency: static table presence has to be be taken into account in many other operations, e.g. presence of read-only properties for put.
  • Memory: in order to avoid the virtual lookup, DOM prototypes eagerly reify all properties. This is likely suboptimal.

Instead, JSObject::getPropertySlot / JSObject::getOwnPropertySlot should be
able to handle static properties.

This is actually a fairly small & simple change.

The common pattern is for subclasses of JObject to override getOwnPropertySlot
to first defer to JSObject for property storage lookup, and only if this fails
consult the static table. They just want the static tables to be consulted after
regular property storgae lookup. So just add a fast flag in TypeInfo for JSObject
to check, and where it is set, do so. Then it's just a question of switching
classes over to start setting this flag, and drop the override.

The new mechanism does change static table lookup order from oldest-ancestor
first to most-derived first. The new ordering makes more sense (means derived
class static tables can now override entries from parents), and shoudn't affect
any existing code (since overriding didn't previously work, there likely aren't
shadowing properties in more derived types).

This patch changes all classes in JavaScriptCore over to using the new mechanism,
except JSGlobalObject. I'll move classes in WebCore over as a separate patch
(this is also why I've not moved JSGlobalObject in this patch - doing so would
move JSDOMWindow, and I'd rather handle that separately).

  • runtime/JSTypeInfo.h:

(JSC::TypeInfo::hasStaticPropertyTable):

  • Add HasStaticPropertyTable flag.
  • runtime/Lookup.cpp:

(JSC::setUpStaticFunctionSlot):

  • Change setUpStaticFunctionSlot to take a VM&.
  • runtime/Lookup.h:

(JSC::getStaticPropertySlotFromTable):

  • Added helper function to perform static lookup alone.

(JSC::getStaticPropertySlot):
(JSC::getStaticFunctionSlot):

  • setUpStaticFunctionSlot changed to take a VM&.
  • runtime/JSObject.cpp:

(JSC::JSObject::getOwnStaticPropertySlot):

  • Added, walks ClassInfo chain looking for static properties.
  • runtime/JSObject.h:

(JSC::JSObject::getOwnNonIndexPropertySlot):

  • getOwnNonIndexPropertySlot is used internally by getPropertySlot & getOwnPropertySlot. If property is not present in storage array then check the static table.
  • runtime/ArrayConstructor.cpp:

(JSC::ArrayConstructor::finishCreation):
(JSC::constructArrayWithSizeQuirk):
(JSC::ArrayConstructor::getOwnPropertySlot): Deleted.

  • runtime/ArrayConstructor.h:

(JSC::ArrayConstructor::create):

  • runtime/ArrayIteratorPrototype.cpp:

(JSC::ArrayIteratorPrototype::finishCreation):
(JSC::ArrayIteratorPrototype::getOwnPropertySlot): Deleted.

  • runtime/ArrayIteratorPrototype.h:

(JSC::ArrayIteratorPrototype::create):
(JSC::ArrayIteratorPrototype::ArrayIteratorPrototype):

  • runtime/BooleanPrototype.cpp:

(JSC::BooleanPrototype::finishCreation):
(JSC::booleanProtoFuncToString):
(JSC::BooleanPrototype::getOwnPropertySlot): Deleted.

  • runtime/BooleanPrototype.h:

(JSC::BooleanPrototype::create):

  • runtime/DateConstructor.cpp:

(JSC::DateConstructor::finishCreation):
(JSC::millisecondsFromComponents):
(JSC::DateConstructor::getOwnPropertySlot): Deleted.

  • runtime/DateConstructor.h:

(JSC::DateConstructor::create):

  • runtime/DatePrototype.cpp:

(JSC::DatePrototype::finishCreation):
(JSC::dateProtoFuncToString):
(JSC::DatePrototype::getOwnPropertySlot): Deleted.

  • runtime/DatePrototype.h:

(JSC::DatePrototype::create):

  • runtime/ErrorPrototype.cpp:

(JSC::ErrorPrototype::finishCreation):
(JSC::ErrorPrototype::getOwnPropertySlot): Deleted.

  • runtime/ErrorPrototype.h:

(JSC::ErrorPrototype::create):

  • runtime/GeneratorPrototype.cpp:

(JSC::GeneratorPrototype::finishCreation):
(JSC::GeneratorPrototype::getOwnPropertySlot): Deleted.

  • runtime/GeneratorPrototype.h:

(JSC::GeneratorPrototype::create):
(JSC::GeneratorPrototype::createStructure):
(JSC::GeneratorPrototype::GeneratorPrototype):

  • runtime/InspectorInstrumentationObject.cpp:

(JSC::InspectorInstrumentationObject::finishCreation):
(JSC::InspectorInstrumentationObject::isEnabled):
(JSC::InspectorInstrumentationObject::getOwnPropertySlot): Deleted.

  • runtime/InspectorInstrumentationObject.h:

(JSC::InspectorInstrumentationObject::create):
(JSC::InspectorInstrumentationObject::createStructure):

  • runtime/IntlCollatorConstructor.cpp:

(JSC::IntlCollatorConstructor::getCallData):
(JSC::IntlCollatorConstructorFuncSupportedLocalesOf):
(JSC::IntlCollatorConstructor::getOwnPropertySlot): Deleted.

  • runtime/IntlCollatorConstructor.h:
  • runtime/IntlCollatorPrototype.cpp:

(JSC::IntlCollatorPrototype::finishCreation):
(JSC::IntlCollatorFuncCompare):
(JSC::IntlCollatorPrototype::getOwnPropertySlot): Deleted.

  • runtime/IntlCollatorPrototype.h:
  • runtime/IntlDateTimeFormatConstructor.cpp:

(JSC::IntlDateTimeFormatConstructor::getCallData):
(JSC::IntlDateTimeFormatConstructorFuncSupportedLocalesOf):
(JSC::IntlDateTimeFormatConstructor::getOwnPropertySlot): Deleted.

  • runtime/IntlDateTimeFormatConstructor.h:
  • runtime/IntlDateTimeFormatPrototype.cpp:

(JSC::IntlDateTimeFormatPrototype::finishCreation):
(JSC::IntlDateTimeFormatFuncFormatDateTime):
(JSC::IntlDateTimeFormatPrototype::getOwnPropertySlot): Deleted.

  • runtime/IntlDateTimeFormatPrototype.h:
  • runtime/IntlNumberFormatConstructor.cpp:

(JSC::IntlNumberFormatConstructor::getCallData):
(JSC::IntlNumberFormatConstructorFuncSupportedLocalesOf):
(JSC::IntlNumberFormatConstructor::getOwnPropertySlot): Deleted.

  • runtime/IntlNumberFormatConstructor.h:
  • runtime/IntlNumberFormatPrototype.cpp:

(JSC::IntlNumberFormatPrototype::finishCreation):
(JSC::IntlNumberFormatFuncFormatNumber):
(JSC::IntlNumberFormatPrototype::getOwnPropertySlot): Deleted.

  • runtime/IntlNumberFormatPrototype.h:
  • runtime/JSDataViewPrototype.cpp:

(JSC::JSDataViewPrototype::createStructure):
(JSC::getData):
(JSC::JSDataViewPrototype::getOwnPropertySlot): Deleted.

  • runtime/JSDataViewPrototype.h:
  • runtime/JSInternalPromiseConstructor.cpp:

(JSC::JSInternalPromiseConstructor::getCallData):
(JSC::JSInternalPromiseConstructor::getOwnPropertySlot): Deleted.

  • runtime/JSInternalPromiseConstructor.h:
  • runtime/JSONObject.cpp:

(JSC::Walker::Walker):
(JSC::JSONObject::getOwnPropertySlot): Deleted.

  • runtime/JSONObject.h:

(JSC::JSONObject::create):

  • runtime/JSPromiseConstructor.cpp:

(JSC::JSPromiseConstructor::getCallData):
(JSC::JSPromiseConstructor::getOwnPropertySlot): Deleted.

  • runtime/JSPromiseConstructor.h:
  • runtime/JSPromisePrototype.cpp:

(JSC::JSPromisePrototype::addOwnInternalSlots):
(JSC::JSPromisePrototype::getOwnPropertySlot): Deleted.

  • runtime/JSPromisePrototype.h:
  • runtime/MapPrototype.cpp:

(JSC::MapPrototype::finishCreation):
(JSC::getMap):
(JSC::MapPrototype::getOwnPropertySlot): Deleted.

  • runtime/MapPrototype.h:

(JSC::MapPrototype::create):
(JSC::MapPrototype::MapPrototype):

  • runtime/ModuleLoaderObject.cpp:

(JSC::ModuleLoaderObject::finishCreation):
(JSC::printableModuleKey):
(JSC::ModuleLoaderObject::getOwnPropertySlot): Deleted.

  • runtime/ModuleLoaderObject.h:
  • runtime/NumberPrototype.cpp:

(JSC::NumberPrototype::finishCreation):
(JSC::toThisNumber):
(JSC::NumberPrototype::getOwnPropertySlot): Deleted.

  • runtime/NumberPrototype.h:

(JSC::NumberPrototype::create):

  • runtime/ObjectConstructor.cpp:

(JSC::ObjectConstructor::addDefineProperty):
(JSC::constructObject):
(JSC::ObjectConstructor::getOwnPropertySlot): Deleted.

  • runtime/ObjectConstructor.h:

(JSC::ObjectConstructor::create):
(JSC::ObjectConstructor::createStructure):

  • runtime/ReflectObject.cpp:

(JSC::ReflectObject::finishCreation):
(JSC::ReflectObject::getOwnPropertySlot): Deleted.

  • runtime/ReflectObject.h:

(JSC::ReflectObject::create):
(JSC::ReflectObject::createStructure):

  • runtime/RegExpConstructor.cpp:

(JSC::RegExpConstructor::getRightContext):
(JSC::regExpConstructorDollar):
(JSC::RegExpConstructor::getOwnPropertySlot): Deleted.

  • runtime/RegExpConstructor.h:

(JSC::RegExpConstructor::create):
(JSC::RegExpConstructor::createStructure):

  • runtime/SetPrototype.cpp:

(JSC::SetPrototype::finishCreation):
(JSC::getSet):
(JSC::SetPrototype::getOwnPropertySlot): Deleted.

  • runtime/SetPrototype.h:

(JSC::SetPrototype::create):
(JSC::SetPrototype::SetPrototype):

  • runtime/StringConstructor.cpp:

(JSC::StringConstructor::finishCreation):
(JSC::stringFromCharCodeSlowCase):
(JSC::StringConstructor::getOwnPropertySlot): Deleted.

  • runtime/StringConstructor.h:

(JSC::StringConstructor::create):

  • runtime/StringIteratorPrototype.cpp:

(JSC::StringIteratorPrototype::finishCreation):
(JSC::StringIteratorPrototype::getOwnPropertySlot): Deleted.

  • runtime/StringIteratorPrototype.h:

(JSC::StringIteratorPrototype::create):
(JSC::StringIteratorPrototype::StringIteratorPrototype):

  • runtime/StringPrototype.cpp:

(JSC::StringPrototype::create):
(JSC::substituteBackreferencesSlow):
(JSC::StringPrototype::getOwnPropertySlot): Deleted.

  • runtime/StringPrototype.h:
  • runtime/SymbolConstructor.cpp:

(JSC::SymbolConstructor::finishCreation):
(JSC::callSymbol):
(JSC::SymbolConstructor::getOwnPropertySlot): Deleted.

  • runtime/SymbolConstructor.h:

(JSC::SymbolConstructor::create):

  • runtime/SymbolPrototype.cpp:

(JSC::SymbolPrototype::finishCreation):
(JSC::SymbolPrototype::getOwnPropertySlot): Deleted.

  • runtime/SymbolPrototype.h:

(JSC::SymbolPrototype::create):

  • remove getOwnPropertySlot, replace OverridesGetOwnPropertySlot flag with HasStaticPropertyTable.
Location:
trunk/Source/JavaScriptCore
Files:
68 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r201445 r201448  
     12016-05-26  Gavin & Ellie Barraclough  <barraclough@apple.com>
     2
     3        Static table property lookup should not require getOwnPropertySlot override.
     4        https://bugs.webkit.org/show_bug.cgi?id=158059
     5
     6        Reviewed by Darin Adler.
     7
     8        Currently JSObject does not handle property lookup of entries in the static
     9        table. Each subclass with static properties mut override getOwnPropertySlot,
     10        and explicitly call the lookup functions. This has the following drawbacks:
     11
     12        - Performance: for any class with static properties, property acces becomes
     13          virtual (via method table).
     14        - Poor encapsulation: implementation detail of static property access is
     15          spread throughout & cross projects, rather than being contained in JSObject.
     16        - Code size: this results in a great many additional functions.
     17        - Inconsistency: static table presence has to be be taken into account in many
     18          other operations, e.g. presence of read-only properties for put.
     19        - Memory: in order to avoid the virtual lookup, DOM prototypes eagerly reify
     20          all properties. This is likely suboptimal.
     21
     22        Instead, JSObject::getPropertySlot / JSObject::getOwnPropertySlot should be
     23        able to handle static properties.
     24
     25        This is actually a fairly small & simple change.
     26
     27        The common pattern is for subclasses of JObject to override getOwnPropertySlot
     28        to first defer to JSObject for property storage lookup, and only if this fails
     29        consult the static table. They just want the static tables to be consulted after
     30        regular property storgae lookup. So just add a fast flag in TypeInfo for JSObject
     31        to check, and where it is set, do so. Then it's just a question of switching
     32        classes over to start setting this flag, and drop the override.
     33
     34        The new mechanism does change static table lookup order from oldest-ancestor
     35        first to most-derived first. The new ordering makes more sense (means derived
     36        class static tables can now override entries from parents), and shoudn't affect
     37        any existing code (since overriding didn't previously work, there likely aren't
     38        shadowing properties in more derived types).
     39
     40        This patch changes all classes in JavaScriptCore over to using the new mechanism,
     41        except JSGlobalObject. I'll move classes in WebCore over as a separate patch
     42        (this is also why I've not moved JSGlobalObject in this patch - doing so would
     43        move JSDOMWindow, and I'd rather handle that separately).
     44
     45        * runtime/JSTypeInfo.h:
     46        (JSC::TypeInfo::hasStaticPropertyTable):
     47            - Add HasStaticPropertyTable flag.
     48        * runtime/Lookup.cpp:
     49        (JSC::setUpStaticFunctionSlot):
     50            - Change setUpStaticFunctionSlot to take a VM&.
     51        * runtime/Lookup.h:
     52        (JSC::getStaticPropertySlotFromTable):
     53            - Added helper function to perform static lookup alone.
     54        (JSC::getStaticPropertySlot):
     55        (JSC::getStaticFunctionSlot):
     56            - setUpStaticFunctionSlot changed to take a VM&.
     57        * runtime/JSObject.cpp:
     58        (JSC::JSObject::getOwnStaticPropertySlot):
     59            - Added, walks ClassInfo chain looking for static properties.
     60        * runtime/JSObject.h:
     61        (JSC::JSObject::getOwnNonIndexPropertySlot):
     62            - getOwnNonIndexPropertySlot is used internally by getPropertySlot
     63              & getOwnPropertySlot. If property is not present in storage array
     64              then check the static table.
     65        * runtime/ArrayConstructor.cpp:
     66        (JSC::ArrayConstructor::finishCreation):
     67        (JSC::constructArrayWithSizeQuirk):
     68        (JSC::ArrayConstructor::getOwnPropertySlot): Deleted.
     69        * runtime/ArrayConstructor.h:
     70        (JSC::ArrayConstructor::create):
     71        * runtime/ArrayIteratorPrototype.cpp:
     72        (JSC::ArrayIteratorPrototype::finishCreation):
     73        (JSC::ArrayIteratorPrototype::getOwnPropertySlot): Deleted.
     74        * runtime/ArrayIteratorPrototype.h:
     75        (JSC::ArrayIteratorPrototype::create):
     76        (JSC::ArrayIteratorPrototype::ArrayIteratorPrototype):
     77        * runtime/BooleanPrototype.cpp:
     78        (JSC::BooleanPrototype::finishCreation):
     79        (JSC::booleanProtoFuncToString):
     80        (JSC::BooleanPrototype::getOwnPropertySlot): Deleted.
     81        * runtime/BooleanPrototype.h:
     82        (JSC::BooleanPrototype::create):
     83        * runtime/DateConstructor.cpp:
     84        (JSC::DateConstructor::finishCreation):
     85        (JSC::millisecondsFromComponents):
     86        (JSC::DateConstructor::getOwnPropertySlot): Deleted.
     87        * runtime/DateConstructor.h:
     88        (JSC::DateConstructor::create):
     89        * runtime/DatePrototype.cpp:
     90        (JSC::DatePrototype::finishCreation):
     91        (JSC::dateProtoFuncToString):
     92        (JSC::DatePrototype::getOwnPropertySlot): Deleted.
     93        * runtime/DatePrototype.h:
     94        (JSC::DatePrototype::create):
     95        * runtime/ErrorPrototype.cpp:
     96        (JSC::ErrorPrototype::finishCreation):
     97        (JSC::ErrorPrototype::getOwnPropertySlot): Deleted.
     98        * runtime/ErrorPrototype.h:
     99        (JSC::ErrorPrototype::create):
     100        * runtime/GeneratorPrototype.cpp:
     101        (JSC::GeneratorPrototype::finishCreation):
     102        (JSC::GeneratorPrototype::getOwnPropertySlot): Deleted.
     103        * runtime/GeneratorPrototype.h:
     104        (JSC::GeneratorPrototype::create):
     105        (JSC::GeneratorPrototype::createStructure):
     106        (JSC::GeneratorPrototype::GeneratorPrototype):
     107        * runtime/InspectorInstrumentationObject.cpp:
     108        (JSC::InspectorInstrumentationObject::finishCreation):
     109        (JSC::InspectorInstrumentationObject::isEnabled):
     110        (JSC::InspectorInstrumentationObject::getOwnPropertySlot): Deleted.
     111        * runtime/InspectorInstrumentationObject.h:
     112        (JSC::InspectorInstrumentationObject::create):
     113        (JSC::InspectorInstrumentationObject::createStructure):
     114        * runtime/IntlCollatorConstructor.cpp:
     115        (JSC::IntlCollatorConstructor::getCallData):
     116        (JSC::IntlCollatorConstructorFuncSupportedLocalesOf):
     117        (JSC::IntlCollatorConstructor::getOwnPropertySlot): Deleted.
     118        * runtime/IntlCollatorConstructor.h:
     119        * runtime/IntlCollatorPrototype.cpp:
     120        (JSC::IntlCollatorPrototype::finishCreation):
     121        (JSC::IntlCollatorFuncCompare):
     122        (JSC::IntlCollatorPrototype::getOwnPropertySlot): Deleted.
     123        * runtime/IntlCollatorPrototype.h:
     124        * runtime/IntlDateTimeFormatConstructor.cpp:
     125        (JSC::IntlDateTimeFormatConstructor::getCallData):
     126        (JSC::IntlDateTimeFormatConstructorFuncSupportedLocalesOf):
     127        (JSC::IntlDateTimeFormatConstructor::getOwnPropertySlot): Deleted.
     128        * runtime/IntlDateTimeFormatConstructor.h:
     129        * runtime/IntlDateTimeFormatPrototype.cpp:
     130        (JSC::IntlDateTimeFormatPrototype::finishCreation):
     131        (JSC::IntlDateTimeFormatFuncFormatDateTime):
     132        (JSC::IntlDateTimeFormatPrototype::getOwnPropertySlot): Deleted.
     133        * runtime/IntlDateTimeFormatPrototype.h:
     134        * runtime/IntlNumberFormatConstructor.cpp:
     135        (JSC::IntlNumberFormatConstructor::getCallData):
     136        (JSC::IntlNumberFormatConstructorFuncSupportedLocalesOf):
     137        (JSC::IntlNumberFormatConstructor::getOwnPropertySlot): Deleted.
     138        * runtime/IntlNumberFormatConstructor.h:
     139        * runtime/IntlNumberFormatPrototype.cpp:
     140        (JSC::IntlNumberFormatPrototype::finishCreation):
     141        (JSC::IntlNumberFormatFuncFormatNumber):
     142        (JSC::IntlNumberFormatPrototype::getOwnPropertySlot): Deleted.
     143        * runtime/IntlNumberFormatPrototype.h:
     144        * runtime/JSDataViewPrototype.cpp:
     145        (JSC::JSDataViewPrototype::createStructure):
     146        (JSC::getData):
     147        (JSC::JSDataViewPrototype::getOwnPropertySlot): Deleted.
     148        * runtime/JSDataViewPrototype.h:
     149        * runtime/JSInternalPromiseConstructor.cpp:
     150        (JSC::JSInternalPromiseConstructor::getCallData):
     151        (JSC::JSInternalPromiseConstructor::getOwnPropertySlot): Deleted.
     152        * runtime/JSInternalPromiseConstructor.h:
     153        * runtime/JSONObject.cpp:
     154        (JSC::Walker::Walker):
     155        (JSC::JSONObject::getOwnPropertySlot): Deleted.
     156        * runtime/JSONObject.h:
     157        (JSC::JSONObject::create):
     158        * runtime/JSPromiseConstructor.cpp:
     159        (JSC::JSPromiseConstructor::getCallData):
     160        (JSC::JSPromiseConstructor::getOwnPropertySlot): Deleted.
     161        * runtime/JSPromiseConstructor.h:
     162        * runtime/JSPromisePrototype.cpp:
     163        (JSC::JSPromisePrototype::addOwnInternalSlots):
     164        (JSC::JSPromisePrototype::getOwnPropertySlot): Deleted.
     165        * runtime/JSPromisePrototype.h:
     166        * runtime/MapPrototype.cpp:
     167        (JSC::MapPrototype::finishCreation):
     168        (JSC::getMap):
     169        (JSC::MapPrototype::getOwnPropertySlot): Deleted.
     170        * runtime/MapPrototype.h:
     171        (JSC::MapPrototype::create):
     172        (JSC::MapPrototype::MapPrototype):
     173        * runtime/ModuleLoaderObject.cpp:
     174        (JSC::ModuleLoaderObject::finishCreation):
     175        (JSC::printableModuleKey):
     176        (JSC::ModuleLoaderObject::getOwnPropertySlot): Deleted.
     177        * runtime/ModuleLoaderObject.h:
     178        * runtime/NumberPrototype.cpp:
     179        (JSC::NumberPrototype::finishCreation):
     180        (JSC::toThisNumber):
     181        (JSC::NumberPrototype::getOwnPropertySlot): Deleted.
     182        * runtime/NumberPrototype.h:
     183        (JSC::NumberPrototype::create):
     184        * runtime/ObjectConstructor.cpp:
     185        (JSC::ObjectConstructor::addDefineProperty):
     186        (JSC::constructObject):
     187        (JSC::ObjectConstructor::getOwnPropertySlot): Deleted.
     188        * runtime/ObjectConstructor.h:
     189        (JSC::ObjectConstructor::create):
     190        (JSC::ObjectConstructor::createStructure):
     191        * runtime/ReflectObject.cpp:
     192        (JSC::ReflectObject::finishCreation):
     193        (JSC::ReflectObject::getOwnPropertySlot): Deleted.
     194        * runtime/ReflectObject.h:
     195        (JSC::ReflectObject::create):
     196        (JSC::ReflectObject::createStructure):
     197        * runtime/RegExpConstructor.cpp:
     198        (JSC::RegExpConstructor::getRightContext):
     199        (JSC::regExpConstructorDollar):
     200        (JSC::RegExpConstructor::getOwnPropertySlot): Deleted.
     201        * runtime/RegExpConstructor.h:
     202        (JSC::RegExpConstructor::create):
     203        (JSC::RegExpConstructor::createStructure):
     204        * runtime/SetPrototype.cpp:
     205        (JSC::SetPrototype::finishCreation):
     206        (JSC::getSet):
     207        (JSC::SetPrototype::getOwnPropertySlot): Deleted.
     208        * runtime/SetPrototype.h:
     209        (JSC::SetPrototype::create):
     210        (JSC::SetPrototype::SetPrototype):
     211        * runtime/StringConstructor.cpp:
     212        (JSC::StringConstructor::finishCreation):
     213        (JSC::stringFromCharCodeSlowCase):
     214        (JSC::StringConstructor::getOwnPropertySlot): Deleted.
     215        * runtime/StringConstructor.h:
     216        (JSC::StringConstructor::create):
     217        * runtime/StringIteratorPrototype.cpp:
     218        (JSC::StringIteratorPrototype::finishCreation):
     219        (JSC::StringIteratorPrototype::getOwnPropertySlot): Deleted.
     220        * runtime/StringIteratorPrototype.h:
     221        (JSC::StringIteratorPrototype::create):
     222        (JSC::StringIteratorPrototype::StringIteratorPrototype):
     223        * runtime/StringPrototype.cpp:
     224        (JSC::StringPrototype::create):
     225        (JSC::substituteBackreferencesSlow):
     226        (JSC::StringPrototype::getOwnPropertySlot): Deleted.
     227        * runtime/StringPrototype.h:
     228        * runtime/SymbolConstructor.cpp:
     229        (JSC::SymbolConstructor::finishCreation):
     230        (JSC::callSymbol):
     231        (JSC::SymbolConstructor::getOwnPropertySlot): Deleted.
     232        * runtime/SymbolConstructor.h:
     233        (JSC::SymbolConstructor::create):
     234        * runtime/SymbolPrototype.cpp:
     235        (JSC::SymbolPrototype::finishCreation):
     236        (JSC::SymbolPrototype::getOwnPropertySlot): Deleted.
     237        * runtime/SymbolPrototype.h:
     238        (JSC::SymbolPrototype::create):
     239            - remove getOwnPropertySlot, replace OverridesGetOwnPropertySlot flag with HasStaticPropertyTable.
     240
    12412016-05-26  Commit Queue  <commit-queue@webkit.org>
    2242
  • trunk/Source/JavaScriptCore/runtime/ArrayConstructor.cpp

    r201049 r201448  
    7272}
    7373
    74 bool ArrayConstructor::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot &slot)
    75 {
    76     return getStaticFunctionSlot<InternalFunction>(exec, arrayConstructorTable, jsCast<ArrayConstructor*>(object), propertyName, slot);
    77 }
    78 
    7974// ------------------------------ Functions ---------------------------
    8075
  • trunk/Source/JavaScriptCore/runtime/ArrayConstructor.h

    r201049 r201448  
    3535public:
    3636    typedef InternalFunction Base;
    37     static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags;
     37    static const unsigned StructureFlags = HasStaticPropertyTable | InternalFunction::StructureFlags;
    3838
    3939    static ArrayConstructor* create(VM& vm, JSGlobalObject* globalObject, Structure* structure, ArrayPrototype* arrayPrototype, GetterSetter* speciesSymbol)
     
    5656private:
    5757    ArrayConstructor(VM&, Structure*);
    58     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    5958
    6059    static ConstructType getConstructData(JSCell*, ConstructData&);
  • trunk/Source/JavaScriptCore/runtime/ArrayIteratorPrototype.cpp

    r200499 r201448  
    5656}
    5757
    58 bool ArrayIteratorPrototype::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
    59 {
    60     return getStaticFunctionSlot<Base>(exec, arrayIteratorPrototypeTable, jsCast<ArrayIteratorPrototype*>(object), propertyName, slot);
    61 }
    62 
    6358// ------------------------------ Array Functions ----------------------------
    6459
  • trunk/Source/JavaScriptCore/runtime/ArrayIteratorPrototype.h

    r182747 r201448  
    3434public:
    3535    typedef JSNonFinalObject Base;
    36     static const unsigned StructureFlags = OverridesGetOwnPropertySlot | Base::StructureFlags;
     36    static const unsigned StructureFlags = HasStaticPropertyTable | Base::StructureFlags;
    3737
    3838    static ArrayIteratorPrototype* create(VM& vm, JSGlobalObject* globalObject, Structure* structure)
     
    5757
    5858    void finishCreation(VM&, JSGlobalObject*);
    59     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    6059};
    6160
  • trunk/Source/JavaScriptCore/runtime/BooleanPrototype.cpp

    r171824 r201448  
    6464}
    6565
    66 bool BooleanPrototype::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot &slot)
    67 {
    68     return getStaticFunctionSlot<BooleanObject>(exec, booleanPrototypeTable, jsCast<BooleanPrototype*>(object), propertyName, slot);
    69 }
    70 
    7166// ------------------------------ Functions ---------------------------
    7267
  • trunk/Source/JavaScriptCore/runtime/BooleanPrototype.h

    r182747 r201448  
    2929public:
    3030    typedef BooleanObject Base;
    31     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
     31    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    3232
    3333    static BooleanPrototype* create(VM& vm, JSGlobalObject* globalObject, Structure* structure)
     
    5050private:
    5151    BooleanPrototype(VM&, Structure*);
    52     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    5352};
    5453
  • trunk/Source/JavaScriptCore/runtime/DateConstructor.cpp

    r197614 r201448  
    106106    putDirectWithoutTransition(vm, vm.propertyNames->prototype, datePrototype, DontEnum | DontDelete | ReadOnly);
    107107    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(7), ReadOnly | DontEnum | DontDelete);
    108 }
    109 
    110 bool DateConstructor::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot &slot)
    111 {
    112     return getStaticFunctionSlot<InternalFunction>(exec, dateConstructorTable, jsCast<DateConstructor*>(object), propertyName, slot);
    113108}
    114109
  • trunk/Source/JavaScriptCore/runtime/DateConstructor.h

    r195460 r201448  
    3232public:
    3333    typedef InternalFunction Base;
    34     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
     34    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    3535
    3636    static DateConstructor* create(VM& vm, Structure* structure, DatePrototype* datePrototype, GetterSetter*)
     
    5555    static ConstructType getConstructData(JSCell*, ConstructData&);
    5656    static CallType getCallData(JSCell*, CallData&);
    57 
    58     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    5957};
    6058
  • trunk/Source/JavaScriptCore/runtime/DatePrototype.cpp

    r197614 r201448  
    505505}
    506506
    507 bool DatePrototype::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
    508 {
    509     return getStaticFunctionSlot<JSObject>(exec, dateTable, jsCast<DatePrototype*>(object), propertyName, slot);
    510 }
    511 
    512507// Functions
    513508
  • trunk/Source/JavaScriptCore/runtime/DatePrototype.h

    r195138 r201448  
    3434public:
    3535    typedef JSNonFinalObject Base;
    36     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
     36    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    3737
    3838    static DatePrototype* create(VM& vm, JSGlobalObject* globalObject, Structure* structure)
     
    4242        return prototype;
    4343    }
    44     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    4544
    4645    DECLARE_INFO;
  • trunk/Source/JavaScriptCore/runtime/ErrorPrototype.cpp

    r198469 r201448  
    6161    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("Error"))), DontEnum);
    6262    putDirect(vm, vm.propertyNames->message, jsEmptyString(&vm), DontEnum);
    63 }
    64 
    65 bool ErrorPrototype::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot &slot)
    66 {
    67     return getStaticFunctionSlot<ErrorInstance>(exec, errorPrototypeTable, jsCast<ErrorPrototype*>(object), propertyName, slot);
    6863}
    6964
  • trunk/Source/JavaScriptCore/runtime/ErrorPrototype.h

    r198469 r201448  
    3131public:
    3232    typedef JSNonFinalObject Base;
    33     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
     33    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    3434
    3535    static ErrorPrototype* create(VM& vm, JSGlobalObject*, Structure* structure)
     
    5050    ErrorPrototype(VM&, Structure*);
    5151    void finishCreation(VM&);
    52 
    53 private:
    54     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    5552};
    5653
  • trunk/Source/JavaScriptCore/runtime/GeneratorPrototype.cpp

    r192937 r201448  
    5555}
    5656
    57 bool GeneratorPrototype::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
    58 {
    59     return getStaticFunctionSlot<Base>(exec, generatorPrototypeTable, jsCast<GeneratorPrototype*>(object), propertyName, slot);
    60 }
    61 
    6257} // namespace JSC
  • trunk/Source/JavaScriptCore/runtime/GeneratorPrototype.h

    r192937 r201448  
    3434public:
    3535    typedef JSNonFinalObject Base;
    36     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
     36    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    3737
    3838    static GeneratorPrototype* create(VM& vm, JSGlobalObject*, Structure* structure)
     
    5050    }
    5151
    52     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    53 
    5452private:
    5553    GeneratorPrototype(VM& vm, Structure* structure)
  • trunk/Source/JavaScriptCore/runtime/InspectorInstrumentationObject.cpp

    r192204 r201448  
    6565}
    6666
    67 bool InspectorInstrumentationObject::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot &slot)
    68 {
    69     return getStaticFunctionSlot<Base>(exec, inspectorInstrumentationObjectTable, jsCast<InspectorInstrumentationObject*>(object), propertyName, slot);
    70 }
    71 
    7267bool InspectorInstrumentationObject::isEnabled(VM& vm) const
    7368{
  • trunk/Source/JavaScriptCore/runtime/InspectorInstrumentationObject.h

    r188497 r201448  
    3737public:
    3838    typedef JSNonFinalObject Base;
    39     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
     39    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    4040
    4141    static InspectorInstrumentationObject* create(VM& vm, JSGlobalObject* globalObject, Structure* structure)
     
    5353    }
    5454
    55     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    56 
    5755    void enable(VM&);
    5856    void disable(VM&);
  • trunk/Source/JavaScriptCore/runtime/IntlCollatorConstructor.cpp

    r200928 r201448  
    136136}
    137137
    138 bool IntlCollatorConstructor::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot& slot)
    139 {
    140     return getStaticFunctionSlot<InternalFunction>(state, collatorConstructorTable, jsCast<IntlCollatorConstructor*>(object), propertyName, slot);
    141 }
    142 
    143138EncodedJSValue JSC_HOST_CALL IntlCollatorConstructorFuncSupportedLocalesOf(ExecState* state)
    144139{
  • trunk/Source/JavaScriptCore/runtime/IntlCollatorConstructor.h

    r191286 r201448  
    3939public:
    4040    typedef InternalFunction Base;
    41     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
     41    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    4242
    4343    static IntlCollatorConstructor* create(VM&, Structure*, IntlCollatorPrototype*, Structure*);
     
    5555    static ConstructType getConstructData(JSCell*, ConstructData&);
    5656    static CallType getCallData(JSCell*, CallData&);
    57     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    5857    static void visitChildren(JSCell*, SlotVisitor&);
    5958   
  • trunk/Source/JavaScriptCore/runtime/IntlCollatorPrototype.cpp

    r199946 r201448  
    8080}
    8181
    82 bool IntlCollatorPrototype::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot& slot)
    83 {
    84     return getStaticFunctionSlot<JSObject>(state, collatorPrototypeTable, jsCast<IntlCollatorPrototype*>(object), propertyName, slot);
    85 }
    86 
    8782static EncodedJSValue JSC_HOST_CALL IntlCollatorFuncCompare(ExecState* state)
    8883{
  • trunk/Source/JavaScriptCore/runtime/IntlCollatorPrototype.h

    r187575 r201448  
    3737public:
    3838    typedef IntlCollator Base;
    39     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
     39    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    4040
    4141    static IntlCollatorPrototype* create(VM&, JSGlobalObject*, Structure*);
     
    4949private:
    5050    IntlCollatorPrototype(VM&, Structure*);
    51     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    5251};
    5352
  • trunk/Source/JavaScriptCore/runtime/IntlDateTimeFormatConstructor.cpp

    r200928 r201448  
    136136}
    137137
    138 bool IntlDateTimeFormatConstructor::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot& slot)
    139 {
    140     return getStaticFunctionSlot<InternalFunction>(state, dateTimeFormatConstructorTable, jsCast<IntlDateTimeFormatConstructor*>(object), propertyName, slot);
    141 }
    142 
    143138EncodedJSValue JSC_HOST_CALL IntlDateTimeFormatConstructorFuncSupportedLocalesOf(ExecState* state)
    144139{
  • trunk/Source/JavaScriptCore/runtime/IntlDateTimeFormatConstructor.h

    r191286 r201448  
    3939public:
    4040    typedef InternalFunction Base;
    41     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
     41    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    4242
    4343    static IntlDateTimeFormatConstructor* create(VM&, Structure*, IntlDateTimeFormatPrototype*, Structure*);
     
    5555    static ConstructType getConstructData(JSCell*, ConstructData&);
    5656    static CallType getCallData(JSCell*, CallData&);
    57     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    5857    static void visitChildren(JSCell*, SlotVisitor&);
    5958   
  • trunk/Source/JavaScriptCore/runtime/IntlDateTimeFormatPrototype.cpp

    r200928 r201448  
    7979{
    8080    Base::finishCreation(vm);
    81 }
    82 
    83 bool IntlDateTimeFormatPrototype::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot& slot)
    84 {
    85     return getStaticFunctionSlot<JSObject>(state, dateTimeFormatPrototypeTable, jsCast<IntlDateTimeFormatPrototype*>(object), propertyName, slot);
    8681}
    8782
  • trunk/Source/JavaScriptCore/runtime/IntlDateTimeFormatPrototype.h

    r187575 r201448  
    3737public:
    3838    typedef IntlDateTimeFormat Base;
    39     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
     39    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    4040
    4141    static IntlDateTimeFormatPrototype* create(VM&, JSGlobalObject*, Structure*);
     
    4949private:
    5050    IntlDateTimeFormatPrototype(VM&, Structure*);
    51     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    5251};
    5352
  • trunk/Source/JavaScriptCore/runtime/IntlNumberFormatConstructor.cpp

    r200928 r201448  
    136136}
    137137
    138 bool IntlNumberFormatConstructor::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot& slot)
    139 {
    140     return getStaticFunctionSlot<InternalFunction>(state, numberFormatConstructorTable, jsCast<IntlNumberFormatConstructor*>(object), propertyName, slot);
    141 }
    142 
    143138EncodedJSValue JSC_HOST_CALL IntlNumberFormatConstructorFuncSupportedLocalesOf(ExecState* state)
    144139{
  • trunk/Source/JavaScriptCore/runtime/IntlNumberFormatConstructor.h

    r191286 r201448  
    3939public:
    4040    typedef InternalFunction Base;
    41     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
     41    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    4242
    4343    static IntlNumberFormatConstructor* create(VM&, Structure*, IntlNumberFormatPrototype*, Structure*);
     
    5555    static ConstructType getConstructData(JSCell*, ConstructData&);
    5656    static CallType getCallData(JSCell*, CallData&);
    57     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    5857    static void visitChildren(JSCell*, SlotVisitor&);
    5958   
  • trunk/Source/JavaScriptCore/runtime/IntlNumberFormatPrototype.cpp

    r200928 r201448  
    7979}
    8080
    81 bool IntlNumberFormatPrototype::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot& slot)
    82 {
    83     return getStaticFunctionSlot<JSObject>(state, numberFormatPrototypeTable, jsCast<IntlNumberFormatPrototype*>(object), propertyName, slot);
    84 }
    85 
    8681static EncodedJSValue JSC_HOST_CALL IntlNumberFormatFuncFormatNumber(ExecState* state)
    8782{
  • trunk/Source/JavaScriptCore/runtime/IntlNumberFormatPrototype.h

    r187575 r201448  
    3737public:
    3838    typedef IntlNumberFormat Base;
    39     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
     39    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    4040
    4141    static IntlNumberFormatPrototype* create(VM&, JSGlobalObject*, Structure*);
     
    4949private:
    5050    IntlNumberFormatPrototype(VM&, Structure*);
    51     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    5251};
    5352
  • trunk/Source/JavaScriptCore/runtime/JSDataViewPrototype.cpp

    r198435 r201448  
    120120}
    121121
    122 bool JSDataViewPrototype::getOwnPropertySlot(
    123     JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
    124 {
    125     return getStaticFunctionSlot<JSObject>(
    126         exec, dataViewTable, jsCast<JSDataViewPrototype*>(object),
    127         propertyName, slot);
    128 }
    129 
    130122template<typename Adaptor>
    131123EncodedJSValue getData(ExecState* exec)
  • trunk/Source/JavaScriptCore/runtime/JSDataViewPrototype.h

    r191864 r201448  
    3434public:
    3535    typedef JSNonFinalObject Base;
    36     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
     36    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    3737
    3838protected:
     
    4747   
    4848    static Structure* createStructure(VM&, JSGlobalObject*, JSValue prototype);
    49 
    50 protected:
    51     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    5249};
    5350
  • trunk/Source/JavaScriptCore/runtime/JSInternalPromiseConstructor.cpp

    r197614 r201448  
    8686}
    8787
    88 bool JSInternalPromiseConstructor::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
    89 {
    90     return getStaticFunctionSlot<Base>(exec, internalPromiseConstructorTable, jsCast<JSInternalPromiseConstructor*>(object), propertyName, slot);
    91 }
    92 
    9388} // namespace JSC
  • trunk/Source/JavaScriptCore/runtime/JSInternalPromiseConstructor.h

    r195460 r201448  
    3737public:
    3838    typedef JSPromiseConstructor Base;
    39     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
     39    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    4040
    4141    static JSInternalPromiseConstructor* create(VM&, Structure*, JSInternalPromisePrototype*, GetterSetter*);
     
    4848    static ConstructType getConstructData(JSCell*, ConstructData&);
    4949    static CallType getCallData(JSCell*, CallData&);
    50     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    5150};
    5251
  • trunk/Source/JavaScriptCore/runtime/JSONObject.cpp

    r198150 r201448  
    552552
    553553// ECMA 15.8
    554 
    555 bool JSONObject::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
    556 {
    557     return getStaticFunctionSlot<JSObject>(exec, jsonTable, jsCast<JSONObject*>(object), propertyName, slot);
    558 }
    559554
    560555class Walker {
  • trunk/Source/JavaScriptCore/runtime/JSONObject.h

    r190888 r201448  
    3434public:
    3535    typedef JSNonFinalObject Base;
    36     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
     36    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    3737
    3838    static JSONObject* create(VM& vm, Structure* structure)
     
    5555private:
    5656    JSONObject(VM&, Structure*);
    57     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    5857};
    5958
  • trunk/Source/JavaScriptCore/runtime/JSObject.cpp

    r201315 r201448  
    16731673    number = result.toNumber(exec);
    16741674    return !result.isString();
     1675}
     1676
     1677bool JSObject::getOwnStaticPropertySlot(VM& vm, PropertyName propertyName, PropertySlot& slot)
     1678{
     1679    for (auto* info = classInfo(); info; info = info->parentClass) {
     1680        if (auto* table = info->staticPropHashTable) {
     1681            if (getStaticPropertySlotFromTable(vm, *table, this, propertyName, slot))
     1682                return true;
     1683        }
     1684    }
     1685    return false;
    16751686}
    16761687
  • trunk/Source/JavaScriptCore/runtime/JSObject.h

    r199075 r201448  
    8888    friend class JSFinalObject;
    8989    friend class MarkedBlock;
    90     JS_EXPORT_PRIVATE friend bool setUpStaticFunctionSlot(ExecState*, const HashTableValue*, JSObject*, PropertyName, PropertySlot&);
     90    JS_EXPORT_PRIVATE friend bool setUpStaticFunctionSlot(VM&, const HashTableValue*, JSObject*, PropertyName, PropertySlot&);
    9191
    9292    enum PutMode {
     
    923923    void fillCustomGetterPropertySlot(PropertySlot&, JSValue, unsigned, Structure&);
    924924
     925    JS_EXPORT_PRIVATE bool getOwnStaticPropertySlot(VM&, PropertyName, PropertySlot&);
    925926    JS_EXPORT_PRIVATE const HashTableValue* findPropertyHashEntry(PropertyName) const;
    926927       
     
    11931194    unsigned attributes;
    11941195    PropertyOffset offset = structure.get(vm, propertyName, attributes);
    1195     if (!isValidOffset(offset))
    1196         return false;
     1196    if (!isValidOffset(offset)) {
     1197        if (!TypeInfo::hasStaticPropertyTable(inlineTypeFlags()))
     1198            return false;
     1199        return getOwnStaticPropertySlot(vm, propertyName, slot);
     1200    }
    11971201
    11981202    // getPropertySlot relies on this method never returning index properties!
  • trunk/Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp

    r197614 r201448  
    134134}
    135135
    136 bool JSPromiseConstructor::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
    137 {
    138     return getStaticFunctionSlot<Base>(exec, promiseConstructorTable, jsCast<JSPromiseConstructor*>(object), propertyName, slot);
    139 }
    140 
    141136} // namespace JSC
  • trunk/Source/JavaScriptCore/runtime/JSPromiseConstructor.h

    r195460 r201448  
    3838public:
    3939    typedef InternalFunction Base;
    40     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
     40    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    4141
    4242    static JSPromiseConstructor* create(VM&, Structure*, JSPromisePrototype*, GetterSetter* speciesSymbol);
     
    4444
    4545    DECLARE_INFO;
    46 
    47     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    4846
    4947protected:
  • trunk/Source/JavaScriptCore/runtime/JSPromisePrototype.cpp

    r195528 r201448  
    8686}
    8787
    88 bool JSPromisePrototype::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
    89 {
    90     return getStaticFunctionSlot<Base>(exec, promisePrototypeTable, jsCast<JSPromisePrototype*>(object), propertyName, slot);
    91 }
    92 
    9388} // namespace JSC
  • trunk/Source/JavaScriptCore/runtime/JSPromisePrototype.h

    r192157 r201448  
    3434public:
    3535    typedef JSNonFinalObject Base;
    36     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
     36    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    3737
    3838    static JSPromisePrototype* create(VM&, JSGlobalObject*, Structure*);
     
    4040
    4141    DECLARE_INFO;
    42 
    43     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    4442
    4543protected:
  • trunk/Source/JavaScriptCore/runtime/JSTypeInfo.h

    r199686 r201448  
    4444static const unsigned StructureIsImmortal = 1 << 5;
    4545static const unsigned OverridesToThis = 1 << 6; // If this is false then this returns something other than 'this'. Non-object cells that are visible to JS have this set as do some exotic objects.
    46 // There is one free bit at the end of the InlineTypeFlags.
     46static const unsigned HasStaticPropertyTable = 1 << 7;
    4747
    4848static const unsigned ImplementsHasInstance = 1 << 8;
     
    8484    bool overridesGetOwnPropertySlot() const { return overridesGetOwnPropertySlot(inlineTypeFlags()); }
    8585    static bool overridesGetOwnPropertySlot(InlineTypeFlags flags) { return flags & OverridesGetOwnPropertySlot; }
     86    static bool hasStaticPropertyTable(InlineTypeFlags flags) { return flags & HasStaticPropertyTable; }
    8687    bool interceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero() const { return isSetOnFlags1(InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero); }
    8788    bool structureIsImmortal() const { return isSetOnFlags1(StructureIsImmortal); }
  • trunk/Source/JavaScriptCore/runtime/Lookup.cpp

    r201340 r201448  
    2828namespace JSC {
    2929
    30 void reifyStaticAccessor(VM& vm, const HashTableValue& value, JSObject& thisObj, PropertyName propertyName)
     30void reifyStaticAccessor(VM& vm, const HashTableValue& value, JSObject& thisObject, PropertyName propertyName)
    3131{
    32     JSGlobalObject* globalObject = thisObj.globalObject();
     32    JSGlobalObject* globalObject = thisObject.globalObject();
    3333    GetterSetter* accessor = GetterSetter::create(vm, globalObject);
    3434    if (value.accessorGetter()) {
     
    4040            : JSFunction::create(vm, globalObject, 0, getterName, value.accessorGetter()));
    4141    }
    42     thisObj.putDirectNonIndexAccessor(vm, propertyName, accessor, attributesForStructure(value.attributes()));
     42    thisObject.putDirectNonIndexAccessor(vm, propertyName, accessor, attributesForStructure(value.attributes()));
    4343}
    4444
    45 bool setUpStaticFunctionSlot(ExecState* exec, const HashTableValue* entry, JSObject* thisObj, PropertyName propertyName, PropertySlot& slot)
     45bool setUpStaticFunctionSlot(VM& vm, const HashTableValue* entry, JSObject* thisObject, PropertyName propertyName, PropertySlot& slot)
    4646{
    47     ASSERT(thisObj->globalObject());
     47    ASSERT(thisObject->globalObject());
    4848    ASSERT(entry->attributes() & BuiltinOrFunctionOrAccessorOrLazyProperty);
    49     VM& vm = exec->vm();
    5049    unsigned attributes;
    5150    bool isAccessor = entry->attributes() & Accessor;
    52     PropertyOffset offset = thisObj->getDirectOffset(vm, propertyName, attributes);
     51    PropertyOffset offset = thisObject->getDirectOffset(vm, propertyName, attributes);
    5352
    5453    if (!isValidOffset(offset)) {
    5554        // If a property is ever deleted from an object with a static table, then we reify
    5655        // all static functions at that time - after this we shouldn't be re-adding anything.
    57         if (thisObj->staticFunctionsReified())
     56        if (thisObject->staticFunctionsReified())
    5857            return false;
    5958
    6059        if (entry->attributes() & Builtin)
    61             thisObj->putDirectBuiltinFunction(vm, thisObj->globalObject(), propertyName, entry->builtinGenerator()(vm), attributesForStructure(entry->attributes()));
     60            thisObject->putDirectBuiltinFunction(vm, thisObject->globalObject(), propertyName, entry->builtinGenerator()(vm), attributesForStructure(entry->attributes()));
    6261        else if (entry->attributes() & Function) {
    63             thisObj->putDirectNativeFunction(
    64                 vm, thisObj->globalObject(), propertyName, entry->functionLength(),
     62            thisObject->putDirectNativeFunction(
     63                vm, thisObject->globalObject(), propertyName, entry->functionLength(),
    6564                entry->function(), entry->intrinsic(), attributesForStructure(entry->attributes()));
    6665        } else if (isAccessor)
    67             reifyStaticAccessor(vm, *entry, *thisObj, propertyName);
     66            reifyStaticAccessor(vm, *entry, *thisObject, propertyName);
    6867        else if (entry->attributes() & CellProperty) {
    6968            LazyCellProperty* property = bitwise_cast<LazyCellProperty*>(
    70                 bitwise_cast<char*>(thisObj) + entry->lazyCellPropertyOffset());
    71             JSCell* result = property->get(thisObj);
    72             thisObj->putDirect(vm, propertyName, result, attributesForStructure(entry->attributes()));
     69                bitwise_cast<char*>(thisObject) + entry->lazyCellPropertyOffset());
     70            JSCell* result = property->get(thisObject);
     71            thisObject->putDirect(vm, propertyName, result, attributesForStructure(entry->attributes()));
    7372        } else if (entry->attributes() & ClassStructure) {
    7473            LazyClassStructure* structure = bitwise_cast<LazyClassStructure*>(
    75                 bitwise_cast<char*>(thisObj) + entry->lazyClassStructureOffset());
    76             structure->get(jsCast<JSGlobalObject*>(thisObj));
     74                bitwise_cast<char*>(thisObject) + entry->lazyClassStructureOffset());
     75            structure->get(jsCast<JSGlobalObject*>(thisObject));
    7776        } else if (entry->attributes() & PropertyCallback) {
    78             JSValue result = entry->lazyPropertyCallback()(vm, thisObj);
    79             thisObj->putDirect(vm, propertyName, result, attributesForStructure(entry->attributes()));
     77            JSValue result = entry->lazyPropertyCallback()(vm, thisObject);
     78            thisObject->putDirect(vm, propertyName, result, attributesForStructure(entry->attributes()));
    8079        } else {
    8180            dataLog("Static hashtable entry for ", propertyName, " has weird attributes: ", entry->attributes(), "\n");
     
    8382        }
    8483
    85         offset = thisObj->getDirectOffset(vm, propertyName, attributes);
     84        offset = thisObject->getDirectOffset(vm, propertyName, attributes);
    8685        if (!isValidOffset(offset)) {
    8786            dataLog("Static hashtable initialiation for ", propertyName, " did not produce a property.\n");
     
    9190
    9291    if (isAccessor)
    93         slot.setCacheableGetterSlot(thisObj, attributes, jsCast<GetterSetter*>(thisObj->getDirect(offset)), offset);
     92        slot.setCacheableGetterSlot(thisObject, attributes, jsCast<GetterSetter*>(thisObject->getDirect(offset)), offset);
    9493    else
    95         slot.setValue(thisObj, attributes, thisObj->getDirect(offset), offset);
     94        slot.setValue(thisObject, attributes, thisObject->getDirect(offset), offset);
    9695    return true;
    9796}
  • trunk/Source/JavaScriptCore/runtime/Lookup.h

    r201428 r201448  
    192192};
    193193
    194 JS_EXPORT_PRIVATE bool setUpStaticFunctionSlot(ExecState*, const HashTableValue*, JSObject* thisObject, PropertyName, PropertySlot&);
     194JS_EXPORT_PRIVATE bool setUpStaticFunctionSlot(VM&, const HashTableValue*, JSObject* thisObject, PropertyName, PropertySlot&);
    195195JS_EXPORT_PRIVATE void reifyStaticAccessor(VM&, const HashTableValue&, JSObject& thisObject, PropertyName);
    196196
     
    207207    ASSERT(m_attributes & Builtin);
    208208    return reinterpret_cast<BuiltinGenerator>(m_values.value2);
     209}
     210
     211inline bool getStaticPropertySlotFromTable(VM& vm, const HashTable& table, JSObject* thisObject, PropertyName propertyName, PropertySlot& slot)
     212{
     213    if (thisObject->staticFunctionsReified())
     214        return false;
     215
     216    auto* entry = table.entry(propertyName);
     217    if (!entry)
     218        return false;
     219
     220    if (entry->attributes() & BuiltinOrFunctionOrAccessorOrLazyProperty)
     221        return setUpStaticFunctionSlot(vm, entry, thisObject, propertyName, slot);
     222
     223    if (entry->attributes() & ConstantInteger) {
     224        slot.setValue(thisObject, attributesForStructure(entry->attributes()), jsNumber(entry->constantInteger()));
     225        return true;
     226    }
     227
     228    slot.setCacheableCustom(thisObject, attributesForStructure(entry->attributes()), entry->propertyGetter());
     229    return true;
    209230}
    210231
     
    216237 */
    217238template <class ThisImp, class ParentImp>
    218 inline bool getStaticPropertySlot(ExecState* exec, const HashTable& table, ThisImp* thisObj, PropertyName propertyName, PropertySlot& slot)
    219 {
    220     if (ParentImp::getOwnPropertySlot(thisObj, exec, propertyName, slot))
    221         return true;
    222 
    223     if (thisObj->staticFunctionsReified())
     239inline bool getStaticPropertySlot(ExecState* exec, const HashTable& table, ThisImp* thisObject, PropertyName propertyName, PropertySlot& slot)
     240{
     241    if (ParentImp::getOwnPropertySlot(thisObject, exec, propertyName, slot))
     242        return true;
     243
     244    if (thisObject->staticFunctionsReified())
    224245        return false;
    225246
     
    229250
    230251    if (entry->attributes() & BuiltinOrFunctionOrAccessorOrLazyProperty)
    231         return setUpStaticFunctionSlot(exec, entry, thisObj, propertyName, slot);
     252        return setUpStaticFunctionSlot(exec->vm(), entry, thisObject, propertyName, slot);
    232253
    233254    if (entry->attributes() & ConstantInteger) {
    234         slot.setValue(thisObj, attributesForStructure(entry->attributes()), jsNumber(entry->constantInteger()));
    235         return true;
    236     }
    237 
    238     slot.setCacheableCustom(thisObj, attributesForStructure(entry->attributes()), entry->propertyGetter());
     255        slot.setValue(thisObject, attributesForStructure(entry->attributes()), jsNumber(entry->constantInteger()));
     256        return true;
     257    }
     258
     259    slot.setCacheableCustom(thisObject, attributesForStructure(entry->attributes()), entry->propertyGetter());
    239260    return true;
    240261}
     
    246267 */
    247268template <class ParentImp>
    248 inline bool getStaticFunctionSlot(ExecState* exec, const HashTable& table, JSObject* thisObj, PropertyName propertyName, PropertySlot& slot)
    249 {
    250     if (ParentImp::getOwnPropertySlot(thisObj, exec, propertyName, slot))
    251         return true;
    252 
    253     if (thisObj->staticFunctionsReified())
     269inline bool getStaticFunctionSlot(ExecState* exec, const HashTable& table, JSObject* thisObject, PropertyName propertyName, PropertySlot& slot)
     270{
     271    if (ParentImp::getOwnPropertySlot(thisObject, exec, propertyName, slot))
     272        return true;
     273
     274    if (thisObject->staticFunctionsReified())
    254275        return false;
    255276
     
    258279        return false;
    259280
    260     return setUpStaticFunctionSlot(exec, entry, thisObj, propertyName, slot);
     281    return setUpStaticFunctionSlot(exec->vm(), entry, thisObject, propertyName, slot);
    261282}
    262283
     
    266287 */
    267288template <class ThisImp, class ParentImp>
    268 inline bool getStaticValueSlot(ExecState* exec, const HashTable& table, ThisImp* thisObj, PropertyName propertyName, PropertySlot& slot)
    269 {
    270     if (ParentImp::getOwnPropertySlot(thisObj, exec, propertyName, slot))
    271         return true;
    272 
    273     if (thisObj->staticFunctionsReified())
     289inline bool getStaticValueSlot(ExecState* exec, const HashTable& table, ThisImp* thisObject, PropertyName propertyName, PropertySlot& slot)
     290{
     291    if (ParentImp::getOwnPropertySlot(thisObject, exec, propertyName, slot))
     292        return true;
     293
     294    if (thisObject->staticFunctionsReified())
    274295        return false;
    275296
     
    281302
    282303    if (entry->attributes() & ConstantInteger) {
    283         slot.setValue(thisObj, attributesForStructure(entry->attributes()), jsNumber(entry->constantInteger()));
    284         return true;
    285     }
    286 
    287     slot.setCacheableCustom(thisObj, attributesForStructure(entry->attributes()), entry->propertyGetter());
     304        slot.setValue(thisObject, attributesForStructure(entry->attributes()), jsNumber(entry->constantInteger()));
     305        return true;
     306    }
     307
     308    slot.setCacheableCustom(thisObject, attributesForStructure(entry->attributes()), entry->propertyGetter());
    288309    return true;
    289310}
  • trunk/Source/JavaScriptCore/runtime/MapPrototype.cpp

    r200422 r201448  
    9090}
    9191
    92 bool MapPrototype::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
    93 {
    94     return getStaticFunctionSlot<Base>(exec, mapPrototypeTable, jsCast<MapPrototype*>(object), propertyName, slot);
    95 }
    96 
    9792ALWAYS_INLINE static JSMap* getMap(CallFrame* callFrame, JSValue thisValue)
    9893{
  • trunk/Source/JavaScriptCore/runtime/MapPrototype.h

    r194838 r201448  
    3535    typedef JSNonFinalObject Base;
    3636
    37     static const unsigned StructureFlags = OverridesGetOwnPropertySlot | Base::StructureFlags;
     37    static const unsigned StructureFlags = HasStaticPropertyTable | Base::StructureFlags;
    3838
    3939    static MapPrototype* create(VM& vm, JSGlobalObject* globalObject, Structure* structure)
     
    5757    }
    5858    void finishCreation(VM&, JSGlobalObject*);
    59     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    6059};
    6160
  • trunk/Source/JavaScriptCore/runtime/ModuleLoaderObject.cpp

    r197614 r201448  
    120120}
    121121
    122 bool ModuleLoaderObject::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot &slot)
    123 {
    124     return getStaticFunctionSlot<Base>(exec, moduleLoaderObjectTable, jsCast<ModuleLoaderObject*>(object), propertyName, slot);
    125 }
    126 
    127122// ------------------------------ Functions --------------------------------
    128123
  • trunk/Source/JavaScriptCore/runtime/ModuleLoaderObject.h

    r189941 r201448  
    3838public:
    3939    typedef JSNonFinalObject Base;
    40     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
     40    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    4141
    4242    enum Status {
     
    7878    JSValue evaluate(ExecState*, JSValue key, JSValue moduleRecord);
    7979
    80     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    81 
    8280protected:
    8381    void finishCreation(VM&, JSGlobalObject*);
  • trunk/Source/JavaScriptCore/runtime/NumberPrototype.cpp

    r199725 r201448  
    8888
    8989    ASSERT(inherits(info()));
    90 }
    91 
    92 bool NumberPrototype::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot &slot)
    93 {
    94     return getStaticFunctionSlot<NumberObject>(exec, numberPrototypeTable, jsCast<NumberPrototype*>(object), propertyName, slot);
    9590}
    9691
  • trunk/Source/JavaScriptCore/runtime/NumberPrototype.h

    r199725 r201448  
    2929public:
    3030    typedef NumberObject Base;
    31     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
     31    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    3232
    3333    static NumberPrototype* create(VM& vm, JSGlobalObject* globalObject, Structure* structure)
     
    5050private:
    5151    NumberPrototype(VM&, Structure*);
    52     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    5352};
    5453
  • trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp

    r200421 r201448  
    112112    putDirectWithoutTransition(vm, vm.propertyNames->defineProperty, definePropertyFunction, DontEnum);
    113113    return definePropertyFunction;
    114 }
    115 
    116 bool ObjectConstructor::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot &slot)
    117 {
    118     return getStaticFunctionSlot<JSObject>(exec, objectConstructorTable, jsCast<ObjectConstructor*>(object), propertyName, slot);
    119114}
    120115
  • trunk/Source/JavaScriptCore/runtime/ObjectConstructor.h

    r201049 r201448  
    3939public:
    4040    typedef InternalFunction Base;
    41     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
     41    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    4242
    4343    static ObjectConstructor* create(VM& vm, JSGlobalObject* globalObject, Structure* structure, ObjectPrototype* objectPrototype)
     
    4747        return constructor;
    4848    }
    49 
    50     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    5149
    5250    DECLARE_INFO;
  • trunk/Source/JavaScriptCore/runtime/ReflectObject.cpp

    r200355 r201448  
    9090}
    9191
    92 bool ReflectObject::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot &slot)
    93 {
    94     return getStaticFunctionSlot<Base>(exec, reflectObjectTable, jsCast<ReflectObject*>(object), propertyName, slot);
    95 }
    96 
    9792// ------------------------------ Functions --------------------------------
    9893
  • trunk/Source/JavaScriptCore/runtime/ReflectObject.h

    r187401 r201448  
    3737public:
    3838    typedef JSNonFinalObject Base;
    39     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
     39    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    4040
    4141    static ReflectObject* create(VM& vm, JSGlobalObject* globalObject, Structure* structure)
     
    5353    }
    5454
    55     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    56 
    5755protected:
    5856    void finishCreation(VM&, JSGlobalObject*);
  • trunk/Source/JavaScriptCore/runtime/RegExpConstructor.cpp

    r201322 r201448  
    146146    return m_cachedResult.rightContext(exec, this);
    147147}
    148    
    149 bool RegExpConstructor::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
    150 {
    151     return getStaticValueSlot<RegExpConstructor, InternalFunction>(exec, regExpConstructorTable, jsCast<RegExpConstructor*>(object), propertyName, slot);
    152 }
    153148
    154149template<int N>
  • trunk/Source/JavaScriptCore/runtime/RegExpConstructor.h

    r199144 r201448  
    3535public:
    3636    typedef InternalFunction Base;
    37     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
     37    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    3838
    3939    static RegExpConstructor* create(VM& vm, Structure* structure, RegExpPrototype* regExpPrototype, GetterSetter* species)
     
    4848        return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
    4949    }
    50 
    51     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    5250
    5351    DECLARE_INFO;
  • trunk/Source/JavaScriptCore/runtime/SetPrototype.cpp

    r200422 r201448  
    8383    JSC_NATIVE_GETTER(vm.propertyNames->size, setProtoFuncSize, DontEnum | Accessor);
    8484}
    85 
    86 bool SetPrototype::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
    87 {
    88     return getStaticFunctionSlot<Base>(exec, setPrototypeTable, jsCast<SetPrototype*>(object), propertyName, slot);
    89 }
    90 
    9185
    9286ALWAYS_INLINE static JSSet* getSet(CallFrame* callFrame, JSValue thisValue)
  • trunk/Source/JavaScriptCore/runtime/SetPrototype.h

    r194838 r201448  
    3535    typedef JSNonFinalObject Base;
    3636
    37     static const unsigned StructureFlags = OverridesGetOwnPropertySlot | Base::StructureFlags;
     37    static const unsigned StructureFlags = HasStaticPropertyTable | Base::StructureFlags;
    3838
    3939    static SetPrototype* create(VM& vm, JSGlobalObject* globalObject, Structure* structure)
     
    5757    }
    5858    void finishCreation(VM&, JSGlobalObject*);
    59     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    6059};
    6160
  • trunk/Source/JavaScriptCore/runtime/StringConstructor.cpp

    r197614 r201448  
    6363    putDirectWithoutTransition(vm, vm.propertyNames->prototype, stringPrototype, ReadOnly | DontEnum | DontDelete);
    6464    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
    65 }
    66 
    67 bool StringConstructor::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot &slot)
    68 {
    69     return getStaticFunctionSlot<InternalFunction>(exec, stringConstructorTable, jsCast<StringConstructor*>(object), propertyName, slot);
    7065}
    7166
  • trunk/Source/JavaScriptCore/runtime/StringConstructor.h

    r195460 r201448  
    3232public:
    3333    typedef InternalFunction Base;
    34     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
     34    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    3535
    3636    static StringConstructor* create(VM& vm, Structure* structure, StringPrototype* stringPrototype, GetterSetter*)
     
    5353    static ConstructType getConstructData(JSCell*, ConstructData&);
    5454    static CallType getCallData(JSCell*, CallData&);
    55 
    56     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    5755};
    5856
  • trunk/Source/JavaScriptCore/runtime/StringIteratorPrototype.cpp

    r192204 r201448  
    5959}
    6060
    61 bool StringIteratorPrototype::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
    62 {
    63     return getStaticFunctionSlot<Base>(exec, stringIteratorPrototypeTable, jsCast<StringIteratorPrototype*>(object), propertyName, slot);
    64 }
    65 
    6661} // namespace JSC
  • trunk/Source/JavaScriptCore/runtime/StringIteratorPrototype.h

    r182747 r201448  
    3535public:
    3636    typedef JSNonFinalObject Base;
    37     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
     37    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    3838
    3939    static StringIteratorPrototype* create(VM& vm, JSGlobalObject* globalObject, Structure* structure)
     
    5757    }
    5858    void finishCreation(VM&, JSGlobalObject*);
    59     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    6059};
    6160
  • trunk/Source/JavaScriptCore/runtime/StringPrototype.cpp

    r200743 r201448  
    190190}
    191191
    192 bool StringPrototype::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot &slot)
    193 {
    194     return getStaticFunctionSlot<Base>(exec, stringPrototypeTable, jsCast<StringPrototype*>(object), propertyName, slot);
    195 }
    196 
    197192// ------------------------------ Functions --------------------------
    198193
  • trunk/Source/JavaScriptCore/runtime/StringPrototype.h

    r199731 r201448  
    3737public:
    3838    typedef StringObject Base;
    39     static const unsigned StructureFlags = OverridesGetOwnPropertySlot | Base::StructureFlags;
     39    static const unsigned StructureFlags = HasStaticPropertyTable | Base::StructureFlags;
    4040
    4141    static StringPrototype* create(VM&, JSGlobalObject*, Structure*);
     
    5050protected:
    5151    void finishCreation(VM&, JSGlobalObject*, JSString*);
    52 
    53 private:
    54     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    5552};
    5653
  • trunk/Source/JavaScriptCore/runtime/SymbolConstructor.cpp

    r200402 r201448  
    7474}
    7575
    76 bool SymbolConstructor::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot &slot)
    77 {
    78     return getStaticFunctionSlot<Base>(exec, symbolConstructorTable, jsCast<SymbolConstructor*>(object), propertyName, slot);
    79 }
    80 
    8176// ------------------------------ Functions ---------------------------
    8277
  • trunk/Source/JavaScriptCore/runtime/SymbolConstructor.h

    r195460 r201448  
    3939public:
    4040    typedef InternalFunction Base;
    41     static const unsigned StructureFlags = OverridesGetOwnPropertySlot | Base::StructureFlags;
     41    static const unsigned StructureFlags = HasStaticPropertyTable | Base::StructureFlags;
    4242
    4343    static SymbolConstructor* create(VM& vm, Structure* structure, SymbolPrototype* prototype, GetterSetter*)
     
    6262    static ConstructType getConstructData(JSCell*, ConstructData&);
    6363    static CallType getCallData(JSCell*, CallData&);
    64     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    6564};
    6665
  • trunk/Source/JavaScriptCore/runtime/SymbolPrototype.cpp

    r200402 r201448  
    6666}
    6767
    68 bool SymbolPrototype::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot &slot)
    69 {
    70     return getStaticFunctionSlot<Base>(exec, symbolPrototypeTable, jsCast<SymbolPrototype*>(object), propertyName, slot);
    71 }
    72 
    7368// ------------------------------ Functions ---------------------------
    7469
  • trunk/Source/JavaScriptCore/runtime/SymbolPrototype.h

    r197531 r201448  
    3737public:
    3838    typedef JSNonFinalObject Base;
    39     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
     39    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
    4040
    4141    static SymbolPrototype* create(VM& vm, JSGlobalObject* globalObject, Structure* structure)
     
    5656    SymbolPrototype(VM&, Structure*);
    5757    void finishCreation(VM&, JSGlobalObject*);
    58 
    59 private:
    60     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    6158};
    6259STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(SymbolPrototype);
Note: See TracChangeset for help on using the changeset viewer.