diff options
author | Eduardo Julian | 2018-05-06 03:30:47 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-05-06 03:30:47 -0400 |
commit | e65e734e5df3746ffb7df2cc9fa33826e0083fcd (patch) | |
tree | c67b1105a4b421d527804ccbfcab4d29ec20e744 /new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux | |
parent | f5a6fe62a612c0727063fa9e530d53ddda5fcd82 (diff) |
- Re-named shift-left -> left-shift, shift-right -> logical-right-shift, signed-shift-right -> arithmetic-right-shift.
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux index 1e1e4c53a..c3f2981e1 100644 --- a/new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux @@ -165,7 +165,7 @@ (ruby.set! (list subject) (ruby./ (ruby.int 2) subject))))) (ruby.return! "count")))) -(runtime: (bit//shift-right param subject) +(runtime: (bit//logical-right-shift param subject) (let [mask (|> (ruby.int 1) (ruby.bit-shl (ruby.- param (ruby.int 64))) (ruby.- (ruby.int 1)))] @@ -176,9 +176,9 @@ (def: runtime//bit Runtime (format @@bit//count - @@bit//shift-right)) + @@bit//logical-right-shift)) -(def: high (-> Expression Expression) (bit//shift-right (ruby.int 32))) +(def: high (-> Expression Expression) (bit//logical-right-shift (ruby.int 32))) (def: low (-> Expression Expression) (ruby.bit-and "0xFFFFFFFF")) (runtime: (nat//< param subject) @@ -220,8 +220,8 @@ (ruby.set! (list "sH") (high subject)) (ruby.set! (list "pL") (low param)) (ruby.set! (list "pH") (high param)) - (ruby.set! (list "bottom") (bit//shift-right (ruby.int 32) - (ruby.* "pL" "sL"))) + (ruby.set! (list "bottom") (bit//logical-right-shift (ruby.int 32) + (ruby.* "pL" "sL"))) (ruby.set! (list "middle") (ruby.+ (ruby.* "pL" "sH") (ruby.* "pH" "sL"))) (ruby.set! (list "top") (ruby.* "pH" "sH")) @@ -234,7 +234,7 @@ (ruby.block! (list (ruby.set! (list "zeroes") (ruby.int 64)) (ruby.while! (ruby.not (ruby.= (ruby.int 0) input)) (ruby.block! (list (ruby.set! (list "zeroes") (ruby.- (ruby.int 1) "zeroes")) - (ruby.set! (list input) (bit//shift-right (ruby.int 1) input))))) + (ruby.set! (list input) (bit//logical-right-shift (ruby.int 1) input))))) (ruby.return! "zeroes")))) (runtime: (deg/// param subject) |