It is a bit like the assembler for Forth systems. In case you don't want to re-write the whole world in forth you can reuse some .net library classes.
You also need a way to refer to the stack and data segment in C#, i.e. calling the function in VmExt. Either we rename them to be more friendly, or we inject friendlier methods. This work can then also be used for source generators.
: aWordThatIsImplementedInC# {{
var a = VmExt.pop(ref vm);
CallACSharpMethod(a);
}}
It is a bit like the assembler for Forth systems. In case you don't want to re-write the whole world in forth you can reuse some .net library classes.
You also need a way to refer to the stack and data segment in C#, i.e. calling the function in VmExt. Either we rename them to be more friendly, or we inject friendlier methods. This work can then also be used for source generators.