This upgrades 0 A.D. to use Spidermonkey ESR 91.
API changes are essentially trivial, basically renaming:
- The trend of more precise headers continue
- JSGC enums have changed slightly: https://bugzilla.mozilla.org/show_bug.cgi?id=1686249
- Property descriptors have been tweaked: https://bugzilla.mozilla.org/show_bug.cgi?id=1706404
- Some more API renaming here & there
~~The most important change is the introduction of Warp: https://hacks.mozilla.org/2020/11/warp-improved-js-performance-in-firefox-83/
Based on some rather trivial AI replays (both a 1v1 and a 4-player FFA), I think we actually see greater speed improvements than claimed by Mozilla. My very basic profiling suggests JS code might be up to 2x faster, resulting in substantial speed boosts for the simulation as a whole (up to 30% for 'sim update'). Note that this won't translate to 'the game is 30% faster' since this will mostly affect simturns and not raw frames, but overall the upgrade seems _excellent_.~~
Edit -> Scratch that, I'm seeing the effect of x86 to ARM compilation. Obviously the game is much faster when it's not running in rosetta...
It appears that SM91 remains replay-compatible with SM78 (it worked in the above AI game anyways) so getting some perf comparisons will be easy enough.
NB: a subsequent diff handles file removals & ought handle binary changes such & windows headers.
NB2: Download the tarball from here: https://github.com/wraitii/spidermonkey-tarballs/releases/download/mozjs-91.5.0/mozjs-91.5.0.tar.xz