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

The following examples show how to use jdk.internal.org.objectweb.asm.Opcodes#LRETURN . 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: GetBytecodeTest.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private static boolean containsReturn(byte[] bytecode) {
    for (byte b : bytecode) {
        //  cast unsigned byte to int
        int value = (int) b & 0x000000FF;
        switch (value) {
            case Opcodes.RET:
            case Opcodes.ARETURN:
            case Opcodes.IRETURN:
            case Opcodes.LRETURN:
            case Opcodes.FRETURN:
            case Opcodes.DRETURN:
            case Opcodes.RETURN:
                return true;
        }
    }
    return false;
}
 
Example 2
Source File: JIMethodInliningAdapter.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitInsn(int opcode) {
    if (opcode == Opcodes.RETURN || opcode == Opcodes.IRETURN
            || opcode == Opcodes.ARETURN || opcode == Opcodes.LRETURN) {
        super.visitJumpInsn(Opcodes.GOTO, end);
    } else {
        super.visitInsn(opcode);
    }
}
 
Example 3
Source File: JIMethodInliningAdapter.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitInsn(int opcode) {
    if (opcode == Opcodes.RETURN || opcode == Opcodes.IRETURN
            || opcode == Opcodes.ARETURN || opcode == Opcodes.LRETURN) {
        super.visitJumpInsn(Opcodes.GOTO, end);
    } else {
        super.visitInsn(opcode);
    }
}
 
Example 4
Source File: NashornTextifier.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private static final boolean noFallThru(final int opcode) {
    switch (opcode) {
    case Opcodes.GOTO:
    case Opcodes.ATHROW:
    case Opcodes.ARETURN:
    case Opcodes.IRETURN:
    case Opcodes.LRETURN:
    case Opcodes.FRETURN:
    case Opcodes.DRETURN:
        return true;
    default:
        return false;
    }
}
 
Example 5
Source File: NashornTextifier.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private static final boolean noFallThru(final int opcode) {
    switch (opcode) {
    case Opcodes.GOTO:
    case Opcodes.ATHROW:
    case Opcodes.ARETURN:
    case Opcodes.IRETURN:
    case Opcodes.LRETURN:
    case Opcodes.FRETURN:
    case Opcodes.DRETURN:
        return true;
    default:
        return false;
    }
}
 
Example 6
Source File: JIMethodInliningAdapter.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitInsn(int opcode) {
    if (opcode == Opcodes.RETURN || opcode == Opcodes.IRETURN
            || opcode == Opcodes.ARETURN || opcode == Opcodes.LRETURN) {
        super.visitJumpInsn(Opcodes.GOTO, end);
    } else {
        super.visitInsn(opcode);
    }
}
 
Example 7
Source File: NashornTextifier.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private static final boolean noFallThru(final int opcode) {
    switch (opcode) {
    case Opcodes.GOTO:
    case Opcodes.ATHROW:
    case Opcodes.ARETURN:
    case Opcodes.IRETURN:
    case Opcodes.LRETURN:
    case Opcodes.FRETURN:
    case Opcodes.DRETURN:
        return true;
    default:
        return false;
    }
}
 
Example 8
Source File: NashornTextifier.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private static final boolean noFallThru(final int opcode) {
    switch (opcode) {
    case Opcodes.GOTO:
    case Opcodes.ATHROW:
    case Opcodes.ARETURN:
    case Opcodes.IRETURN:
    case Opcodes.LRETURN:
    case Opcodes.FRETURN:
    case Opcodes.DRETURN:
        return true;
    default:
        return false;
    }
}
 
Example 9
Source File: InvokerBytecodeGenerator.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Emits an actual return instruction conforming to the given return type.
 */
private void emitReturnInsn(BasicType type) {
    int opcode;
    switch (type) {
    case I_TYPE:  opcode = Opcodes.IRETURN;  break;
    case J_TYPE:  opcode = Opcodes.LRETURN;  break;
    case F_TYPE:  opcode = Opcodes.FRETURN;  break;
    case D_TYPE:  opcode = Opcodes.DRETURN;  break;
    case L_TYPE:  opcode = Opcodes.ARETURN;  break;
    case V_TYPE:  opcode = Opcodes.RETURN;   break;
    default:
        throw new InternalError("unknown return type: " + type);
    }
    mv.visitInsn(opcode);
}
 
Example 10
Source File: InvokerBytecodeGenerator.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Emits an actual return instruction conforming to the given return type.
 */
private void emitReturnInsn(BasicType type) {
    int opcode;
    switch (type) {
    case I_TYPE:  opcode = Opcodes.IRETURN;  break;
    case J_TYPE:  opcode = Opcodes.LRETURN;  break;
    case F_TYPE:  opcode = Opcodes.FRETURN;  break;
    case D_TYPE:  opcode = Opcodes.DRETURN;  break;
    case L_TYPE:  opcode = Opcodes.ARETURN;  break;
    case V_TYPE:  opcode = Opcodes.RETURN;   break;
    default:
        throw new InternalError("unknown return type: " + type);
    }
    mv.visitInsn(opcode);
}
 
Example 11
Source File: NashornTextifier.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private static boolean noFallThru(final int opcode) {
    switch (opcode) {
    case Opcodes.GOTO:
    case Opcodes.ATHROW:
    case Opcodes.ARETURN:
    case Opcodes.IRETURN:
    case Opcodes.LRETURN:
    case Opcodes.FRETURN:
    case Opcodes.DRETURN:
        return true;
    default:
        return false;
    }
}
 
Example 12
Source File: NashornTextifier.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private static final boolean noFallThru(final int opcode) {
    switch (opcode) {
    case Opcodes.GOTO:
    case Opcodes.ATHROW:
    case Opcodes.ARETURN:
    case Opcodes.IRETURN:
    case Opcodes.LRETURN:
    case Opcodes.FRETURN:
    case Opcodes.DRETURN:
        return true;
    default:
        return false;
    }
}
 
Example 13
Source File: NashornTextifier.java    From jdk8u_nashorn with GNU General Public License v2.0 5 votes vote down vote up
private static final boolean noFallThru(final int opcode) {
    switch (opcode) {
    case Opcodes.GOTO:
    case Opcodes.ATHROW:
    case Opcodes.ARETURN:
    case Opcodes.IRETURN:
    case Opcodes.LRETURN:
    case Opcodes.FRETURN:
    case Opcodes.DRETURN:
        return true;
    default:
        return false;
    }
}