Open waywardmonkeys opened 8 years ago
even better is to merge the interpreter and the compiler into a single library. The compiler looks like a minifier (using bytecodes) than a proper compiler. Most of the work is done at runtime. The first step for the API is to move the interpreter state into its own object and pass it around for native methods (define-class and define-method) and the FFI.
It might be that we should share something between the interpreter and compiler but they shouldn't be a single library.
If the dbmc plan (#49) works out, then we wouldn't want to keep the current compiler in the same binary image all of the time.
But yes, it would be nice if the compiler, whether it is mindycomp or dbmc, could integrate more directly with the interpreter.
We'd like to make the compiler and interpreter into standalone libraries so that they can be embedded into other applications. This might also simplify building some stuff with it in emscripten.
It isn't clear exactly what the API should look like yet.