< prev index next >

src/hotspot/share/runtime/vframe_hp.cpp

Print this page
rev 53033 : imported patch at_scope


 235 
 236 
 237 compiledVFrame::compiledVFrame(const frame* fr, const RegisterMap* reg_map, JavaThread* thread, CompiledMethod* nm)
 238 : javaVFrame(fr, reg_map, thread) {
 239   _scope  = NULL;
 240   _vframe_id = 0;
 241   // Compiled method (native stub or Java code)
 242   // native wrappers have no scope data, it is implied
 243   if (!nm->is_compiled() || !nm->as_compiled_method()->is_native_method()) {
 244       _scope  = nm->scope_desc_at(_fr.pc());
 245   }
 246 }
 247 
 248 compiledVFrame::compiledVFrame(const frame* fr, const RegisterMap* reg_map, JavaThread* thread, ScopeDesc* scope, int vframe_id)
 249 : javaVFrame(fr, reg_map, thread) {
 250   _scope  = scope;
 251   _vframe_id = vframe_id;
 252   guarantee(_scope != NULL, "scope must be present");
 253 }
 254 








 255 
 256 bool compiledVFrame::is_top() const {
 257   // FIX IT: Remove this when new native stubs are in place
 258   if (scope() == NULL) return true;
 259   return scope()->is_top();
 260 }
 261 
 262 
 263 CompiledMethod* compiledVFrame::code() const {
 264   return CodeCache::find_compiled(_fr.pc());
 265 }
 266 
 267 
 268 Method* compiledVFrame::method() const {
 269   if (scope() == NULL) {
 270     // native nmethods have no scope the method is implied
 271     nmethod* nm = code()->as_nmethod();
 272     assert(nm->is_native_method(), "must be native");
 273     return nm->method();
 274   }




 235 
 236 
 237 compiledVFrame::compiledVFrame(const frame* fr, const RegisterMap* reg_map, JavaThread* thread, CompiledMethod* nm)
 238 : javaVFrame(fr, reg_map, thread) {
 239   _scope  = NULL;
 240   _vframe_id = 0;
 241   // Compiled method (native stub or Java code)
 242   // native wrappers have no scope data, it is implied
 243   if (!nm->is_compiled() || !nm->as_compiled_method()->is_native_method()) {
 244       _scope  = nm->scope_desc_at(_fr.pc());
 245   }
 246 }
 247 
 248 compiledVFrame::compiledVFrame(const frame* fr, const RegisterMap* reg_map, JavaThread* thread, ScopeDesc* scope, int vframe_id)
 249 : javaVFrame(fr, reg_map, thread) {
 250   _scope  = scope;
 251   _vframe_id = vframe_id;
 252   guarantee(_scope != NULL, "scope must be present");
 253 }
 254 
 255 compiledVFrame* compiledVFrame::at_scope(int decode_offset, int vframe_id) {
 256   if (scope()->decode_offset() != decode_offset) {
 257     ScopeDesc* scope = this->scope()->at_offset(decode_offset);
 258     return new compiledVFrame(frame_pointer(), register_map(), thread(), scope, vframe_id);
 259   }
 260   assert(_vframe_id == vframe_id, "wrong frame id");
 261   return this;
 262 }
 263 
 264 bool compiledVFrame::is_top() const {
 265   // FIX IT: Remove this when new native stubs are in place
 266   if (scope() == NULL) return true;
 267   return scope()->is_top();
 268 }
 269 
 270 
 271 CompiledMethod* compiledVFrame::code() const {
 272   return CodeCache::find_compiled(_fr.pc());
 273 }
 274 
 275 
 276 Method* compiledVFrame::method() const {
 277   if (scope() == NULL) {
 278     // native nmethods have no scope the method is implied
 279     nmethod* nm = code()->as_nmethod();
 280     assert(nm->is_native_method(), "must be native");
 281     return nm->method();
 282   }


< prev index next >