diff options
Diffstat (limited to '')
-rw-r--r-- | lux-jvm/source/luxc/lang/host/jvm/inst.lux | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/lux-jvm/source/luxc/lang/host/jvm/inst.lux b/lux-jvm/source/luxc/lang/host/jvm/inst.lux index ea68f2680..1a2c811a3 100644 --- a/lux-jvm/source/luxc/lang/host/jvm/inst.lux +++ b/lux-jvm/source/luxc/lang/host/jvm/inst.lux @@ -149,17 +149,17 @@ ]) ## [Insts] -(def: #export make_label +(def: .public make_label (All [s] (Operation s org/objectweb/asm/Label)) (function (_ state) (#try.Success [state (org/objectweb/asm/Label::new)]))) -(def: #export (with_label action) +(def: .public (with_label action) (All [a] (-> (-> org/objectweb/asm/Label a) a)) (action (org/objectweb/asm/Label::new))) (template [<name> <type> <prepare>] - [(def: #export (<name> value) + [(def: .public (<name> value) (-> <type> Inst) (function (_ visitor) (do_to visitor @@ -177,7 +177,7 @@ (`` ((~~ (template.identifier ["org/objectweb/asm/Opcodes::" short]))))) (template [<constant>] - [(def: #export <constant> + [(def: .public <constant> Inst (function (_ visitor) (do_to visitor @@ -189,14 +189,14 @@ [DCONST_0] [DCONST_1] ) -(def: #export NULL +(def: .public NULL Inst (function (_ visitor) (do_to visitor (org/objectweb/asm/MethodVisitor::visitInsn (!prefix ACONST_NULL))))) (template [<constant>] - [(def: #export (<constant> constant) + [(def: .public (<constant> constant) (-> Int Inst) (function (_ visitor) (do_to visitor @@ -207,7 +207,7 @@ ) (template [<name>] - [(def: #export <name> + [(def: .public <name> Inst (function (_ visitor) (do_to visitor @@ -267,10 +267,10 @@ [RETURN] [IRETURN] [LRETURN] [FRETURN] [DRETURN] [ARETURN] ) -(type: #export Register Nat) +(type: .public Register Nat) (template [<name>] - [(def: #export (<name> register) + [(def: .public (<name> register) (-> Register Inst) (function (_ visitor) (do_to visitor @@ -282,7 +282,7 @@ ) (template [<name> <inst>] - [(def: #export (<name> class field type) + [(def: .public (<name> class field type) (-> (Type Class) Text (Type Value) Inst) (function (_ visitor) (do_to visitor @@ -297,7 +297,7 @@ (template [<category> <instructions>+] [(`` (template [<name> <inst>] - [(def: #export (<name> class) + [(def: .public (<name> class) (-> (Type <category>) Inst) (function (_ visitor) (do_to visitor @@ -314,7 +314,7 @@ [INSTANCEOF org/objectweb/asm/Opcodes::INSTANCEOF]]] ) -(def: #export (NEWARRAY type) +(def: .public (NEWARRAY type) (-> (Type Primitive) Inst) (function (_ visitor) (do_to visitor @@ -334,7 +334,7 @@ (undefined))))))) (template [<name> <inst> <interface?>] - [(def: #export (<name> class method_name method) + [(def: .public (<name> class method_name method) (-> (Type Class) Text (Type Method) Inst) (function (_ visitor) (do_to visitor @@ -351,7 +351,7 @@ ) (template [<name>] - [(def: #export (<name> @where) + [(def: .public (<name> @where) (-> //.Label Inst) (function (_ visitor) (do_to visitor @@ -364,7 +364,7 @@ [GOTO] ) -(def: #export (LOOKUPSWITCH default keys+labels) +(def: .public (LOOKUPSWITCH default keys+labels) (-> //.Label (List [Int //.Label]) Inst) (function (_ visitor) (let [keys+labels (list.sort (function (_ left right) @@ -384,7 +384,7 @@ (do_to visitor (org/objectweb/asm/MethodVisitor::visitLookupSwitchInsn default keys_array labels_array))))) -(def: #export (TABLESWITCH min max default labels) +(def: .public (TABLESWITCH min max default labels) (-> Int Int //.Label (List //.Label) Inst) (function (_ visitor) (let [num_labels (list.size labels) @@ -399,19 +399,19 @@ (do_to visitor (org/objectweb/asm/MethodVisitor::visitTableSwitchInsn min max default labels_array))))) -(def: #export (try @from @to @handler exception) +(def: .public (try @from @to @handler exception) (-> //.Label //.Label //.Label (Type Class) Inst) (function (_ visitor) (do_to visitor (org/objectweb/asm/MethodVisitor::visitTryCatchBlock @from @to @handler (..class_name exception))))) -(def: #export (label @label) +(def: .public (label @label) (-> //.Label Inst) (function (_ visitor) (do_to visitor (org/objectweb/asm/MethodVisitor::visitLabel @label)))) -(def: #export (array elementT) +(def: .public (array elementT) (-> (Type Value) Inst) (case (type.primitive? elementT) (#.Left elementT) @@ -445,18 +445,18 @@ "longValue" "floatValue" "doubleValue" "charValue"] ) -(def: #export (wrap type) +(def: .public (wrap type) (-> (Type Primitive) Inst) (let [wrapper (type.class (primitive_wrapper type) (list))] (INVOKESTATIC wrapper "valueOf" (type.method [(list) (list type) wrapper (list)])))) -(def: #export (unwrap type) +(def: .public (unwrap type) (-> (Type Primitive) Inst) (let [wrapper (type.class (primitive_wrapper type) (list))] (|>> (CHECKCAST wrapper) (INVOKEVIRTUAL wrapper (primitive_unwrap type) (type.method [(list) (list) type (list)]))))) -(def: #export (fuse insts) +(def: .public (fuse insts) (-> (List Inst) Inst) (case insts #.End |