Commit 37cb3f5e authored by Junliang Yan's avatar Junliang Yan Committed by Commit Bot

PPC/s390: [ignition] Make SuspendGenerator return

Port 5cef3ddd

Original Commit Message:

    Instead of requiring the pattern that a SuspendGenerator must be
    followed by a Return, make SuspendGenerator return directly. This can,
    in the future, simplify some of the reasoning around generator suspends.

R=leszeks@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: Ic967164b40433ed64df5996560490b13d6159a94
Reviewed-on: https://chromium-review.googlesource.com/879223Reviewed-by: 's avatarJoran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#50774}
parent cddf3e3f
......@@ -1039,12 +1039,15 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
MemOperand(fp, InterpreterFrameConstants::kBytecodeOffsetFromFp));
__ SmiUntag(kInterpreterBytecodeOffsetRegister);
// Check if we should return.
// Check if we should return by testing for one of the returning bytecodes.
Label do_return;
__ lbzx(r4, MemOperand(kInterpreterBytecodeArrayRegister,
kInterpreterBytecodeOffsetRegister));
__ cmpi(r4, Operand(static_cast<int>(interpreter::Bytecode::kReturn)));
#define JUMP_IF_EQUAL(NAME) \
__ cmpi(r4, Operand(static_cast<int>(interpreter::Bytecode::k##NAME))); \
__ beq(&do_return);
RETURN_BYTECODE_LIST(JUMP_IF_EQUAL)
#undef JUMP_IF_EQUAL
// Advance to the next bytecode and dispatch.
AdvanceBytecodeOffset(masm, kInterpreterBytecodeArrayRegister,
......
......@@ -1038,12 +1038,15 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
MemOperand(fp, InterpreterFrameConstants::kBytecodeOffsetFromFp));
__ SmiUntag(kInterpreterBytecodeOffsetRegister);
// Check if we should return.
// Check if we should return by testing for one of the returning bytecodes.
Label do_return;
__ LoadlB(r3, MemOperand(kInterpreterBytecodeArrayRegister,
kInterpreterBytecodeOffsetRegister));
__ CmpP(r3, Operand(static_cast<int>(interpreter::Bytecode::kReturn)));
#define JUMP_IF_EQUAL(NAME) \
__ CmpP(r3, Operand(static_cast<int>(interpreter::Bytecode::k##NAME))); \
__ beq(&do_return);
RETURN_BYTECODE_LIST(JUMP_IF_EQUAL)
#undef JUMP_IF_EQUAL
// Advance to the next bytecode and dispatch.
AdvanceBytecodeOffset(masm, kInterpreterBytecodeArrayRegister,
......
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