diff options
author | Eduardo Julian | 2018-07-31 22:23:07 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-07-31 22:23:07 -0400 |
commit | 97ab1f076ac08992d6b64cd77bc0bef97b3fc50a (patch) | |
tree | 6ea01c3e9f5be6a1387c1a7621681d1642176329 /new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux | |
parent | 7e44ee8a2cfb14e35f6283a9eb8d6a2ddc8bd99a (diff) |
Now implementing array functionality in stdlib instead of the compiler.
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux | 56 |
1 files changed, 0 insertions, 56 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 49b1971f1..2c470c44c 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 @@ -113,15 +113,6 @@ (def: lux-intI $.Inst (|>> _.I2L (_.wrap #$.Long))) (def: jvm-intI $.Inst (|>> (_.unwrap #$.Long) _.L2I)) -(def: (array-writeI arrayI idxI elemI) - (-> $.Inst $.Inst $.Inst - $.Inst) - (|>> arrayI (_.CHECKCAST ($t.descriptor $Object-Array)) - _.DUP - idxI jvm-intI - elemI - _.AASTORE)) - (def: (predicateI tester) (-> (-> $.Label $.Inst) $.Inst) @@ -209,41 +200,6 @@ [bit//logical-right-shift _.LUSHR] ) -## [[Arrays]] -(def: (array//new lengthI) - Unary - (|>> lengthI jvm-intI (_.ANEWARRAY ($t.binary-name "java.lang.Object")))) - -(def: (array//get [arrayI idxI]) - Binary - (<| _.with-label (function (_ @is-null)) - _.with-label (function (_ @end)) - (|>> arrayI (_.CHECKCAST ($t.descriptor $Object-Array)) - idxI jvm-intI - _.AALOAD - _.DUP - (_.IFNULL @is-null) - runtimeT.someI - (_.GOTO @end) - (_.label @is-null) - _.POP - runtimeT.noneI - (_.label @end)))) - -(def: (array//put [arrayI idxI elemI]) - Trinary - (array-writeI arrayI idxI elemI)) - -(def: (array//remove [arrayI idxI]) - Binary - (array-writeI arrayI idxI _.NULL)) - -(def: (array//size arrayI) - Unary - (|>> arrayI (_.CHECKCAST ($t.descriptor $Object-Array)) - _.ARRAYLENGTH - lux-intI)) - ## [[Numbers]] (def: nat-method $.Method @@ -501,17 +457,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") @@ -537,7 +482,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) ))) |