https://bugs.webkit.org/show_bug.cgi?id=156830
Reviewed by Saam Barati.
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* tests/stress/dfg-del-by-id.js: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199801
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2016-04-20 Filip Pizlo <fpizlo@apple.com>
+
+ DFG del_by_id support forgets to set()
+ https://bugs.webkit.org/show_bug.cgi?id=156830
+
+ Reviewed by Saam Barati.
+
+ * dfg/DFGByteCodeParser.cpp:
+ (JSC::DFG::ByteCodeParser::parseBlock):
+ * tests/stress/dfg-del-by-id.js: Added.
+
2016-04-20 Saam barati <sbarati@apple.com>
Improve sampling profiler CLI JSC tool
2016-04-20 Saam barati <sbarati@apple.com>
Improve sampling profiler CLI JSC tool
case op_del_by_id: {
Node* base = get(VirtualRegister(currentInstruction[2].u.operand));
unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[currentInstruction[3].u.operand];
case op_del_by_id: {
Node* base = get(VirtualRegister(currentInstruction[2].u.operand));
unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[currentInstruction[3].u.operand];
- addToGraph(DeleteById, OpInfo(identifierNumber), base);
+ set(VirtualRegister(currentInstruction[1].u.operand),
+ addToGraph(DeleteById, OpInfo(identifierNumber), base));
NEXT_OPCODE(op_del_by_id);
}
NEXT_OPCODE(op_del_by_id);
}
--- /dev/null
+function foo(o) {
+ return delete o.f;
+}
+
+noInline(foo);
+
+for (var i = 0; i < 10000; ++i) {
+ var o = {f:42};
+ var result = foo(o);
+ if (result !== true)
+ throw "Error: bad result: " + result;
+ if ("f" in o)
+ throw "Error: \"f\" still in ok";
+}