aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/ruby')
-rw-r--r--new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux5
-rw-r--r--new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux11
2 files changed, 1 insertions, 15 deletions
diff --git a/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux
index 729acd978..bcc555fe2 100644
--- a/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux
@@ -174,15 +174,10 @@
[bit//logical-right-shift runtimeT.bit//logical-right-shift]
)
-(def: bit//count
- Unary
- runtimeT.bit//count)
-
(def: bit-procs
Bundle
(<| (prefix "bit")
(|> (dict.new text.Hash<Text>)
- (install "count" (unary bit//count))
(install "and" (binary bit//and))
(install "or" (binary bit//or))
(install "xor" (binary bit//xor))
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 ac8f7b11a..ef840d210 100644
--- a/new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux
@@ -157,14 +157,6 @@
@@product//right "\n"
@@sum//get "\n"))
-(runtime: (bit//count subject)
- (ruby.block! (list (ruby.set! (list "count") (ruby.int 0))
- (ruby.while! (ruby.> (ruby.int 0) subject)
- (ruby.block! (list (ruby.set! (list "count") (ruby.+ (ruby.% (ruby.int 2) subject)
- "count"))
- (ruby.set! (list subject) (ruby./ (ruby.int 2) subject)))))
- (ruby.return! "count"))))
-
(runtime: (bit//logical-right-shift param subject)
(let [mask (|> (ruby.int 1)
(ruby.bit-shl (ruby.- param (ruby.int 64)))
@@ -175,8 +167,7 @@
(def: runtime//bit
Runtime
- (format @@bit//count
- @@bit//logical-right-shift))
+ @@bit//logical-right-shift)
(runtime: (text//index subject param start)
(ruby.block! (list (ruby.set! (list "idx") (ruby.send "index" (list param start) subject))