Interfaces

Derek L Davies ddavies at world.std.com
Mon Feb 7 14:04:00 PST 2000


Jason Baker <jbaker at cs.utah.edu> writes:
> Patrick Tullmann <tullmann at cs.utah.edu> writes:
> > Derek L Davies wrote:
> > > But JavaVM is a singleton as well and does have a 'this' pointer.  I
> > > guess maybe it's not really necessary in JavaVM then either, but was
> > > included anyway?
> > 
> > Its always easier to wrap a flexible interface an present it as a less 
> > flexible one, so I suggest going with the 'this' pointer approach.  If 
> > it turns out that all the JVMDI code in the world is written to the
> > singleton, no-this-pointer approach it should be pretty easy to wrap.
> > Going the other way is much harder, I think.
> > 
> What do you mean if it turns out?  All the JVMDI code in the world IS
> written the singleton, no-this-pointer way, because that is how the
> spec IS defined and implemented by Sun.  

Ah.  Point taken.  I was trying to verify that it really was so (in
Suns implementation) and you've done that so thanks.  Thanks also for
supplying the test code!  I will either wrap the 'this' method or just
remove it.  Regardless I will insure that your (and Suns, and
"codeguru", etc ;-) code runs.  I wasn't sure how far along the JVMDI
spec was.  It's seems a shame though, since the 'this' approach
appears to be technically superior.  I've been betamaxed! ;-)


More information about the kaffe mailing list