3 ms·
Compiling to a bytecode like Python or javac is very different from compiling to machine code like GCC or the JVM. I think a progression like AST interpreter -
by tom_mellior 7y ago
Compiling to a bytecode like Python or javac is very different from compiling to machine code like GCC or the JVM.
I think a progression like AST interpreter -> bytecode compiler and interpreter -> machine-code compiler is a reasonable way to go. Starting with AST -> machine code is possible of course (that's what university compiler courses often do), but if you are explicitly interested in both compilers and interpreters, doing interpreters first makes more sense to me. It's a steady progression from higher to lower level.