166 |
166 |
167 #ifndef SERIALGC |
167 #ifndef SERIALGC |
168 void constantPoolCacheKlass::oop_push_contents(PSPromotionManager* pm, |
168 void constantPoolCacheKlass::oop_push_contents(PSPromotionManager* pm, |
169 oop obj) { |
169 oop obj) { |
170 assert(obj->is_constantPoolCache(), "should be constant pool"); |
170 assert(obj->is_constantPoolCache(), "should be constant pool"); |
171 if (EnableInvokeDynamic) { |
171 if (ScavengeRootsInCode) { |
172 constantPoolCacheOop cache = (constantPoolCacheOop)obj; |
172 constantPoolCacheOop cache = (constantPoolCacheOop)obj; |
173 // during a scavenge, it is safe to inspect my pool, since it is perm |
173 // during a scavenge, it is safe to inspect my pool, since it is perm |
174 constantPoolOop pool = cache->constant_pool(); |
174 constantPoolOop pool = cache->constant_pool(); |
175 assert(pool->is_constantPool(), "should be constant pool"); |
175 assert(pool->is_constantPool(), "should be constant pool"); |
176 if (pool->has_invokedynamic()) { |
176 for (int i = 0; i < cache->length(); i++) { |
177 for (int i = 0; i < cache->length(); i++) { |
177 ConstantPoolCacheEntry* e = cache->entry_at(i); |
178 ConstantPoolCacheEntry* e = cache->entry_at(i); |
178 oop* p = (oop*)&e->_f1; |
179 oop* p = (oop*)&e->_f1; |
179 if (PSScavenge::should_scavenge(p)) |
180 if (e->is_secondary_entry()) { |
180 pm->claim_or_forward_depth(p); |
181 if (PSScavenge::should_scavenge(p)) |
181 assert(!(e->is_vfinal() && PSScavenge::should_scavenge((oop*)&e->_f2)), |
182 pm->claim_or_forward_depth(p); |
182 "no live oops here"); |
183 assert(!(e->is_vfinal() && PSScavenge::should_scavenge((oop*)&e->_f2)), |
|
184 "no live oops here"); |
|
185 } |
|
186 } |
|
187 } |
183 } |
188 } |
184 } |
189 } |
185 } |
190 |
186 |
191 int |
187 int |