diff options
author | Eduardo Julian | 2018-07-11 22:21:23 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-07-11 22:21:23 -0400 |
commit | 81480739f4c5caa468b295eb047e5844d39701ca (patch) | |
tree | c0b95639cd9427f8ecf57220a38b413fb9845145 /new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux | |
parent | f76922dfef6e88db854a27dc17987ccdc9736d6a (diff) |
- Removed "lux text hash" extension.
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux | 16 |
1 files changed, 1 insertions, 15 deletions
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) |