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. --- .../source/luxc/lang/translation/js/procedure/common.jvm.lux | 2 -- new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux | 12 +----------- 2 files changed, 1 insertion(+), 13 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/js') diff --git a/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux index cdaa22eee..a2b30390d 100644 --- a/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux @@ -255,7 +255,6 @@ [int//to-frac runtimeT.int//to-number] [frac//to-int runtimeT.int//from-number] - [text//hash runtimeT.text//hash] ) (def: (int//char inputJS) @@ -440,7 +439,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/js/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux index 267a3e637..9840bba1f 100644 --- a/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux @@ -591,21 +591,11 @@ "}") "})")) -(runtime: text//hash "textHash" - (format "(function " @ "(input) {" - "var hash = 0;" - (format "for(var i = 0; i < input.length; i++) {" - "hash = (((hash << 5) - hash) + input.charCodeAt(i)) & 0xFFFFFFFF;" - "}") - "return " int//from-number "(hash);" - "})")) - (def: runtime//text Runtime (format __text//index __text//clip - __text//char - __text//hash)) + __text//char)) (runtime: array//get "arrayGet" (format "(function " @ "(arr,idx) {" -- cgit v1.2.3