[Survey] About the cognitive surcharge of super
Tim Rowledge
tim at sumeru.stanford.edu
Fri Sep 6 18:37:43 UTC 2002
Stephane Ducasse <ducasse at iam.unibe.ch> is claimed by the authorities to have written:
> Hi ian
>
> this is fun because squeakers are much better than the oo expert (j..)
> I know ;).
> Just a point. The fact that class is not sent is not really good. I
> would say that ideally it should be bytecoded only when class is not
> redefined in the class or one of its superclasses.
Trivial to fix if people would like it;
'From Squeak3.1beta of 3 October 2001 [latest update: #4478] on 5 January 2002 at 11:21:57 am'!
"Change Set: byteCodePrimClassFix
Date: 5 January 2002
Author: tim at sumeru.stanford.edu
Snippet of VM code to change the bytecodePrimClass bytecode to send the special selector #23 (#class) instead of shortcircuiting it. This ought to be considered as a possible improvement in the life of proxy programmers."!
!Interpreter methodsFor: 'common selector sends' stamp: 'tpr 1/5/2002 11:19'!
bytecodePrimClass
messageSelector _ self specialSelector: 23.
argumentCount _ 1.
self normalSend.
! !
tim
--
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
E Pluribus UNIX.
More information about the Squeak-dev
mailing list
|