Design and implementation of virtual machines, interpreters, automata, Turing machines. **DO NOT** use this tag for virtualized computers (VirtualBox, VMWare, ...), unless the question address the implementation of such tools.
Questions tagged [vm-implementation]
294 questions
15
votes
2 answers
Clearing up the `hidden classes` concept of V8
I've read some articles about V8's hidden classes. However, I still have a few questions in my head:
If, let's say, there are two objects:
var a = { }
a.x = 5
a.y = 6
var b = { }
b.y = 7
b.x = 8
Do they end up with the same hidden class or…

Pijusn
- 11,025
- 7
- 57
- 76
15
votes
4 answers
Bytecode Design?
I'm designing a programming language which compiles to an intermediary bytecode. However, I'm having a lot of trouble designing the bytecode structure. Does anybody have any pointers on how to represent a program in binary? Alternatively, are…

Imagist
- 18,086
- 12
- 58
- 77
14
votes
4 answers
Virtual machine from regular expression
I read Regular Expression Matching: the Virtual Machine Approach and now I try to parse a regular expression and create a virtual machine from it.
The tokenizer works and creates its tokens. After that step, I create the reversed polish notation…

mal-raten
- 149
- 5
13
votes
3 answers
How to observe the Ruby bytecode executed by YARV
I would like to observe the Ruby bytecode executed by YARV, post mortem.
How can I get this ?
Someone else here told it was not possible. However, there is the hotruby framework that seems to execute ruby bytecode, so I am puzzled...
Thanks a lot!

JCLL
- 5,379
- 5
- 44
- 64
13
votes
7 answers
What exactly is Java?
The question may at first sound silly, but maybe it isn't at all.
Java is not the Java language, most people know that, since you can program Java with lots of other langauges like Scala or Groovy
Java is not a concrete VM implementation since…

codymanix
- 28,510
- 21
- 92
- 151
13
votes
1 answer
Language Engines VS. Runtimes VS. Process Virtual Machines
Since the rising popularity of JavaScript, I found it intriguing to hear (even during the same speech) either about JavaScript engine, or about JavaScript virtual machine, or JavaScript interpreter, in the same context and referring to the same…

Teodor Tite
- 1,855
- 3
- 24
- 31
13
votes
4 answers
What is this asm style "x | 0" some javascript programmers are now using?
I've seen some performance critical javascript code, like the one on this project that makes extensive use of bitwise OR operations with 0. Ex:
GameBoyAdvanceCPU.prototype.write8 = function (address, data) {
address = address | 0;
data = data |…

Diogo Franco
- 486
- 2
- 4
- 13
13
votes
14 answers
Back-end choice for a new dynamic programming language?
I've been developing a Smalltalk variant for just the fun of it and I wonder what would be a fellow stackoverflowers choice when it comes to targeting a back-end. These were my current considerations:
.NET, JVM: These two VM's are mainly for…

utku_karatas
- 6,163
- 4
- 40
- 52
12
votes
3 answers
Interested in VM for lisp-like languages on 8-bit system
I'm looking for recommended virtual machines that can run on a 8-bit microprocessor AND support dynamic languages. I'd like a VM solution because I perceive benefits in terms of code density, portability, and ability to have a smaller interpreter,…

The Programmer
- 124
- 11
12
votes
2 answers
What are some obvious optimizations for a virtual machine implementing a functional language?
I'm working on an intermediate language and a virtual machine to run a functional language with a couple of "problematic" properties:
Lexical namespaces (closures)
Dynamically growing call stack
A slow integer type (bignums)
The intermediate…

Stefano Palazzo
- 4,212
- 2
- 29
- 40
11
votes
1 answer
How does a register based virtual machine work?
How does a register based virtual machine work?
I am looking for introduction to how a register based virtual machine works.
Can someone please help?
Thank you.

yinglcs
- 2,891
- 6
- 26
- 20
11
votes
3 answers
What are alternatives to the Java VM?
As Oracle sues Google over the Dalvik VM it becomes clear, that you cannot implement a Java VM without license from Oracle (EDIT: Matthew Flaschen points out, that the claims of Oracle may not be valid. Anyways we have currently a situation, where…

Mnementh
- 50,487
- 48
- 148
- 202
11
votes
2 answers
What is the reason for the overhead in memory usage for arrays in Java?
In Java, the character data type, char, is represented with 2 bytes. The array of n characters, char[], is represented with 2n+24 bytes.
In general, there is an overhead of 24 bytes for storing an array of n objects (at least if the objects are of…

blazs
- 4,705
- 24
- 38
11
votes
6 answers
Is There Any Way To Develop in Smalltalk Without Using a VM?
I'm really begining to learn Smalltalk. Now I'm using Squeak, but there is any way to develop in Smalltalk without using VMs, but something like an IDE?

Nathan Campos
- 28,769
- 59
- 194
- 300
11
votes
1 answer
what is the c/c++ virtual machine referred to in the asm.js spec
In the spec for asm.js (at http://asmjs.org/spec/latest/ ) in the introduction section it says
"The asm.js language provides an abstraction similar to the C/C++ virtual machine"
..but I can't find any information on 'the C/C++ virtual machine' by…

James Cat
- 432
- 2
- 12