summaryrefslogtreecommitdiff
path: root/Meta/grub-mbr.cfg
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-10-07 01:06:21 +0200
committerAndreas Kling <kling@serenityos.org>2021-10-07 11:53:18 +0200
commit41a072bded25b0993f315bc86e11cae8419f3231 (patch)
tree59de353aa7622da579ecc4e7c5627a07e8370f6e /Meta/grub-mbr.cfg
parent421845b0cd109d3532beb9dfc06e44169b846505 (diff)
downloadserenity-41a072bded25b0993f315bc86e11cae8419f3231.zip
LibJS: Fast non-local variable access :^)
This patch introduces the "environment coordinate" concept, which encodes the distance from a variable access to the binding it ends up resolving to. EnvironmentCoordinate has two fields: - hops: The number of hops up the lexical environment chain we have to make before getting to the resolved binding. - index: The index of the resolved binding within its declarative environment record. Whenever a variable lookup resolves somewhere inside a declarative environment, we now cache the coordinates and reuse them in subsequent lookups. This is achieved via a coordinate cache in JS::Identifier. Note that non-strict direct eval() breaks this optimization and so it will not be performed if the resolved environment has been permanently screwed by eval(). This makes variable access *significantly* faster. :^)
Diffstat (limited to 'Meta/grub-mbr.cfg')
0 files changed, 0 insertions, 0 deletions