Index: src/interpreter/bytecode-array-builder.cc |
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc |
index 652c32d35dbcc48b3696d5e828daa941b0537b3f..4c17ae1a5c5a1edd66aa66b727ef6ab065c90760 100644 |
--- a/src/interpreter/bytecode-array-builder.cc |
+++ b/src/interpreter/bytecode-array-builder.cc |
@@ -839,8 +839,13 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::LoadModuleVariable(int cell_index, |
} |
BytecodeArrayBuilder& BytecodeArrayBuilder::SuspendGenerator( |
- Register generator) { |
- OutputSuspendGenerator(generator); |
+ Register generator, Yield::YieldType type) { |
+ if (type == Yield::kNormal || type == Yield::kDelegate) { |
+ OutputSuspendGenerator(generator); |
+ } else { |
+ DCHECK_EQ(type, Yield::kAwait); |
+ OutputAwaitGenerator(generator); |
+ } |
return *this; |
} |