Skip to main content

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
3 votes
0 answers
200 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 ...
texdr.aft's user avatar
  • 313
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 ...
Foxy's user avatar
  • 213
5 votes
6 answers
493 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,743
3 votes
2 answers
831 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,429
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 ...
чистов_n's user avatar
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 ...
kouta-kun's user avatar
  • 1,429
2 votes
1 answer
194 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 ...
чистов_n's user avatar
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 ...
чистов_n's user avatar