Fix assertion failure on BytecodeGenerator::recordOpcode
authortzagallo@apple.com <tzagallo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Nov 2018 15:24:04 +0000 (15:24 +0000)
committertzagallo@apple.com <tzagallo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Nov 2018 15:24:04 +0000 (15:24 +0000)
commitf1b8a00b474cdec284850ffba0fa49232ddba378
treed533af3cd3431c58db9439697e9ba8c822139039
parentbc2c510c34b923a45162a87bf1c1b8f0df7ad82f
Fix assertion failure on BytecodeGenerator::recordOpcode
https://bugs.webkit.org/show_bug.cgi?id=191724
<rdar://problem/45724395>

Reviewed by Saam Barati.

JSTests:

* stress/regress-187373-2.js: Added.
(foo):

Source/JavaScriptCore:

Since https://bugs.webkit.org/show_bug.cgi?id=187373, we were not
restoring m_lastInstruction after patching the bytecode when
finalizing StructureForInContexts, only m_lastOpcodeID, which led to
the assertion failure.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::StructureForInContext::finalize):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238281 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/stress/regress-187373-2.js [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp