summaryrefslogtreecommitdiff
path: root/chromium/v8/src/interpreter/bytecode-generator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/v8/src/interpreter/bytecode-generator.cc')
-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 4d0638a7292..be79f34adea 100644
--- a/chromium/v8/src/interpreter/bytecode-generator.cc
+++ b/chromium/v8/src/interpreter/bytecode-generator.cc
@@ -1040,6 +1040,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();
}
@@ -1100,9 +1103,6 @@ void BytecodeGenerator::GenerateBytecodeBody() {
// Emit initializing assignments for module namespace imports (if any).
VisitModuleNamespaceImports();
- // Perform a stack-check before the body.
- builder()->StackCheck(info()->literal()->start_position());
-
// The derived constructor case is handled in VisitCallSuper.
if (IsBaseConstructor(function_kind()) &&
info()->literal()->requires_instance_fields_initializer()) {