https://bugs.webkit.org/show_bug.cgi?id=68328
The generator and intrinsic fields in HashTableValue/HashEntry and associated structures and methods are redundant
Reviewed by Geoff Garen.
../JavaScriptCore:
Move the instrinsic enum out of the DFG, into runtime. Add entires for all host functions
that have an intrinsic in the form of a generated thunk. Remove the thunk pointer from the
hashtable, and make Intrinsic field no longer ifdef on JIT/DFG. In getHostFunction select
a thunk genertaor to use based on the Intrinsic.
- JavaScriptCore.xcodeproj/project.pbxproj:
- create_hash_table:
- dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::handleIntrinsic):
- dfg/DFGCapabilities.h:
- dfg/DFGIntrinsic.h: Removed.
- jit/JITStubs.cpp:
(JSC::JITThunks::hostFunctionStub):
- jit/JITStubs.h:
- runtime/Executable.cpp:
(JSC::ExecutableBase::intrinsic):
(JSC::NativeExecutable::intrinsic):
(JSC::ExecutableBase::intrinsicFor):
(JSC::NativeExecutable::create):
(JSC::NativeExecutable::finishCreation):
- runtime/Intrinsic.h: Copied from Source/JavaScriptCore/dfg/DFGIntrinsic.h.
- runtime/JSGlobalData.cpp:
(JSC::thunkGeneratorForIntrinsic):
(JSC::JSGlobalData::getHostFunction):
- runtime/JSGlobalData.h:
- runtime/Lookup.cpp:
(JSC::HashTable::createTable):
(JSC::setUpStaticFunctionSlot):
(JSC::HashEntry::initialize):
(JSC::HashEntry::intrinsic):
../WebCore:
Intrinsic is no longer in the DFG namespace, is always in the
hash table. Removed ThunkGenerator.
- bindings/scripts/CodeGeneratorJS.pm:
(GenerateHashTable):