diff options
Diffstat (limited to '')
-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) |