Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion src/hotspot/share/classfile/resolutionErrors.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class ResolutionErrorTable : AllStatic {
static const int CPCACHE_INDEX_MANGLE_VALUE = 1000000;

// This function is used to encode an invokedynamic index to differentiate it from a
// constant pool index. It assumes it is being called with a index that is less than 0
// constant pool index.
static int encode_indy_index(int index) {
return index + CPCACHE_INDEX_MANGLE_VALUE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -717,18 +717,17 @@ private static JavaType getJavaType(final Object type) {

@Override
public JavaMethod lookupMethod(int rawIndex, int opcode, ResolvedJavaMethod caller) {
int which = rawIndex;
final HotSpotResolvedJavaMethod method = compilerToVM().lookupMethodInPool(this, which, (byte) opcode, (HotSpotResolvedJavaMethodImpl) caller);
final HotSpotResolvedJavaMethod method = compilerToVM().lookupMethodInPool(this, rawIndex, (byte) opcode, (HotSpotResolvedJavaMethodImpl) caller);
if (method != null) {
return method;
} else {
// Get the method's name and signature.
String name = compilerToVM().lookupNameInPool(this, which, opcode);
HotSpotSignature signature = new HotSpotSignature(runtime(), compilerToVM().lookupSignatureInPool(this, which, opcode));
String name = compilerToVM().lookupNameInPool(this, rawIndex, opcode);
HotSpotSignature signature = new HotSpotSignature(runtime(), compilerToVM().lookupSignatureInPool(this, rawIndex, opcode));
if (opcode == Bytecodes.INVOKEDYNAMIC) {
return new UnresolvedJavaMethod(name, signature, runtime().getMethodHandleClass());
} else {
final int klassIndex = getKlassRefIndexAt(which, opcode);
final int klassIndex = getKlassRefIndexAt(rawIndex, opcode);
final Object type = compilerToVM().lookupKlassInPool(this, klassIndex);
return new UnresolvedJavaMethod(name, signature, getJavaType(type));
}
Expand Down