Skip to main content

Implementation — Marshal (impl/marshal/)

This directory describes Registry, MarshalMeta, and Overload C++/C# structures and call chains. Type conversion and [LuaMarshalAs] rules are in ../../spec/marshal/.

FileContents
REGISTRIES.mdObjectRegistry / StructRegistry: slots, weak cache, ByVal GC
MARSHAL-META.mdMarshalMetaInfo, MarshalMeta::Create, writer function pointers
OVERLOAD-RESOLVER.mdMethodGroups, MethodOverloadResolver; spec: ../../spec/04-METHOD-OVERLOAD.md

Layering: marshal/ must not depend on mt/; Mt supplies metatable refs via MetatableHooks (Mono) or upper-layer push (Il2Cpp).

Bridge usage: MethodMarshalCtx / FieldMarshalCtx are created by MetaBinding and shared by bridge/* and the indexer.

Parent index: ../IL2CPP.md §4.3, ../MONO.md