< prev index next >

src/hotspot/share/code/debugInfo.cpp

Print this page




 104   return result;
 105 }
 106 
 107 // LocationValue
 108 
 109 LocationValue::LocationValue(DebugInfoReadStream* stream) {
 110   _location = Location(stream);
 111 }
 112 
 113 void LocationValue::write_on(DebugInfoWriteStream* stream) {
 114   stream->write_int(LOCATION_CODE);
 115   location().write_on(stream);
 116 }
 117 
 118 void LocationValue::print_on(outputStream* st) const {
 119   location().print_on(st);
 120 }
 121 
 122 // ObjectValue
 123 




 124 void ObjectValue::read_object(DebugInfoReadStream* stream) {
 125   _klass = read_from(stream);
 126   assert(_klass->is_constant_oop(), "should be constant java mirror oop");
 127   int length = stream->read_int();
 128   for (int i = 0; i < length; i++) {
 129     ScopeValue* val = read_from(stream);
 130     _field_values.append(val);
 131   }
 132 }
 133 
 134 void ObjectValue::write_on(DebugInfoWriteStream* stream) {
 135   if (_visited) {
 136     stream->write_int(OBJECT_ID_CODE);
 137     stream->write_int(_id);
 138   } else {
 139     _visited = true;
 140     stream->write_int(OBJECT_CODE);
 141     stream->write_int(_id);
 142     _klass->write_on(stream);
 143     int length = _field_values.length();




 104   return result;
 105 }
 106 
 107 // LocationValue
 108 
 109 LocationValue::LocationValue(DebugInfoReadStream* stream) {
 110   _location = Location(stream);
 111 }
 112 
 113 void LocationValue::write_on(DebugInfoWriteStream* stream) {
 114   stream->write_int(LOCATION_CODE);
 115   location().write_on(stream);
 116 }
 117 
 118 void LocationValue::print_on(outputStream* st) const {
 119   location().print_on(st);
 120 }
 121 
 122 // ObjectValue
 123 
 124 void ObjectValue::set_value(oop value) {
 125   _value = Handle(Thread::current(), value);
 126 }
 127 
 128 void ObjectValue::read_object(DebugInfoReadStream* stream) {
 129   _klass = read_from(stream);
 130   assert(_klass->is_constant_oop(), "should be constant java mirror oop");
 131   int length = stream->read_int();
 132   for (int i = 0; i < length; i++) {
 133     ScopeValue* val = read_from(stream);
 134     _field_values.append(val);
 135   }
 136 }
 137 
 138 void ObjectValue::write_on(DebugInfoWriteStream* stream) {
 139   if (_visited) {
 140     stream->write_int(OBJECT_ID_CODE);
 141     stream->write_int(_id);
 142   } else {
 143     _visited = true;
 144     stream->write_int(OBJECT_CODE);
 145     stream->write_int(_id);
 146     _klass->write_on(stream);
 147     int length = _field_values.length();


< prev index next >