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/php/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/php/runtime.jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/php/runtime.jvm.lux | 40 |
1 files changed, 2 insertions, 38 deletions
diff --git a/new-luxc/source/luxc/lang/translation/php/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/php/runtime.jvm.lux index 66827025e..c7262a291 100644 --- a/new-luxc/source/luxc/lang/translation/php/runtime.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/php/runtime.jvm.lux @@ -216,41 +216,7 @@ (_.then! @@product//right) (_.then! @@sum//get))) -## (def: full-32-bits (_.code "0xFFFFFFFF")) - -## (runtime: (bit//32 input) -## (with-vars [capped] -## (_.cond! (list [(|> input (_.> full-32-bits)) -## (_.return! (|> input (_.bit-and full-32-bits) bit//32))] -## [(|> input (_.> (_.code "0x7FFFFFFF"))) -## ($_ _.then! -## (_.set! (list capped) -## (_.apply (list (|> (_.code "0x100000000") -## (_.- input))) -## (_.global "int"))) -## (_.if! (|> (@@ capped) (_.<= (_.int 2147483647))) -## (_.return! (|> (@@ capped) (_.* (_.int -1)))) -## (_.return! (_.int -2147483648))))]) -## (_.return! input)))) - -## (def: full-64-bits (_.code "0xFFFFFFFFFFFFFFFF")) - -## (runtime: (bit//64 input) -## (with-vars [capped] -## (_.cond! (list [(|> input (_.> full-64-bits)) -## (_.return! (|> input (_.bit-and full-64-bits) bit//64))] -## [(|> input (_.> (_.code "0x7FFFFFFFFFFFFFFF"))) -## ($_ _.then! -## (_.set! (list capped) -## (_.apply (list (|> (_.code "0x10000000000000000") -## (_.- input))) -## (_.global "int"))) -## (_.if! (|> (@@ capped) (_.<= (_.code "9223372036854775807L"))) -## (_.return! (|> (@@ capped) (_.* (_.int -1)))) -## (_.return! (_.code "-9223372036854775808L"))))]) -## (_.return! input)))) - -## (runtime: (bit//shift-right param subject) +## (runtime: (bit//logical-right-shift param subject) ## (let [mask (|> (_.int 1) ## (_.bit-shl (_.- param (_.int 64))) ## (_.- (_.int 1)))] @@ -261,9 +227,7 @@ ## (def: runtime//bit ## Runtime ## ($_ _.then! -## @@bit//32 -## @@bit//64 -## @@bit//shift-right)) +## @@bit//logical-right-shift)) ## (runtime: (text//index subject param start) ## (with-vars [idx] |