lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello Lua Hackers,

2011年1月27日 22:50:29 UTC+9 Roberto Ierusalimschy <roberto@inf.puc-rio.br>:
The attached program tests all cases with up to 3 connectives (and/or)
and prints the buggy ones. (It assumes that the basic and/or is
working :) The patch that removes all optimizations seems to correct
all cases.

Wow, It's so cool.  I've not undergone enough training yet...

BTW, either my last patch and Sean's second one pass all cases, but I think
that Sean's one is best for main line.  

This optimization is a kind of the constant folding optimization, like 
constfolding() for numerical operators, but goiftrue()/goiffalse() will
control only jump instructions.  The best way is generating constant, I think.
To generate constant, it will be necessary to write more lines and functions.
It will be hard work, so, the work around must be simple, right now.  The
half-finished work is not necessary.  Please dump my patch to a trash bin.

Ryota Hirose