Hacker News new | ask | show | jobs
by direwolf20 61 days ago
Interpreters don't translate bytecode to native instructions.
2 comments

The usual understanding of "interpreter" in a CS context is program that executes source code directly without a compilation step. However the binary that translates an intermediate bytecode to native machine code is at least sometimes called a "bytecode interpreter".

https://doc.pypy.org/en/latest/interpreter.html

This is still incorrect. A bytecode interpreter, as its name indicates, interprets a bytecode. Typically, compiling a bytecode to native machine code is the work of a JIT compiler.
That's a partial evaluator, not an interpreter, and it converts an interpreter into compiler, which are different things.
> Interpreters don't translate bytecode to native instructions.

> That's a partial evaluator, not an interpreter, and it converts an interpreter into compiler, which are different things.

https://old.reddit.com/r/Compilers/comments/1sm90x5/retrofit...

Yes, that's another great example of the same kind of thing - creating a JIT from an interpreter. It remains true that interpreters do not directly generate machine code.
The author of weval is the top comment.

Reading the comments and understanding that transitively, weval turns interpreters into compilers, allowing interpreters to generate machine code.

If you turn milk into cheese it isn't milk any more, and it doesn't prove that milk is a yellow solid.