equal
deleted
inserted
replaced
246 } |
246 } |
247 |
247 |
248 } else if ((lf = x->array()->as_LoadField()) != NULL) { |
248 } else if ((lf = x->array()->as_LoadField()) != NULL) { |
249 ciField* field = lf->field(); |
249 ciField* field = lf->field(); |
250 if (field->is_static_constant()) { |
250 if (field->is_static_constant()) { |
251 assert(PatchALot || ScavengeRootsInCode < 2, "Constant field loads are folded during parsing"); |
251 // Constant field loads are usually folded during parsing. |
|
252 // But it doesn't happen with PatchALot, ScavengeRootsInCode < 2, or when |
|
253 // holder class is being initialized during parsing (for static fields). |
252 ciObject* c = field->constant_value().as_object(); |
254 ciObject* c = field->constant_value().as_object(); |
253 if (!c->is_null_object()) { |
255 if (!c->is_null_object()) { |
254 set_constant(c->as_array()->length()); |
256 set_constant(c->as_array()->length()); |
255 } |
257 } |
256 } |
258 } |