103 static OopHandle _system_thread_group; // Reference to the system thread group object
104
105 static OopHandle _the_empty_class_array; // Canonicalized obj array of type java.lang.Class
106 static OopHandle _the_null_string; // A cache of "null" as a Java string
107 static OopHandle _the_min_jint_string; // A cache of "-2147483648" as a Java string
108
109 static OopHandle _the_null_sentinel; // A unique object pointer unused except as a sentinel for null.
110
111 // preallocated error objects (no backtrace)
112 static OopHandle _out_of_memory_errors;
113 static OopHandle _class_init_stack_overflow_error;
114
115 // preallocated cause message for delayed StackOverflowError
116 static OopHandle _delayed_stack_overflow_error_message;
117
118 static LatestMethodCache* _finalizer_register_cache; // static method for registering finalizable objects
119 static LatestMethodCache* _loader_addClass_cache; // method for registering loaded classes in class loader vector
120 static LatestMethodCache* _throw_illegal_access_error_cache; // Unsafe.throwIllegalAccessError() method
121 static LatestMethodCache* _throw_no_such_method_error_cache; // Unsafe.throwNoSuchMethodError() method
122 static LatestMethodCache* _do_stack_walk_cache; // method for stack walker callback
123
124 static Array<int>* _the_empty_int_array; // Canonicalized int array
125 static Array<u2>* _the_empty_short_array; // Canonicalized short array
126 static Array<Klass*>* _the_empty_klass_array; // Canonicalized klass array
127 static Array<InstanceKlass*>* _the_empty_instance_klass_array; // Canonicalized instance klass array
128 static Array<Method*>* _the_empty_method_array; // Canonicalized method array
129
130 static Array<Klass*>* _the_array_interfaces_array;
131
132 // array of preallocated error objects with backtrace
133 static OopHandle _preallocated_out_of_memory_error_array;
134
135 // number of preallocated error objects available for use
136 static volatile jint _preallocated_out_of_memory_error_avail_count;
137
138 // preallocated message detail strings for error objects
139 static OopHandle _msg_metaspace;
140 static OopHandle _msg_class_metaspace;
141
142 static OopHandle _null_ptr_exception_instance; // preallocated exception object
143 static OopHandle _arithmetic_exception_instance; // preallocated exception object
144 static OopHandle _virtual_machine_error_instance; // preallocated exception object
145
146 // References waiting to be transferred to the ReferenceHandler
147 static OopHandle _reference_pending_list;
148
149 // The particular choice of collected heap.
150 static CollectedHeap* _collectedHeap;
151
152 static intptr_t _non_oop_bits;
153
154 // array of dummy objects used with +FullGCAlot
155 debug_only(static OopHandle _fullgc_alot_dummy_array;)
156 debug_only(static int _fullgc_alot_dummy_next;)
157
158 // Compiler/dispatch support
159 static int _base_vtable_size; // Java vtbl size of klass Object (in words)
160
161 // Initialization
162 static bool _bootstrapping; // true during genesis
163 static bool _module_initialized; // true after call_initPhase2 called
164 static bool _fully_initialized; // true after universe_init and initialize_vtables called
165
166 // the array of preallocated errors with backtraces
167 static objArrayOop preallocated_out_of_memory_errors();
168
169 static objArrayOop out_of_memory_errors();
170 // generate an out of memory error; if possible using an error with preallocated backtrace;
171 // otherwise return the given default error.
172 static oop gen_out_of_memory_error(oop default_err);
173
257
258 static objArrayOop the_empty_class_array ();
259
260 static oop the_null_string();
261 static oop the_min_jint_string();
262
263 static oop null_ptr_exception_instance();
264 static oop arithmetic_exception_instance();
265 static oop virtual_machine_error_instance();
266 static oop vm_exception() { return virtual_machine_error_instance(); }
267
268 static Array<Klass*>* the_array_interfaces_array() { return _the_array_interfaces_array; }
269 static Method* finalizer_register_method() { return _finalizer_register_cache->get_method(); }
270 static Method* loader_addClass_method() { return _loader_addClass_cache->get_method(); }
271
272 static Method* throw_illegal_access_error() { return _throw_illegal_access_error_cache->get_method(); }
273 static Method* throw_no_such_method_error() { return _throw_no_such_method_error_cache->get_method(); }
274
275 static Method* do_stack_walk_method() { return _do_stack_walk_cache->get_method(); }
276
277 static oop the_null_sentinel();
278 static address the_null_sentinel_addr() { return (address) &_the_null_sentinel; }
279
280 // Function to initialize these
281 static void initialize_known_methods(TRAPS);
282
283 static void create_preallocated_out_of_memory_errors(TRAPS);
284
285 // Reference pending list manipulation. Access is protected by
286 // Heap_lock. The getter, setter and predicate require the caller
287 // owns the lock. Swap is used by parallel non-concurrent reference
288 // processing threads, where some higher level controller owns
289 // Heap_lock, so requires the lock is locked, but not necessarily by
290 // the current thread.
291 static oop reference_pending_list();
292 static void clear_reference_pending_list();
293 static bool has_reference_pending_list();
294 static oop swap_reference_pending_list(oop list);
295
296 static Array<int>* the_empty_int_array() { return _the_empty_int_array; }
|
103 static OopHandle _system_thread_group; // Reference to the system thread group object
104
105 static OopHandle _the_empty_class_array; // Canonicalized obj array of type java.lang.Class
106 static OopHandle _the_null_string; // A cache of "null" as a Java string
107 static OopHandle _the_min_jint_string; // A cache of "-2147483648" as a Java string
108
109 static OopHandle _the_null_sentinel; // A unique object pointer unused except as a sentinel for null.
110
111 // preallocated error objects (no backtrace)
112 static OopHandle _out_of_memory_errors;
113 static OopHandle _class_init_stack_overflow_error;
114
115 // preallocated cause message for delayed StackOverflowError
116 static OopHandle _delayed_stack_overflow_error_message;
117
118 static LatestMethodCache* _finalizer_register_cache; // static method for registering finalizable objects
119 static LatestMethodCache* _loader_addClass_cache; // method for registering loaded classes in class loader vector
120 static LatestMethodCache* _throw_illegal_access_error_cache; // Unsafe.throwIllegalAccessError() method
121 static LatestMethodCache* _throw_no_such_method_error_cache; // Unsafe.throwNoSuchMethodError() method
122 static LatestMethodCache* _do_stack_walk_cache; // method for stack walker callback
123 static LatestMethodCache* _is_substitutable_cache; // ValueObjectMethods.isSubstitutable() method
124 static LatestMethodCache* _value_object_hash_code_cache; // ValueObjectMethods.valueObjectHashCode() method
125
126 static Array<int>* _the_empty_int_array; // Canonicalized int array
127 static Array<u2>* _the_empty_short_array; // Canonicalized short array
128 static Array<Klass*>* _the_empty_klass_array; // Canonicalized klass array
129 static Array<InstanceKlass*>* _the_empty_instance_klass_array; // Canonicalized instance klass array
130 static Array<Method*>* _the_empty_method_array; // Canonicalized method array
131
132 static Array<Klass*>* _the_array_interfaces_array;
133
134 // array of preallocated error objects with backtrace
135 static OopHandle _preallocated_out_of_memory_error_array;
136
137 // number of preallocated error objects available for use
138 static volatile jint _preallocated_out_of_memory_error_avail_count;
139
140 // preallocated message detail strings for error objects
141 static OopHandle _msg_metaspace;
142 static OopHandle _msg_class_metaspace;
143
144 static OopHandle _null_ptr_exception_instance; // preallocated exception object
145 static OopHandle _arithmetic_exception_instance; // preallocated exception object
146 static OopHandle _virtual_machine_error_instance; // preallocated exception object
147
148 // References waiting to be transferred to the ReferenceHandler
149 static OopHandle _reference_pending_list;
150
151 // The particular choice of collected heap.
152 static CollectedHeap* _collectedHeap;
153
154 static intptr_t _non_oop_bits;
155
156
157 // array of dummy objects used with +FullGCAlot
158 debug_only(static OopHandle _fullgc_alot_dummy_array;)
159 debug_only(static int _fullgc_alot_dummy_next;)
160
161 // Compiler/dispatch support
162 static int _base_vtable_size; // Java vtbl size of klass Object (in words)
163
164 // Initialization
165 static bool _bootstrapping; // true during genesis
166 static bool _module_initialized; // true after call_initPhase2 called
167 static bool _fully_initialized; // true after universe_init and initialize_vtables called
168
169 // the array of preallocated errors with backtraces
170 static objArrayOop preallocated_out_of_memory_errors();
171
172 static objArrayOop out_of_memory_errors();
173 // generate an out of memory error; if possible using an error with preallocated backtrace;
174 // otherwise return the given default error.
175 static oop gen_out_of_memory_error(oop default_err);
176
260
261 static objArrayOop the_empty_class_array ();
262
263 static oop the_null_string();
264 static oop the_min_jint_string();
265
266 static oop null_ptr_exception_instance();
267 static oop arithmetic_exception_instance();
268 static oop virtual_machine_error_instance();
269 static oop vm_exception() { return virtual_machine_error_instance(); }
270
271 static Array<Klass*>* the_array_interfaces_array() { return _the_array_interfaces_array; }
272 static Method* finalizer_register_method() { return _finalizer_register_cache->get_method(); }
273 static Method* loader_addClass_method() { return _loader_addClass_cache->get_method(); }
274
275 static Method* throw_illegal_access_error() { return _throw_illegal_access_error_cache->get_method(); }
276 static Method* throw_no_such_method_error() { return _throw_no_such_method_error_cache->get_method(); }
277
278 static Method* do_stack_walk_method() { return _do_stack_walk_cache->get_method(); }
279
280 static Method* is_substitutable_method() { return _is_substitutable_cache->get_method(); }
281 static Method* value_object_hash_code_method() { return _value_object_hash_code_cache->get_method(); }
282
283 static oop the_null_sentinel();
284 static address the_null_sentinel_addr() { return (address) &_the_null_sentinel; }
285
286 // Function to initialize these
287 static void initialize_known_methods(TRAPS);
288
289 static void create_preallocated_out_of_memory_errors(TRAPS);
290
291 // Reference pending list manipulation. Access is protected by
292 // Heap_lock. The getter, setter and predicate require the caller
293 // owns the lock. Swap is used by parallel non-concurrent reference
294 // processing threads, where some higher level controller owns
295 // Heap_lock, so requires the lock is locked, but not necessarily by
296 // the current thread.
297 static oop reference_pending_list();
298 static void clear_reference_pending_list();
299 static bool has_reference_pending_list();
300 static oop swap_reference_pending_list(oop list);
301
302 static Array<int>* the_empty_int_array() { return _the_empty_int_array; }
|