Ignore:
Timestamp:
Jan 10, 2018, 11:41:12 AM (8 years ago)
Author:
[email protected]
Message:

Unreviewed, rolling out r226667 and r226673.
https://bugs.webkit.org/show_bug.cgi?id=181488

This caused a flaky crash. (Requested by mlewis13 on #webkit).

Reverted changesets:

"CodeBlocks should be in IsoSubspaces"
https://bugs.webkit.org/show_bug.cgi?id=180884
https://trac.webkit.org/changeset/226667

"REGRESSION (r226667): CodeBlocks should be in IsoSubspaces"
https://bugs.webkit.org/show_bug.cgi?id=180884
https://trac.webkit.org/changeset/226673

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.h

    r226667 r226725  
    8888class CodeBlockSet;
    8989class ExecState;
    90 class ExecutableToCodeBlockEdge;
    9190class JSModuleEnvironment;
    9291class LLIntOffsetsExtractor;
     
    109108    friend class LLIntOffsetsExtractor;
    110109
     110    struct UnconditionalFinalizer : public JSC::UnconditionalFinalizer {
     111        UnconditionalFinalizer(CodeBlock& codeBlock)
     112            : codeBlock(codeBlock)
     113        { }
     114        void finalizeUnconditionally() override;
     115        CodeBlock& codeBlock;
     116    };
     117
     118    struct WeakReferenceHarvester : public JSC::WeakReferenceHarvester {
     119        WeakReferenceHarvester(CodeBlock& codeBlock)
     120            : codeBlock(codeBlock)
     121        { }
     122        void visitWeakReferences(SlotVisitor&) override;
     123        CodeBlock& codeBlock;
     124    };
     125
    111126public:
    112127
     
    114129
    115130    static const unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
    116     static const bool needsDestruction = true;
    117 
    118     template<typename>
    119     static void subspaceFor(VM&) { }
    120131
    121132    DECLARE_INFO;
     
    127138    void finishCreation(VM&, CopyParsedBlockTag, CodeBlock& other);
    128139    bool finishCreation(VM&, ScriptExecutable* ownerExecutable, UnlinkedCodeBlock*, JSScope*);
    129    
    130     void finishCreationCommon(VM&);
    131140
    132141    WriteBarrier<JSGlobalObject> m_globalObject;
     
    192201    static void visitChildren(JSCell*, SlotVisitor&);
    193202    void visitChildren(SlotVisitor&);
    194     void finalizeUnconditionally(VM&);
     203    void visitWeakly(SlotVisitor&);
     204    void clearVisitWeaklyHasBeenCalled();
    195205
    196206    void dumpSource();
     
    360370    ExecutableBase* ownerExecutable() const { return m_ownerExecutable.get(); }
    361371    ScriptExecutable* ownerScriptExecutable() const { return jsCast<ScriptExecutable*>(m_ownerExecutable.get()); }
    362    
    363     ExecutableToCodeBlockEdge* ownerEdge() const { return m_ownerEdge.get(); }
    364372
    365373    VM* vm() const { return m_poisonedVM.unpoisoned(); }
     
    822830    mutable ConcurrentJSLock m_lock;
    823831
     832    bool m_visitWeaklyHasBeenCalled;
     833
    824834    bool m_shouldAlwaysBeInlined; // Not a bitfield because the JIT wants to store to it.
    825835
     
    909919private:
    910920    friend class CodeBlockSet;
    911     friend class ExecutableToCodeBlockEdge;
    912921
    913922    BytecodeLivenessAnalysis& livenessAnalysisSlow();
     
    974983    };
    975984    WriteBarrier<ExecutableBase> m_ownerExecutable;
    976     WriteBarrier<ExecutableToCodeBlockEdge> m_ownerEdge;
    977985    ConstExprPoisoned<CodeBlockPoison, VM*> m_poisonedVM;
    978986
     
    10391047
    10401048    std::unique_ptr<RareData> m_rareData;
     1049
     1050    PoisonedUniquePtr<CodeBlockPoison, UnconditionalFinalizer> m_unconditionalFinalizer;
     1051    PoisonedUniquePtr<CodeBlockPoison, WeakReferenceHarvester> m_weakReferenceHarvester;
    10411052};
    10421053
     
    10631074{
    10641075    return uncheckedR(reg.offset());
     1076}
     1077
     1078inline void CodeBlock::clearVisitWeaklyHasBeenCalled()
     1079{
     1080    m_visitWeaklyHasBeenCalled = false;
    10651081}
    10661082
Note: See TracChangeset for help on using the changeset viewer.