commit | 9b37a4695ebf50b37b5b4fb279ae948f23b5b6a0 | [log] [tgz] |
---|---|---|
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | Tue Mar 19 10:53:18 2019 -0300 |
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | Tue Mar 19 10:53:18 2019 -0300 |
tree | 2a6b0f6c1c2eb962bb383175eb0a67ea81a4564d | |
parent | 1e0c73d5b643707335b06abd2546a83d9439d14c [diff] |
New semantics for the integer 'for' loop The numerical 'for' loop over integers now uses a precomputed counter to control its number of iteractions. This change eliminates several weird cases caused by overflows (wrap-around) in the control variable. (It also ensures that every integer loop halts.) Also, the special opcodes for the usual case of step==1 were removed. (The new code is already somewhat complex for the usual case, but efficient.)