3 ms·
See, but C, and the x86 architecture, has none of that, or it all can be changed (like calling conventions), and yet all languages and VMs can be implemented in
by thwarted 18y ago
See, but C, and the x86 architecture, has none of that, or it all can be changed (like calling conventions), and yet all languages and VMs can be implemented in C. Despite the explicit lack of support for those things, many C libraries are available with specific language bindings.
That being said, those things can be _defined_ for a VM that still uses a flat address space and direct memory manipulation model of the x86 architecture. There is no support for objects or garbage collection or module interfaces in assembly or C, yet those things exist on top of it in languages that are implemented in C and run on x86 (or any usable architecture). There has to be a superset of many languages' conventions that can be used to define the semantics of calls, types, data structures, objects, garbage collection, modules, dynamic dispatch. This already exists somewhat as the ELF (and other) executable formats for things written in C.