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

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

Issue 2033223003: [debug] implement intuitive semantics for stepping over await call. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix arm64 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 | « src/mips/builtins-mips.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/builtins-mips64.cc
diff --git a/src/mips64/builtins-mips64.cc b/src/mips64/builtins-mips64.cc
index 60f5b9874a4fc2b368f650724478260655cf4dde..0c11b17b0fb1653832eb60f77bbb3eae6179ccd5 100644
--- a/src/mips64/builtins-mips64.cc
+++ b/src/mips64/builtins-mips64.cc
@@ -706,20 +706,21 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ ld(a4, FieldMemOperand(a1, 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());
__ li(t1, Operand(step_in_enabled));
__ lb(t1, MemOperand(t1));
- __ Branch(&skip_flooding, eq, t1, Operand(zero_reg));
- {
- FrameScope scope(masm, StackFrame::INTERNAL);
- __ Push(a1, a2, a4);
- __ CallRuntime(Runtime::kDebugPrepareStepInIfStepping);
- __ Pop(a1, a2);
- __ ld(a4, FieldMemOperand(a1, JSGeneratorObject::kFunctionOffset));
- }
- __ bind(&skip_flooding);
+ __ Branch(&prepare_step_in_if_stepping, ne, t1, Operand(zero_reg));
+
+ // Flood function if we need to continue stepping in the suspended generator.
+ ExternalReference debug_suspended_generator =
+ ExternalReference::debug_suspended_generator_address(masm->isolate());
+ __ li(t1, Operand(debug_suspended_generator));
+ __ lw(t1, MemOperand(t1));
+ __ Branch(&prepare_step_in_suspended_generator, eq, t1, Operand(zero_reg));
+ __ bind(&stepping_prepared);
// Push receiver.
__ ld(a5, FieldMemOperand(a1, JSGeneratorObject::kReceiverOffset));
@@ -815,6 +816,26 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ Move(v0, a1); // Continuation expects generator object in v0.
__ Jump(a3);
}
+
+ __ bind(&prepare_step_in_if_stepping);
+ {
+ FrameScope scope(masm, StackFrame::INTERNAL);
+ __ Push(a1, a2, a4);
+ __ CallRuntime(Runtime::kDebugPrepareStepInIfStepping);
+ __ Pop(a1, a2);
+ }
+ __ Branch(USE_DELAY_SLOT, &stepping_prepared);
+ __ ld(a4, FieldMemOperand(a1, JSGeneratorObject::kFunctionOffset));
+
+ __ bind(&prepare_step_in_suspended_generator);
+ {
+ FrameScope scope(masm, StackFrame::INTERNAL);
+ __ Push(a1, a2);
+ __ CallRuntime(Runtime::kDebugPrepareStepInSuspendedGenerator);
+ __ Pop(a1, a2);
+ }
+ __ Branch(USE_DELAY_SLOT, &stepping_prepared);
+ __ ld(a4, FieldMemOperand(a1, JSGeneratorObject::kFunctionOffset));
}
void Builtins::Generate_ConstructedNonConstructable(MacroAssembler* masm) {
« no previous file with comments | « src/mips/builtins-mips.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698