diff options
author | Eduardo Julian | 2018-07-31 22:54:35 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-07-31 22:54:35 -0400 |
commit | 428965131e17d101a16e3ca60b3412101e216cd1 (patch) | |
tree | 2b74c5241ee117aa581f4ee7301fc1e5f1bfa6a8 /new-luxc/source/luxc/lang/translation/jvm | |
parent | 97ab1f076ac08992d6b64cd77bc0bef97b3fc50a (diff) |
Now implementing box functionality in stdlib instead of the compiler.
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/jvm')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux | 34 |
1 files changed, 0 insertions, 34 deletions
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) ))) |