[Top][All Lists]

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

[Pnet-developers] Getting method slots for classes

From: Gopal V
Subject: [Pnet-developers] Getting method slots for classes
Date: Sat, 10 May 2003 13:07:09 +0530
User-agent: Mutt/1.2.5i

Hello All,
        Suppose I want to lookup a particular virtual method in a class .
And I don't just need the newslot declaration (cscc gets away with
callvirt orginal virtual method) , I need the latest override in the
class heirarchy.

I'll explain where I need this ... in Type.GetMethod() which is 
currently giving multiple entries of the same method , but if I
filter out virtual overrides , I get the wrong method to invoke !

The runtime while invocations gets away with it as it needs only 
1 method and can exit as soon as it discovers one ... but in this
case I need to report ambiguity if any later on into the hierarchy.

Other than filtering the final list using inheritance precedence 
and ILOverride stuff there seems no way out now ?. But since these 
things are supposed to be slotted in the bytecode or something , I 
sort of thought if the method slot number can be obtained ?.

ie while traversing down , ignore members which had the same slot 
number as the list ...

The best case scenario will be a real life array which I can traverse
and pick up the members by offset ... (this could be generated at class 
load time) ..

Any comments ?

The difference between insanity and genius is measured by success

reply via email to

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