He he, check this out, I designed an assembler that uses structured control flow and a static type system:
https://github.com/nim-lang/nativenif/blob/master/doc/nifasm.md
--> We can produce native code and don't have to hunt code generation bugs at runtime as the assembler tells us at compile-time.
how many optimizations can nim already do by himself?
https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html https://llvm.org/docs/Passes.html
I'm guessing not everything on the list makes sense thanks to NJVL, but i think there is still a lot of work, loops unrolling for example
loops unrolling for example
When it counts, I did unroll myself, see here https://github.com/nim-lang/Nim/blob/devel/lib/system/gc.nim#L410
Love the ambition to write a debugger.
Are there eventual plans to support a REPL or JIT code (similar to asmjit)? Is the LLVM backend scrapped in favor for nativenif+NJVL?
Are there eventual plans to support a REPL or JIT (similar to asmjit)?
No. But nobody is stopping you from using the compiler as a library and turning it into a JIT. Since we emit binary code directly, there is not much missing from a JIT.
Is the LLVM backend scrapped in favor for nativenif+NJVL?
Probably. It's all in very early stages of development, so it's hard to tell.