Ignore:
Timestamp:
Mar 24, 2014, 8:44:52 PM (11 years ago)
Author:
[email protected]
Message:

More scaffolding for a stub routine to have a stub recursively embedded inside it
https://bugs.webkit.org/show_bug.cgi?id=130770

Reviewed by Oliver Hunt.

  • bytecode/CallLinkInfo.cpp:

(JSC::CallLinkInfo::unlink): VM& argument is superfluous.
(JSC::CallLinkInfo::visitWeak): Factor this out, it used to be in CodeBlock::finalizeUnconditionally().

  • bytecode/CallLinkInfo.h:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finalizeUnconditionally): Factor out some functionality into CallLinkInfo::visitWeak(), and make sure we pass RepatchBuffer& in more places.
(JSC::CodeBlock::unlinkCalls):
(JSC::CodeBlock::unlinkIncomingCalls):

  • bytecode/PolymorphicGetByIdList.cpp: Pass RepatchBuffer& through and call JITStubRoutine::visitWeak().

(JSC::GetByIdAccess::visitWeak):
(JSC::PolymorphicGetByIdList::visitWeak):

  • bytecode/PolymorphicGetByIdList.h:
  • bytecode/PolymorphicPutByIdList.cpp: Pass RepatchBuffer& through and call JITStubRoutine::visitWeak().

(JSC::PutByIdAccess::visitWeak):
(JSC::PolymorphicPutByIdList::visitWeak):

  • bytecode/PolymorphicPutByIdList.h:
  • bytecode/StructureStubInfo.cpp: Pass RepatchBuffer& through.

(JSC::StructureStubInfo::visitWeakReferences):

  • bytecode/StructureStubInfo.h:
  • jit/ClosureCallStubRoutine.cpp: isClosureCall is unused.

(JSC::ClosureCallStubRoutine::ClosureCallStubRoutine):

  • jit/GCAwareJITStubRoutine.cpp:

(JSC::GCAwareJITStubRoutine::GCAwareJITStubRoutine):
(JSC::createJITStubRoutine):

  • jit/GCAwareJITStubRoutine.h: Make it easier to construct one of these.

(JSC::GCAwareJITStubRoutine::isClosureCall): Deleted.

  • jit/JITStubRoutine.cpp:

(JSC::JITStubRoutine::visitWeak): This will allow future JITStubRoutine subclasses to have stubs recursively embedded inside them.

  • jit/JITStubRoutine.h:
  • jit/Repatch.cpp:

(JSC::generateGetByIdStub): Fix a possible GC bug where we weren't making the stub routine GC aware.
(JSC::emitCustomSetterStub): Clean up some code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/GCAwareJITStubRoutine.cpp

    r164229 r166218  
    3838
    3939GCAwareJITStubRoutine::GCAwareJITStubRoutine(
    40     const MacroAssemblerCodeRef& code, VM& vm, bool isClosureCall)
     40    const MacroAssemblerCodeRef& code, VM& vm)
    4141    : JITStubRoutine(code)
    4242    , m_mayBeExecuting(false)
    4343    , m_isJettisoned(false)
    44     , m_isClosureCall(isClosureCall)
    4544{
    4645    vm.heap.m_jitStubRoutines.add(this);
     
    9998    const MacroAssemblerCodeRef& code,
    10099    VM& vm,
    101     const JSCell*,
    102     bool makesCalls)
    103 {
    104     if (!makesCalls)
    105         return adoptRef(new JITStubRoutine(code));
    106 
    107     return static_pointer_cast<JITStubRoutine>(
    108         adoptRef(new GCAwareJITStubRoutine(code, vm)));
    109 }
    110 
    111 PassRefPtr<JITStubRoutine> createJITStubRoutine(
    112     const MacroAssemblerCodeRef& code,
    113     VM& vm,
    114100    const JSCell* owner,
    115101    bool makesCalls,
     
    118104    if (!makesCalls)
    119105        return adoptRef(new JITStubRoutine(code));
     106   
     107    if (!object) {
     108        return static_pointer_cast<JITStubRoutine>(
     109            adoptRef(new GCAwareJITStubRoutine(code, vm)));
     110    }
    120111   
    121112    return static_pointer_cast<JITStubRoutine>(
Note: See TracChangeset for help on using the changeset viewer.