MerlinVR / UdonSharp

An experimental compiler for compiling C# to Udon assembly
MIT License
671 stars 87 forks source link

Full inheritance with generics handling #109

Open MerlinVR opened 3 years ago

MerlinVR commented 3 years ago

Handling for virtual classes and interfaces on UdonSharpBehaviours and imported user classes. Needs to handle generic type uses that implement interfaces as well.

Will be treated as an AOT process where all potentially referenced virtual members of imported user types get emitted into the referencing UdonSharpBehaviour's program, then have vtables generated for that program's context.

MerlinVR commented 3 years ago

Currently working on just UdonSharpBehaviour virtual inheritance since it needs to be handled when allocating values and addresses for methods in order to allow cheap virtual method calls across behaviours.

MerlinVR commented 3 years ago

Update: Virtual inheritance on UdonSharpBehaviours functional. Currently includes inheriting base class members, implementing virtual methods, base calls, calls to virtual method implementations from base class methods.