mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8292818: replace 96-bit representation for field metadata with variable-sized streams
Co-authored-by: John R Rose <jrose@openjdk.org> Co-authored-by: Chris Plummer <cjplummer@openjdk.org> Reviewed-by: dholmes, coleenp, cjplummer, dnsimon
This commit is contained in:
parent
932be3542d
commit
bfb812a8ff
54 changed files with 1302 additions and 858 deletions
|
@ -1420,6 +1420,33 @@ JVMCIObject JVMCIEnv::new_JVMCIError(JVMCI_TRAPS) {
|
|||
}
|
||||
}
|
||||
|
||||
JVMCIObject JVMCIEnv::new_FieldInfo(FieldInfo* fieldinfo, JVMCI_TRAPS) {
|
||||
JavaThread* THREAD = JavaThread::current(); // For exception macros.
|
||||
if (is_hotspot()) {
|
||||
HotSpotJVMCI::FieldInfo::klass()->initialize(CHECK_(JVMCIObject()));
|
||||
oop obj = HotSpotJVMCI::FieldInfo::klass()->allocate_instance(CHECK_(JVMCIObject()));
|
||||
Handle obj_h(THREAD, obj);
|
||||
HotSpotJVMCI::FieldInfo::set_nameIndex(JVMCIENV, obj_h(), (jint)fieldinfo->name_index());
|
||||
HotSpotJVMCI::FieldInfo::set_signatureIndex(JVMCIENV, obj_h(), (jint)fieldinfo->signature_index());
|
||||
HotSpotJVMCI::FieldInfo::set_offset(JVMCIENV, obj_h(), (jint)fieldinfo->offset());
|
||||
HotSpotJVMCI::FieldInfo::set_classfileFlags(JVMCIENV, obj_h(), (jint)fieldinfo->access_flags().as_int());
|
||||
HotSpotJVMCI::FieldInfo::set_internalFlags(JVMCIENV, obj_h(), (jint)fieldinfo->field_flags().as_uint());
|
||||
HotSpotJVMCI::FieldInfo::set_initializerIndex(JVMCIENV, obj_h(), (jint)fieldinfo->initializer_index());
|
||||
return wrap(obj_h());
|
||||
} else {
|
||||
JNIAccessMark jni(this, THREAD);
|
||||
jobject result = jni()->NewObject(JNIJVMCI::FieldInfo::clazz(),
|
||||
JNIJVMCI::FieldInfo::constructor(),
|
||||
(jint)fieldinfo->name_index(),
|
||||
(jint)fieldinfo->signature_index(),
|
||||
(jint)fieldinfo->offset(),
|
||||
(jint)fieldinfo->access_flags().as_int(),
|
||||
(jint)fieldinfo->field_flags().as_uint(),
|
||||
(jint)fieldinfo->initializer_index());
|
||||
|
||||
return wrap(result);
|
||||
}
|
||||
}
|
||||
|
||||
JVMCIObject JVMCIEnv::get_object_constant(oop objOop, bool compressed, bool dont_register) {
|
||||
JavaThread* THREAD = JavaThread::current(); // For exception macros.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue