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);
676
677 static void print_stack_element(outputStream *st, Method* method, int bci);
678
679 static void compute_offsets();
680 static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
681
682 // Allocate space for backtrace (created but stack trace not filled in)
683 static void allocate_backtrace(Handle throwable, TRAPS);
684 // Fill in current stack trace for throwable with preallocated backtrace (no GC)
685 static void fill_in_stack_trace_of_preallocated_backtrace(Handle throwable);
686 // Fill in current stack trace, can cause GC
687 static void fill_in_stack_trace(Handle throwable, const methodHandle& method, TRAPS);
688 static void fill_in_stack_trace(Handle throwable, const methodHandle& method = methodHandle());
689
690 // Programmatic access to stack trace
691 static void get_stack_trace_elements(int depth, Handle backtrace, objArrayHandle stack_trace, TRAPS);
692
693 // For recreating class initialization error exceptions.
694 static Handle create_initialization_error(JavaThread* current, Handle throwable);
695
696 // Printing
697 static void print(oop throwable, outputStream* st);
698 static void print_stack_trace(Handle throwable, outputStream* st);
699 static void java_printStackTrace(Handle throwable, TRAPS);
700 // Debugging
701 friend class JavaClasses;
702 // Gets the method and bci of the top frame (TOS). Returns false if this failed.
703 static bool get_top_method_and_bci(oop throwable, Method** method, int* bci);
704 };
705
706
707 // Interface to java.lang.reflect.AccessibleObject objects
708
709 class java_lang_reflect_AccessibleObject: AllStatic {
710 private:
711 // Note that to reduce dependencies on the JDK we compute these
712 // offsets at run-time.
713 static int _override_offset;
714
715 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);
679
680 static void print_stack_element(outputStream *st, Method* method, int bci);
681
682 static void compute_offsets();
683 static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
684
685 // Allocate space for backtrace (created but stack trace not filled in)
686 static void allocate_backtrace(Handle throwable, TRAPS);
687 // Fill in current stack trace for throwable with preallocated backtrace (no GC)
688 static void fill_in_stack_trace_of_preallocated_backtrace(Handle throwable);
689 // Fill in current stack trace, can cause GC
690 static void fill_in_stack_trace(Handle throwable, const methodHandle& method, TRAPS);
691 static void fill_in_stack_trace(Handle throwable, const methodHandle& method = methodHandle());
692
693 // Programmatic access to stack trace
694 static void get_stack_trace_elements(int depth, Handle backtrace, objArrayHandle stack_trace, TRAPS);
695
696 // For recreating class initialization error exceptions.
697 static Handle create_initialization_error(JavaThread* current, Handle throwable);
698
699 static oop create_exception_instance(Symbol* class_name, TRAPS);
700
701 // Printing
702 static void print(oop throwable, outputStream* st);
703 static void print_stack_trace(Handle throwable, outputStream* st);
704 static void java_printStackTrace(Handle throwable, TRAPS);
705 // Debugging
706 friend class JavaClasses;
707 // Gets the method and bci of the top frame (TOS). Returns false if this failed.
708 static bool get_top_method_and_bci(oop throwable, Method** method, int* bci);
709 };
710
711
712 // Interface to java.lang.reflect.AccessibleObject objects
713
714 class java_lang_reflect_AccessibleObject: AllStatic {
715 private:
716 // Note that to reduce dependencies on the JDK we compute these
717 // offsets at run-time.
718 static int _override_offset;
719
720 static void compute_offsets();
|