146 static oop _the_min_jint_string; // A cache of "-2147483648" as a Java string
147 static LatestMethodCache* _finalizer_register_cache; // static method for registering finalizable objects
148 static LatestMethodCache* _loader_addClass_cache; // method for registering loaded classes in class loader vector
149 static LatestMethodCache* _pd_implies_cache; // method for checking protection domain attributes
150 static LatestMethodCache* _throw_illegal_access_error_cache; // Unsafe.throwIllegalAccessError() method
151 static LatestMethodCache* _do_stack_walk_cache; // method for stack walker callback
152
153 // preallocated error objects (no backtrace)
154 static oop _out_of_memory_error_java_heap;
155 static oop _out_of_memory_error_metaspace;
156 static oop _out_of_memory_error_class_metaspace;
157 static oop _out_of_memory_error_array_size;
158 static oop _out_of_memory_error_gc_overhead_limit;
159 static oop _out_of_memory_error_realloc_objects;
160
161 // preallocated cause message for delayed StackOverflowError
162 static oop _delayed_stack_overflow_error_message;
163
164 static Array<int>* _the_empty_int_array; // Canonicalized int array
165 static Array<u2>* _the_empty_short_array; // Canonicalized short array
166 static Array<Klass*>* _the_empty_klass_array; // Canonicalized klass obj array
167 static Array<Method*>* _the_empty_method_array; // Canonicalized method obj array
168
169 static Array<Klass*>* _the_array_interfaces_array;
170
171 // array of preallocated error objects with backtrace
172 static objArrayOop _preallocated_out_of_memory_error_array;
173
174 // number of preallocated error objects available for use
175 static volatile jint _preallocated_out_of_memory_error_avail_count;
176
177 static oop _null_ptr_exception_instance; // preallocated exception object
178 static oop _arithmetic_exception_instance; // preallocated exception object
179 static oop _virtual_machine_error_instance; // preallocated exception object
180 // The object used as an exception dummy when exceptions are thrown for
181 // the vm thread.
182 static oop _vm_exception;
183
184 // References waiting to be transferred to the ReferenceHandler
185 static oop _reference_pending_list;
186
187 // The particular choice of collected heap.
344 static oop null_ptr_exception_instance() { return _null_ptr_exception_instance; }
345 static oop arithmetic_exception_instance() { return _arithmetic_exception_instance; }
346 static oop virtual_machine_error_instance() { return _virtual_machine_error_instance; }
347 static oop vm_exception() { return _vm_exception; }
348
349 // Reference pending list manipulation. Access is protected by
350 // Heap_lock. The getter, setter and predicate require the caller
351 // owns the lock. Swap is used by parallel non-concurrent reference
352 // processing threads, where some higher level controller owns
353 // Heap_lock, so requires the lock is locked, but not necessarily by
354 // the current thread.
355 static oop reference_pending_list();
356 static void set_reference_pending_list(oop list);
357 static bool has_reference_pending_list();
358 static oop swap_reference_pending_list(oop list);
359
360 static Array<int>* the_empty_int_array() { return _the_empty_int_array; }
361 static Array<u2>* the_empty_short_array() { return _the_empty_short_array; }
362 static Array<Method*>* the_empty_method_array() { return _the_empty_method_array; }
363 static Array<Klass*>* the_empty_klass_array() { return _the_empty_klass_array; }
364
365 // OutOfMemoryError support. Returns an error with the required message. The returned error
366 // may or may not have a backtrace. If error has a backtrace then the stack trace is already
367 // filled in.
368 static oop out_of_memory_error_java_heap() { return gen_out_of_memory_error(_out_of_memory_error_java_heap); }
369 static oop out_of_memory_error_metaspace() { return gen_out_of_memory_error(_out_of_memory_error_metaspace); }
370 static oop out_of_memory_error_class_metaspace() { return gen_out_of_memory_error(_out_of_memory_error_class_metaspace); }
371 static oop out_of_memory_error_array_size() { return gen_out_of_memory_error(_out_of_memory_error_array_size); }
372 static oop out_of_memory_error_gc_overhead_limit() { return gen_out_of_memory_error(_out_of_memory_error_gc_overhead_limit); }
373 static oop out_of_memory_error_realloc_objects() { return gen_out_of_memory_error(_out_of_memory_error_realloc_objects); }
374 static oop delayed_stack_overflow_error_message() { return _delayed_stack_overflow_error_message; }
375
376 // Accessors needed for fast allocation
377 static Klass** boolArrayKlassObj_addr() { return &_boolArrayKlassObj; }
378 static Klass** byteArrayKlassObj_addr() { return &_byteArrayKlassObj; }
379 static Klass** charArrayKlassObj_addr() { return &_charArrayKlassObj; }
380 static Klass** intArrayKlassObj_addr() { return &_intArrayKlassObj; }
381 static Klass** shortArrayKlassObj_addr() { return &_shortArrayKlassObj; }
382 static Klass** longArrayKlassObj_addr() { return &_longArrayKlassObj; }
383 static Klass** singleArrayKlassObj_addr() { return &_singleArrayKlassObj; }
|
146 static oop _the_min_jint_string; // A cache of "-2147483648" as a Java string
147 static LatestMethodCache* _finalizer_register_cache; // static method for registering finalizable objects
148 static LatestMethodCache* _loader_addClass_cache; // method for registering loaded classes in class loader vector
149 static LatestMethodCache* _pd_implies_cache; // method for checking protection domain attributes
150 static LatestMethodCache* _throw_illegal_access_error_cache; // Unsafe.throwIllegalAccessError() method
151 static LatestMethodCache* _do_stack_walk_cache; // method for stack walker callback
152
153 // preallocated error objects (no backtrace)
154 static oop _out_of_memory_error_java_heap;
155 static oop _out_of_memory_error_metaspace;
156 static oop _out_of_memory_error_class_metaspace;
157 static oop _out_of_memory_error_array_size;
158 static oop _out_of_memory_error_gc_overhead_limit;
159 static oop _out_of_memory_error_realloc_objects;
160
161 // preallocated cause message for delayed StackOverflowError
162 static oop _delayed_stack_overflow_error_message;
163
164 static Array<int>* _the_empty_int_array; // Canonicalized int array
165 static Array<u2>* _the_empty_short_array; // Canonicalized short array
166 static Array<Klass*>* _the_empty_klass_array; // Canonicalized klass array
167 static Array<InstanceKlass*>* _the_empty_instance_klass_array; // Canonicalized instance klass array
168 static Array<Method*>* _the_empty_method_array; // Canonicalized method array
169
170 static Array<Klass*>* _the_array_interfaces_array;
171
172 // array of preallocated error objects with backtrace
173 static objArrayOop _preallocated_out_of_memory_error_array;
174
175 // number of preallocated error objects available for use
176 static volatile jint _preallocated_out_of_memory_error_avail_count;
177
178 static oop _null_ptr_exception_instance; // preallocated exception object
179 static oop _arithmetic_exception_instance; // preallocated exception object
180 static oop _virtual_machine_error_instance; // preallocated exception object
181 // The object used as an exception dummy when exceptions are thrown for
182 // the vm thread.
183 static oop _vm_exception;
184
185 // References waiting to be transferred to the ReferenceHandler
186 static oop _reference_pending_list;
187
188 // The particular choice of collected heap.
345 static oop null_ptr_exception_instance() { return _null_ptr_exception_instance; }
346 static oop arithmetic_exception_instance() { return _arithmetic_exception_instance; }
347 static oop virtual_machine_error_instance() { return _virtual_machine_error_instance; }
348 static oop vm_exception() { return _vm_exception; }
349
350 // Reference pending list manipulation. Access is protected by
351 // Heap_lock. The getter, setter and predicate require the caller
352 // owns the lock. Swap is used by parallel non-concurrent reference
353 // processing threads, where some higher level controller owns
354 // Heap_lock, so requires the lock is locked, but not necessarily by
355 // the current thread.
356 static oop reference_pending_list();
357 static void set_reference_pending_list(oop list);
358 static bool has_reference_pending_list();
359 static oop swap_reference_pending_list(oop list);
360
361 static Array<int>* the_empty_int_array() { return _the_empty_int_array; }
362 static Array<u2>* the_empty_short_array() { return _the_empty_short_array; }
363 static Array<Method*>* the_empty_method_array() { return _the_empty_method_array; }
364 static Array<Klass*>* the_empty_klass_array() { return _the_empty_klass_array; }
365 static Array<InstanceKlass*>* the_empty_instance_klass_array() { return _the_empty_instance_klass_array; }
366
367 // OutOfMemoryError support. Returns an error with the required message. The returned error
368 // may or may not have a backtrace. If error has a backtrace then the stack trace is already
369 // filled in.
370 static oop out_of_memory_error_java_heap() { return gen_out_of_memory_error(_out_of_memory_error_java_heap); }
371 static oop out_of_memory_error_metaspace() { return gen_out_of_memory_error(_out_of_memory_error_metaspace); }
372 static oop out_of_memory_error_class_metaspace() { return gen_out_of_memory_error(_out_of_memory_error_class_metaspace); }
373 static oop out_of_memory_error_array_size() { return gen_out_of_memory_error(_out_of_memory_error_array_size); }
374 static oop out_of_memory_error_gc_overhead_limit() { return gen_out_of_memory_error(_out_of_memory_error_gc_overhead_limit); }
375 static oop out_of_memory_error_realloc_objects() { return gen_out_of_memory_error(_out_of_memory_error_realloc_objects); }
376 static oop delayed_stack_overflow_error_message() { return _delayed_stack_overflow_error_message; }
377
378 // Accessors needed for fast allocation
379 static Klass** boolArrayKlassObj_addr() { return &_boolArrayKlassObj; }
380 static Klass** byteArrayKlassObj_addr() { return &_byteArrayKlassObj; }
381 static Klass** charArrayKlassObj_addr() { return &_charArrayKlassObj; }
382 static Klass** intArrayKlassObj_addr() { return &_intArrayKlassObj; }
383 static Klass** shortArrayKlassObj_addr() { return &_shortArrayKlassObj; }
384 static Klass** longArrayKlassObj_addr() { return &_longArrayKlassObj; }
385 static Klass** singleArrayKlassObj_addr() { return &_singleArrayKlassObj; }
|