classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cp-patches] Some VMStackWalker cleanups/simplifications


From: Jeroen Frijters
Subject: RE: [cp-patches] Some VMStackWalker cleanups/simplifications
Date: Mon, 17 Jan 2005 00:07:35 +0100

Mark Wielaard wrote:
> Right. It isn't needed for the Method.invoke() case, but the default
> implementation got this wrong so this fix was also included. The Class
> parameter is needed for those cases where the call stack depth is not
> precisely know, either because the call was made through some other
> method or class, the call was inlined by the compiler or runtime or
> because the runtime actually implements these methods by calling other
> classes written in java again (kaffe and jikesrvm do this for 
> example).

There is nothing in the existing interface that prevents these VMs from
working. I strongly object to making these incredibly lame changes, just
to make it a little easier for them.

> The Class parameter is fixed at each callsite so shouldn't 
> add any real overhead.

Of course it adds overhead, especially with a 1.4 compiler.

> A runtime is encouraged to implement all three VMStackWalker
> methods as efficiently as possible. Using the Class parameter should
> help in making it more efficient and robust since you don't have to
> depend on the current call stack depth. I'll add this to the
> documentation.

Adding a Class parameter does not help at all. In fact, it's trivial for
a VM to add this parameter automatically, if it feels it needs this. Of
course, I can also make my JIT remove it, but it seems unfair that the
good have to suffer because of the bad.

Regards,
Jeroen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]