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. --- .../luxc/lang/translation/lua/procedure/common.jvm.lux | 2 -- new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux | 12 +----------- 2 files changed, 1 insertion(+), 13 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/lua') diff --git a/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux index 7497aeca2..c750bbaf4 100644 --- a/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux @@ -255,7 +255,6 @@ (|> inputO ))] [frac//to-int (<| (lua.apply "math.floor") (list))] - [text//hash runtimeT.text//hash] ) (def: int//char @@ -428,7 +427,6 @@ (install "concat" (binary text//concat)) (install "index" (trinary text//index)) (install "size" (unary text//size)) - (install "hash" (unary text//hash)) (install "char" (binary text//char)) (install "clip" (trinary text//clip)) ))) diff --git a/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux index 9e7dc7422..2c0dfec17 100644 --- a/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux @@ -207,21 +207,11 @@ (lua.return! none) (lua.return! (some "char")))))) -(runtime: (text//hash input) - (lua.block! (list (lua.local! "hash" (#.Some (lua.int 0))) - (lua.for-step! "idx" (lua.int 1) (lua.apply "string.len" (list input)) (lua.int 1) - (lua.set! "hash" (|> "hash" - (lua.bit-shl (lua.int 5)) - (lua.- "hash") - (lua.+ (lua.apply "string.byte" (list input "idx")))))) - (lua.return! "hash")))) - (def: runtime//text Runtime (format @@text//index @@text//clip - @@text//char - @@text//hash)) + @@text//char)) (def: (check-index-out-of-bounds array idx body!) (-> Expression Expression Statement Statement) -- cgit v1.2.3