Changeset 147053 in webkit


Ignore:
Timestamp:
Mar 27, 2013 8:41:11 PM (11 years ago)
Author:
ggaren@apple.com
Message:

Removed some dead code in the DFG bytecode parser
https://bugs.webkit.org/show_bug.cgi?id=113472

Reviewed by Sam Weinig.

Now that Phi creation and liveness analysis are separate passes, we can
remove the vestiges of code that used to do that in the bytecode
parser.

  • dfg/DFGByteCodeParser.cpp:

(ByteCodeParser):
(JSC::DFG::ByteCodeParser::addToGraph):
(JSC::DFG::ByteCodeParser::parse):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r147047 r147053  
     12013-03-27  Geoffrey Garen  <ggaren@apple.com>
     2
     3        Removed some dead code in the DFG bytecode parser
     4        https://bugs.webkit.org/show_bug.cgi?id=113472
     5
     6        Reviewed by Sam Weinig.
     7
     8        Now that Phi creation and liveness analysis are separate passes, we can
     9        remove the vestiges of code that used to do that in the bytecode
     10        parser.
     11
     12        * dfg/DFGByteCodeParser.cpp:
     13        (ByteCodeParser):
     14        (JSC::DFG::ByteCodeParser::addToGraph):
     15        (JSC::DFG::ByteCodeParser::parse):
     16
    1172013-03-27  Filip Pizlo  <fpizlo@apple.com>
    218
  • trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp

    r146669 r147053  
    194194    void linkBlock(BasicBlock*, Vector<BlockIndex>& possibleTargets);
    195195    void linkBlocks(Vector<UnlinkedBlock>& unlinkedBlocks, Vector<BlockIndex>& possibleTargets);
    196     // Link GetLocal & SetLocal nodes, to ensure live values are generated.
    197     enum PhiStackType {
    198         LocalPhiStack,
    199         ArgumentPhiStack
    200     };
    201     template<PhiStackType stackType>
    202     void processPhiStack();
    203196   
    204197    VariableAccessData* newVariableAccessData(int operand, bool isCaptured)
     
    698691    }
    699692   
    700     // These methods create a node and add it to the graph. If nodes of this type are
    701     // 'mustGenerate' then the node  will implicitly be ref'ed to ensure generation.
    702693    Node* addToGraph(NodeType op, Node* child1 = 0, Node* child2 = 0, Node* child3 = 0)
    703694    {
     
    720711        Node* result = m_graph.addNode(
    721712            SpecNone, op, currentCodeOrigin(), info, Edge(child1), Edge(child2), Edge(child3));
    722         if (op == Phi)
    723             m_currentBlock->phis.append(result);
    724         else
    725             m_currentBlock->append(result);
     713        ASSERT(op != Phi);
     714        m_currentBlock->append(result);
    726715        return result;
    727716    }
     
    746735        m_numPassedVarArgs = 0;
    747736       
    748         return result;
    749     }
    750 
    751     Node* insertPhiNode(OpInfo info, BasicBlock* block)
    752     {
    753         Node* result = m_graph.addNode(SpecNone, Phi, currentCodeOrigin(), info);
    754         block->phis.append(result);
    755737        return result;
    756738    }
     
    10251007    unsigned m_globalResolveNumber;
    10261008
    1027     struct PhiStackEntry {
    1028         PhiStackEntry(BasicBlock* block, Node* phi, unsigned varNo)
    1029             : m_block(block)
    1030             , m_phi(phi)
    1031             , m_varNo(varNo)
    1032         {
    1033         }
    1034 
    1035         BasicBlock* m_block;
    1036         Node* m_phi;
    1037         unsigned m_varNo;
    1038     };
    1039     Vector<PhiStackEntry, 16> m_argumentPhiStack;
    1040     Vector<PhiStackEntry, 16> m_localPhiStack;
    1041    
    10421009    HashMap<ConstantBufferKey, unsigned> m_constantBufferCache;
    10431010   
     
    37613728    linkBlocks(inlineStackEntry.m_unlinkedBlocks, inlineStackEntry.m_blockLinkingTargets);
    37623729    m_graph.determineReachability();
    3763 #if DFG_ENABLE(DEBUG_PROPAGATION_VERBOSE)
    3764     dataLogF("Processing local variable phis.\n");
    3765 #endif
    37663730   
    37673731    ASSERT(m_preservedVars.size());
Note: See TracChangeset for help on using the changeset viewer.