aboutsummaryrefslogtreecommitdiff
path: root/llex.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-03-27 14:56:10 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-03-27 14:56:10 -0300
commitd12262068d689eacc452a459a021df0ad8f6d46c (patch)
treed3e839cd1ddf3daf5e12c8f472c10a980b7d9d8c /llex.c
parent0443ad9e288825b6e4441eb11104bcdb4ff4593a (diff)
downloadlua-d12262068d689eacc452a459a021df0ad8f6d46c.tar.gz
lua-d12262068d689eacc452a459a021df0ad8f6d46c.tar.bz2
lua-d12262068d689eacc452a459a021df0ad8f6d46c.zip
Small optimizations in range checks
Checks of the form '1 <= x && x <= M' were rewritten in the form '(unsigned)x - 1 < (unsigned)M', which is usually more efficient. (Other similar checks have similar translations.) Although some compilers do these optimizations, that does not happen for all compilers or all cases.
Diffstat (limited to 'llex.c')
0 files changed, 0 insertions, 0 deletions