aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/r
diff options
context:
space:
mode:
authorEduardo Julian2018-07-11 22:21:23 -0400
committerEduardo Julian2018-07-11 22:21:23 -0400
commit81480739f4c5caa468b295eb047e5844d39701ca (patch)
treec0b95639cd9427f8ecf57220a38b413fb9845145 /new-luxc/source/luxc/lang/translation/r
parentf76922dfef6e88db854a27dc17987ccdc9736d6a (diff)
- Removed "lux text hash" extension.
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/r')
-rw-r--r--new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux1
-rw-r--r--new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux16
2 files changed, 1 insertions, 16 deletions
diff --git a/new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux
index 2e6ea90e2..00f04e49f 100644
--- a/new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux
@@ -325,7 +325,6 @@
(install "concat" (binary text//concat))
(install "index" (trinary text//index))
(install "size" (unary (|>> (apply1 (r.global "nchar")) runtimeT.int//from-float)))
- (install "hash" (unary runtimeT.text//hash))
(install "char" (binary text//char))
(install "clip" (trinary text//clip))
)))
diff --git a/new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux
index 09bc9e7b0..9cab92115 100644
--- a/new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux
@@ -720,26 +720,12 @@
(..some (int//from-float (char-at (@@ idx) (@@ text)))))
..none))
-(runtime: (text//hash input)
- (let [bits-32 (r.code "0xFFFFFFFF")]
- (with-vars [idx hash]
- ($_ r.then
- (r.set! hash (r.int 0))
- (r.for-in idx (r.range (r.int 1) (text-length (@@ input)))
- (r.set! hash (|> (@@ hash)
- (r.bit-shl (r.int 5))
- (r.- (@@ hash))
- (r.+ (char-at (@@ idx) (@@ input)))
- (r.bit-and bits-32))))
- (int//from-float (@@ hash))))))
-
(def: runtime//text
Runtime
($_ r.then
@@text//index
@@text//clip
- @@text//char
- @@text//hash))
+ @@text//char))
(def: (check-index-out-of-bounds array idx body)
(-> Expression Expression Expression Expression)