mirror of
https://github.com/Reuh/candran.git
synced 2025-10-27 17:59:30 +00:00
Fix LuaJIT bit operators
This commit is contained in:
parent
836ba82fef
commit
4517ee110f
3 changed files with 3074 additions and 3076 deletions
|
|
@ -425,8 +425,6 @@ This command will use the precompilled version of this repository (candran.lua)
|
||||||
canc candran.can
|
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 :
|
You can then run the tests on your build :
|
||||||
|
|
||||||
````
|
````
|
||||||
|
|
|
||||||
6136
candran.lua
6136
candran.lua
File diff suppressed because it is too large
Load diff
|
|
@ -10,27 +10,27 @@ tags._opid.idiv = (left, right)
|
||||||
end
|
end
|
||||||
tags._opid.band = (left, right)
|
tags._opid.band = (left, right)
|
||||||
addRequire("bit", "band", "band")
|
addRequire("bit", "band", "band")
|
||||||
return getRequire("band") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
|
return var("band") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
|
||||||
end
|
end
|
||||||
tags._opid.bor = (left, right)
|
tags._opid.bor = (left, right)
|
||||||
addRequire("bit", "bor", "bor")
|
addRequire("bit", "bor", "bor")
|
||||||
return getRequire("bor") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
|
return var("bor") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
|
||||||
end
|
end
|
||||||
tags._opid.bxor = (left, right)
|
tags._opid.bxor = (left, right)
|
||||||
addRequire("bit", "bxor", "bxor")
|
addRequire("bit", "bxor", "bxor")
|
||||||
return getRequire("bxor") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
|
return var("bxor") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
|
||||||
end
|
end
|
||||||
tags._opid.shl = (left, right)
|
tags._opid.shl = (left, right)
|
||||||
addRequire("bit", "lshift", "lshift")
|
addRequire("bit", "lshift", "lshift")
|
||||||
return getRequire("lshift") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
|
return var("lshift") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
|
||||||
end
|
end
|
||||||
tags._opid.shr = (left, right)
|
tags._opid.shr = (left, right)
|
||||||
addRequire("bit", "rshift", "rshift")
|
addRequire("bit", "rshift", "rshift")
|
||||||
return getRequire("rshift") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
|
return var("rshift") .. "(" .. lua(left) .. ", " .. lua(right) .. ")"
|
||||||
end
|
end
|
||||||
tags._opid.bnot = (right)
|
tags._opid.bnot = (right)
|
||||||
addRequire("bit", "bnot", "bnot")
|
addRequire("bit", "bnot", "bnot")
|
||||||
return getRequire("bnot") .. "(" .. lua(right) .. ")"
|
return var("bnot") .. "(" .. lua(right) .. ")"
|
||||||
end
|
end
|
||||||
|
|
||||||
#local patch = output
|
#local patch = output
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue