3 ms·
It sounds like it, but it is not. It gets confusing fast when one talks about these things in even slightly accurate ways. In DTC to call a function of the VM
by astrobe_ 8y ago
It sounds like it, but it is not. It gets confusing fast when one talks about these things in even slightly accurate ways.
In DTC to call a function of the VM code (ie a another piece of DTC) you typically have a "call" virtual instruction, followed by the virtual address to call. you also have a virtual "return" function that pops the virtual instruction pointer from the virtual call stack.
Subroutine threaded is really just a very primitive form of AoT compilation.
- tom_mellior 8y agoNone of this explains why you think that your code in which "a VM instruction is just a pointer to the C function implementing it" is direct threaded. If you call a C function for each VM instruction, and that function returns before the next C function is called, then your threading is not direct.