< prev index next >
src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java
Print this page
*** 124,134 ****
return notPresent;
}
if (entry.address != 0) {
throw new JVMCIError("cannot get offset of static field " + name);
}
! return entry == null ? notPresent : type.cast(convertValue(name, type, entry.offset, cppType));
}
/**
* Gets the offset of a non-static C++ field.
*
--- 124,134 ----
return notPresent;
}
if (entry.address != 0) {
throw new JVMCIError("cannot get offset of static field " + name);
}
! return type.cast(convertValue(name, type, entry.offset, cppType));
}
/**
* Gets the offset of a non-static C++ field.
*
*** 171,181 ****
return notPresent;
}
if (entry.address == 0) {
throw new JVMCIError(name + " is not a static field");
}
! return entry == null ? notPresent : entry.address;
}
/**
* Gets the address of a static C++ field.
*
--- 171,181 ----
return notPresent;
}
if (entry.address == 0) {
throw new JVMCIError(name + " is not a static field");
}
! return entry.address;
}
/**
* Gets the address of a static C++ field.
*
*** 311,321 ****
return value;
} else if (value instanceof Long) {
return (int) (long) value;
}
} else if (toType == Long.class) {
! return (long) value;
}
throw new JVMCIError("cannot convert " + name + " of type " + value.getClass().getSimpleName() + (cppType == null ? "" : " [" + cppType + "]") + " to " + toType.getSimpleName());
}
--- 311,321 ----
return value;
} else if (value instanceof Long) {
return (int) (long) value;
}
} else if (toType == Long.class) {
! return value;
}
throw new JVMCIError("cannot convert " + name + " of type " + value.getClass().getSimpleName() + (cppType == null ? "" : " [" + cppType + "]") + " to " + toType.getSimpleName());
}
< prev index next >