lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 9a825f6bb9a141023ac519a73f6a9958c113659e
parent 941b189d98c7019c1be093bb0b709d90771b72d9
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Tue, 10 Jul 2018 14:54:49 -0300

In tests of opcodes, avoid coercion in bitwise operation

Diffstat:
Mtestes/code.lua | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testes/code.lua b/testes/code.lua @@ -239,7 +239,7 @@ checkI(function () return ~~-1024.0 end, -1024) checkI(function () return ((100 << 6) << -4) >> 2 end, 100) -- borders around MAXARG_sBx ((((1 << 17) - 1) >> 1) == 65535) -local sbx = ((1 << "17") - 1) >> 1 -- avoid folding +local a = 17; local sbx = ((1 << a) - 1) >> 1 -- avoid folding checkI(function () return 65535 end, sbx) checkI(function () return -65535 end, -sbx) checkI(function () return 65536 end, sbx + 1)