Oh, it's still a while off that. I do plan to make it public at some point, but when I'm actually happy the code isn't completely vomit.
But for a simple taste, the push to stack function currently looks like this. (All the emit stuff just writes bytes into a mmap that gets executed later.)
Creating an assembler with Lisp syntax and then using that to bootstrap a Lisp compiler (with Lisp macros instead of standard assembler macros) is one of those otherwise pointless educational projects I’ve been wanting to do for years. One day perhaps.
Oh, it's still a while off that. I do plan to make it public at some point, but when I'm actually happy the code isn't completely vomit.
But for a simple taste, the push to stack function currently looks like this. (All the emit stuff just writes bytes into a mmap that gets executed later.)
This is super cool!
Creating an assembler with Lisp syntax and then using that to bootstrap a Lisp compiler (with Lisp macros instead of standard assembler macros) is one of those otherwise pointless educational projects I’ve been wanting to do for years. One day perhaps.
Even though I tend to be a bit negative into the whole WebAssembly hype, that is exactly a good starting point.
You already have the assembler with Lisp syntax covered.
Add some macro support on top, and you can start already implementing the upper layer for your Lisp.
Naturally there are already a couple of attempts at that.
Machine code generation for RISC-V is so easy. Excellent for teaching.
Thanks Shakna!