Static hash tables no longer need to be coupled with a VM.
<https://webkit.org/b/135421>

Source/JavaScriptCore:
Now that the static hash tables are using char** instead of StringImpl**,
it's no longer necessary to make them per-VM.

This patch removes the hook in ClassInfo for providing your own static
hash table getter. Everyone now uses ClassInfo::staticPropHashTable.
Most of this patch is tweaking ClassInfo construction sites to pass one
less null pointer.

Also simplified Lookup.h to stop requiring ExecState/VM to access the
static hash tables.

Reviewed by Geoffrey Garen.

* API/JSAPIWrapperObject.mm:
* API/JSCallbackConstructor.cpp:
* API/JSCallbackFunction.cpp:
* API/JSCallbackObject.cpp:
* API/ObjCCallbackFunction.mm:
* bytecode/UnlinkedCodeBlock.cpp:
* create_hash_table:
* debugger/DebuggerScope.cpp:
* inspector/JSInjectedScriptHost.cpp:
* inspector/JSInjectedScriptHostPrototype.cpp:
* inspector/JSJavaScriptCallFrame.cpp:
* inspector/JSJavaScriptCallFramePrototype.cpp:
* interpreter/CallFrame.h:
(JSC::ExecState::arrayConstructorTable): Deleted.
(JSC::ExecState::arrayPrototypeTable): Deleted.
(JSC::ExecState::booleanPrototypeTable): Deleted.
(JSC::ExecState::dataViewTable): Deleted.
(JSC::ExecState::dateTable): Deleted.
(JSC::ExecState::dateConstructorTable): Deleted.
(JSC::ExecState::errorPrototypeTable): Deleted.
(JSC::ExecState::globalObjectTable): Deleted.
(JSC::ExecState::jsonTable): Deleted.
(JSC::ExecState::numberConstructorTable): Deleted.
(JSC::ExecState::numberPrototypeTable): Deleted.
(JSC::ExecState::objectConstructorTable): Deleted.
(JSC::ExecState::privateNamePrototypeTable): Deleted.
(JSC::ExecState::regExpTable): Deleted.
(JSC::ExecState::regExpConstructorTable): Deleted.
(JSC::ExecState::regExpPrototypeTable): Deleted.
(JSC::ExecState::stringConstructorTable): Deleted.
(JSC::ExecState::promisePrototypeTable): Deleted.
(JSC::ExecState::promiseConstructorTable): Deleted.
* jsc.cpp:
* parser/Lexer.h:
(JSC::Keywords::isKeyword):
(JSC::Keywords::getKeyword):
* runtime/Arguments.cpp:
* runtime/ArgumentsIteratorConstructor.cpp:
* runtime/ArgumentsIteratorPrototype.cpp:
* runtime/ArrayBufferNeuteringWatchpoint.cpp:
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::getOwnPropertySlot):
* runtime/ArrayIteratorConstructor.cpp:
* runtime/ArrayIteratorPrototype.cpp:
* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::getOwnPropertySlot):
* runtime/BooleanConstructor.cpp:
* runtime/BooleanObject.cpp:
* runtime/BooleanPrototype.cpp:
(JSC::BooleanPrototype::getOwnPropertySlot):
* runtime/ClassInfo.h:
(JSC::ClassInfo::hasStaticProperties):
(JSC::ClassInfo::propHashTable): Deleted.
* runtime/ConsolePrototype.cpp:
* runtime/CustomGetterSetter.cpp:
* runtime/DateConstructor.cpp:
(JSC::DateConstructor::getOwnPropertySlot):
* runtime/DateInstance.cpp:
* runtime/DatePrototype.cpp:
(JSC::DatePrototype::getOwnPropertySlot):
* runtime/Error.cpp:
* runtime/ErrorConstructor.cpp:
* runtime/ErrorInstance.cpp:
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::getOwnPropertySlot):
* runtime/ExceptionHelpers.cpp:
* runtime/Executable.cpp:
* runtime/FunctionConstructor.cpp:
* runtime/FunctionPrototype.cpp:
* runtime/GetterSetter.cpp:
* runtime/InternalFunction.cpp:
* runtime/JSAPIValueWrapper.cpp:
* runtime/JSActivation.cpp:
* runtime/JSArgumentsIterator.cpp:
* runtime/JSArray.cpp:
* runtime/JSArrayBuffer.cpp:
* runtime/JSArrayBufferConstructor.cpp:
* runtime/JSArrayBufferPrototype.cpp:
* runtime/JSArrayBufferView.cpp:
* runtime/JSArrayIterator.cpp:
* runtime/JSBoundFunction.cpp:
* runtime/JSConsole.cpp:
* runtime/JSDataView.cpp:
* runtime/JSDataViewPrototype.cpp:
(JSC::JSDataViewPrototype::getOwnPropertySlot):
* runtime/JSFunction.cpp:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::getOwnPropertySlot):
* runtime/JSMap.cpp:
* runtime/JSMapIterator.cpp:
* runtime/JSNameScope.cpp:
* runtime/JSNotAnObject.cpp:
* runtime/JSONObject.cpp:
(JSC::JSONObject::getOwnPropertySlot):
* runtime/JSObject.cpp:
(JSC::getClassPropertyNames):
(JSC::JSObject::put):
(JSC::JSObject::deleteProperty):
(JSC::JSObject::findPropertyHashEntry):
(JSC::JSObject::reifyStaticFunctionsForDelete):
* runtime/JSObject.h:
* runtime/JSPromise.cpp:
* runtime/JSPromiseConstructor.cpp:
(JSC::JSPromiseConstructor::getOwnPropertySlot):
* runtime/JSPromiseDeferred.cpp:
* runtime/JSPromisePrototype.cpp:
(JSC::JSPromisePrototype::getOwnPropertySlot):
* runtime/JSPromiseReaction.cpp:
* runtime/JSPropertyNameIterator.cpp:
* runtime/JSProxy.cpp:
* runtime/JSSet.cpp:
* runtime/JSSetIterator.cpp:
* runtime/JSString.cpp:
* runtime/JSTypedArrayConstructors.cpp:
* runtime/JSTypedArrayPrototypes.cpp:
* runtime/JSTypedArrays.cpp:
* runtime/JSVariableObject.cpp:
* runtime/JSWeakMap.cpp:
* runtime/JSWithScope.cpp:
* runtime/Lookup.cpp:
(JSC::HashTable::createTable):
* runtime/Lookup.h:
(JSC::HashTable::initializeIfNeeded):
(JSC::HashTable::entry):
(JSC::HashTable::begin):
(JSC::HashTable::end):
(JSC::getStaticPropertySlot):
(JSC::getStaticFunctionSlot):
(JSC::getStaticValueSlot):
(JSC::lookupPut):
* runtime/MapConstructor.cpp:
* runtime/MapData.cpp:
* runtime/MapIteratorConstructor.cpp:
* runtime/MapIteratorPrototype.cpp:
* runtime/MapPrototype.cpp:
* runtime/MathObject.cpp:
* runtime/NameConstructor.cpp:
* runtime/NameInstance.cpp:
* runtime/NamePrototype.cpp:
(JSC::NamePrototype::getOwnPropertySlot):
* runtime/NativeErrorConstructor.cpp:
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::getOwnPropertySlot):
* runtime/NumberObject.cpp:
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::getOwnPropertySlot):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::getOwnPropertySlot):
* runtime/ObjectPrototype.cpp:
* runtime/PropertyTable.cpp:
* runtime/RegExp.cpp:
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::getOwnPropertySlot):
* runtime/RegExpMatchesArray.cpp:
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::getOwnPropertySlot):
* runtime/RegExpPrototype.cpp:
(JSC::RegExpPrototype::getOwnPropertySlot):
* runtime/SetConstructor.cpp:
* runtime/SetIteratorConstructor.cpp:
* runtime/SetIteratorPrototype.cpp:
* runtime/SetPrototype.cpp:
* runtime/SparseArrayValueMap.cpp:
* runtime/StrictEvalActivation.cpp:
* runtime/StringConstructor.cpp:
(JSC::StringConstructor::getOwnPropertySlot):
* runtime/StringObject.cpp:
* runtime/StringPrototype.cpp:
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::freezeTransition):
(JSC::ClassInfo::hasStaticSetterOrReadonlyProperties):
* runtime/StructureChain.cpp:
* runtime/StructureRareData.cpp:
* runtime/SymbolTable.cpp:
* runtime/VM.cpp:
(JSC::VM::VM):
(JSC::VM::~VM):
* runtime/VM.h:
* runtime/WeakMapConstructor.cpp:
* runtime/WeakMapData.cpp:
* runtime/WeakMapPrototype.cpp:
* testRegExp.cpp:

Source/WebCore:
Update for JSC::ClassInfo changes.

Remove the JSNoStaticTables mode for IDL code generation, which was used to
ensure that each VM had its own unique copy of certain static tables.
This was used for interfaces that could be used in workers, and now there's
no need to manually annotate these things anymore.

Also remove the DOMObjectHashTableMap class that was only used for this.

Reviewed by Geoffrey Garen.

* Modules/indexeddb/IDBAny.idl:
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBCursorWithValue.idl:
* Modules/indexeddb/IDBDatabase.idl:
* Modules/indexeddb/IDBFactory.idl:
* Modules/indexeddb/IDBIndex.idl:
* Modules/indexeddb/IDBKeyRange.idl:
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/indexeddb/IDBOpenDBRequest.idl:
* Modules/indexeddb/IDBRequest.idl:
* Modules/indexeddb/IDBTransaction.idl:
* Modules/indexeddb/IDBVersionChangeEvent.idl:
* Modules/webdatabase/Database.idl:
* Modules/webdatabase/DatabaseSync.idl:
* Modules/webdatabase/SQLError.idl:
* Modules/webdatabase/SQLException.idl:
* Modules/webdatabase/SQLResultSet.idl:
* Modules/webdatabase/SQLResultSetRowList.idl:
* Modules/webdatabase/SQLTransaction.idl:
* Modules/webdatabase/SQLTransactionSync.idl:
* Modules/websockets/CloseEvent.idl:
* Modules/websockets/WebSocket.idl:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/DOMObjectHashTableMap.cpp: Removed.
* bindings/js/DOMObjectHashTableMap.h: Removed.
* bindings/js/JSDOMBinding.cpp:
(WebCore::getHashTableForGlobalData): Deleted.
* bindings/js/JSDOMBinding.h:
(WebCore::getStaticValueSlotEntryWithoutCaching):
* bindings/js/JSDOMGlobalObject.cpp:
* bindings/js/JSDOMWindowBase.cpp:
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::getOwnPropertySlot):
(WebCore::JSDOMWindow::put):
* bindings/js/JSDOMWindowShell.cpp:
* bindings/js/JSImageConstructor.cpp:
* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::putDelegate):
* bindings/js/JSStorageCustom.cpp:
(WebCore::JSStorage::deleteProperty):
(WebCore::JSStorage::putDelegate):
* bindings/js/JSWorkerGlobalScopeBase.cpp:
* bindings/js/WebCoreJSClientData.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateGetOwnPropertySlotBody):
(GenerateImplementation):
(GenerateConstructorHelperMethods):
(hashTableAccessor): Deleted.
(prototypeHashTableAccessor): Deleted.
(constructorHashTableAccessor): Deleted.
* bindings/scripts/IDLAttributes.txt:
* bridge/c/CRuntimeObject.cpp:
* bridge/c/c_instance.cpp:
* bridge/objc/ObjCRuntimeObject.mm:
* bridge/objc/objc_instance.mm:
* bridge/objc/objc_runtime.mm:
* bridge/runtime_array.cpp:
* bridge/runtime_method.cpp:
* bridge/runtime_object.cpp:
* crypto/CryptoKey.idl:
* css/CSSFontFaceLoadEvent.idl:
* dom/DOMCoreException.idl:
* dom/DOMStringList.idl:
* dom/ErrorEvent.idl:
* dom/Event.idl:
* dom/EventException.idl:
* dom/EventListener.idl:
* dom/MessageChannel.idl:
* dom/MessageEvent.idl:
* dom/MessagePort.idl:
* dom/ProgressEvent.idl:
* fileapi/Blob.idl:
* fileapi/File.idl:
* fileapi/FileError.idl:
* fileapi/FileException.idl:
* fileapi/FileList.idl:
* fileapi/FileReader.idl:
* fileapi/FileReaderSync.idl:
* html/DOMURL.idl:
* page/EventSource.idl:
* page/WorkerNavigator.idl:
* workers/DedicatedWorkerGlobalScope.idl:
* workers/SharedWorkerGlobalScope.idl:
* workers/WorkerGlobalScope.idl:
* workers/WorkerLocation.idl:
* xml/XMLHttpRequest.idl:
* xml/XMLHttpRequestException.idl:
* xml/XMLHttpRequestProgressEvent.idl:
* xml/XMLHttpRequestUpload.idl:

Source/WebKit/mac:
Reviewed by Geoffrey Garen.

* Plugins/Hosted/ProxyInstance.mm:
* Plugins/Hosted/ProxyRuntimeObject.mm:

Source/WebKit2:
Reviewed by Geoffrey Garen.

* WebProcess/Plugins/Netscape/JSNPMethod.cpp:
* WebProcess/Plugins/Netscape/JSNPObject.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@171824 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/runtime/CustomGetterSetter.cpp b/Source/JavaScriptCore/runtime/CustomGetterSetter.cpp
index 92b0219..0f9e1af 100644
--- a/Source/JavaScriptCore/runtime/CustomGetterSetter.cpp
+++ b/Source/JavaScriptCore/runtime/CustomGetterSetter.cpp
@@ -34,7 +34,7 @@
 
 STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(CustomGetterSetter);
 
-const ClassInfo CustomGetterSetter::s_info = { "CustomGetterSetter", 0, 0, 0, CREATE_METHOD_TABLE(CustomGetterSetter) };
+const ClassInfo CustomGetterSetter::s_info = { "CustomGetterSetter", 0, 0, CREATE_METHOD_TABLE(CustomGetterSetter) };
 
 void callCustomSetter(ExecState* exec, JSValue customGetterSetter, JSObject* base, JSValue thisValue, JSValue value)
 {