Questions tagged [vm-implementation]

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.

294 questions
26
votes
6 answers

What prevents an efficient Haskell virtual machine (like JVM)?

I have been wondering, what prevents the development of an efficient virtual machine like JVM or PyPy for Haskell (except maybe development effort)? Is it the language structure? I think languages, that are harder to interpret efficiently (like…
aelguindy
  • 3,703
  • 24
  • 31
26
votes
7 answers

What exactly is Parrot?

I understand that Parrot is a virtual machine, but I feel like I'm not completely grasping the idea behind it. As I understand, it's a virtual machine that's being made to handle multiple languages. Is this correct? What are the advantages of…
user20805
  • 1,347
  • 1
  • 11
  • 10
24
votes
8 answers

What is the minimum instruction set required for any Assembly language to be considered useful?

I am studying Assembly programming in general, so I've decided to try and implement a "virtual microprocessor" in software, which has registers, flags and RAM to work with, implemented with variables and arrays. But since I want to simulate only the…
24
votes
7 answers

Clean, self-contained VM implemented in C and under 100-200K compiled code size?

I'm looking for a VM with the following features: Small compiled code footprint (under 200K). No external dependencies. Unicode (or raw) string support. Clean code/well organized. C(99) code, NOT C++. C/Java-like syntax. Operators/bitwise: AND/OR,…
user656208
24
votes
7 answers

How would I go about writing a Virtual Machine

I'm interested in programming a virtual machine, nothing as fancy as virtualbox or vmware, but something that can emulate a simple architecture, be it cisc or risc, say the Zilog, SPARC, MIPS, or 80686 architecture models. I suppose by doing this it…
whoozat
  • 241
  • 1
  • 2
  • 3
23
votes
4 answers

VM Design: More opcodes or less opcodes? What is better?

Don't be shocked. This is a lot of text but I'm afraid without giving some detailed information I cannot really show what this is all about (and might get a lot of answers that don't really address my question). And this definitely not an assignment…
Mecki
  • 125,244
  • 33
  • 244
  • 253
21
votes
4 answers

C++: doubles, precision, virtual machines and GCC

I have the following piece of code: #include int main() { if ((1.0 + 0.1) != (1.0 + 0.1)) printf("not equal\n"); else printf("equal\n"); return 0; } When compiled with O3 using gcc (4.4,4.5 and 4.6) and run natively…
21
votes
2 answers

What are some fundamental Feature/Architectural differences between the BEAM and JVM?

What are some fundamental Feature/Architectural difference between the BEAM and JVM? Yes I know: one was originally built around java and the other built around erlang I understand the JVM (somewhat) and want to compare their structures For…
jtzero
  • 2,204
  • 2
  • 25
  • 44
19
votes
5 answers

How does a virtual machine work?

I've been looking into how programming languages work, and some of them have a so-called virtual machines. I understand that this is some form of emulation of the programming language within another programming language, and that it works like how a…
Martin
  • 509
  • 1
  • 6
  • 16
19
votes
3 answers

Is there Dart VM available?

Just read news that Google had announced an early preview of the new web programming language Dart. The documentation on the dartlang.org states: You will be able to run Dart code in several ways: Translate Dart code to JavaScript that can run in…
Volo
  • 28,673
  • 12
  • 97
  • 125
18
votes
6 answers

Is there a JavaScript (ECMAScript) implementation written in Python?

Are there any JavaScript (ECMAScript) implementations written in pure Python? It is okay even if its implementation is very slow.
minhee
  • 5,688
  • 5
  • 43
  • 81
17
votes
2 answers

How do modern VMs handle memory allocation?

I'm working on a simple stack machine written in C, mostly for learning purposes. After using malloc/free for my memory operations, I thought it would be a good idea to read some memory allocation specific code from modern virtual machines. I…
sinan
  • 6,809
  • 6
  • 38
  • 67
17
votes
3 answers

How would you improve Dalvik? Android's Virtual Machine

I am currently writing a paper on the Android platform. After some research, it's clear that Dalvik has room for improvement. I was wondering, what do you think would be the best use of a developer's time with this goal? JIT compilation seems like…
gav
  • 29,022
  • 23
  • 65
  • 90
16
votes
3 answers

Matching a virtual machine design with its primary programming language

As background for a side project, I've been reading about different virtual machine designs, with the JVM of course getting the most press. I've also looked at BEAM (Erlang), GHC's RTS (kind of but not quite a VM) and some of the JavaScript…
John F. Miller
  • 26,961
  • 10
  • 71
  • 121
15
votes
2 answers

Python Virtual Machine architecture diagrams/references

Someone could point out sites/books where I can find introductory documentation about the architecture of the Python VM? I'm interested in the C version, but if there are easy-to-follow references about other implementations it could be helpful…
Sam
  • 6,437
  • 6
  • 33
  • 41
1
2
3
19 20