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