Questions tagged [virtual-machine-languages]
7 questions
58
votes
6 answers
Why aren't there other programming languages that compile to Python bytecode?
In Java, there are multiple languages that compile to Java bytecode and can run on the JVM -- Clojure, Groovy, and Scala being the main ones I can remember off the top of my head.
However, Python also turns into bytecode (.pyc files) before being…

Michael0x2a
- 1,099
- 1
- 7
- 22
24
votes
3 answers
I want to build a Virtual Machine, are there any good references?
I'm looking to build a Virtual Machine as a platform independent way to run some game code (essentially scripting).
The Virtual Machines that I'm aware of in games are rather old: Infocom's Z-Machine, LucasArts' SCUMM, id Software's Quake 3. As a…

Michael Stum
- 1,778
- 2
- 17
- 22
10
votes
2 answers
Module system for OOP language
I'm designing a simple OO programming language.
It's statically typed, compiled, and executed by a VM - similar to Java.
The difference is that I don't want to have such a strong emphasis on OOP. The code itself will mostly resemble C++ (classes,…

Aber Kled
- 331
- 2
- 10
8
votes
4 answers
Why aren't VM languages compiled just once?
(First of all, I should make clear that compilers and virtual machines (aka) are a completely unknown field for me)
As I understand it, every time a Java/C#/... application is run, a VM is invoked and translates intermediate code (bytecode, CIL,…

deprecated
- 3,297
- 3
- 20
- 26
5
votes
4 answers
Use of globals in stack-based virtual machine implementation
I'm implementing a stack-based virtual machine in C.
The following variables are used by pretty much every function:
memory array
various pointers to memory offsets
program counter
stack
stack pointer
frame pointer (less so)
Ordinarily, I'd avoid…

retrodev
- 387
- 3
- 8
4
votes
1 answer
Do Virtual Machines (for execution of PL) operate on one contiguous array for their bytecode?
I have been reading every now and then on the virtual machines of programming languages like Java, Python and Lua. They all have a notion of bytecode, into which the source code is translated and that is excutable on a virtual machine (register or…

wirrbel
- 3,018
- 2
- 21
- 33
3
votes
2 answers
Cross "Machine" Code?
Some languages (mostly ones made in the last 2 decades or so) can now not only run (after some compilation step or directly) on several platforms, but also can be compiled to run on several virtual machines.
For example, take Scala. Pure Scala code…

ApprenticeHacker
- 1,373
- 1
- 18
- 27