Changeset 178284 in webkit for trunk/Source/JavaScriptCore/heap


Ignore:
Timestamp:
Jan 12, 2015, 10:26:11 AM (10 years ago)
Author:
[email protected]
Message:

Unreviewed, rolling out r178266.
https://bugs.webkit.org/show_bug.cgi?id=140363

Broke a JSC test (Requested by ap on #webkit).

Reverted changeset:

"Local JSArray* "keys" in objectConstructorKeys() is not
marked during garbage collection"
https://bugs.webkit.org/show_bug.cgi?id=140348
http://trac.webkit.org/changeset/178266

Location:
trunk/Source/JavaScriptCore/heap
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/heap/Heap.cpp

    r178266 r178284  
    505505    // We gather conservative roots before clearing mark bits because conservative
    506506    // gathering uses the mark bits to determine whether a reference is valid.
     507    void* dummy;
    507508    ConservativeRoots conservativeRoots(&m_objectSpace.blocks(), &m_storageSpace);
    508     gatherStackRoots(conservativeRoots);
     509    gatherStackRoots(conservativeRoots, &dummy);
    509510    gatherJSStackRoots(conservativeRoots);
    510511    gatherScratchBufferRoots(conservativeRoots);
     
    566567}
    567568
    568 void Heap::gatherStackRoots(ConservativeRoots& roots)
     569void Heap::gatherStackRoots(ConservativeRoots& roots, void** dummy)
    569570{
    570571    GCPHASE(GatherStackRoots);
    571572    m_jitStubRoutines.clearMarks();
    572     m_machineThreads.gatherConservativeRoots(roots, m_jitStubRoutines, m_codeBlocks);
     573    m_machineThreads.gatherConservativeRoots(roots, m_jitStubRoutines, m_codeBlocks, dummy);
    573574}
    574575
  • trunk/Source/JavaScriptCore/heap/Heap.h

    r178266 r178284  
    276276
    277277    void markRoots(double gcStartTime);
    278     void gatherStackRoots(ConservativeRoots&);
     278    void gatherStackRoots(ConservativeRoots&, void** dummy);
    279279    void gatherJSStackRoots(ConservativeRoots&);
    280280    void gatherScratchBufferRoots(ConservativeRoots&);
  • trunk/Source/JavaScriptCore/heap/MachineStackMarker.cpp

    r178266 r178284  
    222222#endif
    223223
    224 void MachineThreads::gatherFromCurrentThread(ConservativeRoots& conservativeRoots, JITStubRoutineSet& jitStubRoutines, CodeBlockSet& codeBlocks)
     224void MachineThreads::gatherFromCurrentThread(ConservativeRoots& conservativeRoots, JITStubRoutineSet& jitStubRoutines, CodeBlockSet& codeBlocks, void* stackCurrent)
    225225{
    226226    // setjmp forces volatile registers onto the stack
    227227    jmp_buf registers REGISTER_BUFFER_ALIGNMENT;
    228 
    229228#if COMPILER(MSVC)
    230229#pragma warning(push)
     
    240239    conservativeRoots.add(registersBegin, registersEnd, jitStubRoutines, codeBlocks);
    241240
    242     // We need to mark the stack top in this function so that callee saves are either already on the stack,
    243     // or will be saved in registers.
    244     void* stackBegin = &registers;
     241    void* stackBegin = stackCurrent;
    245242    void* stackEnd = wtfThreadData().stack().origin();
    246243    conservativeRoots.add(stackBegin, stackEnd, jitStubRoutines, codeBlocks);
     
    449446}
    450447
    451 void MachineThreads::gatherConservativeRoots(ConservativeRoots& conservativeRoots, JITStubRoutineSet& jitStubRoutines, CodeBlockSet& codeBlocks)
    452 {
    453     gatherFromCurrentThread(conservativeRoots, jitStubRoutines, codeBlocks);
     448void MachineThreads::gatherConservativeRoots(ConservativeRoots& conservativeRoots, JITStubRoutineSet& jitStubRoutines, CodeBlockSet& codeBlocks, void* stackCurrent)
     449{
     450    gatherFromCurrentThread(conservativeRoots, jitStubRoutines, codeBlocks, stackCurrent);
    454451
    455452    if (m_threadSpecific) {
  • trunk/Source/JavaScriptCore/heap/MachineStackMarker.h

    r178266 r178284  
    4040        ~MachineThreads();
    4141
    42         void gatherConservativeRoots(ConservativeRoots&, JITStubRoutineSet&, CodeBlockSet&);
     42        void gatherConservativeRoots(ConservativeRoots&, JITStubRoutineSet&, CodeBlockSet&, void* stackCurrent);
    4343
    4444        JS_EXPORT_PRIVATE void makeUsableFromMultipleThreads();
     
    4646
    4747    private:
    48         void gatherFromCurrentThread(ConservativeRoots&, JITStubRoutineSet&, CodeBlockSet&);
     48        void gatherFromCurrentThread(ConservativeRoots&, JITStubRoutineSet&, CodeBlockSet&, void* stackCurrent);
    4949
    5050        class Thread;
Note: See TracChangeset for help on using the changeset viewer.