Which methods are really not executed?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Which methods are really not executed?

Mariano Martinez Peck
Hi folks. I would like to know which are the messages that are not really executed, thus not being intercepted by proxies.
So far, I know:

1)   MessageNode >> initialize
    MacroSelectors :=
        #(    ifTrue: ifFalse: ifTrue:ifFalse: ifFalse:ifTrue:
            and: or:
            whileFalse: whileTrue: whileFalse whileTrue
            to:do: to:by:do:
            caseOf: caseOf:otherwise:
            ifNil: ifNotNil:  ifNil:ifNotNil: ifNotNil:ifNil:).

those are inlined by the compiler...

2)  Special shorcut bytecodes that are in "Smalltalk specialSelectors" / "ParseNode classVarNamed:  'StdSelectors'"  / "Smalltalk specialObjectsArray at: 24"

Here I have a question...if I understand correctly, in this list of selectors there are 3 cases:

2.1)  methods may or may not be executed depending on the receiver/arguments. For example
1 + 2  will never send the message #+ to 1.
but 1 + 'mariano'   will do.

2.2) methods that are NEVER sent,   like #class and #==

2.3) methods that are ALWAYS sent, like #new, #next, #nextPut:, #size, etc.

So...did I understand correclty this part?


are there more cases where a message may not be really executed?

thanks

Mariano