mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:37:35 +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:
parent
7826c006c1
commit
1d8ec677a3
6 changed files with 147 additions and 3 deletions
|
@ -15,6 +15,9 @@ struct EnvironmentCoordinate {
|
|||
u32 hops { invalid_marker };
|
||||
u32 index { invalid_marker };
|
||||
|
||||
static FlatPtr hops_offset() { return OFFSET_OF(EnvironmentCoordinate, hops); }
|
||||
static FlatPtr index_offset() { return OFFSET_OF(EnvironmentCoordinate, index); }
|
||||
|
||||
bool is_valid() const { return hops != invalid_marker && index != invalid_marker; }
|
||||
|
||||
static constexpr u32 invalid_marker = 0xfffffffe;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue