LibJS: Split inline frames from execution context stack

Keep JS-to-JS inline calls out of m_execution_context_stack and walk
the active stack from the running execution context instead. Base
pushes now record the previous running context so duplicate
TemporaryExecutionContext pushes and host re-entry still restore
correctly.

This keeps the fast JS-to-JS path off the vector without losing GC
root collection, stack traces, or helpers that need to inspect the
active execution context chain.
This commit is contained in:
Andreas Kling
2026-04-13 12:49:41 +02:00
committed by Andreas Kling
parent 2ca7dfa649
commit 9af5508aef
Notes: github-actions[bot] 2026-04-13 16:31:17 +00:00
6 changed files with 176 additions and 53 deletions

View File

@@ -218,11 +218,10 @@ void AsyncGenerator::execute(VM& vm, Completion completion)
auto yield_completion = normal_completion(value);
// 6. Assert: The execution context stack has at least two elements.
VERIFY(vm.execution_context_stack().size() >= 2);
auto* previous_context = vm.previous_execution_context();
VERIFY(previous_context);
// 7. Let previousContext be the second to top element of the execution context stack.
auto& previous_context = vm.execution_context_stack().at(vm.execution_context_stack().size() - 2);
// 8. Let previousRealm be previousContext's Realm.
auto previous_realm = previous_context->realm;