summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chromium/v8/src/interpreter/bytecode-generator.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/chromium/v8/src/interpreter/bytecode-generator.cc b/chromium/v8/src/interpreter/bytecode-generator.cc
index d3b27b4375f..da06bf6e393 100644
--- a/chromium/v8/src/interpreter/bytecode-generator.cc
+++ b/chromium/v8/src/interpreter/bytecode-generator.cc
@@ -1131,6 +1131,9 @@ void BytecodeGenerator::GenerateBytecode(uintptr_t stack_limit) {
AllocateTopLevelRegisters();
+ // Perform a stack-check before the body.
+ builder()->StackCheck(info()->literal()->start_position());
+
if (info()->literal()->CanSuspend()) {
BuildGeneratorPrologue();
}
@@ -1195,9 +1198,6 @@ void BytecodeGenerator::GenerateBytecodeBody() {
// Emit initializing assignments for module namespace imports (if any).
VisitModuleNamespaceImports();
- // Perform a stack-check before the body.
- builder()->StackCheck(literal->start_position());
-
// The derived constructor case is handled in VisitCallSuper.
if (IsBaseConstructor(function_kind())) {
if (literal->requires_brand_initialization()) {