EDDI 0.4 : Native compilation and swap operator
The version 0.4 of EDDI is released.
There is only one new feature, the swap operator () to swap two variables together, but the biggest news is that now EDDI is not anymore an interpreted language, but is a compiled language.
In fact, I rewritten the compiler in order to output Linux assembly code. For now the code is only 32 bits, but I plan to support 64 as well. I made that change in order to not having to write a virtual machine and in order to learn assembly as well. The current outputted assembly code is not really optimized and there will certainly be a lot of changes. Indeed, in order to simplify the switch to native compiler, I continued using stack operations, so that the numeric computations have a lot have a lot of stack operations in it. Moreover, I'm far from being a professional in assembly, so that, they can beginner's errors in the generated code.
I use as to compile the assembly and then gcc to link. I will try to not depend on gcc, but it seems to be difficult if I want to use malloc (used for the string concatenation).
You can download the sources and find some information on the GitHub repository : https://github.com/wichtounet/eddic/ (check the tag v0.4 if you want the exact version I refer in this post).
Do not hesitate to send me your comments about the C++ code, the design or the outputted assembly.
The first version will see loops integrated, certainly some assembly optimizations and some code refactorings I planned.
Comments
Comments powered by Disqus