[Top][All Lists]

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

Re: [DotGNU]callvirt change to cscc

From: Gopal V
Subject: Re: [DotGNU]callvirt change to cscc
Date: Fri, 15 Nov 2002 13:15:39 +0530
User-agent: Mutt/1.2.5i

If memory serves me right, Rhys Weatherley wrote:
> I just changed cscc and ilrun to use "callvirt" instructions for
> non-virtual instance methods, as all the other C# compilers do that.
> (Personally, I think the previous behaviour was better).

Appeal to ECMA to rename call to callstatic ? ....

IIRC this is very similar to Java's invokestatic and invokevirtual ...
But ECMA should name it correctly...

> This change will cause calls on instance methods to always throw
> NullReferenceException when null is supplied as "this", even if
> the method isn't virtual.

this totally destroys the efficency of using non-virtual methods ...
Because if we're going to lookup each and every method .... It's just
one lookup per method for every call . IMHO we should try to optimise 
rather than correct non-existent bugs for non-existent compatibility..

The correct NullReferenceException will be thrown when the called
method accesses 'this' anyway...

Sorry, I don't like this change ... This is neither good or bad ..
it's UGLY ...

The difference between insanity and genius is measured by success

reply via email to

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