From 428965131e17d101a16e3ca60b3412101e216cd1 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 31 Jul 2018 22:54:35 -0400 Subject: Now implementing box functionality in stdlib instead of the compiler. --- .../lang/translation/jvm/procedure/common.jvm.lux | 34 ---------------------- 1 file changed, 34 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/jvm/procedure') 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) - (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) ))) -- cgit v1.2.3