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

Unified Diff: src/interpreter/interpreter.cc

Issue 2067503002: [debugger] fix stepping over await calls for ignition generators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@test
Patch Set: address comments 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/debug/debug.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index 5a5ce40d8144ee7fac3bb39574345eaad7722a4f..b288fd186fefd23753995ad31013a180be028abe 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -1792,6 +1792,17 @@ void Interpreter::DoSuspendGenerator(InterpreterAssembler* assembler) {
Node* generator_reg = __ BytecodeOperandReg(0);
Node* generator = __ LoadRegister(generator_reg);
+ Label if_stepping(assembler, Label::kDeferred), ok(assembler);
+ Node* step_action_address = __ ExternalConstant(
+ ExternalReference::debug_last_step_action_address(isolate_));
+ Node* step_action = __ Load(MachineType::Int8(), step_action_address);
+ STATIC_ASSERT(StepIn > StepNext);
+ STATIC_ASSERT(StepFrame > StepNext);
+ STATIC_ASSERT(LastStepAction == StepFrame);
+ Node* step_next = __ Int32Constant(StepNext);
+ __ BranchIfInt32LessThanOrEqual(step_next, step_action, &if_stepping, &ok);
+ __ Bind(&ok);
+
Node* array =
__ LoadObjectField(generator, JSGeneratorObject::kOperandStackOffset);
Node* context = __ GetContext();
@@ -1802,6 +1813,13 @@ void Interpreter::DoSuspendGenerator(InterpreterAssembler* assembler) {
__ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, state);
__ Dispatch();
+
+ __ Bind(&if_stepping);
+ {
+ Node* context = __ GetContext();
+ __ CallRuntime(Runtime::kDebugRecordAsyncFunction, context, generator);
+ __ Goto(&ok);
+ }
}
// ResumeGenerator <generator>
« no previous file with comments | « src/debug/debug.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698