189 st->print(" %s", obj->bool_field(offset()) ? "true" : "false");
190 break;
191 case T_ARRAY:
192 st->print(" ");
193 NOT_LP64(as_int = obj->int_field(offset()));
194 obj->obj_field(offset())->print_value_on(st);
195 break;
196 case T_OBJECT:
197 st->print(" ");
198 NOT_LP64(as_int = obj->int_field(offset()));
199 obj->obj_field(offset())->print_value_on(st);
200 break;
201 case T_VALUETYPE: {
202 // Resolve klass of flattened value type field
203 Thread* THREAD = Thread::current();
204 SignatureStream ss(signature(), false);
205 Klass* k = ss.as_klass(Handle(field_holder()->class_loader()), Handle(field_holder()->protection_domain()), SignatureStream::ReturnNull, THREAD);
206 assert(k != NULL && !HAS_PENDING_EXCEPTION, "can resolve klass?");
207 ValueKlass* vk = ValueKlass::cast(k);
208 int field_offset = offset() - vk->first_field_offset();
209 obj = (oop)((uintptr_t)obj + field_offset);
210 // Print flattened fields of the value type field
211 st->print_cr("Flattened value type '%s':", vk->name()->as_C_string());
212 FieldPrinter print_field(st, obj);
213 vk->do_nonstatic_fields(&print_field);
214 return; // Do not print underlying representation
215 }
216 default:
217 ShouldNotReachHere();
218 break;
219 }
220 // Print a hint as to the underlying integer representation. This can be wrong for
221 // pointers on an LP64 machine
222 if (ft == T_LONG || ft == T_DOUBLE LP64_ONLY(|| !is_java_primitive(ft)) ) {
223 st->print(" (%x %x)", obj->int_field(offset()), obj->int_field(offset()+sizeof(jint)));
224 } else if (as_int < 0 || as_int > 9) {
225 st->print(" (%x)", as_int);
226 }
227 st->cr();
228 }
229
|
189 st->print(" %s", obj->bool_field(offset()) ? "true" : "false");
190 break;
191 case T_ARRAY:
192 st->print(" ");
193 NOT_LP64(as_int = obj->int_field(offset()));
194 obj->obj_field(offset())->print_value_on(st);
195 break;
196 case T_OBJECT:
197 st->print(" ");
198 NOT_LP64(as_int = obj->int_field(offset()));
199 obj->obj_field(offset())->print_value_on(st);
200 break;
201 case T_VALUETYPE: {
202 // Resolve klass of flattened value type field
203 Thread* THREAD = Thread::current();
204 SignatureStream ss(signature(), false);
205 Klass* k = ss.as_klass(Handle(field_holder()->class_loader()), Handle(field_holder()->protection_domain()), SignatureStream::ReturnNull, THREAD);
206 assert(k != NULL && !HAS_PENDING_EXCEPTION, "can resolve klass?");
207 ValueKlass* vk = ValueKlass::cast(k);
208 int field_offset = offset() - vk->first_field_offset();
209 obj = (oop)((address)obj + field_offset);
210 // Print flattened fields of the value type field
211 st->print_cr("Flattened value type '%s':", vk->name()->as_C_string());
212 FieldPrinter print_field(st, obj);
213 vk->do_nonstatic_fields(&print_field);
214 return; // Do not print underlying representation
215 }
216 default:
217 ShouldNotReachHere();
218 break;
219 }
220 // Print a hint as to the underlying integer representation. This can be wrong for
221 // pointers on an LP64 machine
222 if (ft == T_LONG || ft == T_DOUBLE LP64_ONLY(|| !is_java_primitive(ft)) ) {
223 st->print(" (%x %x)", obj->int_field(offset()), obj->int_field(offset()+sizeof(jint)));
224 } else if (as_int < 0 || as_int > 9) {
225 st->print(" (%x)", as_int);
226 }
227 st->cr();
228 }
229
|