Skip to content
Permalink
Browse files
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):


Canonical link: https://commits.webkit.org/131794@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@147053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
geoffreygaren committed Mar 28, 2013
1 parent 01d06d6 commit c13f5008e75bfc329c18a6b8bb4a0ad59d21122e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 38 deletions.
@@ -1,3 +1,19 @@
2013-03-27 Geoffrey Garen <ggaren@apple.com>

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):

2013-03-27 Filip Pizlo <fpizlo@apple.com>

JIT and DFG should NaN-check loads from Float32 arrays
@@ -193,13 +193,6 @@ class ByteCodeParser {
// Link block successors.
void linkBlock(BasicBlock*, Vector<BlockIndex>& possibleTargets);
void linkBlocks(Vector<UnlinkedBlock>& unlinkedBlocks, Vector<BlockIndex>& possibleTargets);
// Link GetLocal & SetLocal nodes, to ensure live values are generated.
enum PhiStackType {
LocalPhiStack,
ArgumentPhiStack
};
template<PhiStackType stackType>
void processPhiStack();

VariableAccessData* newVariableAccessData(int operand, bool isCaptured)
{
@@ -697,8 +690,6 @@ class ByteCodeParser {
return value.isBoolean() || value.isUndefinedOrNull();
}

// These methods create a node and add it to the graph. If nodes of this type are
// 'mustGenerate' then the node will implicitly be ref'ed to ensure generation.
Node* addToGraph(NodeType op, Node* child1 = 0, Node* child2 = 0, Node* child3 = 0)
{
Node* result = m_graph.addNode(
@@ -719,10 +710,8 @@ class ByteCodeParser {
{
Node* result = m_graph.addNode(
SpecNone, op, currentCodeOrigin(), info, Edge(child1), Edge(child2), Edge(child3));
if (op == Phi)
m_currentBlock->phis.append(result);
else
m_currentBlock->append(result);
ASSERT(op != Phi);
m_currentBlock->append(result);
return result;
}
Node* addToGraph(NodeType op, OpInfo info1, OpInfo info2, Node* child1 = 0, Node* child2 = 0, Node* child3 = 0)
@@ -748,13 +737,6 @@ class ByteCodeParser {
return result;
}

Node* insertPhiNode(OpInfo info, BasicBlock* block)
{
Node* result = m_graph.addNode(SpecNone, Phi, currentCodeOrigin(), info);
block->phis.append(result);
return result;
}

void addVarArgChild(Node* child)
{
m_graph.m_varArgChildren.append(Edge(child));
@@ -1024,21 +1006,6 @@ class ByteCodeParser {
// The index in the global resolve info.
unsigned m_globalResolveNumber;

struct PhiStackEntry {
PhiStackEntry(BasicBlock* block, Node* phi, unsigned varNo)
: m_block(block)
, m_phi(phi)
, m_varNo(varNo)
{
}

BasicBlock* m_block;
Node* m_phi;
unsigned m_varNo;
};
Vector<PhiStackEntry, 16> m_argumentPhiStack;
Vector<PhiStackEntry, 16> m_localPhiStack;

HashMap<ConstantBufferKey, unsigned> m_constantBufferCache;

struct InlineStackEntry {
@@ -3760,9 +3727,6 @@ bool ByteCodeParser::parse()

linkBlocks(inlineStackEntry.m_unlinkedBlocks, inlineStackEntry.m_blockLinkingTargets);
m_graph.determineReachability();
#if DFG_ENABLE(DEBUG_PROPAGATION_VERBOSE)
dataLogF("Processing local variable phis.\n");
#endif

ASSERT(m_preservedVars.size());
size_t numberOfLocals = 0;

0 comments on commit c13f500

Please sign in to comment.