aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/js
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/js')
-rw-r--r--new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux33
-rw-r--r--new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux30
2 files changed, 0 insertions, 63 deletions
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 df1be8508..0efdedd4c 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
@@ -164,27 +164,6 @@
[bit//logical-right-shift runtimeT.bit//logical-right-shift]
)
-## [[Arrays]]
-(def: (array//new sizeJS)
- Unary
- (self-contained (format "new Array(" runtimeT.int//to-number "(" sizeJS ")" ")")))
-
-(def: (array//get [arrayJS idxJS])
- Binary
- (format runtimeT.array//get "(" arrayJS "," idxJS ")"))
-
-(def: (array//put [arrayJS idxJS elemJS])
- Trinary
- (format runtimeT.array//put "(" arrayJS "," idxJS "," elemJS ")"))
-
-(def: (array//remove [arrayJS idxJS])
- Binary
- (format runtimeT.array//remove "(" arrayJS "," idxJS ")"))
-
-(def: (array//size arrayJS)
- Unary
- (format arrayJS ".length"))
-
## [[Numbers]]
(host.import: java/lang/Double
(#static MIN_VALUE Double)
@@ -388,17 +367,6 @@
(install "clip" (trinary text//clip))
)))
-(def: array-procs
- Bundle
- (<| (prefix "array")
- (|> (dict.new text.Hash<Text>)
- (install "new" (unary array//new))
- (install "get" (binary array//get))
- (install "put" (trinary array//put))
- (install "remove" (binary array//remove))
- (install "size" (unary array//size))
- )))
-
(def: io-procs
Bundle
(<| (prefix "io")
@@ -424,7 +392,6 @@
(dict.merge int-procs)
(dict.merge frac-procs)
(dict.merge text-procs)
- (dict.merge array-procs)
(dict.merge io-procs)
(dict.merge box-procs)
)))
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 d5abbc150..af47bffce 100644
--- a/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux
@@ -597,35 +597,6 @@
__text//clip
__text//char))
-(runtime: array//get "arrayGet"
- (format "(function " @ "(arr,idx) {"
- "var temp = arr[" int//to-number "(idx)];"
- (format "if(temp !== undefined) {"
- (format "return " (some "temp") ";")
- "}"
- "else {"
- (format "return " none ";")
- "}")
- "})"))
-
-(runtime: array//put "arrayPut"
- (format "(function " @ "(arr,idx,val) {"
- "arr[" int//to-number "(idx)] = val;"
- "return arr;"
- "})"))
-
-(runtime: array//remove "arrayRemove"
- (format "(function " @ "(arr,idx) {"
- "delete arr[" int//to-number "(idx)];"
- "return arr;"
- "})"))
-
-(def: runtime//array
- Runtime
- (format __array//get
- __array//put
- __array//remove))
-
(runtime: io//log "log"
(format "(function " @ "(message) {"
"if(typeof console !== \"undefined\" && console.log) { console.log(message); }"
@@ -685,7 +656,6 @@
runtime//bit
runtime//int
runtime//text
- runtime//array
runtime//io
runtime//js))