classpath
[Top][All Lists]
Advanced

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

RE: Query on stacktrace management logic


From: Jeroen Frijters
Subject: RE: Query on stacktrace management logic
Date: Sat, 13 Mar 2004 01:57:41 +0100

David Holmes wrote:
> > Since I seem to be the only one that actually wants a VMClass
> > instance, maybe we can agree on a slightly different interface.
> > How about keep a reference to a VMClass instance in Class, but
> > not calling any instance methods on VMClass, but using static
> > methods instead (always passing the Class reference along).
> 
> I don't understand the purpose of holding a reference to an 
> instance of a class that only has static methods invoked on it.

The reference implementation of VMClass will not have any instance
members, but VMs might choose to add instance state. However, after
thinking about it some more, I think it would be better to just add an
instance member to Class, called vmState (or whatever) of type Object.
That is more flexible (at the cost of additional downcasts).

The only overhead for you is the unused vmState reference field in each
Class instance.

Regards,
Jeroen




reply via email to

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