Java Code Examples for org.objectweb.asm.Opcodes#FLOAD

The following examples show how to use org.objectweb.asm.Opcodes#FLOAD . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TypeUtils.java    From maple-ir with GNU General Public License v3.0 6 votes vote down vote up
public static int getVariableLoadOpcode(Type type) {
		if (type.getSort() >= Type.BOOLEAN && type.getSort() <= Type.INT) {
			return Opcodes.ILOAD;
		} else if (type == Type.LONG_TYPE) {
			return Opcodes.LLOAD;
		} else if (type == Type.FLOAT_TYPE) {
			return Opcodes.FLOAD;
		} else if (type == Type.DOUBLE_TYPE) {
			return Opcodes.DLOAD;
		} else if (type.getSort() >= Type.ARRAY && type.getSort() <= Type.OBJECT) {
			return Opcodes.ALOAD;
		} else {
			return getVariableLoadOpcode(asSimpleType(type));
//			throw new IllegalArgumentException(type.toString());
		}
	}
 
Example 2
Source File: ASMUtils.java    From radon with GNU General Public License v3.0 6 votes vote down vote up
public static int getVarOpcode(Type type, boolean store) {
    switch (type.getSort()) {
        case Type.BOOLEAN:
        case Type.CHAR:
        case Type.BYTE:
        case Type.SHORT:
        case Type.INT:
            return store ? Opcodes.ISTORE : Opcodes.ILOAD;
        case Type.FLOAT:
            return store ? Opcodes.FSTORE : Opcodes.FLOAD;
        case Type.LONG:
            return store ? Opcodes.LSTORE : Opcodes.LLOAD;
        case Type.DOUBLE:
            return store ? Opcodes.DSTORE : Opcodes.DLOAD;
        case Type.ARRAY:
        case Type.OBJECT:
            return store ? Opcodes.ASTORE : Opcodes.ALOAD;
        default:
            throw new AssertionError("Unknown type: " + type.getClassName());
    }
}
 
Example 3
Source File: AsmUtil.java    From quarkus with Apache License 2.0 6 votes vote down vote up
/**
 * Returns the bytecode instruction to load the given Jandex Type. This returns the specialised
 * bytecodes <tt>ILOAD, DLOAD, FLOAD and LLOAD</tt> for primitives, or <tt>ALOAD</tt> otherwise.
 * 
 * @param jandexType The Jandex Type whose load instruction to return.
 * @return The bytecode instruction to load the given Jandex Type.
 */
public static int getLoadOpcode(Type jandexType) {
    if (jandexType.kind() == Kind.PRIMITIVE) {
        switch (jandexType.asPrimitiveType().primitive()) {
            case BOOLEAN:
            case BYTE:
            case SHORT:
            case INT:
            case CHAR:
                return Opcodes.ILOAD;
            case DOUBLE:
                return Opcodes.DLOAD;
            case FLOAT:
                return Opcodes.FLOAD;
            case LONG:
                return Opcodes.LLOAD;
            default:
                throw new IllegalArgumentException("Unknown primitive type: " + jandexType);
        }
    }
    return Opcodes.ALOAD;
}
 
Example 4
Source File: Asm.java    From netbeans with Apache License 2.0 6 votes vote down vote up
@Override
public void visitBaseType(char c) {
    int idx = paramIndex++;
    int opcode;

    switch (c) {
        // two-word data
        case 'J': opcode = Opcodes.LLOAD; paramIndex++; localSize++; break;
        case 'D': opcode = Opcodes.DLOAD; paramIndex++; localSize++; break;
        // float has a special opcode
        case 'F': opcode = Opcodes.FLOAD; break;
        default: opcode = Opcodes.ILOAD; break;

    }
    load(opcode, idx);
    localSize++;
}
 
Example 5
Source File: JVMImpl.java    From serianalyzer with GNU General Public License v3.0 5 votes vote down vote up
/**
 * @param opcode
 * @return
 */
private static Type toType ( int opcode ) {
    switch ( opcode ) {
    case Opcodes.LLOAD:
        return Type.LONG_TYPE;
    case Opcodes.ILOAD:
        return Type.INT_TYPE;
    case Opcodes.FLOAD:
        return Type.FLOAT_TYPE;
    case Opcodes.DLOAD:
        return Type.DOUBLE_TYPE;
    case Opcodes.ALOAD:
        return Type.getType("Ljava/lang/Object;"); //$NON-NLS-1$
    case Opcodes.IALOAD:
        return Type.INT_TYPE;
    case Opcodes.LALOAD:
        return Type.LONG_TYPE;
    case Opcodes.FALOAD:
        return Type.FLOAT_TYPE;
    case Opcodes.DALOAD:
        return Type.DOUBLE_TYPE;
    case Opcodes.BALOAD:
        return Type.BYTE_TYPE;
    case Opcodes.CALOAD:
        return Type.CHAR_TYPE;
    case Opcodes.SALOAD:
        return Type.SHORT_TYPE;
    }
    return Type.VOID_TYPE;
}
 
Example 6
Source File: ABSMutator.java    From pitest with Apache License 2.0 5 votes vote down vote up
@Override
public void visitVarInsn(int opcode, int var) {
    mv.visitVarInsn(opcode, var); // push the variable.

    switch (opcode) {
        case Opcodes.ILOAD:
            if (this.shouldMutate("Negated integer local variable number " + var)) {
                mv.visitInsn(Opcodes.INEG);
            }
            break;

        case Opcodes.FLOAD:
            if (this.shouldMutate("Negated float local variable number " + var)) {
                mv.visitInsn(Opcodes.FNEG);
            }
            break;

        case Opcodes.LLOAD:
            if (this.shouldMutate("Negated long local variable number " + var)) {
                mv.visitInsn(Opcodes.LNEG);
            }
            break;

        case Opcodes.DLOAD:
            if (this.shouldMutate("Negated double local variable number " + var)) {
                mv.visitInsn(Opcodes.DNEG);
            }
            break;
        default:
            break;
    }
}
 
Example 7
Source File: TreeInstructions.java    From instrumentation with Apache License 2.0 5 votes vote down vote up
public static VarInsnNode getLoadInst(Type type, int position) {
    int opCode = -1;
    switch (type.getDescriptor().charAt(0)) {
        case 'B':
            opCode = Opcodes.ILOAD;
            break;
        case 'C':
            opCode = Opcodes.ILOAD;
            break;
        case 'D':
            opCode = Opcodes.DLOAD;
            break;
        case 'F':
            opCode = Opcodes.FLOAD;
            break;
        case 'I':
            opCode = Opcodes.ILOAD;
            break;
        case 'J':
            opCode = Opcodes.LLOAD;
            break;
        case 'L':
            opCode = Opcodes.ALOAD;
            break;
        case '[':
            opCode = Opcodes.ALOAD;
            break;
        case 'Z':
            opCode = Opcodes.ILOAD;
            break;
        case 'S':
            opCode = Opcodes.ILOAD;
            break;
        default:
            throw new ClassFormatError("Invalid method signature: "
                    + type.getDescriptor());
    }
    return new VarInsnNode(opCode, position);
}
 
Example 8
Source File: InstructionAdapter.java    From JReFrameworker with MIT License 5 votes vote down vote up
@Override
public void visitVarInsn(final int opcode, final int var) {
  switch (opcode) {
    case Opcodes.ILOAD:
      load(var, Type.INT_TYPE);
      break;
    case Opcodes.LLOAD:
      load(var, Type.LONG_TYPE);
      break;
    case Opcodes.FLOAD:
      load(var, Type.FLOAT_TYPE);
      break;
    case Opcodes.DLOAD:
      load(var, Type.DOUBLE_TYPE);
      break;
    case Opcodes.ALOAD:
      load(var, OBJECT_TYPE);
      break;
    case Opcodes.ISTORE:
      store(var, Type.INT_TYPE);
      break;
    case Opcodes.LSTORE:
      store(var, Type.LONG_TYPE);
      break;
    case Opcodes.FSTORE:
      store(var, Type.FLOAT_TYPE);
      break;
    case Opcodes.DSTORE:
      store(var, Type.DOUBLE_TYPE);
      break;
    case Opcodes.ASTORE:
      store(var, OBJECT_TYPE);
      break;
    case Opcodes.RET:
      ret(var);
      break;
    default:
      throw new IllegalArgumentException();
  }
}
 
Example 9
Source File: LocalVariablesSorter.java    From JReFrameworker with MIT License 5 votes vote down vote up
@Override
public void visitVarInsn(final int opcode, final int var) {
  Type varType;
  switch (opcode) {
    case Opcodes.LLOAD:
    case Opcodes.LSTORE:
      varType = Type.LONG_TYPE;
      break;
    case Opcodes.DLOAD:
    case Opcodes.DSTORE:
      varType = Type.DOUBLE_TYPE;
      break;
    case Opcodes.FLOAD:
    case Opcodes.FSTORE:
      varType = Type.FLOAT_TYPE;
      break;
    case Opcodes.ILOAD:
    case Opcodes.ISTORE:
      varType = Type.INT_TYPE;
      break;
    case Opcodes.ALOAD:
    case Opcodes.ASTORE:
    case Opcodes.RET:
      varType = OBJECT_TYPE;
      break;
    default:
      throw new IllegalArgumentException("Invalid opcode " + opcode);
  }
  super.visitVarInsn(opcode, remap(var, varType));
}
 
Example 10
Source File: UOI2Mutator.java    From pitest with Apache License 2.0 5 votes vote down vote up
@Override
public void visitVarInsn(int opcode, int var) {
    mv.visitVarInsn(opcode, var);
    switch (opcode) {
        case Opcodes.ILOAD:
            if (this.shouldMutate("Decremented (a--) integer local variable number " + var)) {
                mv.visitIincInsn(var, -1);
            }
            break;
        case Opcodes.FLOAD:
            if (this.shouldMutate("Decremented (a--) float local variable number " + var)) {
                mv.visitInsn(Opcodes.DUP);
                mv.visitInsn(Opcodes.FCONST_1);
                mv.visitInsn(Opcodes.FSUB);
                mv.visitVarInsn(Opcodes.FSTORE, var);
            }
            break;
        case Opcodes.LLOAD:
            if (this.shouldMutate("Decremented (a--) long local variable number " + var)) {
                mv.visitInsn(Opcodes.DUP2);
                mv.visitInsn(Opcodes.LCONST_1);
                mv.visitInsn(Opcodes.LSUB);
                mv.visitVarInsn(Opcodes.LSTORE, var);
            }
            break;
        case Opcodes.DLOAD:
            if (this.shouldMutate("Decremented (a--) double local variable number " + var)) {
                mv.visitInsn(Opcodes.DUP2);
                mv.visitInsn(Opcodes.DCONST_1);
                mv.visitInsn(Opcodes.DSUB);
                mv.visitVarInsn(Opcodes.DSTORE, var);
            }
            break;
        default:
            break;
    }
}
 
Example 11
Source File: LocalVariablesSorter.java    From JReFrameworker with MIT License 5 votes vote down vote up
@Override
public void visitVarInsn(final int opcode, final int var) {
  Type varType;
  switch (opcode) {
    case Opcodes.LLOAD:
    case Opcodes.LSTORE:
      varType = Type.LONG_TYPE;
      break;
    case Opcodes.DLOAD:
    case Opcodes.DSTORE:
      varType = Type.DOUBLE_TYPE;
      break;
    case Opcodes.FLOAD:
    case Opcodes.FSTORE:
      varType = Type.FLOAT_TYPE;
      break;
    case Opcodes.ILOAD:
    case Opcodes.ISTORE:
      varType = Type.INT_TYPE;
      break;
    case Opcodes.ALOAD:
    case Opcodes.ASTORE:
    case Opcodes.RET:
      varType = OBJECT_TYPE;
      break;
    default:
      throw new IllegalArgumentException("Invalid opcode " + opcode);
  }
  super.visitVarInsn(opcode, remap(var, varType));
}
 
Example 12
Source File: UOI1Mutator.java    From pitest with Apache License 2.0 5 votes vote down vote up
@Override
public void visitVarInsn(int opcode, int var) {
    mv.visitVarInsn(opcode, var);

    switch (opcode) {
        case Opcodes.ILOAD:
            if (this.shouldMutate("Incremented (a++) integer local variable number " + var)) {
                mv.visitIincInsn(var, 1);
            }
            break;
        case Opcodes.FLOAD:
            if (this.shouldMutate("Incremented (a++) float local variable number " + var)) {
                mv.visitInsn(Opcodes.DUP);
                mv.visitInsn(Opcodes.FCONST_1);
                mv.visitInsn(Opcodes.FADD);
                mv.visitVarInsn(Opcodes.FSTORE, var);
            }
            break;
        case Opcodes.LLOAD:
            if (this.shouldMutate("Incremented (a++) long local variable number " + var)) {
                mv.visitInsn(Opcodes.DUP2);
                mv.visitInsn(Opcodes.LCONST_1);
                mv.visitInsn(Opcodes.LADD);
                mv.visitVarInsn(Opcodes.LSTORE, var);
            }
            break;
        case Opcodes.DLOAD:
            if (this.shouldMutate("Incremented (a++) double local variable number " + var)) {
                mv.visitInsn(Opcodes.DUP2);
                mv.visitInsn(Opcodes.DCONST_1);
                mv.visitInsn(Opcodes.DADD);
                mv.visitVarInsn(Opcodes.DSTORE, var);
            }
            break;

        default:
            break;
    }
}
 
Example 13
Source File: ANFTransform.java    From Concurnas with MIT License 5 votes vote down vote up
public static int getLoadOp(char c){ 
	switch(c){
		case 'Z': return Opcodes.ILOAD ;
		case 'B': return Opcodes.ILOAD ;
		case 'S': return Opcodes.ILOAD;
		case 'I': return Opcodes.ILOAD ;
		case 'J': return Opcodes.LLOAD ;
		case 'F': return Opcodes.FLOAD ;
		case 'D': return Opcodes.DLOAD ;
		case 'C': return Opcodes.ILOAD ;
		default:
			return Opcodes.ALOAD;
	}
}
 
Example 14
Source File: InstructionAdapter.java    From JByteMod-Beta with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitVarInsn(final int opcode, final int var) {
  switch (opcode) {
    case Opcodes.ILOAD:
      load(var, Type.INT_TYPE);
      break;
    case Opcodes.LLOAD:
      load(var, Type.LONG_TYPE);
      break;
    case Opcodes.FLOAD:
      load(var, Type.FLOAT_TYPE);
      break;
    case Opcodes.DLOAD:
      load(var, Type.DOUBLE_TYPE);
      break;
    case Opcodes.ALOAD:
      load(var, OBJECT_TYPE);
      break;
    case Opcodes.ISTORE:
      store(var, Type.INT_TYPE);
      break;
    case Opcodes.LSTORE:
      store(var, Type.LONG_TYPE);
      break;
    case Opcodes.FSTORE:
      store(var, Type.FLOAT_TYPE);
      break;
    case Opcodes.DSTORE:
      store(var, Type.DOUBLE_TYPE);
      break;
    case Opcodes.ASTORE:
      store(var, OBJECT_TYPE);
      break;
    case Opcodes.RET:
      ret(var);
      break;
    default:
      throw new IllegalArgumentException();
  }
}
 
Example 15
Source File: LocalVariablesSorter.java    From JByteMod-Beta with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitVarInsn(final int opcode, final int var) {
  Type varType;
  switch (opcode) {
    case Opcodes.LLOAD:
    case Opcodes.LSTORE:
      varType = Type.LONG_TYPE;
      break;
    case Opcodes.DLOAD:
    case Opcodes.DSTORE:
      varType = Type.DOUBLE_TYPE;
      break;
    case Opcodes.FLOAD:
    case Opcodes.FSTORE:
      varType = Type.FLOAT_TYPE;
      break;
    case Opcodes.ILOAD:
    case Opcodes.ISTORE:
      varType = Type.INT_TYPE;
      break;
    case Opcodes.ALOAD:
    case Opcodes.ASTORE:
    case Opcodes.RET:
      varType = OBJECT_TYPE;
      break;
    default:
      throw new IllegalArgumentException("Invalid opcode " + opcode);
  }
  super.visitVarInsn(opcode, remap(var, varType));
}
 
Example 16
Source File: InstructionAdapter.java    From Concurnas with MIT License 5 votes vote down vote up
@Override
public void visitVarInsn(final int opcode, final int var) {
  switch (opcode) {
    case Opcodes.ILOAD:
      load(var, Type.INT_TYPE);
      break;
    case Opcodes.LLOAD:
      load(var, Type.LONG_TYPE);
      break;
    case Opcodes.FLOAD:
      load(var, Type.FLOAT_TYPE);
      break;
    case Opcodes.DLOAD:
      load(var, Type.DOUBLE_TYPE);
      break;
    case Opcodes.ALOAD:
      load(var, OBJECT_TYPE);
      break;
    case Opcodes.ISTORE:
      store(var, Type.INT_TYPE);
      break;
    case Opcodes.LSTORE:
      store(var, Type.LONG_TYPE);
      break;
    case Opcodes.FSTORE:
      store(var, Type.FLOAT_TYPE);
      break;
    case Opcodes.DSTORE:
      store(var, Type.DOUBLE_TYPE);
      break;
    case Opcodes.ASTORE:
      store(var, OBJECT_TYPE);
      break;
    case Opcodes.RET:
      ret(var);
      break;
    default:
      throw new IllegalArgumentException();
  }
}
 
Example 17
Source File: LocalVariablesSorter.java    From Concurnas with MIT License 5 votes vote down vote up
@Override
public void visitVarInsn(final int opcode, final int var) {
  Type varType;
  switch (opcode) {
    case Opcodes.LLOAD:
    case Opcodes.LSTORE:
      varType = Type.LONG_TYPE;
      break;
    case Opcodes.DLOAD:
    case Opcodes.DSTORE:
      varType = Type.DOUBLE_TYPE;
      break;
    case Opcodes.FLOAD:
    case Opcodes.FSTORE:
      varType = Type.FLOAT_TYPE;
      break;
    case Opcodes.ILOAD:
    case Opcodes.ISTORE:
      varType = Type.INT_TYPE;
      break;
    case Opcodes.ALOAD:
    case Opcodes.ASTORE:
    case Opcodes.RET:
      varType = OBJECT_TYPE;
      break;
    default:
      throw new IllegalArgumentException("Invalid opcode " + opcode);
  }
  super.visitVarInsn(opcode, remap(var, varType));
}
 
Example 18
Source File: JVMImpl.java    From serianalyzer with GNU General Public License v3.0 4 votes vote down vote up
/**
 * @param opcode
 * @param var
 * @param s
 */
static void handleVarInsn ( int opcode, int var, JVMStackState s ) {
    Set<BaseType> v;
    switch ( opcode ) {
    case Opcodes.LLOAD:
    case Opcodes.ILOAD:
    case Opcodes.FLOAD:
    case Opcodes.DLOAD:
    case Opcodes.ALOAD:
        v = s.getVariable(var);
        if ( log.isTraceEnabled() ) {
            log.trace("LOAD " + opcode + "@" + var + ":" + v); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
        }
        if ( v == null || v.isEmpty() ) {
            s.push(new BasicVariable(toType(opcode), "unknown " + var, true)); //$NON-NLS-1$
        }
        else if ( v.size() == 1 ) {
            s.push(v.iterator().next());
        }
        else {
            Set<BaseType> alts = new HashSet<>();
            for ( BaseType o : v ) {
                if ( o instanceof MultiAlternatives && ! ( (MultiAlternatives) o ).getAlternatives().isEmpty() ) {
                    alts.addAll( ( (MultiAlternatives) o ).getAlternatives());
                }
                else {
                    alts.add(o);
                }
            }
            s.push(new MultiAlternatives(alts));
        }
        break;
    case Opcodes.LSTORE:
    case Opcodes.ISTORE:
    case Opcodes.FSTORE:
    case Opcodes.DSTORE:
    case Opcodes.ASTORE:
        s.getVariable(var).add(s.pop());
        break;
    case Opcodes.RET:
        break;
    default:
        log.warn("Unimplemented opcode " + opcode); //$NON-NLS-1$
    }
}
 
Example 19
Source File: VarOp.java    From CodenameOne with GNU General Public License v2.0 4 votes vote down vote up
@Override
public boolean assignTo(String varName, StringBuilder sb) {
    StringBuilder b = new StringBuilder();
    
    /*
    if (typeVarName != null) {
        switch (opcode) {
            case Opcodes.ALOAD:
                b.append("locals[");
                b.append(var);
                b.append("].type = CN1_TYPE_OBJECT; ");
                break;
        }
    }*/
    if (varName != null) {
        b.append("    ");
        b.append(varName).append(" = ");
    }
    switch(opcode) {
        case Opcodes.ILOAD:
            b.append("ilocals_");
            b.append(var);
            b.append("_");
            break;
        case Opcodes.LLOAD:
            b.append("llocals_");
            b.append(var);
            b.append("_");
            break;
        case Opcodes.FLOAD:
            b.append("flocals_");
            b.append(var);
            b.append("_");
            break;
        case Opcodes.DLOAD:
            b.append("dlocals_");
            b.append(var);
            b.append("_");
            break;
        case Opcodes.ALOAD:
            if (getMethod() != null && !getMethod().isStatic() && var == 0) {
                b.append("__cn1ThisObject");
            } else {
                b.append("locals[");
                b.append(var);
                b.append("].data.o");
            }
            break;
        default:
            return false;
            
    }
    if (varName != null) {
        b.append(";\n");
    }
    sb.append(b);
    return true;
}
 
Example 20
Source File: VarOp.java    From CodenameOne with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void appendInstruction(StringBuilder b) {
    b.append("    ");
    switch(opcode) {
        case Opcodes.ILOAD:
            b.append("(*SP).type = CN1_TYPE_INT; /* ILOAD */ \n" +
                    "    (*SP).data.i = ilocals_");
            b.append(var);
            b.append("_; \n    SP++;\n");
            return;
        case Opcodes.LLOAD:
            b.append("BC_LLOAD(");
            break;
        case Opcodes.FLOAD:
            b.append("BC_FLOAD(");
            break;
        case Opcodes.DLOAD:
            b.append("BC_DLOAD(");
            break;
        case Opcodes.ALOAD:
            b.append("BC_ALOAD(");
            break;
        case Opcodes.ISTORE:
            b.append("BC_ISTORE(");
            break;
        case Opcodes.LSTORE:
            b.append("BC_LSTORE(");
            break;
        case Opcodes.FSTORE:
            b.append("BC_FSTORE(");
            break;
        case Opcodes.DSTORE:
            b.append("BC_DSTORE(");
            break;
        case Opcodes.ASTORE:
            b.append("BC_ASTORE(");
            break;
        case Opcodes.RET:
            b.append("/* RET TODO */");
            //b.append("goto label_");
            //b.append(var);
            //b.append("; /* RET */\n");
            return;
        case Opcodes.SIPUSH:
        case Opcodes.BIPUSH:
            b.append("PUSH_INT(");
            break;
        case Opcodes.NEWARRAY:
            switch(var) {
                case 4: // boolean
                    b.append("PUSH_OBJ(allocArray(threadStateData, POP_INT(), &class_array1__JAVA_BOOLEAN, sizeof(JAVA_ARRAY_BOOLEAN), 1));\n");
                    break;
                case 5: // char
                    b.append("PUSH_OBJ(allocArray(threadStateData, POP_INT(), &class_array1__JAVA_CHAR, sizeof(JAVA_ARRAY_CHAR), 1));\n");
                    break;
                case 6: // float
                    b.append("PUSH_OBJ(allocArray(threadStateData, POP_INT(), &class_array1__JAVA_FLOAT, sizeof(JAVA_ARRAY_FLOAT), 1));\n");
                    break;
                case 7: // double
                    b.append("PUSH_OBJ(allocArray(threadStateData, POP_INT(), &class_array1__JAVA_DOUBLE, sizeof(JAVA_ARRAY_DOUBLE), 1));\n");
                    break;
                case 8: // byte
                    b.append("PUSH_OBJ(allocArray(threadStateData, POP_INT(), &class_array1__JAVA_BYTE, sizeof(JAVA_ARRAY_BYTE), 1));\n");
                    break;
                case 9: // short
                    b.append("PUSH_OBJ(allocArray(threadStateData, POP_INT(), &class_array1__JAVA_SHORT, sizeof(JAVA_ARRAY_SHORT), 1));\n");
                    break;
                case 10: // int
                    b.append("PUSH_OBJ(allocArray(threadStateData, POP_INT(), &class_array1__JAVA_INT, sizeof(JAVA_ARRAY_INT), 1));\n");
                    break;
                case 11: // long 
                    b.append("PUSH_OBJ(allocArray(threadStateData, POP_INT(), &class_array1__JAVA_LONG, sizeof(JAVA_ARRAY_LONG), 1));\n");
                    break;
            }
            return;
        default:
            throw new RuntimeException("Missing opcode: " + opcode);
    }
    b.append(var);
    b.append(");\n");
}