Bug 1837620 - Part 7: Keep JitScripts in a linked list to avoid iterating all BaseScr...
commit19cc57cc599ff4727de782edef8d82144479d93f
authorJon Coppeard <jcoppeard@mozilla.com>
Fri, 7 Jul 2023 17:05:44 +0000 (7 17:05 +0000)
committerJon Coppeard <jcoppeard@mozilla.com>
Fri, 7 Jul 2023 17:05:44 +0000 (7 17:05 +0000)
treebd7f55e71db77c5bd78301c58690e4cf62524c59
parent0d723fbd9f83e943adacbe49a1bb04f7713831aa
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/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