Bug 1837620 - Part 7: Keep JitScripts in a linked list to avoid iterating all BaseScr...
commit2660a05a0729ea64fab02d908ed8553630e7c439
authorJon Coppeard <jcoppeard@mozilla.com>
Tue, 4 Jul 2023 13:58:58 +0000 (4 13:58 +0000)
committerJon Coppeard <jcoppeard@mozilla.com>
Tue, 4 Jul 2023 13:58:58 +0000 (4 13:58 +0000)
treefa3c39958f9625eb456ef0909f11a21478588145
parentcb0316f92fce5e4913b3a84baf7742098e02a654
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