diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
commit | 32761a6cee1d0dee366b885b7b9c777e67885688 (patch) | |
tree | d6bec92bebfb216f4126356e55518842c2f476a1 /Source/JavaScriptCore/jit/JITCode.h | |
parent | a4e969f4965059196ca948db781e52f7cfebf19e (diff) | |
download | WebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz |
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/JavaScriptCore/jit/JITCode.h')
-rw-r--r-- | Source/JavaScriptCore/jit/JITCode.h | 73 |
1 files changed, 17 insertions, 56 deletions
diff --git a/Source/JavaScriptCore/jit/JITCode.h b/Source/JavaScriptCore/jit/JITCode.h index 7fb7b3134..52c78111a 100644 --- a/Source/JavaScriptCore/jit/JITCode.h +++ b/Source/JavaScriptCore/jit/JITCode.h @@ -26,14 +26,14 @@ #ifndef JITCode_h #define JITCode_h -#include "ArityCheckMode.h" +#if ENABLE(JIT) || ENABLE(LLINT) #include "CallFrame.h" -#include "CodeOrigin.h" #include "Disassembler.h" +#include "JITStubs.h" #include "JSCJSValue.h" +#include "LegacyProfiler.h" #include "MacroAssemblerCodeRef.h" -#include "RegisterSet.h" -#include <wtf/Optional.h> +#endif namespace JSC { @@ -47,7 +47,6 @@ class JITCode; } struct ProtoCallFrame; -class TrackedReferences; class VM; class JITCode : public ThreadSafeRefCounted<JITCode> { @@ -55,17 +54,8 @@ public: typedef MacroAssemblerCodeRef CodeRef; typedef MacroAssemblerCodePtr CodePtr; - enum JITType : uint8_t { - None, - HostCallThunk, - InterpreterThunk, - BaselineJIT, - DFGJIT, - FTLJIT - }; + enum JITType { None, HostCallThunk, InterpreterThunk, BaselineJIT, DFGJIT, FTLJIT }; - static const char* typeName(JITType); - static JITType bottomTierJIT() { return BaselineJIT; @@ -122,7 +112,7 @@ public: return false; } } - + static bool isLowerTier(JITType expectedLower, JITType expectedHigher) { RELEASE_ASSERT(isExecutableScript(expectedLower)); @@ -174,7 +164,7 @@ public: return jitCode->jitType(); } - virtual CodePtr addressForCall(ArityCheckMode) = 0; + virtual CodePtr addressForCall() = 0; virtual void* executableAddressAtOffset(size_t offset) = 0; void* executableAddress() { return executableAddressAtOffset(0); } virtual void* dataAddressAtOffset(size_t offset) = 0; @@ -185,9 +175,7 @@ public: virtual FTL::JITCode* ftl(); virtual FTL::ForOSREntryJITCode* ftlForOSREntry(); - virtual void validateReferences(const TrackedReferences&); - - JSValue execute(VM*, ProtoCallFrame*); + JSValue execute(VM*, ProtoCallFrame*, Register*); void* start() { return dataAddressAtOffset(0); } virtual size_t size() = 0; @@ -195,56 +183,29 @@ public: virtual bool contains(void*) = 0; -#if ENABLE(JIT) - virtual RegisterSet liveRegistersToPreserveAtExceptionHandlingCallSite(CodeBlock*, CallSiteIndex); - virtual Optional<CodeOrigin> findPC(CodeBlock*, void* pc) { UNUSED_PARAM(pc); return Nullopt; } -#endif + static PassRefPtr<JITCode> hostFunction(CodeRef); private: JITType m_jitType; }; -class JITCodeWithCodeRef : public JITCode { -protected: - JITCodeWithCodeRef(JITType); - JITCodeWithCodeRef(CodeRef, JITType); - +class DirectJITCode : public JITCode { public: - virtual ~JITCodeWithCodeRef(); + DirectJITCode(JITType); + DirectJITCode(const CodeRef, JITType); + virtual ~DirectJITCode(); + + void initializeCodeRef(CodeRef ref); + virtual CodePtr addressForCall() override; virtual void* executableAddressAtOffset(size_t offset) override; virtual void* dataAddressAtOffset(size_t offset) override; virtual unsigned offsetOf(void* pointerIntoCode) override; virtual size_t size() override; virtual bool contains(void*) override; -protected: - CodeRef m_ref; -}; - -class DirectJITCode : public JITCodeWithCodeRef { -public: - DirectJITCode(JITType); - DirectJITCode(CodeRef, CodePtr withArityCheck, JITType); - virtual ~DirectJITCode(); - - void initializeCodeRef(CodeRef, CodePtr withArityCheck); - - virtual CodePtr addressForCall(ArityCheckMode) override; - private: - CodePtr m_withArityCheck; -}; - -class NativeJITCode : public JITCodeWithCodeRef { -public: - NativeJITCode(JITType); - NativeJITCode(CodeRef, JITType); - virtual ~NativeJITCode(); - - void initializeCodeRef(CodeRef); - - virtual CodePtr addressForCall(ArityCheckMode) override; + CodeRef m_ref; }; } // namespace JSC |