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

The following examples show how to use jdk.internal.org.objectweb.asm.Opcodes#SASTORE . 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: InvokerBytecodeGenerator.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
private int arrayInsnOpcode(byte tcode, int aaop) throws InternalError {
    assert(aaop == Opcodes.AASTORE || aaop == Opcodes.AALOAD);
    int xas;
    switch (tcode) {
        case Opcodes.T_BOOLEAN: xas = Opcodes.BASTORE; break;
        case Opcodes.T_BYTE:    xas = Opcodes.BASTORE; break;
        case Opcodes.T_CHAR:    xas = Opcodes.CASTORE; break;
        case Opcodes.T_SHORT:   xas = Opcodes.SASTORE; break;
        case Opcodes.T_INT:     xas = Opcodes.IASTORE; break;
        case Opcodes.T_LONG:    xas = Opcodes.LASTORE; break;
        case Opcodes.T_FLOAT:   xas = Opcodes.FASTORE; break;
        case Opcodes.T_DOUBLE:  xas = Opcodes.DASTORE; break;
        case 0:                 xas = Opcodes.AASTORE; break;
        default:      throw new InternalError();
    }
    return xas - Opcodes.AASTORE + aaop;
}
 
Example 2
Source File: InvokerBytecodeGenerator.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private int arrayInsnOpcode(byte tcode, int aaop) throws InternalError {
    assert(aaop == Opcodes.AASTORE || aaop == Opcodes.AALOAD);
    int xas;
    switch (tcode) {
        case Opcodes.T_BOOLEAN: xas = Opcodes.BASTORE; break;
        case Opcodes.T_BYTE:    xas = Opcodes.BASTORE; break;
        case Opcodes.T_CHAR:    xas = Opcodes.CASTORE; break;
        case Opcodes.T_SHORT:   xas = Opcodes.SASTORE; break;
        case Opcodes.T_INT:     xas = Opcodes.IASTORE; break;
        case Opcodes.T_LONG:    xas = Opcodes.LASTORE; break;
        case Opcodes.T_FLOAT:   xas = Opcodes.FASTORE; break;
        case Opcodes.T_DOUBLE:  xas = Opcodes.DASTORE; break;
        case 0:                 xas = Opcodes.AASTORE; break;
        default:      throw new InternalError();
    }
    return xas - Opcodes.AASTORE + aaop;
}