From 81480739f4c5caa468b295eb047e5844d39701ca Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 11 Jul 2018 22:21:23 -0400 Subject: - Removed "lux text hash" extension. --- new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux') 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) -- cgit v1.2.3