Remove a functionvalue fakematch

This commit is contained in:
LagoLunatic 2025-11-17 16:27:09 -05:00
parent 9075155201
commit c1d05201b6
3 changed files with 3 additions and 12 deletions

View File

@ -80,8 +80,7 @@ public:
class TFunctionValueAttribute_refer : public JGadget::TVector_pointer<TFunctionValue*> {
public:
// TFunctionValueAttribute_refer() : JGadget::TVector_pointer<TFunctionValue*>(JGadget::TAllocator<void*>()) {}
inline TFunctionValueAttribute_refer();
TFunctionValueAttribute_refer() : JGadget::TVector_pointer<TFunctionValue*>(JGadget::TAllocator<void*>()) {}
~TFunctionValueAttribute_refer() {}
void refer_initialize();

View File

@ -9,15 +9,13 @@
// A possible origin for one of these could be the constructor of TFunctionValueAttribute_refer in
// functionvalue.h. That constructor includes `JGadget::TAllocator<void*>()` in it, which produces
// one weak bss object that has the correct size and alignment. However, we need 16 of them, while
// that only creates one. Also, that header seems to be required in some actors that *don't* need
// any of these weak bss objects. So that constructor is moved to functionvalue.cpp and this fake
// header should be included where necessary instead.
// that only creates one.
#include "JSystem/JStudio/JStudio/functionvalue.h" // IWYU pragma: keep
// They each have size 1, and alignment 1 in the debug maps, but alignment 4 in the non-debug maps.
static inline void dummy_bss_936_to_1036() {
JGadget::TAllocator<void*>(); // @1036
// JGadget::TAllocator<void*>(); // @1036 // Already covered by TFunctionValueAttribute_refer's ctor
JGadget::TAllocator<void*>(); // @1034
JGadget::TAllocator<void*>(); // @1032
JGadget::TAllocator<void*>(); // @1031

View File

@ -44,12 +44,6 @@ TFunctionValue::TFunctionValue() {}
/* 80271078-802710C0 .text __dt__Q27JStudio14TFunctionValueFv */
TFunctionValue::~TFunctionValue() {}
// This seems like it would belong in the functionvalue.h header, but putting it there causes the
// `JGadget::TAllocator<void*>()` part to spawn a weak bss object that appears in many TUs.
// Some TUs do need a weak bss object like that, but it also gets put in ones that don't need it.
TFunctionValueAttribute_refer::TFunctionValueAttribute_refer() :
JGadget::TVector_pointer<TFunctionValue*>(JGadget::TAllocator<void*>()) {}
/* 802710C0-802710E8 .text refer_initialize__Q27JStudio29TFunctionValueAttribute_referFv */
void TFunctionValueAttribute_refer::refer_initialize() {
clear();