Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,17 @@ public void visitInvokeDynamicInsn(String name, String descriptor, Handle bootst
}

private ReferenceTargetType getReferenceTargetType(int stackDepth) {
if (stack == null) { // Unreachable instruction
return ReferenceTargetType.uninitialized();
}

if (stackDepth >= stack.size()) {
throw new IllegalStateException("Stack depth " + stackDepth + " is higher than the stack: " + stackValuesToString(stack) + " in method " + callerEntry);
}

Object stackValue = stack.get(stack.size() - 1 - stackDepth);

if (stackValue.equals(Opcodes.UNINITIALIZED_THIS) || stackValue instanceof Label) {
if (stackValue.equals(Opcodes.UNINITIALIZED_THIS) || stackValue.equals(Opcodes.NULL) || stackValue instanceof Label) {
return ReferenceTargetType.uninitialized();
}

Expand Down