Skip to main content

EDDI 0.2.1 : Integer operations and optimizations

I've introduced a new feature in EDDI. You can now make computations on integers and string concatenations.

So you can now write this kind of thing with EDDI :

int i = 4 + 2 * 2;
int j = i + 5 % 6 / 3 * 4;
Print(i + 2);
Print(j % i);

Adding computations has not been very difficult. The difficult thing has been to find a way to mange operators priorities. For now, I'm not really satisfied with the result, but it works. I will try to think of another way to make that in the future.

I've also introduced the first compile-time optimizations. When a computation is known to be constant a compile time, the computation is directly replaced with its result.

The next step will be to introduce branches and loops.

The sources are available on Github :

  • The compiler, eddic :
  • The virtual machine, eddivm :
  • A commons library used by the two projects :

If you want to see the exact version reffered to in this subject, you can select the tag v0.2.1


Comments powered by Disqus