Questions tagged [virtual-machine]
For questions relating to virtual machines. Virtual machines here refer to software that executes an intermediate representation.
10 questions
1
vote
1
answer
98
views
Implement range based DSL with VM
I wanna create DSL for rule modbus devices over the local network. I'll give you some context so that you better understand what I mean.First of all, imagine a device (let's say an oscilloscope), we ...
3
votes
3
answers
694
views
What to do when registers are used up in a register based VM?
I have some experience in writing stack based VM's and am now thinking about implementing an interpreter based on registers. I have not yet started anything and the project is still in planning phase. ...
3
votes
0
answers
391
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
4k
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
646
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 ...
9
votes
3
answers
2k
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
259
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 ...
18
votes
3
answers
5k
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
301
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
240
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 ...