From e65e734e5df3746ffb7df2cc9fa33826e0083fcd Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 6 May 2018 03:30:47 -0400 Subject: - Re-named shift-left -> left-shift, shift-right -> logical-right-shift, signed-shift-right -> arithmetic-right-shift. --- .../luxc/lang/translation/python/procedure/common.jvm.lux | 12 ++++++------ new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/python') diff --git a/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux index c9ebd6fd7..c201c417c 100644 --- a/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux @@ -161,7 +161,7 @@ [bit//xor python.bit-xor] ) -(def: (bit//shift-left [subjectO paramO]) +(def: (bit//left-shift [subjectO paramO]) Binary (|> (python.bit-shl paramO subjectO) runtimeT.bit//64)) @@ -171,8 +171,8 @@ Binary ( paramO subjectO))] - [bit//shift-right python.bit-shr] - [bit//unsigned-shift-right runtimeT.bit//shift-right] + [bit//arithmetic-right-shift python.bit-shr] + [bit//logical-right-shift runtimeT.bit//logical-right-shift] ) (def: bit-procs @@ -183,9 +183,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)) ))) ## [[Arrays]] diff --git a/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux index 5d0ea9186..65e864d91 100644 --- a/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux @@ -266,7 +266,7 @@ (python.set! (list remaining) (|> (@@ remaining) (python./ (python.int 2)))))) (python.return! (@@ count))))) -(runtime: (bit//shift-right param subject) +(runtime: (bit//logical-right-shift param subject) (let [mask (|> (python.int 1) (python.bit-shl (python.- param (python.int 64))) (python.- (python.int 1)))] @@ -280,9 +280,9 @@ @@bit//32 @@bit//64 @@bit//count - @@bit//shift-right)) + @@bit//logical-right-shift)) -(def: high (-> Expression Expression) (bit//shift-right (python.int 32))) +(def: high (-> Expression Expression) (bit//logical-right-shift (python.int 32))) (def: low (-> Expression Expression) (python.bit-and full-32-bits)) (runtime: (nat//< param subject) @@ -331,8 +331,8 @@ (python.set! (list $sH) (high subject)) (python.set! (list $pL) (..low param)) (python.set! (list $pH) (high param)) - (python.set! (list $bottom) (bit//shift-right (python.int 32) - (python.* (@@ $pL) (@@ $sL)))) + (python.set! (list $bottom) (bit//logical-right-shift (python.int 32) + (python.* (@@ $pL) (@@ $sL)))) (python.set! (list $middle) (python.+ (python.* (@@ $pL) (@@ $sH)) (python.* (@@ $pH) (@@ $sL)))) (python.set! (list $top) (python.* (@@ $pH) (@@ $sH))) @@ -349,7 +349,7 @@ (python.while! (python.not (python.= (python.int 0) (@@ remaining))) ($_ python.then! (python.set! (list zeroes) (python.- (python.int 1) (@@ zeroes))) - (python.set! (list remaining) (bit//shift-right (python.int 1) (@@ remaining))))) + (python.set! (list remaining) (bit//logical-right-shift (python.int 1) (@@ remaining))))) (python.return! (@@ zeroes))))) (runtime: (deg/// param subject) -- cgit v1.2.3