comparison src/share/vm/oops/constantPoolOop.hpp @ 1144:9b9c1ee9b3f6

Merge
author iveresov
date Wed, 06 Jan 2010 22:21:39 -0800
parents dd57230ba8fe
children c18cbe5936b8 ab102d5d923e
comparison
equal deleted inserted replaced
1129:a5a6adfca6ec 1144:9b9c1ee9b3f6
189 // marking thread before the tag was updated, redirty the card. 189 // marking thread before the tag was updated, redirty the card.
190 oop_store_without_check((volatile oop *)obj_at_addr(which), str); 190 oop_store_without_check((volatile oop *)obj_at_addr(which), str);
191 } 191 }
192 } 192 }
193 193
194 void object_at_put(int which, oop str) {
195 oop_store((volatile oop*) obj_at_addr(which), str);
196 release_tag_at_put(which, JVM_CONSTANT_Object);
197 if (UseConcMarkSweepGC) {
198 // In case the earlier card-mark was consumed by a concurrent
199 // marking thread before the tag was updated, redirty the card.
200 oop_store_without_check((volatile oop*) obj_at_addr(which), str);
201 }
202 }
203
194 // For temporary use while constructing constant pool 204 // For temporary use while constructing constant pool
195 void string_index_at_put(int which, int string_index) { 205 void string_index_at_put(int which, int string_index) {
196 tag_at_put(which, JVM_CONSTANT_StringIndex); 206 tag_at_put(which, JVM_CONSTANT_StringIndex);
197 *int_at_addr(which) = string_index; 207 *int_at_addr(which) = string_index;
198 } 208 }
226 constantTag tag = tag_at(which); 236 constantTag tag = tag_at(which);
227 return tag.is_klass() || 237 return tag.is_klass() ||
228 tag.is_unresolved_klass() || 238 tag.is_unresolved_klass() ||
229 tag.is_symbol() || 239 tag.is_symbol() ||
230 tag.is_unresolved_string() || 240 tag.is_unresolved_string() ||
231 tag.is_string(); 241 tag.is_string() ||
242 tag.is_object();
232 } 243 }
233 244
234 // Fetching constants 245 // Fetching constants
235 246
236 klassOop klass_at(int which, TRAPS) { 247 klassOop klass_at(int which, TRAPS) {
287 } 298 }
288 299
289 oop string_at(int which, TRAPS) { 300 oop string_at(int which, TRAPS) {
290 constantPoolHandle h_this(THREAD, this); 301 constantPoolHandle h_this(THREAD, this);
291 return string_at_impl(h_this, which, CHECK_NULL); 302 return string_at_impl(h_this, which, CHECK_NULL);
303 }
304
305 oop object_at(int which) {
306 assert(tag_at(which).is_object(), "Corrupted constant pool");
307 return *obj_at_addr(which);
292 } 308 }
293 309
294 // A "pseudo-string" is an non-string oop that has found is way into 310 // A "pseudo-string" is an non-string oop that has found is way into
295 // a String entry. 311 // a String entry.
296 // Under AnonymousClasses this can happen if the user patches a live 312 // Under AnonymousClasses this can happen if the user patches a live