aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/host/jvm/inst.lux
diff options
context:
space:
mode:
authorEduardo Julian2018-08-29 22:36:47 -0400
committerEduardo Julian2018-08-29 22:36:47 -0400
commitba93f7da278a3fdc71729d7a0325c99cec74ca3c (patch)
tree84f298edb360fefb6c6b518394a4565546ef0739 /new-luxc/source/luxc/lang/host/jvm/inst.lux
parentc9ff55f6c989aff28b2d687fd8aa0ef520701e2c (diff)
Adapted new-luxc to latest stdlib changes.
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/lang/host/jvm/inst.lux47
1 files changed, 24 insertions, 23 deletions
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 [<name> <type> <prepare>]
[(def: #export (<name> value)
(-> <type> Inst)
(function (_ visitor)
(do-to visitor
- (MethodVisitor::visitLdcInsn [(<prepare> value)]))))]
+ (MethodVisitor::visitLdcInsn (<prepare> 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 [<name>]
[(def: #export <name>
Inst
(function (_ visitor)
(do-to visitor
- (MethodVisitor::visitInsn [(prefix <name>)]))))]
+ (MethodVisitor::visitInsn (prefix <name>)))))]
[NOP]
@@ -217,7 +217,7 @@
(-> Nat Inst)
(function (_ visitor)
(do-to visitor
- (MethodVisitor::visitVarInsn [(prefix <name>) (.int register)]))))]
+ (MethodVisitor::visitVarInsn (prefix <name>) (.int register)))))]
[ILOAD] [LLOAD] [DLOAD] [ALOAD]
[ISTORE] [LSTORE] [ASTORE]
@@ -228,7 +228,7 @@
(-> Text Text //.Type Inst)
(function (_ visitor)
(do-to visitor
- (MethodVisitor::visitFieldInsn [<inst> (type.binary-name class) field (type.descriptor type)]))))]
+ (MethodVisitor::visitFieldInsn (<inst>) (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 [<inst> (type.binary-name class)]))))]
+ (MethodVisitor::visitTypeInsn (<inst>) (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 [<name> <inst>]
[(def: #export (<name> class method-name method-signature interface?)
(-> Text Text //.Method Bit Inst)
(function (_ visitor)
(do-to visitor
- (MethodVisitor::visitMethodInsn [<inst> (type.binary-name class) method-name (type.method-descriptor method-signature) interface?]))))]
+ (MethodVisitor::visitMethodInsn (<inst>) (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 <name>) @where]))))]
+ (MethodVisitor::visitJumpInsn (prefix <name>) @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)