As I read here,
the VMT also contains a number of “magic” fields to support features
such as parent class link, instance size, class name, dynamic method
table, published methods table, published fields table, RTTI table,
initialization table for magic fields, the deprecated OLE Automation
dispatch table and implemented interfaces table
It looks like the VMT does not include a field which contains the unit name where the class is defined. Is there some ‘compiler magic’ involved?
I cannot see why the VMT should be involved here. TObject already exposes a
class function UnitNamefor that.System.TObject.UnitName