libgcj merging and VMStackWalker
Jeroen Frijters
jeroen@sumatra.nl
Tue May 16 07:30:00 GMT 2006
Bryce McKinlay wrote:
> GetCallingClass(Class) is intended for situations where you
> really want the caller of an external API into the class,
> but due to overloaded methods or inlining may have an
> indeterminate number of frames between the external method
> and the site at which GetCallingClass() is called.
> java.lang.reflect and ResourceBundle are two examples where
> it is useful - we never want ResourceBundle.class or
> Field.class, for example, to be returned there.
None of the above really applies to VMStackWalker.getCallingClass(). It
has well defined semantics and requires no hacks or workarounds, only a
VM that can reliably walk the stack (i.e. know which frames are non-Java
and prevent inlining from losing frames).
If gcj cannot reliably walk the stack at the moment, I suggest modifying
the code generator to add the class argument to the
VMStackWalker.getCallingClass(), instead of muddling up the VM interface
with that.
Regards,
Jeroen
More information about the Java
mailing list