1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 20:18:12 +00:00

LibJS/JIT: Add fast path for cached GetVariable accesses

We can now stay in machine code for environment variable read accesses
as long as they are cached and initialized.

20% speed-up on Octane/zlib.js :^)
This commit is contained in:
Andreas Kling 2023-11-06 15:23:49 +01:00
parent 7826c006c1
commit 1d8ec677a3
6 changed files with 147 additions and 3 deletions

View file

@ -30,6 +30,8 @@ struct ExecutionContext {
void visit_edges(Cell::Visitor&);
static FlatPtr lexical_environment_offset() { return OFFSET_OF(ExecutionContext, lexical_environment); }
private:
explicit ExecutionContext(MarkedVector<Value> existing_arguments, MarkedVector<Value> existing_local_variables);