comparison src/share/vm/runtime/frame.cpp @ 2023:54f5dd2aa1d9

Merge
author zgu
date Sat, 11 Dec 2010 13:46:36 -0500
parents 2d4762ec74af 09b4dd4f152b
children 8012aa3ccede
comparison
equal deleted inserted replaced
2022:2d4762ec74af 2023:54f5dd2aa1d9
1071 int sp_offset_in_bytes = reg->reg2stack() * VMRegImpl::stack_slot_size; 1071 int sp_offset_in_bytes = reg->reg2stack() * VMRegImpl::stack_slot_size;
1072 return (oop*)(((address)unextended_sp()) + sp_offset_in_bytes); 1072 return (oop*)(((address)unextended_sp()) + sp_offset_in_bytes);
1073 } 1073 }
1074 } 1074 }
1075 1075
1076 BasicLock* frame::compiled_synchronized_native_monitor(nmethod* nm) { 1076 BasicLock* frame::get_native_monitor() {
1077 if (nm == NULL) { 1077 nmethod* nm = (nmethod*)_cb;
1078 assert(_cb != NULL && _cb->is_nmethod() && 1078 assert(_cb != NULL && _cb->is_nmethod() && nm->method()->is_native(),
1079 nm->method()->is_native() && 1079 "Should not call this unless it's a native nmethod");
1080 nm->method()->is_synchronized(), 1080 int byte_offset = in_bytes(nm->native_basic_lock_sp_offset());
1081 "should not call this otherwise");
1082 nm = (nmethod*) _cb;
1083 }
1084 int byte_offset = in_bytes(nm->compiled_synchronized_native_basic_lock_sp_offset());
1085 assert(byte_offset >= 0, "should not see invalid offset"); 1081 assert(byte_offset >= 0, "should not see invalid offset");
1086 return (BasicLock*) &sp()[byte_offset / wordSize]; 1082 return (BasicLock*) &sp()[byte_offset / wordSize];
1087 } 1083 }
1088 1084
1089 oop frame::compiled_synchronized_native_monitor_owner(nmethod* nm) { 1085 oop frame::get_native_receiver() {
1090 if (nm == NULL) { 1086 nmethod* nm = (nmethod*)_cb;
1091 assert(_cb != NULL && _cb->is_nmethod() && 1087 assert(_cb != NULL && _cb->is_nmethod() && nm->method()->is_native(),
1092 nm->method()->is_native() && 1088 "Should not call this unless it's a native nmethod");
1093 nm->method()->is_synchronized(), 1089 int byte_offset = in_bytes(nm->native_receiver_sp_offset());
1094 "should not call this otherwise");
1095 nm = (nmethod*) _cb;
1096 }
1097 int byte_offset = in_bytes(nm->compiled_synchronized_native_basic_lock_owner_sp_offset());
1098 assert(byte_offset >= 0, "should not see invalid offset"); 1090 assert(byte_offset >= 0, "should not see invalid offset");
1099 oop owner = ((oop*) sp())[byte_offset / wordSize]; 1091 oop owner = ((oop*) sp())[byte_offset / wordSize];
1100 assert( Universe::heap()->is_in(owner), "bad receiver" ); 1092 assert( Universe::heap()->is_in(owner), "bad receiver" );
1101 return owner; 1093 return owner;
1102 } 1094 }