Closed danielfomin96 closed 1 year ago
I was just a little conservative when I first wrote the constant folding code. It also turns out that none of my projects have any examples of this, so I've never been motivated to go back and fix it!
But yes, should be fairly straightforward. I'll try to get it into the next release.
Thank you very much, this is much appreciated!
Fixed by fa155792ff2e9a53a2a9dff0fe28ac16e1e074fd (the real fix was in @mark65/monkeyc-optimizer)
Hello,
Firstly, thank you very much for this project. After starting to work with your extension, I don't think I can ever write monkey C without it again.
Upon inspection of the optimized code I found that literal expressions that contain floats in decimal form do not fold. Is this known or even anticipated? Since floats are used in many projects and probably have a great impact on the performance of the program this feature would be well received.
Example: