IRSend.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 11 Jun 2008 14:54:42 +0000
changeset 1 0dd36941955f
child 5 b94aea1d3710
permissions -rw-r--r--
Initial revision. All tests pass.

"{ Package: 'stx:goodies/newcompiler' }"

IRInstruction subclass:#IRSend
	instanceVariableNames:'selector superOf'
	classVariableNames:''
	poolDictionaries:''
	category:'NewCompiler-IR'
!

IRSend comment:'Instruction "send: selector" or "send: selector toSuperOf: behavior"'
!


!IRSend methodsFor:'accessing'!

selector
	^selector
!

selector: symbol

	selector _ symbol
!

senderselector
	^self method selector
!

superOf

	^ superOf
!

superOf: behavior

	superOf _ behavior
! !

!IRSend methodsFor:'interpret'!

executeOn: interpreter

	^ superOf
		ifNil: [interpreter send: selector]
		ifNotNil: [interpreter send: selector toSuperOf: superOf]
! !

!IRSend methodsFor:'testing'!

isMessageSend
	^true.
!

isSend
	^true.
!

isSuperSend
    ^superOf notNil
! !

!IRSend class methodsFor:'documentation'!

version
    ^'$Id$'
! !