links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
FAQ: Message Sends Inlined by the Compiler
Last updated at 11:15 am UTC on 8 March 2017
Which message sends are inlined by the compiler (i.e. translated directly into byte code)?

Andreas Raab gave the hint to look at the method

  MessageNode class>>initialize

The inlined messages are defined as follows (in Squeak 3.8):

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:).

In addition, one should look at the class variable StdSelectors of ParseNode. These are translated into special bytecodes, some of which are handled specially by the VM.