aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source
diff options
context:
space:
mode:
authorEduardo Julian2018-07-31 22:54:35 -0400
committerEduardo Julian2018-07-31 22:54:35 -0400
commit428965131e17d101a16e3ca60b3412101e216cd1 (patch)
tree2b74c5241ee117aa581f4ee7301fc1e5f1bfa6a8 /new-luxc/source
parent97ab1f076ac08992d6b64cd77bc0bef97b3fc50a (diff)
Now implementing box functionality in stdlib instead of the compiler.
Diffstat (limited to 'new-luxc/source')
-rw-r--r--new-luxc/source/luxc/lang/translation/common-lisp/procedure/common.jvm.lux22
-rw-r--r--new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux22
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux34
-rw-r--r--new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux22
-rw-r--r--new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux22
-rw-r--r--new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux22
-rw-r--r--new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux22
7 files changed, 0 insertions, 166 deletions
diff --git a/new-luxc/source/luxc/lang/translation/common-lisp/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/common-lisp/procedure/common.jvm.lux
index 91a95d2f9..b140a11eb 100644
--- a/new-luxc/source/luxc/lang/translation/common-lisp/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/common-lisp/procedure/common.jvm.lux
@@ -301,27 +301,6 @@
(install "exit" (unary runtimeT.io//exit))
(install "current-time" (nullary (function (_ _) (runtimeT.io//current-time runtimeT.unit)))))))
-## [[Box]]
-(def: box//new
- Unary
- (|>> (list) _.vector))
-
-(def: (box//read box)
- Unary
- (_.svref box (_.int 0)))
-
-(def: (box//write [valueO boxO])
- Binary
- (runtimeT.box//write valueO boxO))
-
-(def: box-procs
- Bundle
- (<| (prefix "box")
- (|> (dict.new text.Hash<Text>)
- (install "new" (unary box//new))
- (install "read" (unary box//read))
- (install "write" (binary box//write)))))
-
## [Bundles]
(def: #export procedures
Bundle
@@ -332,5 +311,4 @@
(dict.merge frac-procs)
(dict.merge text-procs)
(dict.merge io-procs)
- (dict.merge box-procs)
)))
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 0efdedd4c..641eb9e02 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
@@ -286,19 +286,6 @@
Nullary
(frac//to-int "(new Date()).getTime()"))
-## [[Box]]
-(def: (box//new initJS)
- Unary
- (format "[" initJS "]"))
-
-(def: (box//read boxJS)
- Unary
- (format "(" boxJS ")[0]"))
-
-(def: (box//write [valueJS boxJS])
- Binary
- (void (format (box//read boxJS) " = " valueJS)))
-
## [Bundles]
(def: lux-procs
Bundle
@@ -376,14 +363,6 @@
(install "exit" (unary io//exit))
(install "current-time" (nullary io//current-time)))))
-(def: box-procs
- Bundle
- (<| (prefix "box")
- (|> (dict.new text.Hash<Text>)
- (install "new" (unary box//new))
- (install "read" (unary box//read))
- (install "write" (binary box//write)))))
-
(def: #export procedures
Bundle
(<| (prefix "lux")
@@ -393,5 +372,4 @@
(dict.merge frac-procs)
(dict.merge text-procs)
(dict.merge io-procs)
- (dict.merge box-procs)
)))
diff --git a/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux
index 2c470c44c..809a13bb9 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux
@@ -364,31 +364,6 @@
(|>> (_.INVOKESTATIC "java.lang.System" "currentTimeMillis" ($t.method (list) (#.Some $t.long) (list)) #0)
(_.wrap #$.Long)))
-## [[Box]]
-(def: empty-boxI
- $.Inst
- (|>> (_.int 1) (_.ANEWARRAY ($t.binary-name "java.lang.Object"))))
-
-(def: check-boxI
- $.Inst
- (_.CHECKCAST ($t.descriptor $Object-Array)))
-
-(def: (box//new initI)
- Unary
- (|>> empty-boxI
- _.DUP (_.int 0) initI _.AASTORE))
-
-(def: (box//read boxI)
- Unary
- (|>> boxI check-boxI
- (_.int 0) _.AALOAD))
-
-(def: (box//write [valueI boxI])
- Binary
- (|>> boxI check-boxI
- (_.int 0) valueI _.AASTORE
- unitI))
-
## [Bundles]
(def: lux-procs
Bundle
@@ -466,14 +441,6 @@
(install "exit" (unary io//exit))
(install "current-time" (nullary io//current-time)))))
-(def: box-procs
- Bundle
- (<| (prefix "box")
- (|> (dict.new text.Hash<Text>)
- (install "new" (unary box//new))
- (install "read" (unary box//read))
- (install "write" (binary box//write)))))
-
(def: #export procedures
Bundle
(<| (prefix "lux")
@@ -483,5 +450,4 @@
(dict.merge frac-procs)
(dict.merge text-procs)
(dict.merge io-procs)
- (dict.merge box-procs)
)))
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 394dd3d34..f173f24b6 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
@@ -285,19 +285,6 @@
(|> (lua.apply "os.time" (list))
(lua.* (lua.int 1_000))))
-## [[Box]]
-(def: box//new
- Unary
- (|>> (list) lua.array))
-
-(def: box//read
- Unary
- (lua.nth (lua.int 1)))
-
-(def: (box//write [valueO boxO])
- Binary
- (runtimeT.box//write valueO boxO))
-
## [Bundles]
(def: lux-procs
Bundle
@@ -375,14 +362,6 @@
(install "exit" (unary io//exit))
(install "current-time" (nullary io//current-time)))))
-(def: box-procs
- Bundle
- (<| (prefix "box")
- (|> (dict.new text.Hash<Text>)
- (install "new" (unary box//new))
- (install "read" (unary box//read))
- (install "write" (binary box//write)))))
-
(def: #export procedures
Bundle
(<| (prefix "lux")
@@ -392,5 +371,4 @@
(dict.merge frac-procs)
(dict.merge text-procs)
(dict.merge io-procs)
- (dict.merge box-procs)
)))
diff --git a/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux
index 430d4b5e7..8ffe03f49 100644
--- a/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux
@@ -328,27 +328,6 @@
(install "current-time" (nullary (function (_ _)
(runtimeT.io//current-time! runtimeT.unit)))))))
-## [[Box]]
-(def: box//new
- Unary
- (|>> (list) python.list))
-
-(def: box//read
- Unary
- (python.nth (python.int 0)))
-
-(def: (box//write [valueO boxO])
- Binary
- (runtimeT.box//write valueO boxO))
-
-(def: box-procs
- Bundle
- (<| (prefix "box")
- (|> (dict.new text.Hash<Text>)
- (install "new" (unary box//new))
- (install "read" (unary box//read))
- (install "write" (binary box//write)))))
-
## [Bundles]
(def: #export procedures
Bundle
@@ -359,5 +338,4 @@
(dict.merge frac-procs)
(dict.merge text-procs)
(dict.merge io-procs)
- (dict.merge box-procs)
)))
diff --git a/new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux
index 421618890..261e6cfb9 100644
--- a/new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux
@@ -326,27 +326,6 @@
(install "current-time" (nullary (function (_ _)
(runtimeT.io//current-time! runtimeT.unit)))))))
-## [[Box]]
-(def: box//new
- Unary
- (|>> (list) r.list))
-
-(def: box//read
- Unary
- (r.nth (r.int 1)))
-
-(def: (box//write [valueO boxO])
- Binary
- (runtimeT.box//write valueO boxO))
-
-(def: box-procs
- Bundle
- (<| (prefix "box")
- (|> (dict.new text.Hash<Text>)
- (install "new" (unary box//new))
- (install "read" (unary box//read))
- (install "write" (binary box//write)))))
-
## [Bundles]
(def: #export procedures
Bundle
@@ -357,5 +336,4 @@
(dict.merge frac-procs)
(dict.merge text-procs)
(dict.merge io-procs)
- (dict.merge box-procs)
)))
diff --git a/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux
index e40f49b80..9176879b1 100644
--- a/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux
@@ -359,27 +359,6 @@
(install "exit" (unary io//exit))
(install "current-time" (nullary io//current-time)))))
-## [[Box]]
-(def: box//new
- Unary
- (|>> (list) ruby.array))
-
-(def: box//read
- Unary
- (ruby.nth (ruby.int 0)))
-
-(def: (box//write [valueO boxO])
- Binary
- (runtimeT.box//write valueO boxO))
-
-(def: box-procs
- Bundle
- (<| (prefix "box")
- (|> (dict.new text.Hash<Text>)
- (install "new" (unary box//new))
- (install "read" (unary box//read))
- (install "write" (binary box//write)))))
-
## [Bundles]
(def: #export procedures
Bundle
@@ -390,5 +369,4 @@
(dict.merge frac-procs)
(dict.merge text-procs)
(dict.merge io-procs)
- (dict.merge box-procs)
)))