Is there an elisp interpreter and a byte code interpreter in emacs VM, or jus one interpreter?
If there is only one interpreter, what code format can it evaluate?
I think emacs has only one interpreter, it can only evaluate s-expression, byte code is a kind of s-expression. Then why the interpreter doesn't compile the s-expression into byte-code before evaluating, why we need the byte-compile
function? Cause of the macros?
GNU emacs has both, an evaluator, which works on S-expressions, and a byte-code compiler + interpreter.
Having the evaluator is nice for simple commands and functions, since it avoids the overhead of compilation. This is convenient for interactively defined helpers, say, some quickly hacked together functions to modify a buffer's content.
Having the byte-code interpreter is useful, since it increases the execution speed and lowers the memory overhead due to the more dense representation of the code. This is a concern, since a lot (if not most) of emacs is implemented in lisp.