diff options
Diffstat (limited to 'new-luxc/source/luxc/lang/host')
-rw-r--r-- | new-luxc/source/luxc/lang/host/jvm.lux | 3 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/host/jvm/def.lux | 26 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/host/jvm/inst.lux | 11 |
3 files changed, 21 insertions, 19 deletions
diff --git a/new-luxc/source/luxc/lang/host/jvm.lux b/new-luxc/source/luxc/lang/host/jvm.lux index 4966038c6..7216a1708 100644 --- a/new-luxc/source/luxc/lang/host/jvm.lux +++ b/new-luxc/source/luxc/lang/host/jvm.lux @@ -7,13 +7,12 @@ ["p" parser ["s" code]]] [data + [binary (#+ Binary)] [collection ["." list ("#/." functor)]]] [macro ["." code] [syntax (#+ syntax:)]] - [world - [binary (#+ Binary)]] [target [jvm [type (#+ Class)]]] diff --git a/new-luxc/source/luxc/lang/host/jvm/def.lux b/new-luxc/source/luxc/lang/host/jvm/def.lux index 4d1b99da0..138098929 100644 --- a/new-luxc/source/luxc/lang/host/jvm/def.lux +++ b/new-luxc/source/luxc/lang/host/jvm/def.lux @@ -4,9 +4,11 @@ [control ["." function]] [data - ["." text - format] ["." product] + [number + ["i" int]] + ["." text + ["%" format (#+ format)]] [collection ["." array (#+ Array)] ["." list ("#/." functor)]]] @@ -126,12 +128,12 @@ (def: (class-flags config) (-> //.Class-Config Int) - ($_ i/+ + ($_ i.+ (if (get@ #//.finalC config) (Opcodes::ACC_FINAL) +0))) (def: (method-flags config) (-> //.Method-Config Int) - ($_ i/+ + ($_ i.+ (if (get@ #//.staticM config) (Opcodes::ACC_STATIC) +0) (if (get@ #//.finalM config) (Opcodes::ACC_FINAL) +0) (if (get@ #//.synchronizedM config) (Opcodes::ACC_SYNCHRONIZED) +0) @@ -139,7 +141,7 @@ (def: (field-flags config) (-> //.Field-Config Int) - ($_ i/+ + ($_ i.+ (if (get@ #//.staticF config) (Opcodes::ACC_STATIC) +0) (if (get@ #//.finalF config) (Opcodes::ACC_FINAL) +0) (if (get@ #//.transientF config) (Opcodes::ACC_TRANSIENT) +0) @@ -179,7 +181,7 @@ (def: class-computes Int - ($_ i/+ + ($_ i.+ (ClassWriter::COMPUTE_MAXS) ## (ClassWriter::COMPUTE_FRAMES) )) @@ -191,7 +193,7 @@ (host.type [byte])) (let [writer (|> (do-to (ClassWriter::new class-computes) (ClassWriter::visit (version-flag version) - ($_ i/+ + ($_ i.+ (Opcodes::ACC_SUPER) <flag> (visibility-flag visibility) @@ -218,7 +220,7 @@ (host.type [byte])) (let [writer (|> (do-to (ClassWriter::new class-computes) (ClassWriter::visit (version-flag version) - ($_ i/+ + ($_ i.+ (Opcodes::ACC_SUPER) (Opcodes::ACC_INTERFACE) (visibility-flag visibility) @@ -237,7 +239,7 @@ (-> //.Visibility //.Method-Config Text Method //.Inst //.Def) (function (_ writer) - (let [=method (ClassWriter::visitMethod ($_ i/+ + (let [=method (ClassWriter::visitMethod ($_ i.+ (visibility-flag visibility) (method-flags config)) ($t.binary-name name) @@ -255,7 +257,7 @@ (-> //.Visibility //.Method-Config Text Method //.Def) (function (_ writer) - (let [=method (ClassWriter::visitMethod ($_ i/+ + (let [=method (ClassWriter::visitMethod ($_ i.+ (visibility-flag visibility) (method-flags config) (Opcodes::ACC_ABSTRACT)) @@ -270,7 +272,7 @@ (def: #export (field visibility config name type) (-> //.Visibility //.Field-Config Text Type //.Def) (function (_ writer) - (let [=field (do-to (ClassWriter::visitField ($_ i/+ + (let [=field (do-to (ClassWriter::visitField ($_ i.+ (visibility-flag visibility) (field-flags config)) ($t.binary-name name) @@ -285,7 +287,7 @@ [(def: #export (<name> visibility config name value) (-> //.Visibility //.Field-Config Text <lux-type> //.Def) (function (_ writer) - (let [=field (do-to (ClassWriter::visitField ($_ i/+ + (let [=field (do-to (ClassWriter::visitField ($_ i.+ (visibility-flag visibility) (field-flags config)) ($t.binary-name name) diff --git a/new-luxc/source/luxc/lang/host/jvm/inst.lux b/new-luxc/source/luxc/lang/host/jvm/inst.lux index 35f779799..fcf28d4a7 100644 --- a/new-luxc/source/luxc/lang/host/jvm/inst.lux +++ b/new-luxc/source/luxc/lang/host/jvm/inst.lux @@ -11,8 +11,9 @@ ["." product] ["." maybe] ["." error] - [text - format] + [number + ["n" nat] + ["i" int]] [collection ["." list ("#@." functor)]]] [macro @@ -305,13 +306,13 @@ (-> //.Label (List [Int //.Label]) Inst) (function (_ visitor) (let [keys+labels (list.sort (function (_ left right) - (i/< (product.left left) (product.left right))) + (i.< (product.left left) (product.left right))) keys+labels) array-size (list.size keys+labels) keys-array (host.array int array-size) labels-array (host.array org/objectweb/asm/Label array-size) _ (loop [idx 0] - (if (n/< array-size idx) + (if (n.< array-size idx) (let [[key label] (maybe.assume (list.nth idx keys+labels))] (exec (host.array-write idx (host.long-to-int key) keys-array) @@ -327,7 +328,7 @@ (let [num-labels (list.size labels) labels-array (host.array org/objectweb/asm/Label num-labels) _ (loop [idx 0] - (if (n/< num-labels idx) + (if (n.< num-labels idx) (exec (host.array-write idx (maybe.assume (list.nth idx labels)) labels-array) |