Bug 1837620 - Part 7: Keep JitScripts in a linked list to avoid iterating all BaseScr...
commitf60744eab00c4089ba0661345071de816adbebcf
authorJon Coppeard <jcoppeard@mozilla.com>
Wed, 5 Jul 2023 16:58:38 +0000 (5 16:58 +0000)
committerJon Coppeard <jcoppeard@mozilla.com>
Wed, 5 Jul 2023 16:58:38 +0000 (5 16:58 +0000)
tree9225ff0aa05d068de109a45e4a7a636644d01f81
parent0886b32b0eac5c54760395b823d8fbd3f634f7ea
Bug 1837620 - Part 7: Keep JitScripts in a linked list to avoid iterating all BaseScripts r=jandem

Currently we iterate all BaseScripts to find the JitScripts in a zone. This is
inefficient since there can be many times more BaseScripts that JitScripts
(e.g. 10 - 20 times more).

Instead, keep all JitScripts in a zone in a linked list and use that to iterate
through them. This required giving JitScript a pointer to its owning JSScript
since that was needed in a few cases.

Differential Revision: https://phabricator.services.mozilla.com/D182219
js/src/debugger/Debugger.cpp
js/src/gc/Zone.cpp
js/src/jit/BaselineJIT.cpp
js/src/jit/JitScript.cpp
js/src/jit/JitScript.h
js/src/jit/JitZone.h
js/src/shell/js.cpp