franko / luajit-lang-toolkit

A Lua bytecode compiler written in Lua itself for didactic purposes or for new language implementations
Other
647 stars 91 forks source link

division constant evaluation bug #12

Closed q66 closed 10 years ago

q66 commented 10 years ago

Hey,

your constant eval module checks for 0 in division, which is unnecessary - it will work either way - and keeping the check there results in compile errors with both operands being constant in code like local x = 1 / 0. I suggest you remove it.

franko commented 10 years ago

Waiting for the pull request ;-)

q66 commented 10 years ago

I will send one when I get home.