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/GCAwareJITStubRoutine.cpp | |
parent | a4e969f4965059196ca948db781e52f7cfebf19e (diff) | |
download | WebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz |
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/JavaScriptCore/jit/GCAwareJITStubRoutine.cpp')
-rw-r--r-- | Source/JavaScriptCore/jit/GCAwareJITStubRoutine.cpp | 61 |
1 files changed, 14 insertions, 47 deletions
diff --git a/Source/JavaScriptCore/jit/GCAwareJITStubRoutine.cpp b/Source/JavaScriptCore/jit/GCAwareJITStubRoutine.cpp index 60c0c5514..f681dd847 100644 --- a/Source/JavaScriptCore/jit/GCAwareJITStubRoutine.cpp +++ b/Source/JavaScriptCore/jit/GCAwareJITStubRoutine.cpp @@ -28,25 +28,24 @@ #if ENABLE(JIT) -#include "CodeBlock.h" -#include "DFGCommonData.h" #include "Heap.h" #include "VM.h" -#include "JSCInlines.h" +#include "Operations.h" #include "SlotVisitor.h" #include "Structure.h" namespace JSC { GCAwareJITStubRoutine::GCAwareJITStubRoutine( - const MacroAssemblerCodeRef& code, VM& vm) + const MacroAssemblerCodeRef& code, VM& vm, bool isClosureCall) : JITStubRoutine(code) , m_mayBeExecuting(false) , m_isJettisoned(false) + , m_isClosureCall(isClosureCall) { vm.heap.m_jitStubRoutines.add(this); } - + GCAwareJITStubRoutine::~GCAwareJITStubRoutine() { } void GCAwareJITStubRoutine::observeZeroRefCount() @@ -96,61 +95,29 @@ void MarkingGCAwareJITStubRoutineWithOneObject::markRequiredObjectsInternal(Slot visitor.append(&m_object); } - -GCAwareJITStubRoutineWithExceptionHandler::GCAwareJITStubRoutineWithExceptionHandler( - const MacroAssemblerCodeRef& code, VM& vm, - CodeBlock* codeBlockForExceptionHandlers, CallSiteIndex exceptionHandlerCallSiteIndex) - : GCAwareJITStubRoutine(code, vm) - , m_codeBlockWithExceptionHandler(codeBlockForExceptionHandlers) - , m_exceptionHandlerCallSiteIndex(exceptionHandlerCallSiteIndex) -{ - RELEASE_ASSERT(m_codeBlockWithExceptionHandler); - ASSERT(!!m_codeBlockWithExceptionHandler->handlerForIndex(exceptionHandlerCallSiteIndex.bits())); -} - -void GCAwareJITStubRoutineWithExceptionHandler::aboutToDie() -{ - m_codeBlockWithExceptionHandler = nullptr; -} - -void GCAwareJITStubRoutineWithExceptionHandler::observeZeroRefCount() +PassRefPtr<JITStubRoutine> createJITStubRoutine( + const MacroAssemblerCodeRef& code, + VM& vm, + const JSCell*, + bool makesCalls) { -#if ENABLE(DFG_JIT) - if (m_codeBlockWithExceptionHandler) { - m_codeBlockWithExceptionHandler->jitCode()->dfgCommon()->removeCallSiteIndex(m_exceptionHandlerCallSiteIndex); - m_codeBlockWithExceptionHandler->removeExceptionHandlerForCallSite(m_exceptionHandlerCallSiteIndex); - m_codeBlockWithExceptionHandler = nullptr; - } -#endif + if (!makesCalls) + return adoptRef(new JITStubRoutine(code)); - Base::observeZeroRefCount(); + return static_pointer_cast<JITStubRoutine>( + adoptRef(new GCAwareJITStubRoutine(code, vm))); } - PassRefPtr<JITStubRoutine> createJITStubRoutine( const MacroAssemblerCodeRef& code, VM& vm, const JSCell* owner, bool makesCalls, - JSCell* object, - CodeBlock* codeBlockForExceptionHandlers, - CallSiteIndex exceptionHandlerCallSiteIndex) + JSCell* object) { if (!makesCalls) return adoptRef(new JITStubRoutine(code)); - if (codeBlockForExceptionHandlers) { - RELEASE_ASSERT(!object); // We're not a marking stub routine. - RELEASE_ASSERT(JITCode::isOptimizingJIT(codeBlockForExceptionHandlers->jitType())); - return static_pointer_cast<JITStubRoutine>( - adoptRef(new GCAwareJITStubRoutineWithExceptionHandler(code, vm, codeBlockForExceptionHandlers, exceptionHandlerCallSiteIndex))); - } - - if (!object) { - return static_pointer_cast<JITStubRoutine>( - adoptRef(new GCAwareJITStubRoutine(code, vm))); - } - return static_pointer_cast<JITStubRoutine>( adoptRef(new MarkingGCAwareJITStubRoutineWithOneObject(code, vm, owner, object))); } |