LibJS: Store bytecode VM program counter in ExecutionContext

This way it's always automatically correct, and we don't have to
manually flush it in push_execution_context().

~7% speedup on the MicroBench/call* tests :^)
This commit is contained in:
Andreas Kling 2025-04-28 19:02:56 +02:00 committed by Jelle Raaijmakers
commit 4d17707b26
Notes: github-actions[bot] 2025-04-28 19:13:46 +00:00
6 changed files with 22 additions and 33 deletions

View file

@ -58,7 +58,7 @@ public:
// Non-standard: This points at something that owns this ExecutionContext, in case it needs to be protected from GC.
GC::Ptr<Cell> context_owner;
Optional<size_t> program_counter;
size_t program_counter { 0 };
mutable RefPtr<CachedSourceRange> cached_source_range;