https://bugs.webkit.org/show_bug.cgi?id=68328
authorbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Dec 2011 20:46:07 +0000 (20:46 +0000)
committerbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Dec 2011 20:46:07 +0000 (20:46 +0000)
commit0b6085a559bd061d847b6ffca92dcbfb7331cbea
treea8981b66656cd08dc50e34f7a4e3d27468b9bd12
parentf3ce2665085458c784fb2799e83bcd4c896981c1
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):
* runtime/Executable.h:
(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):
* runtime/Lookup.h:
(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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@102167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/create_hash_table
Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
Source/JavaScriptCore/dfg/DFGCapabilities.h
Source/JavaScriptCore/jit/JITStubs.cpp
Source/JavaScriptCore/jit/JITStubs.h
Source/JavaScriptCore/runtime/Executable.cpp
Source/JavaScriptCore/runtime/Executable.h
Source/JavaScriptCore/runtime/Intrinsic.h [moved from Source/JavaScriptCore/dfg/DFGIntrinsic.h with 85% similarity]
Source/JavaScriptCore/runtime/JSGlobalData.cpp
Source/JavaScriptCore/runtime/JSGlobalData.h
Source/JavaScriptCore/runtime/Lookup.cpp
Source/JavaScriptCore/runtime/Lookup.h
Source/WebCore/ChangeLog
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm