summaryrefslogtreecommitdiff
path: root/AK/Time.cpp
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2022-03-08 12:34:21 -0500
committerLinus Groh <mail@linusgroh.de>2022-03-08 23:02:12 +0100
commitf235f08e6d58396cb3886bf3449d1ff58e28f4c0 (patch)
tree4b86e0db5ae182438ad0e063d36f1bfdf006c579 /AK/Time.cpp
parentf56bf610c47928594d8d00c9120f887739fe2979 (diff)
downloadserenity-f235f08e6d58396cb3886bf3449d1ff58e28f4c0.zip
LibJS: Use known binding indices when creating new for-loop environments
When the initialization statement of a for-loop uses 'let', we must create a new environment for each iteration of the for loop. The bindings of the initialization statement are copied over to the new environment. Since the bindings are created in the same order each time, we can use that order to directly initialize the bindings and avoid any O(n) lookups in this hot loop.
Diffstat (limited to 'AK/Time.cpp')
0 files changed, 0 insertions, 0 deletions