Metadata already has two separate implementations, one for GlobalObject and one for Instruction. Instruction was already separate due to special MD_dbg handling, so move the GlobalObject-specific metadata parts from Value to GlobalObject. The HasMetadata bit, originally an optimization to avoid the hash table lookup when a value has no metadata, is no longer needed, because the information is now stored directly in Instruction/GlobalObject's MetadataIndex field. This also fixes MSan builds, currently ~Value clears metadata and therefore needs to access the subclass's MetadataIndex field, which was already destructed at this point.
62 KiB
62 KiB