diff options
Diffstat (limited to 'new-luxc/source/luxc/generator/host')
-rw-r--r-- | new-luxc/source/luxc/generator/host/jvm/inst.lux | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/new-luxc/source/luxc/generator/host/jvm/inst.lux b/new-luxc/source/luxc/generator/host/jvm/inst.lux index aa9a852dd..ebf12023f 100644 --- a/new-luxc/source/luxc/generator/host/jvm/inst.lux +++ b/new-luxc/source/luxc/generator/host/jvm/inst.lux @@ -22,7 +22,11 @@ (L/map (function [code] (` ((~' #static) (~ (code;local-symbol code)) (~' int))))) wrap)) -(with-expansions [<primitive> (declare T_BOOLEAN T_CHAR T_FLOAT T_DOUBLE +(with-expansions [<conversion> (declare D2F D2I D2L + F2D F2I F2L + I2B I2C I2D I2F I2L I2S + L2D L2F L2I) + <primitive> (declare T_BOOLEAN T_CHAR T_FLOAT T_DOUBLE T_BYTE T_SHORT T_INT T_LONG) <stack> (declare DUP DUP2 DUP2_X1 DUP2_X2 POP POP2 @@ -39,6 +43,9 @@ DCMPG DCMPL) <return> (declare RETURN IRETURN LRETURN DRETURN ARETURN)] (host;import org.objectweb.asm.Opcodes + (#static NOP int) + + <conversion> <primitive> (#static CHECKCAST int) @@ -62,12 +69,6 @@ <arithmethic> - (#static I2L int) - (#static L2I int) - (#static L2D int) - (#static D2L int) - (#static I2C int) - (#static AALOAD int) (#static AASTORE int) (#static ARRAYLENGTH int) @@ -150,9 +151,17 @@ (do-to visitor (MethodVisitor.visitInsn [(prefix <name>)]))))] + [NOP] + ## Stack [DUP] [DUP2] [DUP2_X1] [DUP2_X2] [POP] [POP2] [SWAP] + ## Conversions + [D2F] [D2I] [D2L] + [F2D] [F2I] [F2L] + [I2B] [I2C] [I2D] [I2F] [I2L] [I2S] + [L2D] [L2F] [L2I] + ## Long bitwise [LAND] [LOR] [LXOR] [LSHL] [LSHR] [LUSHR] @@ -167,9 +176,6 @@ [DADD] [DSUB] [DMUL] [DDIV] [DREM] [DCMPG] [DCMPL] - ## Conversions - [I2L] [L2I] [L2D] [D2L] [I2C] - ## Array [AALOAD] [AASTORE] [ARRAYLENGTH] |