mindy icon indicating copy to clipboard operation
mindy copied to clipboard

Make compiler and interpreter into actual libraries rather than just stand-alone executables

Open waywardmonkeys opened this issue 10 years ago • 3 comments

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.

waywardmonkeys avatar Oct 31 '15 02:10 waywardmonkeys

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.

kaveman- avatar Oct 31 '15 07:10 kaveman-

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.

waywardmonkeys avatar Oct 31 '15 07:10 waywardmonkeys

But yes, it would be nice if the compiler, whether it is mindycomp or dbmc, could integrate more directly with the interpreter.

waywardmonkeys avatar Oct 31 '15 07:10 waywardmonkeys