diff options
Diffstat (limited to 'JavaScriptCore/jit/JITStubs.h')
-rw-r--r-- | JavaScriptCore/jit/JITStubs.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/JavaScriptCore/jit/JITStubs.h b/JavaScriptCore/jit/JITStubs.h index f419c8c..fe4bcfb 100644 --- a/JavaScriptCore/jit/JITStubs.h +++ b/JavaScriptCore/jit/JITStubs.h @@ -31,6 +31,8 @@ #include "MacroAssemblerCodeRef.h" #include "Register.h" +#include "ThunkGenerators.h" +#include <wtf/HashMap.h> #if ENABLE(JIT) @@ -43,16 +45,16 @@ namespace JSC { class FunctionExecutable; class Identifier; class JSGlobalData; - class JSGlobalData; + class JSGlobalObject; class JSObject; class JSPropertyNameIterator; class JSValue; class JSValueEncodedAsPointer; + class NativeExecutable; class Profiler; class PropertySlot; class PutPropertySlot; class RegisterFile; - class JSGlobalObject; class RegExp; union JITStubArg { @@ -77,7 +79,7 @@ namespace JSC { MacroAssemblerCodePtr ctiStringLengthTrampoline; MacroAssemblerCodePtr ctiVirtualCallLink; MacroAssemblerCodePtr ctiVirtualCall; - MacroAssemblerCodePtr ctiNativeCallThunk; + RefPtr<NativeExecutable> ctiNativeCallThunk; MacroAssemblerCodePtr ctiSoftModulo; }; @@ -265,6 +267,7 @@ namespace JSC { class JITThunks { public: JITThunks(JSGlobalData*); + ~JITThunks(); static void tryCacheGetByID(CallFrame*, CodeBlock*, ReturnAddressPtr returnAddress, JSValue baseValue, const Identifier& propertyName, const PropertySlot&, StructureStubInfo* stubInfo); static void tryCachePutByID(CallFrame*, CodeBlock*, ReturnAddressPtr returnAddress, JSValue baseValue, const PutPropertySlot&, StructureStubInfo* stubInfo); @@ -272,10 +275,13 @@ namespace JSC { MacroAssemblerCodePtr ctiStringLengthTrampoline() { return m_trampolineStructure.ctiStringLengthTrampoline; } MacroAssemblerCodePtr ctiVirtualCallLink() { return m_trampolineStructure.ctiVirtualCallLink; } MacroAssemblerCodePtr ctiVirtualCall() { return m_trampolineStructure.ctiVirtualCall; } - MacroAssemblerCodePtr ctiNativeCallThunk() { return m_trampolineStructure.ctiNativeCallThunk; } + NativeExecutable* ctiNativeCallThunk() { return m_trampolineStructure.ctiNativeCallThunk.get(); } MacroAssemblerCodePtr ctiSoftModulo() { return m_trampolineStructure.ctiSoftModulo; } + NativeExecutable* specializedThunk(JSGlobalData* globalData, ThunkGenerator generator); private: + typedef HashMap<ThunkGenerator, RefPtr<NativeExecutable> > ThunkMap; + ThunkMap m_thunkMap; RefPtr<ExecutablePool> m_executablePool; TrampolineStructure m_trampolineStructure; |