< prev index next >

src/hotspot/share/classfile/javaClasses.inline.hpp

Print this page
@@ -26,13 +26,15 @@
  #define SHARE_CLASSFILE_JAVACLASSES_INLINE_HPP
  
  #include "classfile/javaClasses.hpp"
  
  #include "oops/access.inline.hpp"
+ #include "oops/instanceKlass.inline.hpp"
  #include "oops/method.hpp"
  #include "oops/oop.inline.hpp"
  #include "oops/oopsHierarchy.hpp"
+ #include "oops/typeArrayOop.inline.hpp"
  
  void java_lang_String::set_coder(oop string, jbyte coder) {
    string->byte_field_put(_coder_offset, coder);
  }
  

@@ -139,10 +141,14 @@
  
  oop java_lang_ref_Reference::unknown_referent_no_keepalive(oop ref) {
    return ref->obj_field_access<ON_UNKNOWN_OOP_REF | AS_NO_KEEPALIVE>(_referent_offset);
  }
  
+ oop java_lang_ref_Reference::unknown_referent(oop ref) {
+   return ref->obj_field_access<ON_UNKNOWN_OOP_REF>(_referent_offset);
+ }
+ 
  void java_lang_ref_Reference::clear_referent(oop ref) {
    ref->obj_field_put_raw(_referent_offset, nullptr);
  }
  
  HeapWord* java_lang_ref_Reference::referent_addr_raw(oop ref) {

@@ -187,10 +193,166 @@
  
  bool java_lang_ref_Reference::is_phantom(oop ref) {
    return InstanceKlass::cast(ref->klass())->reference_type() == REF_PHANTOM;
  }
  
+ inline oop java_lang_Thread::continuation(oop java_thread) {
+   return java_thread->obj_field(_continuation_offset);
+ }
+ 
+ inline oop jdk_internal_vm_ContinuationScope::name(oop ref) {
+   return ref->obj_field(_name_offset);
+ }
+ 
+ inline oop jdk_internal_vm_Continuation::scope(oop ref) {
+   return ref->obj_field(_scope_offset);
+ }
+ inline oop jdk_internal_vm_Continuation::target(oop ref) {
+   return ref->obj_field(_target_offset);
+ }
+ inline oop jdk_internal_vm_Continuation::parent(oop ref) {
+   return ref->obj_field(_parent_offset);
+ }
+ inline oop jdk_internal_vm_Continuation::yieldInfo(oop ref) {
+   return ref->obj_field(_yieldInfo_offset);
+ }
+ inline void jdk_internal_vm_Continuation::set_yieldInfo(oop ref, oop value) {
+   ref->obj_field_put(_yieldInfo_offset, value);
+ }
+ inline stackChunkOop jdk_internal_vm_Continuation::tail(oop ref) {
+   return (stackChunkOop)ref->obj_field(_tail_offset);
+ }
+ inline void jdk_internal_vm_Continuation::set_tail(oop ref, stackChunkOop value) {
+   ref->obj_field_put(_tail_offset, value);
+ }
+ inline jshort jdk_internal_vm_Continuation::critical_section(oop ref) {
+   return ref->short_field(_cs_offset);
+ }
+ inline void jdk_internal_vm_Continuation::set_critical_section(oop ref, jshort value) {
+   ref->short_field_put(_cs_offset, value);
+ }
+ inline bool jdk_internal_vm_Continuation::is_reset(oop ref) {
+   return ref->bool_field(_reset_offset);
+ }
+ 
+ inline bool jdk_internal_vm_Continuation::done(oop ref) {
+   return ref->bool_field(_done_offset);
+ }
+ inline bool jdk_internal_vm_Continuation::is_mounted(oop ref) {
+   return ref->bool_field(_mounted_offset) != 0;
+ }
+ inline bool jdk_internal_vm_Continuation::is_preempted(oop ref) {
+   return ref->bool_field(_preempted_offset);
+ }
+ inline void jdk_internal_vm_Continuation::set_preempted(oop ref, bool value) {
+   ref->bool_field_put(_preempted_offset, (jboolean)value);
+ }
+ 
+ inline oop java_lang_VirtualThread::vthread_scope() {
+   oop base = vmClasses::VirtualThread_klass()->static_field_base_raw();
+   return base->obj_field(static_vthread_scope_offset);
+ }
+ 
+ inline jlong java_lang_VirtualThread::set_jfrTraceId(oop ref, jlong id) {
+   ref->long_field_put(java_lang_Thread::_tid_offset, id);
+   return id;
+ }
+ 
+ inline oop jdk_internal_vm_StackChunk::parent(oop ref) {
+   return ref->obj_field(_parent_offset);
+ }
+ inline void jdk_internal_vm_StackChunk::set_parent(oop ref, oop value) {
+   ref->obj_field_put(_parent_offset, value);
+ }
+ 
+ template<typename P>
+ inline bool jdk_internal_vm_StackChunk::is_parent_null(oop ref) {
+   return (oop)RawAccess<>::oop_load(ref->field_addr<P>(_parent_offset)) == NULL;
+ }
+ 
+ template<typename P>
+ inline void jdk_internal_vm_StackChunk::set_parent_raw(oop ref, oop value) {
+   RawAccess<IS_DEST_UNINITIALIZED>::oop_store(ref->field_addr<P>(_parent_offset), value);
+ }
+ inline oop jdk_internal_vm_StackChunk::cont(oop ref) {
+   return ref->obj_field(_cont_offset);
+ }
+ inline void jdk_internal_vm_StackChunk::set_cont(oop ref, oop value) {
+   ref->obj_field_put(_cont_offset, value);
+ }
+ 
+ template<typename P>
+ inline oop jdk_internal_vm_StackChunk::cont_raw(oop ref) {
+   return (oop)RawAccess<>::oop_load(ref->field_addr<P>(_cont_offset));
+ }
+ 
+ template<typename P>
+ inline void jdk_internal_vm_StackChunk::set_cont_raw(oop ref, oop value) {
+   RawAccess<IS_DEST_UNINITIALIZED>::oop_store(ref->field_addr<P>(_cont_offset), value);
+ }
+ 
+ inline jint jdk_internal_vm_StackChunk::size(oop ref) {
+   return ref->int_field(_size_offset);
+ }
+ inline void jdk_internal_vm_StackChunk::set_size(HeapWord* ref, jint value) {
+   *(cast_to_oop(ref))->field_addr<jint>(_size_offset) = value; // ref->int_field_put(_size_offset, value);
+ }
+ inline jint jdk_internal_vm_StackChunk::sp(oop ref) {
+   return ref->int_field(_sp_offset);
+ }
+ inline void jdk_internal_vm_StackChunk::set_sp(oop ref, jint value) {
+   ref->int_field_put(_sp_offset, value);
+ }
+ inline jlong jdk_internal_vm_StackChunk::pc(oop ref) {
+   return ref->long_field(_pc_offset);
+ }
+ inline void jdk_internal_vm_StackChunk::set_pc(oop ref, jlong value) {
+   ref->long_field_put(_pc_offset, value);
+ }
+ inline jint jdk_internal_vm_StackChunk::argsize(oop ref) {
+   return ref->int_field(_argsize_offset);
+ }
+ inline void jdk_internal_vm_StackChunk::set_argsize(oop ref, jint value) {
+   ref->int_field_put(_argsize_offset, value);
+ }
+ inline jbyte jdk_internal_vm_StackChunk::flags(oop ref) {
+   return ref->byte_field(_flags_offset);
+ }
+ inline void jdk_internal_vm_StackChunk::set_flags(oop ref, jbyte value) {
+   ref->byte_field_put(_flags_offset, value);
+ }
+ inline jint jdk_internal_vm_StackChunk::gc_sp(oop ref) {
+   return ref->int_field(_gcSP_offset);
+ }
+ inline void jdk_internal_vm_StackChunk::set_gc_sp(oop ref, jint value) {
+   ref->int_field_put(_gcSP_offset, value);
+ }
+ inline jlong jdk_internal_vm_StackChunk::mark_cycle(oop ref) {
+   return ref->long_field(_markCycle_offset);
+ }
+ inline void jdk_internal_vm_StackChunk::set_mark_cycle(oop ref, jlong value) {
+   ref->long_field_put(_markCycle_offset, value);
+ }
+ inline jint jdk_internal_vm_StackChunk::maxSize(oop ref) {
+   return ref->int_field(_maxSize_offset);
+ }
+ inline void jdk_internal_vm_StackChunk::set_maxSize(oop ref, jint value) {
+   ref->int_field_put(_maxSize_offset, value);
+ }
+ inline jint jdk_internal_vm_StackChunk::numFrames(oop ref) {
+   return ref->int_field(_numFrames_offset);
+ }
+ inline void jdk_internal_vm_StackChunk::set_numFrames(oop ref, jint value) {
+   ref->int_field_put(_numFrames_offset, value);
+ }
+ inline jint jdk_internal_vm_StackChunk::numOops(oop ref) {
+   return ref->int_field(_numOops_offset);
+ }
+ inline void jdk_internal_vm_StackChunk::set_numOops(oop ref, jint value) {
+   ref->int_field_put(_numOops_offset, value);
+ }
+ 
  inline void java_lang_invoke_CallSite::set_target_volatile(oop site, oop target) {
    site->obj_field_put_volatile(_target_offset, target);
  }
  
  inline oop  java_lang_invoke_CallSite::target(oop site) {
< prev index next >