Java Code Examples for jdk.internal.org.objectweb.asm.Opcodes#ALOAD

The following examples show how to use jdk.internal.org.objectweb.asm.Opcodes#ALOAD . 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: InstructionAdapter.java    From openjdk-jdk9 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 2
Source File: InstructionAdapter.java    From nashorn 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 3
Source File: InstructionAdapter.java    From jdk8u-dev-jdk 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 4
Source File: InstructionAdapter.java    From jdk8u-jdk 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 5
Source File: InstructionAdapter.java    From jdk8u_jdk 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 6
Source File: InstructionAdapter.java    From openjdk-8 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 7
Source File: InstructionAdapter.java    From openjdk-8-source 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 8
Source File: InstructionAdapter.java    From hottub 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 9
Source File: InstructionAdapter.java    From jdk8u-jdk 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 10
Source File: InstructionAdapter.java    From dragonwell8_jdk 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 11
Source File: InvokerBytecodeGenerator.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private int loadInsnOpcode(BasicType type) throws InternalError {
    switch (type) {
        case I_TYPE: return Opcodes.ILOAD;
        case J_TYPE: return Opcodes.LLOAD;
        case F_TYPE: return Opcodes.FLOAD;
        case D_TYPE: return Opcodes.DLOAD;
        case L_TYPE: return Opcodes.ALOAD;
        default:
            throw new InternalError("unknown type: " + type);
    }
}
 
Example 12
Source File: InstructionAdapter.java    From Bytecoder with Apache License 2.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 13
Source File: LocalVariablesSorter.java    From Bytecoder with Apache License 2.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 14
Source File: InvokerBytecodeGenerator.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
private int loadInsnOpcode(BasicType type) throws InternalError {
    switch (type) {
        case I_TYPE: return Opcodes.ILOAD;
        case J_TYPE: return Opcodes.LLOAD;
        case F_TYPE: return Opcodes.FLOAD;
        case D_TYPE: return Opcodes.DLOAD;
        case L_TYPE: return Opcodes.ALOAD;
        default:
            throw new InternalError("unknown type: " + type);
    }
}
 
Example 15
Source File: InstructionAdapter.java    From openjdk-jdk8u-backup 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 16
Source File: InstructionAdapter.java    From openjdk-jdk8u 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 17
Source File: InstructionAdapter.java    From jdk8u60 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 18
Source File: InstructionAdapter.java    From TencentKona-8 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();
    }
}