aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/lua
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/lua')
-rw-r--r--new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux12
-rw-r--r--new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux14
2 files changed, 13 insertions, 13 deletions
diff --git a/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux
index 2bef7cbcf..bdba05a9d 100644
--- a/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux
@@ -154,9 +154,9 @@
Binary
(<op> paramO subjectO))]
- [bit//shift-left lua.bit-shl]
- [bit//shift-right lua.bit-shr]
- [bit//unsigned-shift-right runtimeT.bit//shift-right]
+ [bit//left-shift lua.bit-shl]
+ [bit//arithmetic-right-shift lua.bit-shr]
+ [bit//logical-right-shift runtimeT.bit//logical-right-shift]
)
(def: bit//count
@@ -461,9 +461,9 @@
(install "and" (binary bit//and))
(install "or" (binary bit//or))
(install "xor" (binary bit//xor))
- (install "shift-left" (binary bit//shift-left))
- (install "unsigned-shift-right" (binary bit//unsigned-shift-right))
- (install "shift-right" (binary bit//shift-right))
+ (install "left-shift" (binary bit//left-shift))
+ (install "logical-right-shift" (binary bit//logical-right-shift))
+ (install "arithmetic-right-shift" (binary bit//arithmetic-right-shift))
)))
(def: nat-procs
diff --git a/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux
index e0b037bf5..64253b1c3 100644
--- a/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux
@@ -176,7 +176,7 @@
@@product//right
@@sum//get))
-(runtime: (bit//shift-right param subject)
+(runtime: (bit//logical-right-shift param subject)
(let [mask (|> (lua.int 1)
(lua.bit-shl (lua.- param (lua.int 64)))
(lua.- (lua.int 1)))]
@@ -195,7 +195,7 @@
(def: runtime//bit
Runtime
(format @@bit//count
- @@bit//shift-right))
+ @@bit//logical-right-shift))
(runtime: (nat//< param subject)
(lua.return! (lua.apply "math.ult" (list subject param))))
@@ -234,24 +234,24 @@
(runtime: (deg//* param subject)
(lua.block! (list (lua.local! "sL" (#.Some (lua.bit-and deg//low-mask subject)))
- (lua.local! "sH" (#.Some (bit//shift-right (lua.int 32) subject)))
+ (lua.local! "sH" (#.Some (bit//logical-right-shift (lua.int 32) subject)))
(lua.local! "pL" (#.Some (lua.bit-and deg//low-mask param)))
- (lua.local! "pH" (#.Some (bit//shift-right (lua.int 32) param)))
- (lua.local! "bottom" (#.Some (bit//shift-right (lua.int 32)
+ (lua.local! "pH" (#.Some (bit//logical-right-shift (lua.int 32) param)))
+ (lua.local! "bottom" (#.Some (bit//logical-right-shift (lua.int 32)
(lua.* "pL" "sL"))))
(lua.local! "middle" (#.Some (lua.+ (lua.* "pL" "sH")
(lua.* "pH" "sL"))))
(lua.local! "top" (#.Some (lua.* "pH" "sH")))
(lua.return! (|> "bottom"
(lua.+ "middle")
- (bit//shift-right (lua.int 32))
+ (bit//logical-right-shift (lua.int 32))
(lua.+ "top"))))))
(runtime: (deg//leading-zeroes input)
(lua.block! (list (lua.local! "zeroes" (#.Some (lua.int 64)))
(lua.while! (lua.not (lua.= (lua.int 0) input))
(lua.block! (list (lua.set! "zeroes" (lua.- (lua.int 1) "zeroes"))
- (lua.set! input (bit//shift-right (lua.int 1) input)))))
+ (lua.set! input (bit//logical-right-shift (lua.int 1) input)))))
(lua.return! "zeroes"))))
(runtime: (deg/// param subject)