Title: [141364] trunk/Source/_javascript_Core
- Revision
- 141364
- Author
- [email protected]
- Date
- 2013-01-30 19:14:21 -0800 (Wed, 30 Jan 2013)
Log Message
DFG bytecode parser should have more assertions about the status of local accesses
https://bugs.webkit.org/show_bug.cgi?id=108417
Reviewed by Mark Hahnenberg.
Assert some things that we already know to be true, just to reassure ourselves that they are true.
This is meant as a prerequisite for https://bugs.webkit.org/show_bug.cgi?id=108414, which will
make these rules even stricter.
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::getLocal):
(JSC::DFG::ByteCodeParser::getArgument):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (141363 => 141364)
--- trunk/Source/_javascript_Core/ChangeLog 2013-01-31 02:40:33 UTC (rev 141363)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-01-31 03:14:21 UTC (rev 141364)
@@ -1,3 +1,18 @@
+2013-01-30 Filip Pizlo <[email protected]>
+
+ DFG bytecode parser should have more assertions about the status of local accesses
+ https://bugs.webkit.org/show_bug.cgi?id=108417
+
+ Reviewed by Mark Hahnenberg.
+
+ Assert some things that we already know to be true, just to reassure ourselves that they are true.
+ This is meant as a prerequisite for https://bugs.webkit.org/show_bug.cgi?id=108414, which will
+ make these rules even stricter.
+
+ * dfg/DFGByteCodeParser.cpp:
+ (JSC::DFG::ByteCodeParser::getLocal):
+ (JSC::DFG::ByteCodeParser::getArgument):
+
2013-01-30 Mark Hahnenberg <[email protected]>
Objective-C API: JSContext's dealloc causes ASSERT due to ordering of releases
Modified: trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp (141363 => 141364)
--- trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp 2013-01-31 02:40:33 UTC (rev 141363)
+++ trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp 2013-01-31 03:14:21 UTC (rev 141364)
@@ -299,7 +299,8 @@
node = injectLazyOperandSpeculation(addToGraph(GetLocal, OpInfo(variableAccessData), node));
m_currentBlock->variablesAtTail.local(operand) = node;
return node;
- }
+ } else
+ ASSERT(node->op() == SetLocal);
}
ASSERT(node->op() != Flush);
@@ -314,7 +315,11 @@
// Make sure we link to the Phi node, not to the GetLocal.
if (node->op() == GetLocal)
node = node->child1().node();
+ else
+ ASSERT(node->op() == SetLocal);
+ ASSERT(node->op() == SetLocal || node->op() == Phi);
+
Node* newGetLocal = injectLazyOperandSpeculation(
addToGraph(GetLocal, OpInfo(node->variableAccessData()), node));
m_currentBlock->variablesAtTail.local(operand) = newGetLocal;
@@ -380,7 +385,8 @@
node = injectLazyOperandSpeculation(addToGraph(GetLocal, OpInfo(variableAccessData), node));
m_currentBlock->variablesAtTail.argument(argument) = node;
return node;
- }
+ } else
+ ASSERT(node->op() == SetLocal || node->op() == SetArgument);
}
ASSERT(node->op() != Flush);
@@ -400,6 +406,9 @@
if (isCaptured) {
if (node->op() == GetLocal)
node = node->child1().node();
+ else
+ ASSERT(node->op() == SetLocal || node->op() == SetArgument);
+ ASSERT(node->op() == SetLocal || node->op() == SetArgument || node->op() == Phi);
return injectLazyOperandSpeculation(addToGraph(GetLocal, OpInfo(node->variableAccessData()), node));
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes