Commit a6a3d2c7 authored by Ross McIlroy's avatar Ross McIlroy Committed by Commit Bot

[Interpreter] Flush register equivalance on resume.

BUG=v8:6379

Change-Id: Ieddf861db3e5ef0445989c25ba5ee36f47c0d1bf
Reviewed-on: https://chromium-review.googlesource.com/506155
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45343}
parent e92c52ba
......@@ -66,7 +66,8 @@ class V8_EXPORT_PRIVATE BytecodeRegisterOptimizer final
INLINE(void PrepareForBytecode()) {
if (Bytecodes::IsJump(bytecode) || Bytecodes::IsSwitch(bytecode) ||
bytecode == Bytecode::kDebugger ||
bytecode == Bytecode::kSuspendGenerator) {
bytecode == Bytecode::kSuspendGenerator ||
bytecode == Bytecode::kResumeGenerator) {
// All state must be flushed before emitting
// - a jump bytecode (as the register equivalents at the jump target
// aren't known)
......@@ -74,6 +75,7 @@ class V8_EXPORT_PRIVATE BytecodeRegisterOptimizer final
// aren't known)
// - a call to the debugger (as it can manipulate locals and parameters),
// - a generator suspend (as this involves saving all registers).
// - a generator resume (as this involves restoring all registers).
Flush();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment