From f621a133e6e0a516c0586270fea8eaffb4829d82 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 8 Aug 2021 17:56:15 -0400 Subject: No more #export magic syntax. --- lux-jvm/source/luxc/lang/host/jvm/inst.lux | 44 +++++++++++++++--------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'lux-jvm/source/luxc/lang/host/jvm/inst.lux') 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 [ ] - [(def: #export ( value) + [(def: .public ( value) (-> Inst) (function (_ visitor) (do_to visitor @@ -177,7 +177,7 @@ (`` ((~~ (template.identifier ["org/objectweb/asm/Opcodes::" short]))))) (template [] - [(def: #export + [(def: .public 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 [] - [(def: #export ( constant) + [(def: .public ( constant) (-> Int Inst) (function (_ visitor) (do_to visitor @@ -207,7 +207,7 @@ ) (template [] - [(def: #export + [(def: .public 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 [] - [(def: #export ( register) + [(def: .public ( register) (-> Register Inst) (function (_ visitor) (do_to visitor @@ -282,7 +282,7 @@ ) (template [ ] - [(def: #export ( class field type) + [(def: .public ( class field type) (-> (Type Class) Text (Type Value) Inst) (function (_ visitor) (do_to visitor @@ -297,7 +297,7 @@ (template [ +] [(`` (template [ ] - [(def: #export ( class) + [(def: .public ( class) (-> (Type ) 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 [ ] - [(def: #export ( class method_name method) + [(def: .public ( class method_name method) (-> (Type Class) Text (Type Method) Inst) (function (_ visitor) (do_to visitor @@ -351,7 +351,7 @@ ) (template [] - [(def: #export ( @where) + [(def: .public ( @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 -- cgit v1.2.3