Hey,

On Wed, Jun 30, 2010 at 8:39 PM, Gábor Kozár <[email protected]> wrote:
> Also, you're right about the generic arguments. Forgot those. :(
> Oh, and a bonus question. I have a problem with the callvirt instruction: it
> is late-bound. The problem is that I need the method that is actually called
> here. Is there a simple way of doing that? Right now what I have in mind is
> maintaining an evaluation stack for each method I process, pushing/popping
> values, as if the interpreter would do that, and when I come across a
> callvirt instruction, I just look at the type on the top of evaluation stack
> (skipping the parameters), and then I have the override method. However,
> this is going to be quite tough, considering that there are quite many
> instructions manipulating the evaluation stack (no wonder it's a stack-based
> language)... Any ideas?

That will work only for simple cases. There's no way for a static
analyzer to know what's only available at runtime.

-- 
Jb Evain  <[email protected]>

-- 
--
mono-cecil

Reply via email to