aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/scheme
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/scheme')
-rw-r--r--new-luxc/source/luxc/lang/translation/scheme/procedure/common.jvm.lux14
-rw-r--r--new-luxc/source/luxc/lang/translation/scheme/runtime.jvm.lux8
2 files changed, 11 insertions, 11 deletions
diff --git a/new-luxc/source/luxc/lang/translation/scheme/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/scheme/procedure/common.jvm.lux
index 7387b6530..cd828e082 100644
--- a/new-luxc/source/luxc/lang/translation/scheme/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/scheme/procedure/common.jvm.lux
@@ -161,18 +161,18 @@
[bit//xor _.bit-xor]
)
-(def: (bit//shift-left [subjectO paramO])
+(def: (bit//left-shift [subjectO paramO])
Binary
(_.arithmetic-shift (_.remainder (_.int 64) paramO) subjectO))
-(def: (bit//signed-shift-right [subjectO paramO])
+(def: (bit//arithmetic-right-shift [subjectO paramO])
Binary
(_.arithmetic-shift (|> paramO (_.remainder (_.int 64)) (_.* (_.int -1)))
subjectO))
-(def: (bit//shift-right [subjectO paramO])
+(def: (bit//logical-right-shift [subjectO paramO])
Binary
- (runtimeT.bit//shift-right (_.remainder (_.int 64) paramO) subjectO))
+ (runtimeT.bit//logical-right-shift (_.remainder (_.int 64) paramO) subjectO))
(def: bit-procs
Bundle
@@ -182,9 +182,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//shift-right))
- (install "shift-right" (binary bit//signed-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))
)))
## [[Arrays]]
diff --git a/new-luxc/source/luxc/lang/translation/scheme/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/scheme/runtime.jvm.lux
index 816f92389..09259c2b9 100644
--- a/new-luxc/source/luxc/lang/translation/scheme/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/scheme/runtime.jvm.lux
@@ -225,7 +225,7 @@
@@product//right
@@sum//get)))
-(runtime: (bit//shift-right shift input)
+(runtime: (bit//logical-right-shift shift input)
(_.if (_.= (_.int 0) (@@ shift))
(@@ input)
(|> (@@ input)
@@ -234,9 +234,9 @@
(def: runtime//bit
Runtime
- (_.begin (list @@bit//shift-right)))
+ (_.begin (list @@bit//logical-right-shift)))
-(def: int-high (bit//shift-right (_.int 32)))
+(def: int-high (bit//logical-right-shift (_.int 32)))
(def: int-low (_.bit-and (_.int (hex "FFFFFFFF"))))
(runtime: (nat//< param subject)
@@ -254,7 +254,7 @@
(_.int 1))
(with-vars [quotient]
(_.let (list [quotient (|> (@@ subject)
- (bit//shift-right (_.int 1))
+ (bit//logical-right-shift (_.int 1))
(_.quotient (@@ param))
(_.arithmetic-shift (_.int 1)))])
(let [remainder (_.- (_.* (@@ param) (@@ quotient))