Mercurial > hg > truffle
diff src/share/vm/runtime/frame.cpp @ 2019:09b4dd4f152b
7004582: Add GetThisObject() function to JVMTI 1.2
Summary: Add 'GetThisObject' function
Reviewed-by: never, coleenp
author | kamg |
---|---|
date | Thu, 09 Dec 2010 15:04:26 -0500 |
parents | f95d63e2154a |
children | 54f5dd2aa1d9 |
line wrap: on
line diff
--- a/src/share/vm/runtime/frame.cpp Thu Dec 09 17:53:22 2010 +0300 +++ b/src/share/vm/runtime/frame.cpp Thu Dec 09 15:04:26 2010 -0500 @@ -1071,28 +1071,20 @@ } } -BasicLock* frame::compiled_synchronized_native_monitor(nmethod* nm) { - if (nm == NULL) { - assert(_cb != NULL && _cb->is_nmethod() && - nm->method()->is_native() && - nm->method()->is_synchronized(), - "should not call this otherwise"); - nm = (nmethod*) _cb; - } - int byte_offset = in_bytes(nm->compiled_synchronized_native_basic_lock_sp_offset()); +BasicLock* frame::get_native_monitor() { + nmethod* nm = (nmethod*)_cb; + assert(_cb != NULL && _cb->is_nmethod() && nm->method()->is_native(), + "Should not call this unless it's a native nmethod"); + int byte_offset = in_bytes(nm->native_basic_lock_sp_offset()); assert(byte_offset >= 0, "should not see invalid offset"); return (BasicLock*) &sp()[byte_offset / wordSize]; } -oop frame::compiled_synchronized_native_monitor_owner(nmethod* nm) { - if (nm == NULL) { - assert(_cb != NULL && _cb->is_nmethod() && - nm->method()->is_native() && - nm->method()->is_synchronized(), - "should not call this otherwise"); - nm = (nmethod*) _cb; - } - int byte_offset = in_bytes(nm->compiled_synchronized_native_basic_lock_owner_sp_offset()); +oop frame::get_native_receiver() { + nmethod* nm = (nmethod*)_cb; + assert(_cb != NULL && _cb->is_nmethod() && nm->method()->is_native(), + "Should not call this unless it's a native nmethod"); + int byte_offset = in_bytes(nm->native_receiver_sp_offset()); assert(byte_offset >= 0, "should not see invalid offset"); oop owner = ((oop*) sp())[byte_offset / wordSize]; assert( Universe::heap()->is_in(owner), "bad receiver" );