Questions tagged [virtual-machine]
For questions relating to virtual machines. Virtual machines here refer to software that executes an intermediate representation.
8
questions
3
votes
0
answers
203
views
Is there a downside to using offsets instead of raw pointers in a virtual machine?
Say I'm designing a virtual machine for a bytecode compiler/interpreter, using C as the implementation language. Some kind of “tagged” representation of values is simplest for this language, where ...
11
votes
5
answers
3k
views
Should a virtual machine stack have a limited size?
I'm writing a register- and stack-based virtual machine. My goal is to have something easy to use and general purpose, so I abstain from any form of hardware limitation in its design. Since my VM's ...
5
votes
6
answers
494
views
Why target an existing VM? [closed]
Most interpreted languages use a virtual machine internally, to speed up performance. This is achieved by having an internal compiler compile the code (usually with minimal optimization and maximum ...
3
votes
2
answers
840
views
What are the pros/cons of a tree-based interpreter vs a bytecode-VM-based interpreter?
Based on this closed question.
Basically, why would one choose a pure interpreter for a language implementation as opposed to a virtual machine/bytecode approach like Java or Python (even if at ...
3
votes
2
answers
178
views
What operations are common in register-based virtual machines?
A register-based virtual machine necessarily contains at least some operations to manipulate registers. Like PUSH <register> <value>.
What are some of ...
16
votes
3
answers
3k
views
What are the pros and cons of register-based VMs and stack-based VMs?
What are the pros and cons of choosing a register or stack based VM for a language implementation?
For example Python has stack-based virtual machine, while Lua has register-based VM.
What makes a ...
2
votes
1
answer
196
views
What are differences between stack- and register-based virtual machine's bytecode commands?
What are differences between stack- and register-based virtual machine's bytecode commands?
For example Python has stack-based virtual machine.
But Lua has register-based vm.
So, what are the ...
5
votes
1
answer
176
views
What are the pros and cons of ways to implement the LOAD command in a statically typed VM?
What are the pros and cons of ways to implement the LOAD command in a statically typed VM?
There is two ways to implement LOAD ...