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

The following examples show how to use jdk.internal.org.objectweb.asm.Opcodes#UNINITIALIZED_THIS . 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: CheckMethodAdapter.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Checks a stack frame value.
 *
 * @param value
 *            the value to be checked.
 */
void checkFrameValue(final Object value) {
    if (value == Opcodes.TOP || value == Opcodes.INTEGER
            || value == Opcodes.FLOAT || value == Opcodes.LONG
            || value == Opcodes.DOUBLE || value == Opcodes.NULL
            || value == Opcodes.UNINITIALIZED_THIS) {
        return;
    }
    if (value instanceof String) {
        checkInternalName((String) value, "Invalid stack frame value");
        return;
    }
    if (!(value instanceof Label)) {
        throw new IllegalArgumentException("Invalid stack frame value: "
                + value);
    } else {
        usedLabels.add((Label) value);
    }
}
 
Example 2
Source File: CheckMethodAdapter.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Checks a stack frame value.
 *
 * @param value
 *            the value to be checked.
 */
void checkFrameValue(final Object value) {
    if (value == Opcodes.TOP || value == Opcodes.INTEGER
            || value == Opcodes.FLOAT || value == Opcodes.LONG
            || value == Opcodes.DOUBLE || value == Opcodes.NULL
            || value == Opcodes.UNINITIALIZED_THIS) {
        return;
    }
    if (value instanceof String) {
        checkInternalName((String) value, "Invalid stack frame value");
        return;
    }
    if (!(value instanceof Label)) {
        throw new IllegalArgumentException("Invalid stack frame value: "
                + value);
    } else {
        usedLabels.add((Label) value);
    }
}
 
Example 3
Source File: CheckMethodAdapter.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Checks a stack frame value.
 *
 * @param value
 *            the value to be checked.
 */
void checkFrameValue(final Object value) {
    if (value == Opcodes.TOP || value == Opcodes.INTEGER
            || value == Opcodes.FLOAT || value == Opcodes.LONG
            || value == Opcodes.DOUBLE || value == Opcodes.NULL
            || value == Opcodes.UNINITIALIZED_THIS) {
        return;
    }
    if (value instanceof String) {
        checkInternalName((String) value, "Invalid stack frame value");
        return;
    }
    if (!(value instanceof Label)) {
        throw new IllegalArgumentException("Invalid stack frame value: "
                + value);
    } else {
        usedLabels.add((Label) value);
    }
}
 
Example 4
Source File: CheckMethodAdapter.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Checks a stack frame value.
 *
 * @param value
 *            the value to be checked.
 */
void checkFrameValue(final Object value) {
    if (value == Opcodes.TOP || value == Opcodes.INTEGER
            || value == Opcodes.FLOAT || value == Opcodes.LONG
            || value == Opcodes.DOUBLE || value == Opcodes.NULL
            || value == Opcodes.UNINITIALIZED_THIS) {
        return;
    }
    if (value instanceof String) {
        checkInternalName((String) value, "Invalid stack frame value");
        return;
    }
    if (!(value instanceof Label)) {
        throw new IllegalArgumentException("Invalid stack frame value: "
                + value);
    } else {
        usedLabels.add((Label) value);
    }
}
 
Example 5
Source File: CheckMethodAdapter.java    From nashorn with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Checks a stack frame value.
 *
 * @param value the value to be checked.
 */
void checkFrameValue(final Object value) {
    if (value == Opcodes.TOP || value == Opcodes.INTEGER
            || value == Opcodes.FLOAT || value == Opcodes.LONG
            || value == Opcodes.DOUBLE || value == Opcodes.NULL
            || value == Opcodes.UNINITIALIZED_THIS)
    {
        return;
    }
    if (value instanceof String) {
        checkInternalName((String) value, "Invalid stack frame value");
        return;
    }
    if (!(value instanceof Label)) {
        throw new IllegalArgumentException("Invalid stack frame value: "
                + value);
    } else {
        usedLabels.add((Label) value);
    }
}
 
Example 6
Source File: CheckMethodAdapter.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Checks a stack frame value.
 *
 * @param value
 *            the value to be checked.
 */
void checkFrameValue(final Object value) {
    if (value == Opcodes.TOP || value == Opcodes.INTEGER
            || value == Opcodes.FLOAT || value == Opcodes.LONG
            || value == Opcodes.DOUBLE || value == Opcodes.NULL
            || value == Opcodes.UNINITIALIZED_THIS) {
        return;
    }
    if (value instanceof String) {
        checkInternalName((String) value, "Invalid stack frame value");
        return;
    }
    if (!(value instanceof Label)) {
        throw new IllegalArgumentException("Invalid stack frame value: "
                + value);
    } else {
        usedLabels.add((Label) value);
    }
}
 
Example 7
Source File: CheckMethodAdapter.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Checks a stack frame value.
 *
 * @param value
 *            the value to be checked.
 */
void checkFrameValue(final Object value) {
    if (value == Opcodes.TOP || value == Opcodes.INTEGER
            || value == Opcodes.FLOAT || value == Opcodes.LONG
            || value == Opcodes.DOUBLE || value == Opcodes.NULL
            || value == Opcodes.UNINITIALIZED_THIS) {
        return;
    }
    if (value instanceof String) {
        checkInternalName((String) value, "Invalid stack frame value");
        return;
    }
    if (!(value instanceof Label)) {
        throw new IllegalArgumentException("Invalid stack frame value: "
                + value);
    } else {
        usedLabels.add((Label) value);
    }
}
 
Example 8
Source File: CheckMethodAdapter.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Checks a stack frame value.
 *
 * @param value
 *            the value to be checked.
 */
void checkFrameValue(final Object value) {
    if (value == Opcodes.TOP || value == Opcodes.INTEGER
            || value == Opcodes.FLOAT || value == Opcodes.LONG
            || value == Opcodes.DOUBLE || value == Opcodes.NULL
            || value == Opcodes.UNINITIALIZED_THIS) {
        return;
    }
    if (value instanceof String) {
        checkInternalName((String) value, "Invalid stack frame value");
        return;
    }
    if (!(value instanceof Label)) {
        throw new IllegalArgumentException("Invalid stack frame value: "
                + value);
    } else {
        usedLabels.add((Label) value);
    }
}
 
Example 9
Source File: CheckMethodAdapter.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Checks a stack frame value.
 *
 * @param value
 *            the value to be checked.
 */
void checkFrameValue(final Object value) {
    if (value == Opcodes.TOP || value == Opcodes.INTEGER
            || value == Opcodes.FLOAT || value == Opcodes.LONG
            || value == Opcodes.DOUBLE || value == Opcodes.NULL
            || value == Opcodes.UNINITIALIZED_THIS) {
        return;
    }
    if (value instanceof String) {
        checkInternalName((String) value, "Invalid stack frame value");
        return;
    }
    if (!(value instanceof Label)) {
        throw new IllegalArgumentException("Invalid stack frame value: "
                + value);
    } else {
        usedLabels.add((Label) value);
    }
}
 
Example 10
Source File: CheckMethodAdapter.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Checks a stack frame value.
 *
 * @param value
 *            the value to be checked.
 */
void checkFrameValue(final Object value) {
    if (value == Opcodes.TOP || value == Opcodes.INTEGER
            || value == Opcodes.FLOAT || value == Opcodes.LONG
            || value == Opcodes.DOUBLE || value == Opcodes.NULL
            || value == Opcodes.UNINITIALIZED_THIS) {
        return;
    }
    if (value instanceof String) {
        checkInternalName((String) value, "Invalid stack frame value");
        return;
    }
    if (!(value instanceof Label)) {
        throw new IllegalArgumentException("Invalid stack frame value: "
                + value);
    } else {
        usedLabels.add((Label) value);
    }
}
 
Example 11
Source File: CheckMethodAdapter.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Checks a stack frame value.
 *
 * @param value
 *            the value to be checked.
 */
void checkFrameValue(final Object value) {
    if (value == Opcodes.TOP || value == Opcodes.INTEGER
            || value == Opcodes.FLOAT || value == Opcodes.LONG
            || value == Opcodes.DOUBLE || value == Opcodes.NULL
            || value == Opcodes.UNINITIALIZED_THIS) {
        return;
    }
    if (value instanceof String) {
        checkInternalName((String) value, "Invalid stack frame value");
        return;
    }
    if (!(value instanceof Label)) {
        throw new IllegalArgumentException("Invalid stack frame value: "
                + value);
    } else {
        usedLabels.add((Label) value);
    }
}
 
Example 12
Source File: CheckMethodAdapter.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Checks a stack frame value.
 *
 * @param value
 *            the value to be checked.
 */
void checkFrameValue(final Object value) {
    if (value == Opcodes.TOP || value == Opcodes.INTEGER
            || value == Opcodes.FLOAT || value == Opcodes.LONG
            || value == Opcodes.DOUBLE || value == Opcodes.NULL
            || value == Opcodes.UNINITIALIZED_THIS) {
        return;
    }
    if (value instanceof String) {
        checkInternalName((String) value, "Invalid stack frame value");
        return;
    }
    if (!(value instanceof Label)) {
        throw new IllegalArgumentException("Invalid stack frame value: "
                + value);
    } else {
        usedLabels.add((Label) value);
    }
}
 
Example 13
Source File: AnalyzerAdapter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private void doVisitMethodInsn(int opcode, final String owner,
        final String name, final String desc, final boolean itf) {
    if (mv != null) {
        mv.visitMethodInsn(opcode, owner, name, desc, itf);
    }
    if (this.locals == null) {
        labels = null;
        return;
    }
    pop(desc);
    if (opcode != Opcodes.INVOKESTATIC) {
        Object t = pop();
        if (opcode == Opcodes.INVOKESPECIAL && name.charAt(0) == '<') {
            Object u;
            if (t == Opcodes.UNINITIALIZED_THIS) {
                u = this.owner;
            } else {
                u = uninitializedTypes.get(t);
            }
            for (int i = 0; i < locals.size(); ++i) {
                if (locals.get(i) == t) {
                    locals.set(i, u);
                }
            }
            for (int i = 0; i < stack.size(); ++i) {
                if (stack.get(i) == t) {
                    stack.set(i, u);
                }
            }
        }
    }
    pushDesc(desc);
    labels = null;
}
 
Example 14
Source File: AnalyzerAdapter.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
private void doVisitMethodInsn(
        final int opcode,
        final String owner,
        final String name,
        final String descriptor,
        final boolean isInterface) {
    if (mv != null) {
        mv.visitMethodInsn(opcode, owner, name, descriptor, isInterface);
    }
    if (this.locals == null) {
        labels = null;
        return;
    }
    pop(descriptor);
    if (opcode != Opcodes.INVOKESTATIC) {
        Object value = pop();
        if (opcode == Opcodes.INVOKESPECIAL && name.equals("<init>")) {
            Object initializedValue;
            if (value == Opcodes.UNINITIALIZED_THIS) {
                initializedValue = this.owner;
            } else {
                initializedValue = uninitializedTypes.get(value);
            }
            for (int i = 0; i < locals.size(); ++i) {
                if (locals.get(i) == value) {
                    locals.set(i, initializedValue);
                }
            }
            for (int i = 0; i < stack.size(); ++i) {
                if (stack.get(i) == value) {
                    stack.set(i, initializedValue);
                }
            }
        }
    }
    pushDescriptor(descriptor);
    labels = null;
}
 
Example 15
Source File: AnalyzerAdapter.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private void doVisitMethodInsn(int opcode, final String owner,
        final String name, final String desc, final boolean itf) {
    if (mv != null) {
        mv.visitMethodInsn(opcode, owner, name, desc, itf);
    }
    if (this.locals == null) {
        labels = null;
        return;
    }
    pop(desc);
    if (opcode != Opcodes.INVOKESTATIC) {
        Object t = pop();
        if (opcode == Opcodes.INVOKESPECIAL && name.charAt(0) == '<') {
            Object u;
            if (t == Opcodes.UNINITIALIZED_THIS) {
                u = this.owner;
            } else {
                u = uninitializedTypes.get(t);
            }
            for (int i = 0; i < locals.size(); ++i) {
                if (locals.get(i) == t) {
                    locals.set(i, u);
                }
            }
            for (int i = 0; i < stack.size(); ++i) {
                if (stack.get(i) == t) {
                    stack.set(i, u);
                }
            }
        }
    }
    pushDesc(desc);
    labels = null;
}
 
Example 16
Source File: AnalyzerAdapter.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private void doVisitMethodInsn(int opcode, final String owner,
        final String name, final String desc, final boolean itf) {
    if (mv != null) {
        mv.visitMethodInsn(opcode, owner, name, desc, itf);
    }
    if (this.locals == null) {
        labels = null;
        return;
    }
    pop(desc);
    if (opcode != Opcodes.INVOKESTATIC) {
        Object t = pop();
        if (opcode == Opcodes.INVOKESPECIAL && name.charAt(0) == '<') {
            Object u;
            if (t == Opcodes.UNINITIALIZED_THIS) {
                u = this.owner;
            } else {
                u = uninitializedTypes.get(t);
            }
            for (int i = 0; i < locals.size(); ++i) {
                if (locals.get(i) == t) {
                    locals.set(i, u);
                }
            }
            for (int i = 0; i < stack.size(); ++i) {
                if (stack.get(i) == t) {
                    stack.set(i, u);
                }
            }
        }
    }
    pushDesc(desc);
    labels = null;
}
 
Example 17
Source File: AnalyzerAdapter.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
private void doVisitMethodInsn(int opcode, final String owner,
        final String name, final String desc, final boolean itf) {
    if (mv != null) {
        mv.visitMethodInsn(opcode, owner, name, desc, itf);
    }
    if (this.locals == null) {
        labels = null;
        return;
    }
    pop(desc);
    if (opcode != Opcodes.INVOKESTATIC) {
        Object t = pop();
        if (opcode == Opcodes.INVOKESPECIAL && name.charAt(0) == '<') {
            Object u;
            if (t == Opcodes.UNINITIALIZED_THIS) {
                u = this.owner;
            } else {
                u = uninitializedTypes.get(t);
            }
            for (int i = 0; i < locals.size(); ++i) {
                if (locals.get(i) == t) {
                    locals.set(i, u);
                }
            }
            for (int i = 0; i < stack.size(); ++i) {
                if (stack.get(i) == t) {
                    stack.set(i, u);
                }
            }
        }
    }
    pushDesc(desc);
    labels = null;
}
 
Example 18
Source File: AnalyzerAdapter.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private void doVisitMethodInsn(int opcode, final String owner,
        final String name, final String desc, final boolean itf) {
    if (mv != null) {
        mv.visitMethodInsn(opcode, owner, name, desc, itf);
    }
    if (this.locals == null) {
        labels = null;
        return;
    }
    pop(desc);
    if (opcode != Opcodes.INVOKESTATIC) {
        Object t = pop();
        if (opcode == Opcodes.INVOKESPECIAL && name.charAt(0) == '<') {
            Object u;
            if (t == Opcodes.UNINITIALIZED_THIS) {
                u = this.owner;
            } else {
                u = uninitializedTypes.get(t);
            }
            for (int i = 0; i < locals.size(); ++i) {
                if (locals.get(i) == t) {
                    locals.set(i, u);
                }
            }
            for (int i = 0; i < stack.size(); ++i) {
                if (stack.get(i) == t) {
                    stack.set(i, u);
                }
            }
        }
    }
    pushDesc(desc);
    labels = null;
}
 
Example 19
Source File: AnalyzerAdapter.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private void doVisitMethodInsn(int opcode, final String owner,
        final String name, final String desc, final boolean itf) {
    if (mv != null) {
        mv.visitMethodInsn(opcode, owner, name, desc, itf);
    }
    if (this.locals == null) {
        labels = null;
        return;
    }
    pop(desc);
    if (opcode != Opcodes.INVOKESTATIC) {
        Object t = pop();
        if (opcode == Opcodes.INVOKESPECIAL && name.charAt(0) == '<') {
            Object u;
            if (t == Opcodes.UNINITIALIZED_THIS) {
                u = this.owner;
            } else {
                u = uninitializedTypes.get(t);
            }
            for (int i = 0; i < locals.size(); ++i) {
                if (locals.get(i) == t) {
                    locals.set(i, u);
                }
            }
            for (int i = 0; i < stack.size(); ++i) {
                if (stack.get(i) == t) {
                    stack.set(i, u);
                }
            }
        }
    }
    pushDesc(desc);
    labels = null;
}
 
Example 20
Source File: AnalyzerAdapter.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
private void doVisitMethodInsn(int opcode, final String owner,
        final String name, final String desc, final boolean itf) {
    if (mv != null) {
        mv.visitMethodInsn(opcode, owner, name, desc, itf);
    }
    if (this.locals == null) {
        labels = null;
        return;
    }
    pop(desc);
    if (opcode != Opcodes.INVOKESTATIC) {
        Object t = pop();
        if (opcode == Opcodes.INVOKESPECIAL && name.charAt(0) == '<') {
            Object u;
            if (t == Opcodes.UNINITIALIZED_THIS) {
                u = this.owner;
            } else {
                u = uninitializedTypes.get(t);
            }
            for (int i = 0; i < locals.size(); ++i) {
                if (locals.get(i) == t) {
                    locals.set(i, u);
                }
            }
            for (int i = 0; i < stack.size(); ++i) {
                if (stack.get(i) == t) {
                    stack.set(i, u);
                }
            }
        }
    }
    pushDesc(desc);
    labels = null;
}