Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Sup dis

Name: Anonymous 2011-08-30 17:40

what defines a Virtual Machine

must make one in python, haven't given the specifics of what it's suppose to do, we just know that it will have to act as a compiler

Name: Anonymous 2011-08-30 19:12

>>1
Wrong. A compiler and a virtual machine are two different things. The compiler accepts readable code (this excludes J, Lisp and Haskell) as its input and produces well-packed not-humanely-unreadable code that is intended to be executed by a machine (the latter is the compiler's target). A virtual machine is a software implementation of a certain machine (which may or may not be feasible as a hardware design).

Example:

Input code to the compiler:
x = y + 42;

Output bytecode from the compiler (this example is particularly readable; don't expect anything like this in reality):
push_local 3
push_int 42
add
pop_local 2

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List