From ba93f7da278a3fdc71729d7a0325c99cec74ca3c Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 29 Aug 2018 22:36:47 -0400 Subject: Adapted new-luxc to latest stdlib changes. --- new-luxc/source/luxc/lang/host/jvm/inst.lux | 47 +++++++++++++++-------------- 1 file changed, 24 insertions(+), 23 deletions(-) (limited to 'new-luxc/source/luxc/lang/host/jvm/inst.lux') diff --git a/new-luxc/source/luxc/lang/host/jvm/inst.lux b/new-luxc/source/luxc/lang/host/jvm/inst.lux index cb8d47960..44ce0839a 100644 --- a/new-luxc/source/luxc/lang/host/jvm/inst.lux +++ b/new-luxc/source/luxc/lang/host/jvm/inst.lux @@ -121,18 +121,18 @@ (def: #export make-label (All [s] (Operation s Label)) (function (_ state) - (#error.Success [state (Label::new [])]))) + (#error.Success [state (Label::new)]))) (def: #export (with-label action) (-> (-> Label Inst) Inst) - (action (Label::new []))) + (action (Label::new))) (do-template [ ] [(def: #export ( value) (-> Inst) (function (_ visitor) (do-to visitor - (MethodVisitor::visitLdcInsn [( value)]))))] + (MethodVisitor::visitLdcInsn ( value)))))] [boolean Bit id] [int Int host.long-to-int] @@ -143,20 +143,20 @@ ) (syntax: (prefix {base s.local-identifier}) - (wrap (list (code.local-identifier (format "Opcodes::" base))))) + (wrap (list (` ((~ (code.local-identifier (format "Opcodes::" base)))))))) (def: #export NULL Inst (function (_ visitor) (do-to visitor - (MethodVisitor::visitInsn [(prefix ACONST_NULL)])))) + (MethodVisitor::visitInsn (prefix ACONST_NULL))))) (do-template [] [(def: #export Inst (function (_ visitor) (do-to visitor - (MethodVisitor::visitInsn [(prefix )]))))] + (MethodVisitor::visitInsn (prefix )))))] [NOP] @@ -217,7 +217,7 @@ (-> Nat Inst) (function (_ visitor) (do-to visitor - (MethodVisitor::visitVarInsn [(prefix ) (.int register)]))))] + (MethodVisitor::visitVarInsn (prefix ) (.int register)))))] [ILOAD] [LLOAD] [DLOAD] [ALOAD] [ISTORE] [LSTORE] [ASTORE] @@ -228,7 +228,7 @@ (-> Text Text //.Type Inst) (function (_ visitor) (do-to visitor - (MethodVisitor::visitFieldInsn [ (type.binary-name class) field (type.descriptor type)]))))] + (MethodVisitor::visitFieldInsn () (type.binary-name class) field (type.descriptor type)))))] [GETSTATIC Opcodes::GETSTATIC] [PUTSTATIC Opcodes::PUTSTATIC] @@ -242,7 +242,7 @@ (-> Text Inst) (function (_ visitor) (do-to visitor - (MethodVisitor::visitTypeInsn [ (type.binary-name class)]))))] + (MethodVisitor::visitTypeInsn () (type.binary-name class)))))] [CHECKCAST Opcodes::CHECKCAST] [NEW Opcodes::NEW] @@ -254,22 +254,23 @@ (-> Primitive Inst) (function (_ visitor) (do-to visitor - (MethodVisitor::visitIntInsn [Opcodes::NEWARRAY (case type - #//.Boolean Opcodes::T_BOOLEAN - #//.Byte Opcodes::T_BYTE - #//.Short Opcodes::T_SHORT - #//.Int Opcodes::T_INT - #//.Long Opcodes::T_LONG - #//.Float Opcodes::T_FLOAT - #//.Double Opcodes::T_DOUBLE - #//.Char Opcodes::T_CHAR)])))) + (MethodVisitor::visitIntInsn (Opcodes::NEWARRAY) + (case type + #//.Boolean (Opcodes::T_BOOLEAN) + #//.Byte (Opcodes::T_BYTE) + #//.Short (Opcodes::T_SHORT) + #//.Int (Opcodes::T_INT) + #//.Long (Opcodes::T_LONG) + #//.Float (Opcodes::T_FLOAT) + #//.Double (Opcodes::T_DOUBLE) + #//.Char (Opcodes::T_CHAR)))))) (do-template [ ] [(def: #export ( class method-name method-signature interface?) (-> Text Text //.Method Bit Inst) (function (_ visitor) (do-to visitor - (MethodVisitor::visitMethodInsn [ (type.binary-name class) method-name (type.method-descriptor method-signature) interface?]))))] + (MethodVisitor::visitMethodInsn () (type.binary-name class) method-name (type.method-descriptor method-signature) interface?))))] [INVOKESTATIC Opcodes::INVOKESTATIC] [INVOKEVIRTUAL Opcodes::INVOKEVIRTUAL] @@ -282,7 +283,7 @@ (-> //.Label Inst) (function (_ visitor) (do-to visitor - (MethodVisitor::visitJumpInsn [(prefix ) @where]))))] + (MethodVisitor::visitJumpInsn (prefix ) @where))))] [IF_ICMPEQ] [IF_ICMPGT] [IF_ICMPLT] [IF_ACMPEQ] [IFNULL] [IFEQ] [IFNE] [IFLT] [IFLE] [IFGT] [IFGE] @@ -302,19 +303,19 @@ (recur (inc idx))) []))] (do-to visitor - (MethodVisitor::visitTableSwitchInsn [min max default labels-array]))))) + (MethodVisitor::visitTableSwitchInsn min max default labels-array))))) (def: #export (try @from @to @handler exception) (-> //.Label //.Label //.Label Text Inst) (function (_ visitor) (do-to visitor - (MethodVisitor::visitTryCatchBlock [@from @to @handler (type.binary-name exception)])))) + (MethodVisitor::visitTryCatchBlock @from @to @handler (type.binary-name exception))))) (def: #export (label @label) (-> //.Label Inst) (function (_ visitor) (do-to visitor - (MethodVisitor::visitLabel [@label])))) + (MethodVisitor::visitLabel @label)))) (def: #export (array type) (-> //.Type Inst) -- cgit v1.2.3