1
0
Fork 0
mirror of https://github.com/Reuh/candran.git synced 2025-10-27 09:59:29 +00:00

Fix LuaJIT bit operators

This commit is contained in:
Étienne Fildadut 2018-02-27 12:53:44 +01:00
parent 836ba82fef
commit 4517ee110f
3 changed files with 3074 additions and 3076 deletions

View file

@ -425,8 +425,6 @@ This command will use the precompilled version of this repository (candran.lua)
canc candran.can
````
The Candran build included in this repository was made using the ```mapLines=false``` option.
You can then run the tests on your build :
````

File diff suppressed because it is too large Load diff

View file

@ -10,27 +10,27 @@ tags._opid.idiv = (left, right)
end
tags._opid.band = (left, right)
addRequire("bit", "band", "band")
return getRequire("band") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
return var("band") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
end
tags._opid.bor = (left, right)
addRequire("bit", "bor", "bor")
return getRequire("bor") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
return var("bor") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
end
tags._opid.bxor = (left, right)
addRequire("bit", "bxor", "bxor")
return getRequire("bxor") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
return var("bxor") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
end
tags._opid.shl = (left, right)
addRequire("bit", "lshift", "lshift")
return getRequire("lshift") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
return var("lshift") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
end
tags._opid.shr = (left, right)
addRequire("bit", "rshift", "rshift")
return getRequire("rshift") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
return var("rshift") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
end
tags._opid.bnot = (right)
addRequire("bit", "bnot", "bnot")
return getRequire("bnot") .. "(" .. lua(right) .. ")"
return var("bnot") .. "(" .. lua(right) .. ")"
end
#local patch = output