Stack-Based Virtual Machines
The cluster focuses on discussions about implementing and evaluating stack-based virtual machines, bytecode interpreters, and their alternatives like JIT compilers, with references to historical efforts and projects such as JVM, LuaJIT, and MiniVM.
Activity Over Time
Top Contributors
Keywords
Sample Comments
mostly curiosity: why a stack vm in particular? (is it because you then need to write the compiler for it?)
Oh yea, instead lets write it in an interpreted language who's VM is written in C....
A stack based VM or direct interpretation have no real difference with regard to what you mention. Please elaborate further.
You're basically describing a virtual machine. Compile to bytecode and the runtime JITs (or AOTs) it on the host. It is an idea decades old.
Would it ever make sense to build a chip/vm (something like the JVM) designed to run the intermediate code directly?
Why is it not possible to engineer a basic VM to do this job from the start, rather than retrofitting Javascript to act as a bytecode?
The parsed VM bytecode and calls to native code by the interpreter are two quite different things
This has been tried many times in the history of computing (ANDF/TenDRA, JVM, NaCL, P-code, TIMI, etc). What's different this time?
Obviously the latter. Otherwise it would have to be a JIT compiling VM, not a simple interpreter.
Wouldn’t outputting amd64 instructions and jumping to it create a shorter interpreter?