Bug 1852063 - Use WeakHeapPtr<T> to store weak cache IR stub fields r=jandem
commit50cc1c6a4677716eb290f18a621d401479642029
authorJon Coppeard <jcoppeard@mozilla.com>
Tue, 19 Sep 2023 14:59:13 +0000 (19 14:59 +0000)
committerJon Coppeard <jcoppeard@mozilla.com>
Tue, 19 Sep 2023 14:59:13 +0000 (19 14:59 +0000)
tree327d799fab7c38a3662b5574f6128dfde96f3921
parent60b2e5db6a4b0b7a56b99e265fb39cd6c530ccfe
Bug 1852063 - Use WeakHeapPtr<T> to store weak cache IR stub fields r=jandem

The problem here is that we currently use GCPtr<T> to store weak fields, and
this has assertions that don't make sense in this case.

Selecting the write wrapper class is slightly fiddly but can be accomplished by
using a template class to map from the field type to the types required.

Differential Revision: https://phabricator.services.mozilla.com/D188473
js/src/gc/Marking.cpp
js/src/gc/Tracer.h
js/src/jit-test/tests/gc/bug-1852063.js [new file with mode: 0644]
js/src/jit/BaselineCacheIRCompiler.cpp
js/src/jit/CacheIR.cpp
js/src/jit/CacheIRCompiler.cpp
js/src/jit/CacheIRCompiler.h
js/src/jit/WarpOracle.cpp