Ok guys, I thought that I would take my old notes from CS and take a look at the compiler theory a little more. I have to say that I can’t, because life in me remembers how it all works, but I have a great sample application from my college days that helps me understand a few things.
In this example application, a compiled language is executed and compiled to intermediate assembly code, such as a language. Then a simple VM implementation is executed, which accepts this intermediate language and executes the instructions.
The thing I can't figure out with is that if I were a direct interpreter and not a compiler, it would still collect these intermediate commands in memory, which will be executed at the end. Or does the interpreter actually “execute” conditional sections of code fragments at a time?
source
share