--- a/hotspot/src/share/vm/prims/jvmtiImpl.hpp Thu Dec 09 17:53:22 2010 +0300
+++ b/hotspot/src/share/vm/prims/jvmtiImpl.hpp Thu Dec 09 15:04:26 2010 -0500
@@ -355,7 +355,7 @@
// to the thread simultaneously.
//
class VM_GetOrSetLocal : public VM_Operation {
-private:
+ protected:
JavaThread* _thread;
JavaThread* _calling_thread;
jint _depth;
@@ -365,6 +365,10 @@
javaVFrame* _jvf;
bool _set;
+ // It is possible to get the receiver out of a non-static native wrapper
+ // frame. Use VM_GetReceiver to do this.
+ virtual bool getting_receiver() const { return false; }
+
jvmtiError _result;
vframe* get_vframe();
@@ -395,6 +399,15 @@
static bool is_assignable(const char* ty_sign, Klass* klass, Thread* thread);
};
+class VM_GetReceiver : public VM_GetOrSetLocal {
+ protected:
+ virtual bool getting_receiver() const { return true; }
+
+ public:
+ VM_GetReceiver(JavaThread* thread, JavaThread* calling_thread, jint depth);
+ const char* name() const { return "get receiver"; }
+};
+
///////////////////////////////////////////////////////////////
//