< prev index next >

src/hotspot/share/code/debugInfo.cpp

Print this page




 217 
 218 void ConstantOopWriteValue::write_on(DebugInfoWriteStream* stream) {
 219 #ifdef ASSERT
 220   {
 221     // cannot use ThreadInVMfromNative here since in case of JVMCI compiler,
 222     // thread is already in VM state.
 223     ThreadInVMfromUnknown tiv;
 224     assert(JNIHandles::resolve(value()) == NULL ||
 225            Universe::heap()->is_in_reserved(JNIHandles::resolve(value())),
 226            "Should be in heap");
 227  }
 228 #endif
 229   stream->write_int(CONSTANT_OOP_CODE);
 230   stream->write_handle(value());
 231 }
 232 
 233 void ConstantOopWriteValue::print_on(outputStream* st) const {
 234   // using ThreadInVMfromUnknown here since in case of JVMCI compiler,
 235   // thread is already in VM state.
 236   ThreadInVMfromUnknown tiv;
 237   JNIHandles::resolve(value())->print_value_on(st);
 238 }
 239 
 240 
 241 // ConstantOopReadValue
 242 
 243 ConstantOopReadValue::ConstantOopReadValue(DebugInfoReadStream* stream) {
 244   _value = Handle(Thread::current(), stream->read_oop());
 245   assert(_value() == NULL ||
 246          Universe::heap()->is_in_reserved(_value()), "Should be in heap");
 247 }
 248 
 249 void ConstantOopReadValue::write_on(DebugInfoWriteStream* stream) {
 250   ShouldNotReachHere();
 251 }
 252 
 253 void ConstantOopReadValue::print_on(outputStream* st) const {
 254   value()()->print_value_on(st);
 255 }
 256 
 257 
 258 // MonitorValue
 259 
 260 MonitorValue::MonitorValue(ScopeValue* owner, Location basic_lock, bool eliminated) {
 261   _owner       = owner;
 262   _basic_lock  = basic_lock;
 263   _eliminated  = eliminated;
 264 }
 265 
 266 MonitorValue::MonitorValue(DebugInfoReadStream* stream) {
 267   _basic_lock  = Location(stream);
 268   _owner       = ScopeValue::read_from(stream);
 269   _eliminated  = (stream->read_bool() != 0);
 270 }
 271 
 272 void MonitorValue::write_on(DebugInfoWriteStream* stream) {
 273   _basic_lock.write_on(stream);
 274   _owner->write_on(stream);


 217 
 218 void ConstantOopWriteValue::write_on(DebugInfoWriteStream* stream) {
 219 #ifdef ASSERT
 220   {
 221     // cannot use ThreadInVMfromNative here since in case of JVMCI compiler,
 222     // thread is already in VM state.
 223     ThreadInVMfromUnknown tiv;
 224     assert(JNIHandles::resolve(value()) == NULL ||
 225            Universe::heap()->is_in_reserved(JNIHandles::resolve(value())),
 226            "Should be in heap");
 227  }
 228 #endif
 229   stream->write_int(CONSTANT_OOP_CODE);
 230   stream->write_handle(value());
 231 }
 232 
 233 void ConstantOopWriteValue::print_on(outputStream* st) const {
 234   // using ThreadInVMfromUnknown here since in case of JVMCI compiler,
 235   // thread is already in VM state.
 236   ThreadInVMfromUnknown tiv;
 237   oopDesc::print_value_on(st, JNIHandles::resolve(value()));
 238 }
 239 
 240 
 241 // ConstantOopReadValue
 242 
 243 ConstantOopReadValue::ConstantOopReadValue(DebugInfoReadStream* stream) {
 244   _value = Handle(Thread::current(), stream->read_oop());
 245   assert(_value() == NULL ||
 246          Universe::heap()->is_in_reserved(_value()), "Should be in heap");
 247 }
 248 
 249 void ConstantOopReadValue::write_on(DebugInfoWriteStream* stream) {
 250   ShouldNotReachHere();
 251 }
 252 
 253 void ConstantOopReadValue::print_on(outputStream* st) const {
 254   oopDesc::print_value_on(st, value()());
 255 }
 256 
 257 
 258 // MonitorValue
 259 
 260 MonitorValue::MonitorValue(ScopeValue* owner, Location basic_lock, bool eliminated) {
 261   _owner       = owner;
 262   _basic_lock  = basic_lock;
 263   _eliminated  = eliminated;
 264 }
 265 
 266 MonitorValue::MonitorValue(DebugInfoReadStream* stream) {
 267   _basic_lock  = Location(stream);
 268   _owner       = ScopeValue::read_from(stream);
 269   _eliminated  = (stream->read_bool() != 0);
 270 }
 271 
 272 void MonitorValue::write_on(DebugInfoWriteStream* stream) {
 273   _basic_lock.write_on(stream);
 274   _owner->write_on(stream);
< prev index next >