List of usage examples for org.objectweb.asm Opcodes FSTORE
int FSTORE
To view the source code for org.objectweb.asm Opcodes FSTORE.
Click Source Link
From source file:edu.mit.streamjit.util.bytecode.MethodUnresolver.java
License:Open Source License
private void store(Value v, InsnList insns) { assert registers.containsKey(v) : v; int reg = registers.get(v); Type t = v instanceof LocalVariable ? ((LocalVariable) v).getType().getFieldType() : v.getType(); if (t instanceof ReferenceType || t instanceof NullType) insns.add(new VarInsnNode(Opcodes.ASTORE, reg)); else if (t.equals(longType)) insns.add(new VarInsnNode(Opcodes.LSTORE, reg)); else if (t.equals(floatType)) insns.add(new VarInsnNode(Opcodes.FSTORE, reg)); else if (t.equals(doubleType)) insns.add(new VarInsnNode(Opcodes.DSTORE, reg)); else if (t.isSubtypeOf(intType)) insns.add(new VarInsnNode(Opcodes.ISTORE, reg)); else/*from w ww . j av a 2s. c o m*/ throw new AssertionError("unstorable value: " + v); }
From source file:gnu.classpath.tools.rmic.ClassRmicCompiler.java
License:Open Source License
private static int storeOpcode(Class cls) { if (cls.equals(Void.TYPE)) throw new IllegalArgumentException("can not load void"); int storecode; if (cls.equals(Boolean.TYPE)) storecode = Opcodes.ISTORE;/*from ww w .j a v a 2 s.c o m*/ else if (cls.equals(Byte.TYPE)) storecode = Opcodes.ISTORE; else if (cls.equals(Character.TYPE)) storecode = Opcodes.ISTORE; else if (cls.equals(Short.TYPE)) storecode = Opcodes.ISTORE; else if (cls.equals(Integer.TYPE)) storecode = Opcodes.ISTORE; else if (cls.equals(Long.TYPE)) storecode = Opcodes.LSTORE; else if (cls.equals(Float.TYPE)) storecode = Opcodes.FSTORE; else if (cls.equals(Double.TYPE)) storecode = Opcodes.DSTORE; else storecode = Opcodes.ASTORE; return storecode; }
From source file:jp.co.dgic.testing.common.virtualmock.asm.AbstractAsmMethodVisitor.java
License:Open Source License
protected int getStoreOpcodeByType(Type type) { if (type.equals(Type.BOOLEAN_TYPE)) return Opcodes.ISTORE; if (type.equals(Type.BYTE_TYPE)) return Opcodes.ISTORE; if (type.equals(Type.CHAR_TYPE)) return Opcodes.ISTORE; if (type.equals(Type.SHORT_TYPE)) return Opcodes.ISTORE; if (type.equals(Type.INT_TYPE)) return Opcodes.ISTORE; if (type.equals(Type.LONG_TYPE)) return Opcodes.LSTORE; if (type.equals(Type.DOUBLE_TYPE)) return Opcodes.DSTORE; if (type.equals(Type.FLOAT_TYPE)) return Opcodes.FSTORE; return Opcodes.ASTORE; }
From source file:jpcsp.Allegrex.compiler.CompilerContext.java
License:Open Source License
@Override public void storeFTmp1() { mv.visitVarInsn(Opcodes.FSTORE, LOCAL_TMP1); }
From source file:jpcsp.Allegrex.compiler.CompilerContext.java
License:Open Source License
@Override public void storeFTmp2() { mv.visitVarInsn(Opcodes.FSTORE, LOCAL_TMP2); }
From source file:jpcsp.Allegrex.compiler.CompilerContext.java
License:Open Source License
@Override public void storeFTmp3() { mv.visitVarInsn(Opcodes.FSTORE, LOCAL_TMP3); }
From source file:jpcsp.Allegrex.compiler.CompilerContext.java
License:Open Source License
@Override public void storeFTmp4() { mv.visitVarInsn(Opcodes.FSTORE, LOCAL_TMP4); }
From source file:jpcsp.Allegrex.compiler.CompilerContext.java
License:Open Source License
private void storeFTmpVd(int n, boolean isFloat) { int opcode = isFloat ? Opcodes.FSTORE : Opcodes.ISTORE; if (n == 0) { mv.visitVarInsn(opcode, LOCAL_TMP_VD0); } else if (n == 1) { mv.visitVarInsn(opcode, LOCAL_TMP_VD1); } else {/*w ww . j av a 2 s. c o m*/ mv.visitVarInsn(opcode, LOCAL_TMP_VD2); } }
From source file:org.adjective.stout.tools.StackVisualiserMethodVisitor.java
License:Apache License
public void visitVarInsn(int opcode, int var) { String description = (var == 0 ? "this" : "v" + var); switch (opcode) { case Opcodes.ISTORE: case Opcodes.LSTORE: case Opcodes.FSTORE: case Opcodes.DSTORE: case Opcodes.ASTORE: { Type type = getType(Opcodes.ISTORE, opcode); pop(type);/*from w w w .j a va 2 s.com*/ } break; case Opcodes.ILOAD: case Opcodes.LLOAD: case Opcodes.FLOAD: case Opcodes.DLOAD: case Opcodes.ALOAD: { Type type = getType(Opcodes.ILOAD, opcode); if (_isStatic) { var++; } if (var == 0) { type = _this; } else if (var <= _arguments.length) { type = _arguments[var - 1]; } push(description, type); } break; default: throw new IllegalArgumentException("Unsupported opcode " + OPCODES[opcode]); } print(opcode, description); }
From source file:org.apache.drill.exec.compile.bytecode.ValueHolderIden.java
License:Apache License
private static void initType(int index, Type t, DirectSorter v) { switch (t.getSort()) { case Type.BOOLEAN: case Type.BYTE: case Type.CHAR: case Type.SHORT: case Type.INT: v.visitInsn(Opcodes.ICONST_0);// w ww .j a v a 2 s . c om v.directVarInsn(Opcodes.ISTORE, index); break; case Type.LONG: v.visitInsn(Opcodes.LCONST_0); v.directVarInsn(Opcodes.LSTORE, index); break; case Type.FLOAT: v.visitInsn(Opcodes.FCONST_0); v.directVarInsn(Opcodes.FSTORE, index); break; case Type.DOUBLE: v.visitInsn(Opcodes.DCONST_0); v.directVarInsn(Opcodes.DSTORE, index); break; case Type.OBJECT: v.visitInsn(Opcodes.ACONST_NULL); v.directVarInsn(Opcodes.ASTORE, index); break; default: throw new UnsupportedOperationException(); } }