< prev index next >

src/hotspot/share/runtime/jniHandles.hpp

Print this page




  67   // address designated by the jobject to produce the corresponding
  68   // jweak.  Accessing the value of a jobject must account for it
  69   // being a possibly offset jweak.
  70   static const uintptr_t weak_tag_size = 1;
  71   static const uintptr_t weak_tag_alignment = (1u << weak_tag_size);
  72   static const uintptr_t weak_tag_mask = weak_tag_alignment - 1;
  73   static const int weak_tag_value = 1;
  74 
  75   // Resolve handle into oop
  76   inline static oop resolve(jobject handle);
  77   // Resolve handle into oop, result guaranteed not to be null
  78   inline static oop resolve_non_null(jobject handle);
  79   // Resolve externally provided handle into oop with some guards
  80   static oop resolve_external_guard(jobject handle);
  81 
  82   // Check for equality without keeping objects alive
  83   static bool is_same_object(jobject handle1, jobject handle2);
  84 
  85   // Local handles
  86   static jobject make_local(oop obj);
  87   static jobject make_local(JNIEnv* env, oop obj);    // Fast version when env is known
  88   static jobject make_local(Thread* thread, oop obj); // Even faster version when current thread is known
  89   inline static void destroy_local(jobject handle);
  90 
  91   // Global handles
  92   static jobject make_global(Handle  obj, AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM);
  93   static void destroy_global(jobject handle);
  94 
  95   // Weak global handles
  96   static jobject make_weak_global(Handle obj, AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM);
  97   static void destroy_weak_global(jobject handle);
  98   static bool is_global_weak_cleared(jweak handle); // Test jweak without resolution
  99 
 100   // Initialization
 101   static void initialize();
 102 
 103   // Debugging
 104   static void print_on(outputStream* st);
 105   static void print();
 106   static void verify();
 107   // The category predicates all require handle != NULL.
 108   static bool is_local_handle(Thread* thread, jobject handle);




  67   // address designated by the jobject to produce the corresponding
  68   // jweak.  Accessing the value of a jobject must account for it
  69   // being a possibly offset jweak.
  70   static const uintptr_t weak_tag_size = 1;
  71   static const uintptr_t weak_tag_alignment = (1u << weak_tag_size);
  72   static const uintptr_t weak_tag_mask = weak_tag_alignment - 1;
  73   static const int weak_tag_value = 1;
  74 
  75   // Resolve handle into oop
  76   inline static oop resolve(jobject handle);
  77   // Resolve handle into oop, result guaranteed not to be null
  78   inline static oop resolve_non_null(jobject handle);
  79   // Resolve externally provided handle into oop with some guards
  80   static oop resolve_external_guard(jobject handle);
  81 
  82   // Check for equality without keeping objects alive
  83   static bool is_same_object(jobject handle1, jobject handle2);
  84 
  85   // Local handles
  86   static jobject make_local(oop obj);
  87   static jobject make_local(Thread* thread, oop obj); // Faster version when current thread is known

  88   inline static void destroy_local(jobject handle);
  89 
  90   // Global handles
  91   static jobject make_global(Handle  obj, AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM);
  92   static void destroy_global(jobject handle);
  93 
  94   // Weak global handles
  95   static jobject make_weak_global(Handle obj, AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM);
  96   static void destroy_weak_global(jobject handle);
  97   static bool is_global_weak_cleared(jweak handle); // Test jweak without resolution
  98 
  99   // Initialization
 100   static void initialize();
 101 
 102   // Debugging
 103   static void print_on(outputStream* st);
 104   static void print();
 105   static void verify();
 106   // The category predicates all require handle != NULL.
 107   static bool is_local_handle(Thread* thread, jobject handle);


< prev index next >