aboutsummaryrefslogtreecommitdiff
path: root/testes/bitwise.lua
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-09-24 14:34:52 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-09-24 14:34:52 -0300
commit6ef366644f7c3c21cfb17434835edf4ebf970d6d (patch)
treed41df5b79bea32675f740a52d39c0b5ec37eb92b /testes/bitwise.lua
parent03cde80b58ea7f112f1b7a35c037893093b59f2e (diff)
downloadlua-6ef366644f7c3c21cfb17434835edf4ebf970d6d.tar.gz
lua-6ef366644f7c3c21cfb17434835edf4ebf970d6d.tar.bz2
lua-6ef366644f7c3c21cfb17434835edf4ebf970d6d.zip
Subtraction of small constant integers optimized with OP_ADDI
Diffstat (limited to 'testes/bitwise.lua')
-rw-r--r--testes/bitwise.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/testes/bitwise.lua b/testes/bitwise.lua
index af542e7f..59781f5d 100644
--- a/testes/bitwise.lua
+++ b/testes/bitwise.lua
@@ -60,9 +60,9 @@ assert("1234.0" << "5.0" == 1234 * 32)
60assert("0xffff.0" ~ "0xAAAA" == 0x5555) 60assert("0xffff.0" ~ "0xAAAA" == 0x5555)
61assert(~"0x0.000p4" == -1) 61assert(~"0x0.000p4" == -1)
62 62
63assert("7" .. 3 << 1 == 146) 63assert(("7" .. 3) << 1 == 146)
64assert(10 >> 1 .. "9" == 0) 64assert(0xffffffff >> (1 .. "9") == 0x1fff)
65assert(10 | 1 .. "9" == 27) 65assert(10 | (1 .. "9") == 27)
66 66
67do 67do
68 local st, msg = pcall(function () return 4 & "a" end) 68 local st, msg = pcall(function () return 4 & "a" end)