S390: [debug] implement intuitive semantics for stepping over await call.
Port 8d90210a1e
R=yangguo@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com, bjaideep@ca.ibm.com
BUG=v8:4483
LOG=N
Review-Url: https://codereview.chromium.org/2047673003
Cr-Commit-Position: refs/heads/master@{#36801}
This commit is contained in:
parent
25af5d3d32
commit
701f94876c
@ -711,21 +711,25 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
|
||||
__ LoadP(r6, FieldMemOperand(r3, JSGeneratorObject::kFunctionOffset));
|
||||
|
||||
// Flood function if we are stepping.
|
||||
Label skip_flooding;
|
||||
Label prepare_step_in_if_stepping, prepare_step_in_suspended_generator;
|
||||
Label stepping_prepared;
|
||||
ExternalReference step_in_enabled =
|
||||
ExternalReference::debug_step_in_enabled_address(masm->isolate());
|
||||
__ mov(ip, Operand(step_in_enabled));
|
||||
__ LoadlB(ip, MemOperand(ip));
|
||||
__ CmpP(ip, Operand::Zero());
|
||||
__ beq(&skip_flooding);
|
||||
{
|
||||
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
|
||||
__ Push(r3, r4, r6);
|
||||
__ CallRuntime(Runtime::kDebugPrepareStepInIfStepping);
|
||||
__ Pop(r3, r4);
|
||||
__ LoadP(r6, FieldMemOperand(r3, JSGeneratorObject::kFunctionOffset));
|
||||
}
|
||||
__ bind(&skip_flooding);
|
||||
__ bne(&prepare_step_in_if_stepping);
|
||||
|
||||
// Flood function if we need to continue stepping in the suspended generator.
|
||||
|
||||
ExternalReference debug_suspended_generator =
|
||||
ExternalReference::debug_suspended_generator_address(masm->isolate());
|
||||
|
||||
__ mov(ip, Operand(debug_suspended_generator));
|
||||
__ LoadP(ip, MemOperand(ip));
|
||||
__ CmpP(ip, r3);
|
||||
__ beq(&prepare_step_in_suspended_generator);
|
||||
__ bind(&stepping_prepared);
|
||||
|
||||
// Push receiver.
|
||||
__ LoadP(ip, FieldMemOperand(r3, JSGeneratorObject::kReceiverOffset));
|
||||
@ -830,6 +834,26 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
|
||||
__ Jump(r5);
|
||||
}
|
||||
}
|
||||
|
||||
__ bind(&prepare_step_in_if_stepping);
|
||||
{
|
||||
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
|
||||
__ Push(r3, r4, r6);
|
||||
__ CallRuntime(Runtime::kDebugPrepareStepInIfStepping);
|
||||
__ Pop(r3, r4);
|
||||
__ LoadP(r6, FieldMemOperand(r3, JSGeneratorObject::kFunctionOffset));
|
||||
}
|
||||
__ b(&stepping_prepared);
|
||||
|
||||
__ bind(&prepare_step_in_suspended_generator);
|
||||
{
|
||||
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
|
||||
__ Push(r3, r4);
|
||||
__ CallRuntime(Runtime::kDebugPrepareStepInSuspendedGenerator);
|
||||
__ Pop(r3, r4);
|
||||
__ LoadP(r6, FieldMemOperand(r3, JSGeneratorObject::kFunctionOffset));
|
||||
}
|
||||
__ b(&stepping_prepared);
|
||||
}
|
||||
|
||||
void Builtins::Generate_ConstructedNonConstructable(MacroAssembler* masm) {
|
||||
|
Loading…
Reference in New Issue
Block a user