Questions tagged [virtual-machine]

For questions relating to virtual machines. Virtual machines here refer to software that executes an intermediate representation.

Filter by
Sorted by
Tagged with
5 votes
6 answers
467 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 ...
Seggan's user avatar
  • 2,603
3 votes
2 answers
536 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 ...
kouta-kun's user avatar
  • 1,349
3 votes
2 answers
152 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 ...
nchistov's user avatar
  • 1,585
15 votes
3 answers
1k 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 ...
kouta-kun's user avatar
  • 1,349
2 votes
1 answer
141 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 ...
nchistov's user avatar
  • 1,585
5 votes
1 answer
149 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 ...
nchistov's user avatar
  • 1,585