aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux')
-rw-r--r--new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux31
1 files changed, 0 insertions, 31 deletions
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 9bcc46680..a7bd45ff8 100644
--- a/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux
@@ -220,23 +220,6 @@
@@product//right
@@sum//get))
-(def: full-32-bits (python.code "0xFFFFFFFF"))
-
-(runtime: (bit//32 input)
- (with-vars [capped]
- (python.cond! (list [(|> input (python.> full-32-bits))
- (python.return! (|> input (python.bit-and full-32-bits) bit//32))]
- [(|> input (python.> (python.code "0x7FFFFFFF")))
- ($_ python.then!
- (python.set! (list capped)
- (python.apply (list (|> (python.code "0x100000000")
- (python.- input)))
- (python.global "int")))
- (python.if! (|> (@@ capped) (python.<= (python.int 2147483647)))
- (python.return! (|> (@@ capped) (python.* (python.int -1))))
- (python.return! (python.int -2147483648))))])
- (python.return! input))))
-
(def: full-64-bits (python.code "0xFFFFFFFFFFFFFFFF"))
(runtime: (bit//64 input)
@@ -254,18 +237,6 @@
(python.return! (python.code "-9223372036854775808L"))))])
(python.return! input))))
-(runtime: (bit//count subject)
- (with-vars [count remaining]
- ($_ python.then!
- (python.set! (list count) (python.int 0))
- (python.set! (list remaining) subject)
- (python.while! (|> (@@ remaining) (python.> (python.int 0)))
- ($_ python.then!
- (let [last-bit (|> (@@ remaining) (python.% (python.int 2)))]
- (python.set! (list count) (|> (@@ count) (python.+ last-bit))))
- (python.set! (list remaining) (|> (@@ remaining) (python./ (python.int 2))))))
- (python.return! (@@ count)))))
-
(runtime: (bit//logical-right-shift param subject)
(let [mask (|> (python.int 1)
(python.bit-shl (python.- param (python.int 64)))
@@ -277,9 +248,7 @@
(def: runtime//bit
Runtime
($_ python.then!
- @@bit//32
@@bit//64
- @@bit//count
@@bit//logical-right-shift))
(runtime: (frac//decode input)