Bug 1837620 - Part 1: Remove baseline ICs that guard shapes when the shape becomes...
commit58dc10c4439cab66317ac091ab0e39f029c2445d
authorJon Coppeard <jcoppeard@mozilla.com>
Fri, 7 Jul 2023 17:05:43 +0000 (7 17:05 +0000)
committerJon Coppeard <jcoppeard@mozilla.com>
Fri, 7 Jul 2023 17:05:43 +0000 (7 17:05 +0000)
treedb6eecc5ec2dcdb2b88b8013a1f11a3b4ab3ed42
parent091301fd6a11d7fe00cdfb9857b8e3f8b8da0bc2
Bug 1837620 - Part 1: Remove baseline ICs that guard shapes when the shape becomes unreachable r=jandem

This adds a new kind of cache IR field, WeakShape. This enables the GC to find
these weak edges when necessary.

At the start of sweeping a sweep group these edges are checked and baseline ICs
with pointers to dead shapes are removed.

* * *
Set JitScript flag to indicate stubs have been discarded after sweeping

This fixes an assertion failure in WarpOracle::createSnapshot where we check we
don't regenerate the same code over and over.

Differential Revision: https://phabricator.services.mozilla.com/D180857
24 files changed:
js/src/gc/Compacting.cpp
js/src/gc/Sweeping.cpp
js/src/jit/BaselineCacheIRCompiler.cpp
js/src/jit/BaselineIC.cpp
js/src/jit/BaselineIC.h
js/src/jit/CacheIR.cpp
js/src/jit/CacheIR.h
js/src/jit/CacheIRCloner.h
js/src/jit/CacheIRCompiler.cpp
js/src/jit/CacheIRCompiler.h
js/src/jit/CacheIROps.yaml
js/src/jit/CacheIRWriter.h
js/src/jit/GenerateCacheIRFiles.py
js/src/jit/Ion.cpp
js/src/jit/IonCacheIRCompiler.cpp
js/src/jit/IonScript.h
js/src/jit/JitScript.cpp
js/src/jit/JitScript.h
js/src/jit/JitZone.h
js/src/jit/TrialInlining.cpp
js/src/jit/TrialInlining.h
js/src/jit/WarpCacheIRTranspiler.cpp
js/src/jit/WarpOracle.cpp
js/src/jit/WarpSnapshot.cpp