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