Ignore:
Timestamp:
Dec 6, 2011, 12:46:07 PM (14 years ago)
Author:
[email protected]
Message:

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):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp

    r101457 r102167  
    903903        }
    904904        JSFunction* expectedFunction;
    905         DFG::Intrinsic intrinsic;
     905        Intrinsic intrinsic;
    906906        bool certainAboutExpectedFunction;
    907907        if (callType == ConstantFunction) {
     
    12261226
    12271227    default:
    1228         ASSERT(intrinsic == NoIntrinsic);
    12291228        return false;
    12301229    }
Note: See TracChangeset for help on using the changeset viewer.