Index: src/interpreter/interpreter.cc |
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc |
index 5a5ce40d8144ee7fac3bb39574345eaad7722a4f..bc4bbd5ad02732aeedebb8eaa70278252ec032fa 100644 |
--- a/src/interpreter/interpreter.cc |
+++ b/src/interpreter/interpreter.cc |
@@ -1791,10 +1791,20 @@ void Interpreter::DoNop(InterpreterAssembler* assembler) { __ Dispatch(); } |
void Interpreter::DoSuspendGenerator(InterpreterAssembler* assembler) { |
Node* generator_reg = __ BytecodeOperandReg(0); |
Node* generator = __ LoadRegister(generator_reg); |
+ Node* context = __ GetContext(); |
+ |
+ Node* debug_is_active = __ DebuggerIsActive(); |
+ Label if_debugging(assembler), debugger_done(assembler); |
rmcilroy
2016/06/14 06:23:11
Please make if_debugging deferred. (It's the only
Yang
2016/06/14 09:17:02
Done. However, I think we always build a frame for
rmcilroy
2016/06/14 10:00:22
We do on ia32 due to lack of registers, but not on
|
+ __ BranchIf(debug_is_active, &if_debugging, &debugger_done); |
+ __ Bind(&if_debugging); |
+ { |
+ __ CallRuntime(Runtime::kDebugRecordAsyncFunction, context, generator); |
caitp (gmail)
2016/06/13 13:38:13
Is it possible to know at this point in the interp
Yang
2016/06/13 13:42:26
We could expand a bit more and load the function o
|
+ __ Goto(&debugger_done); |
+ } |
+ __ Bind(&debugger_done); |
Node* array = |
__ LoadObjectField(generator, JSGeneratorObject::kOperandStackOffset); |
- Node* context = __ GetContext(); |
Node* state = __ GetAccumulator(); |
__ ExportRegisterFile(array); |