Ignore:
Timestamp:
Sep 6, 2013, 3:32:08 PM (12 years ago)
Author:
[email protected]
Message:

Stop using fastNew/fastDelete in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=120898

Reviewed by Oliver Hunt.

Source/JavaScriptCore:

Change all the hash table members in ExecState to be OwnPtrs and use
adoptPtr instead. Also, since none of the hash tables can be null, change their getters
to return references and propagate the reference types wherever we know that a HashTable can't be null.

  • interpreter/CallFrame.h:

(JSC::ExecState::arrayConstructorTable):
(JSC::ExecState::arrayPrototypeTable):
(JSC::ExecState::booleanPrototypeTable):
(JSC::ExecState::dataViewTable):
(JSC::ExecState::dateTable):
(JSC::ExecState::dateConstructorTable):
(JSC::ExecState::errorPrototypeTable):
(JSC::ExecState::globalObjectTable):
(JSC::ExecState::jsonTable):
(JSC::ExecState::numberConstructorTable):
(JSC::ExecState::numberPrototypeTable):
(JSC::ExecState::objectConstructorTable):
(JSC::ExecState::privateNamePrototypeTable):
(JSC::ExecState::regExpTable):
(JSC::ExecState::regExpConstructorTable):
(JSC::ExecState::regExpPrototypeTable):
(JSC::ExecState::stringConstructorTable):
(JSC::ExecState::promisePrototypeTable):
(JSC::ExecState::promiseConstructorTable):
(JSC::ExecState::promiseResolverPrototypeTable):

  • runtime/ClassInfo.h:

(JSC::ClassInfo::propHashTable):

  • runtime/Lookup.h:

(JSC::getStaticPropertySlot):
(JSC::getStaticFunctionSlot):
(JSC::getStaticValueSlot):
(JSC::lookupPut):

  • runtime/VM.cpp:

(JSC::VM::VM):
(JSC::VM::~VM):

  • runtime/VM.h:

Source/WebCore:

Update for changes to JavaScriptCore.

  • bindings/js/DOMObjectHashTableMap.h:

(WebCore::DOMObjectHashTableMap::get):

  • bindings/js/JSDOMBinding.cpp:

(WebCore::getHashTableForGlobalData):

  • bindings/js/JSDOMBinding.h:
  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::JSDOMWindow::put):

  • bindings/js/JSPluginElementFunctions.h:

(WebCore::pluginElementCustomGetOwnPropertySlot):

  • bindings/js/JSStorageCustom.cpp:

(WebCore::JSStorage::deleteProperty):
(WebCore::JSStorage::putDelegate):

  • bindings/scripts/CodeGeneratorJS.pm:

(hashTableAccessor):
(prototypeHashTableAccessor):
(constructorHashTableAccessor):
(GenerateGetOwnPropertySlotBody):
(GenerateImplementation):
(GenerateConstructorHelperMethods):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/VM.h

    r155023 r155219  
    223223        Watchdog watchdog;
    224224
    225         const HashTable* arrayConstructorTable;
    226         const HashTable* arrayPrototypeTable;
    227         const HashTable* booleanPrototypeTable;
    228         const HashTable* dataViewTable;
    229         const HashTable* dateTable;
    230         const HashTable* dateConstructorTable;
    231         const HashTable* errorPrototypeTable;
    232         const HashTable* globalObjectTable;
    233         const HashTable* jsonTable;
    234         const HashTable* numberConstructorTable;
    235         const HashTable* numberPrototypeTable;
    236         const HashTable* objectConstructorTable;
    237         const HashTable* privateNamePrototypeTable;
    238         const HashTable* regExpTable;
    239         const HashTable* regExpConstructorTable;
    240         const HashTable* regExpPrototypeTable;
    241         const HashTable* stringConstructorTable;
     225        const OwnPtr<const HashTable> arrayConstructorTable;
     226        const OwnPtr<const HashTable> arrayPrototypeTable;
     227        const OwnPtr<const HashTable> booleanPrototypeTable;
     228        const OwnPtr<const HashTable> dataViewTable;
     229        const OwnPtr<const HashTable> dateTable;
     230        const OwnPtr<const HashTable> dateConstructorTable;
     231        const OwnPtr<const HashTable> errorPrototypeTable;
     232        const OwnPtr<const HashTable> globalObjectTable;
     233        const OwnPtr<const HashTable> jsonTable;
     234        const OwnPtr<const HashTable> numberConstructorTable;
     235        const OwnPtr<const HashTable> numberPrototypeTable;
     236        const OwnPtr<const HashTable> objectConstructorTable;
     237        const OwnPtr<const HashTable> privateNamePrototypeTable;
     238        const OwnPtr<const HashTable> regExpTable;
     239        const OwnPtr<const HashTable> regExpConstructorTable;
     240        const OwnPtr<const HashTable> regExpPrototypeTable;
     241        const OwnPtr<const HashTable> stringConstructorTable;
    242242#if ENABLE(PROMISES)
    243         const HashTable* promisePrototypeTable;
    244         const HashTable* promiseConstructorTable;
    245         const HashTable* promiseResolverPrototypeTable;
     243        const OwnPtr<const HashTable> promisePrototypeTable;
     244        const OwnPtr<const HashTable> promiseConstructorTable;
     245        const OwnPtr<const HashTable> promiseResolverPrototypeTable;
    246246#endif
    247247
Note: See TracChangeset for help on using the changeset viewer.