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

The following examples show how to use jdk.internal.org.objectweb.asm.Opcodes#NEW . 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 dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void visitTypeInsn(final int opcode, final String type) {
    Type t = Type.getObjectType(type);
    switch (opcode) {
    case Opcodes.NEW:
        anew(t);
        break;
    case Opcodes.ANEWARRAY:
        newarray(t);
        break;
    case Opcodes.CHECKCAST:
        checkcast(t);
        break;
    case Opcodes.INSTANCEOF:
        instanceOf(t);
        break;
    default:
        throw new IllegalArgumentException();
    }
}
 
Example 2
Source File: AnalyzerAdapter.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void visitTypeInsn(final int opcode, final String type) {
    if (opcode == Opcodes.NEW) {
        if (labels == null) {
            Label l = new Label();
            labels = new ArrayList<Label>(3);
            labels.add(l);
            if (mv != null) {
                mv.visitLabel(l);
            }
        }
        for (int i = 0; i < labels.size(); ++i) {
            uninitializedTypes.put(labels.get(i), type);
        }
    }
    if (mv != null) {
        mv.visitTypeInsn(opcode, type);
    }
    execute(opcode, 0, type);
}
 
Example 3
Source File: InstructionAdapter.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void visitTypeInsn(final int opcode, final String type) {
    Type t = Type.getObjectType(type);
    switch (opcode) {
    case Opcodes.NEW:
        anew(t);
        break;
    case Opcodes.ANEWARRAY:
        newarray(t);
        break;
    case Opcodes.CHECKCAST:
        checkcast(t);
        break;
    case Opcodes.INSTANCEOF:
        instanceOf(t);
        break;
    default:
        throw new IllegalArgumentException();
    }
}
 
Example 4
Source File: AnalyzerAdapter.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void visitTypeInsn(final int opcode, final String type) {
    if (opcode == Opcodes.NEW) {
        if (labels == null) {
            Label l = new Label();
            labels = new ArrayList<Label>(3);
            labels.add(l);
            if (mv != null) {
                mv.visitLabel(l);
            }
        }
        for (int i = 0; i < labels.size(); ++i) {
            uninitializedTypes.put(labels.get(i), type);
        }
    }
    if (mv != null) {
        mv.visitTypeInsn(opcode, type);
    }
    execute(opcode, 0, type);
}
 
Example 5
Source File: InstructionAdapter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void visitTypeInsn(final int opcode, final String type) {
    Type t = Type.getObjectType(type);
    switch (opcode) {
    case Opcodes.NEW:
        anew(t);
        break;
    case Opcodes.ANEWARRAY:
        newarray(t);
        break;
    case Opcodes.CHECKCAST:
        checkcast(t);
        break;
    case Opcodes.INSTANCEOF:
        instanceOf(t);
        break;
    default:
        throw new IllegalArgumentException();
    }
}
 
Example 6
Source File: InstructionAdapter.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void visitTypeInsn(final int opcode, final String type) {
    Type t = Type.getObjectType(type);
    switch (opcode) {
    case Opcodes.NEW:
        anew(t);
        break;
    case Opcodes.ANEWARRAY:
        newarray(t);
        break;
    case Opcodes.CHECKCAST:
        checkcast(t);
        break;
    case Opcodes.INSTANCEOF:
        instanceOf(t);
        break;
    default:
        throw new IllegalArgumentException();
    }
}
 
Example 7
Source File: InstructionAdapter.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void visitTypeInsn(final int opcode, final String type) {
    Type t = Type.getObjectType(type);
    switch (opcode) {
    case Opcodes.NEW:
        anew(t);
        break;
    case Opcodes.ANEWARRAY:
        newarray(t);
        break;
    case Opcodes.CHECKCAST:
        checkcast(t);
        break;
    case Opcodes.INSTANCEOF:
        instanceOf(t);
        break;
    default:
        throw new IllegalArgumentException();
    }
}
 
Example 8
Source File: InstructionAdapter.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void visitTypeInsn(final int opcode, final String type) {
    Type t = Type.getObjectType(type);
    switch (opcode) {
    case Opcodes.NEW:
        anew(t);
        break;
    case Opcodes.ANEWARRAY:
        newarray(t);
        break;
    case Opcodes.CHECKCAST:
        checkcast(t);
        break;
    case Opcodes.INSTANCEOF:
        instanceOf(t);
        break;
    default:
        throw new IllegalArgumentException();
    }
}
 
Example 9
Source File: AnalyzerAdapter.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void visitTypeInsn(final int opcode, final String type) {
    if (opcode == Opcodes.NEW) {
        if (labels == null) {
            Label l = new Label();
            labels = new ArrayList<Label>(3);
            labels.add(l);
            if (mv != null) {
                mv.visitLabel(l);
            }
        }
        for (int i = 0; i < labels.size(); ++i) {
            uninitializedTypes.put(labels.get(i), type);
        }
    }
    if (mv != null) {
        mv.visitTypeInsn(opcode, type);
    }
    execute(opcode, 0, type);
}
 
Example 10
Source File: InstructionAdapter.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void visitTypeInsn(final int opcode, final String type) {
    Type t = Type.getObjectType(type);
    switch (opcode) {
    case Opcodes.NEW:
        anew(t);
        break;
    case Opcodes.ANEWARRAY:
        newarray(t);
        break;
    case Opcodes.CHECKCAST:
        checkcast(t);
        break;
    case Opcodes.INSTANCEOF:
        instanceOf(t);
        break;
    default:
        throw new IllegalArgumentException();
    }
}
 
Example 11
Source File: AnalyzerAdapter.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void visitTypeInsn(final int opcode, final String type) {
    if (opcode == Opcodes.NEW) {
        if (labels == null) {
            Label l = new Label();
            labels = new ArrayList<Label>(3);
            labels.add(l);
            if (mv != null) {
                mv.visitLabel(l);
            }
        }
        for (int i = 0; i < labels.size(); ++i) {
            uninitializedTypes.put(labels.get(i), type);
        }
    }
    if (mv != null) {
        mv.visitTypeInsn(opcode, type);
    }
    execute(opcode, 0, type);
}
 
Example 12
Source File: AnalyzerAdapter.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void visitTypeInsn(final int opcode, final String type) {
    if (opcode == Opcodes.NEW) {
        if (labels == null) {
            Label l = new Label();
            labels = new ArrayList<Label>(3);
            labels.add(l);
            if (mv != null) {
                mv.visitLabel(l);
            }
        }
        for (int i = 0; i < labels.size(); ++i) {
            uninitializedTypes.put(labels.get(i), type);
        }
    }
    if (mv != null) {
        mv.visitTypeInsn(opcode, type);
    }
    execute(opcode, 0, type);
}
 
Example 13
Source File: AnalyzerAdapter.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void visitTypeInsn(final int opcode, final String type) {
    if (opcode == Opcodes.NEW) {
        if (labels == null) {
            Label l = new Label();
            labels = new ArrayList<Label>(3);
            labels.add(l);
            if (mv != null) {
                mv.visitLabel(l);
            }
        }
        for (int i = 0; i < labels.size(); ++i) {
            uninitializedTypes.put(labels.get(i), type);
        }
    }
    if (mv != null) {
        mv.visitTypeInsn(opcode, type);
    }
    execute(opcode, 0, type);
}
 
Example 14
Source File: CheckMethodAdapter.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitTypeInsn(final int opcode, final String type) {
    checkStartCode();
    checkEndCode();
    checkOpcode(opcode, 3);
    checkInternalName(type, "type");
    if (opcode == Opcodes.NEW && type.charAt(0) == '[') {
        throw new IllegalArgumentException(
                "NEW cannot be used to create arrays: " + type);
    }
    super.visitTypeInsn(opcode, type);
    ++insnCount;
}
 
Example 15
Source File: CheckMethodAdapter.java    From nashorn with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitTypeInsn(final int opcode, final String type) {
    checkStartCode();
    checkEndCode();
    checkOpcode(opcode, 3);
    checkInternalName(type, "type");
    if (opcode == Opcodes.NEW && type.charAt(0) == '[') {
        throw new IllegalArgumentException("NEW cannot be used to create arrays: "
                + type);
    }
    super.visitTypeInsn(opcode, type);
    ++insnCount;
}
 
Example 16
Source File: CheckMethodAdapter.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitTypeInsn(final int opcode, final String type) {
    checkStartCode();
    checkEndCode();
    checkOpcode(opcode, 3);
    checkInternalName(type, "type");
    if (opcode == Opcodes.NEW && type.charAt(0) == '[') {
        throw new IllegalArgumentException(
                "NEW cannot be used to create arrays: " + type);
    }
    super.visitTypeInsn(opcode, type);
    ++insnCount;
}
 
Example 17
Source File: CheckMethodAdapter.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitTypeInsn(final int opcode, final String type) {
    checkStartCode();
    checkEndCode();
    checkOpcode(opcode, 3);
    checkInternalName(type, "type");
    if (opcode == Opcodes.NEW && type.charAt(0) == '[') {
        throw new IllegalArgumentException(
                "NEW cannot be used to create arrays: " + type);
    }
    super.visitTypeInsn(opcode, type);
    ++insnCount;
}
 
Example 18
Source File: CheckMethodAdapter.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitTypeInsn(final int opcode, final String type) {
    checkStartCode();
    checkEndCode();
    checkOpcode(opcode, 3);
    checkInternalName(type, "type");
    if (opcode == Opcodes.NEW && type.charAt(0) == '[') {
        throw new IllegalArgumentException(
                "NEW cannot be used to create arrays: " + type);
    }
    super.visitTypeInsn(opcode, type);
    ++insnCount;
}
 
Example 19
Source File: CheckMethodAdapter.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
@Override
public void visitTypeInsn(final int opcode, final String type) {
    checkVisitCodeCalled();
    checkVisitMaxsNotCalled();
    checkOpcodeMethod(opcode, Method.VISIT_TYPE_INSN);
    checkInternalName(version, type, "type");
    if (opcode == Opcodes.NEW && type.charAt(0) == '[') {
        throw new IllegalArgumentException("NEW cannot be used to create arrays: " + type);
    }
    super.visitTypeInsn(opcode, type);
    ++insnCount;
}
 
Example 20
Source File: CheckMethodAdapter.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void visitTypeInsn(final int opcode, final String type) {
    checkStartCode();
    checkEndCode();
    checkOpcode(opcode, 3);
    checkInternalName(type, "type");
    if (opcode == Opcodes.NEW && type.charAt(0) == '[') {
        throw new IllegalArgumentException(
                "NEW cannot be used to create arrays: " + type);
    }
    super.visitTypeInsn(opcode, type);
    ++insnCount;
}