From 8bf41e44e7ffb124a1a7dee61a26bca4d627aae1 Mon Sep 17 00:00:00 2001 From: kgallowa Date: Thu, 8 Feb 2007 18:01:56 +0000 Subject: 2007-02-06 Kyle Galloway * include/java-interp.h (_Jv_InterpFrame): obj_ptr field added to hold "this" pointer for frame. (_Jv_InterpFrame::get_this_ptr): New method. * interpret-run.cc: Copy the "this" pointer into obj_ptr. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121717 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/include/java-interp.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libjava/include/java-interp.h') diff --git a/libjava/include/java-interp.h b/libjava/include/java-interp.h index ce2fac273c4..2b3ae7cd6f7 100644 --- a/libjava/include/java-interp.h +++ b/libjava/include/java-interp.h @@ -387,6 +387,9 @@ public: _Jv_word *locals; char *locals_type; + // Object pointer for this frame ("this") + jobject obj_ptr; + _Jv_InterpFrame (void *meth, java::lang::Thread *thr, jclass proxyCls = NULL) : _Jv_Frame (reinterpret_cast<_Jv_MethodBase *> (meth), thr, frame_interpreter) @@ -394,12 +397,18 @@ public: next_interp = (_Jv_InterpFrame *) thr->interp_frame; proxyClass = proxyCls; thr->interp_frame = (gnu::gcj::RawData *) this; + obj_ptr = NULL; } ~_Jv_InterpFrame () { thread->interp_frame = (gnu::gcj::RawData *) next_interp; } + + jobject get_this_ptr () + { + return obj_ptr; + } }; // A native frame in the call stack really just a placeholder -- cgit v1.2.1