Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Unified Diff: src/s390/builtins-s390.cc

Issue 2047673003: S390: [debug] implement intuitive semantics for stepping over await call. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/s390/builtins-s390.cc
diff --git a/src/s390/builtins-s390.cc b/src/s390/builtins-s390.cc
index 8aca9da0d0b3235988960e6eecfb8e5e5aa306ac..6927a2ccc8103259150f7490abaa1435bd685ced 100644
--- a/src/s390/builtins-s390.cc
+++ b/src/s390/builtins-s390.cc
@@ -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) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698