314 static Klass* array_klass_acquire(oop java_class);
315 static void release_set_array_klass(oop java_class, Klass* klass);
316 // compiler support for class operations
317 static int klass_offset() { CHECK_INIT(_klass_offset); }
318 static int array_klass_offset() { CHECK_INIT(_array_klass_offset); }
319 // Support for classRedefinedCount field
320 static int classRedefinedCount(oop the_class_mirror);
321 static void set_classRedefinedCount(oop the_class_mirror, int value);
322
323 // Support for embedded per-class oops
324 static oop protection_domain(oop java_class);
325 static oop init_lock(oop java_class);
326 static void clear_init_lock(oop java_class) {
327 set_init_lock(java_class, nullptr);
328 }
329 static oop component_mirror(oop java_class);
330 static int component_mirror_offset() { return _component_mirror_offset; }
331 static objArrayOop signers(oop java_class);
332 static oop class_data(oop java_class);
333 static void set_class_data(oop java_class, oop classData);
334 static void set_reflection_data(oop java_class, oop reflection_data);
335 static int reflection_data_offset() { return _reflectionData_offset; }
336
337 static oop class_loader(oop java_class);
338 static void set_module(oop java_class, oop module);
339 static oop module(oop java_class);
340
341 static oop name(Handle java_class, TRAPS);
342
343 static oop source_file(oop java_class);
344 static void set_source_file(oop java_class, oop source_file);
345
346 static int modifiers(oop java_class);
347 static void set_modifiers(oop java_class, u2 value);
348
349 static int raw_access_flags(oop java_class);
350 static void set_raw_access_flags(oop java_class, u2 value);
351
352 static size_t oop_size(oop java_class);
353 static void set_oop_size(HeapWord* java_class, size_t size);
354 static int static_oop_field_count(oop java_class);
674
675 static void print_stack_element(outputStream *st, Method* method, int bci);
676
677 static void compute_offsets();
678 static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
679
680 // Allocate space for backtrace (created but stack trace not filled in)
681 static void allocate_backtrace(Handle throwable, TRAPS);
682 // Fill in current stack trace for throwable with preallocated backtrace (no GC)
683 static void fill_in_stack_trace_of_preallocated_backtrace(Handle throwable);
684 // Fill in current stack trace, can cause GC
685 static void fill_in_stack_trace(Handle throwable, const methodHandle& method, TRAPS);
686 static void fill_in_stack_trace(Handle throwable, const methodHandle& method = methodHandle());
687
688 // Programmatic access to stack trace
689 static void get_stack_trace_elements(int depth, Handle backtrace, objArrayHandle stack_trace, TRAPS);
690
691 // For recreating class initialization error exceptions.
692 static Handle create_initialization_error(JavaThread* current, Handle throwable);
693
694 // Printing
695 static void print(oop throwable, outputStream* st);
696 static void print_stack_trace(Handle throwable, outputStream* st);
697 static void java_printStackTrace(Handle throwable, TRAPS);
698 // Debugging
699 friend class JavaClasses;
700 // Gets the method and bci of the top frame (TOS). Returns false if this failed.
701 static bool get_top_method_and_bci(oop throwable, Method** method, int* bci);
702 };
703
704
705 // Interface to java.lang.reflect.AccessibleObject objects
706
707 class java_lang_reflect_AccessibleObject: AllStatic {
708 private:
709 // Note that to reduce dependencies on the JDK we compute these
710 // offsets at run-time.
711 static int _override_offset;
712
713 static void compute_offsets();
|
314 static Klass* array_klass_acquire(oop java_class);
315 static void release_set_array_klass(oop java_class, Klass* klass);
316 // compiler support for class operations
317 static int klass_offset() { CHECK_INIT(_klass_offset); }
318 static int array_klass_offset() { CHECK_INIT(_array_klass_offset); }
319 // Support for classRedefinedCount field
320 static int classRedefinedCount(oop the_class_mirror);
321 static void set_classRedefinedCount(oop the_class_mirror, int value);
322
323 // Support for embedded per-class oops
324 static oop protection_domain(oop java_class);
325 static oop init_lock(oop java_class);
326 static void clear_init_lock(oop java_class) {
327 set_init_lock(java_class, nullptr);
328 }
329 static oop component_mirror(oop java_class);
330 static int component_mirror_offset() { return _component_mirror_offset; }
331 static objArrayOop signers(oop java_class);
332 static oop class_data(oop java_class);
333 static void set_class_data(oop java_class, oop classData);
334
335 static oop reflection_data(oop java_class);
336 static void set_reflection_data(oop java_class, oop reflection_data);
337 static bool has_reflection_data(oop java_class);
338 static int reflection_data_offset() { return _reflectionData_offset; }
339
340 static oop class_loader(oop java_class);
341 static void set_module(oop java_class, oop module);
342 static oop module(oop java_class);
343
344 static oop name(Handle java_class, TRAPS);
345
346 static oop source_file(oop java_class);
347 static void set_source_file(oop java_class, oop source_file);
348
349 static int modifiers(oop java_class);
350 static void set_modifiers(oop java_class, u2 value);
351
352 static int raw_access_flags(oop java_class);
353 static void set_raw_access_flags(oop java_class, u2 value);
354
355 static size_t oop_size(oop java_class);
356 static void set_oop_size(HeapWord* java_class, size_t size);
357 static int static_oop_field_count(oop java_class);
677
678 static void print_stack_element(outputStream *st, Method* method, int bci);
679
680 static void compute_offsets();
681 static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
682
683 // Allocate space for backtrace (created but stack trace not filled in)
684 static void allocate_backtrace(Handle throwable, TRAPS);
685 // Fill in current stack trace for throwable with preallocated backtrace (no GC)
686 static void fill_in_stack_trace_of_preallocated_backtrace(Handle throwable);
687 // Fill in current stack trace, can cause GC
688 static void fill_in_stack_trace(Handle throwable, const methodHandle& method, TRAPS);
689 static void fill_in_stack_trace(Handle throwable, const methodHandle& method = methodHandle());
690
691 // Programmatic access to stack trace
692 static void get_stack_trace_elements(int depth, Handle backtrace, objArrayHandle stack_trace, TRAPS);
693
694 // For recreating class initialization error exceptions.
695 static Handle create_initialization_error(JavaThread* current, Handle throwable);
696
697 static oop create_exception_instance(Symbol* class_name, TRAPS);
698
699 // Printing
700 static void print(oop throwable, outputStream* st);
701 static void print_stack_trace(Handle throwable, outputStream* st);
702 static void java_printStackTrace(Handle throwable, TRAPS);
703 // Debugging
704 friend class JavaClasses;
705 // Gets the method and bci of the top frame (TOS). Returns false if this failed.
706 static bool get_top_method_and_bci(oop throwable, Method** method, int* bci);
707 };
708
709
710 // Interface to java.lang.reflect.AccessibleObject objects
711
712 class java_lang_reflect_AccessibleObject: AllStatic {
713 private:
714 // Note that to reduce dependencies on the JDK we compute these
715 // offsets at run-time.
716 static int _override_offset;
717
718 static void compute_offsets();
|