IRJumpIf.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Thu, 30 Oct 2014 22:18:24 +0000
changeset 42 acdc3ec6d152
parent 41 f3898a3b378d
child 43 c8afb8e4c3cc
permissions -rw-r--r--
Better class category name - IR Compiler-*

"{ Package: 'ctu:ircompiler' }"

IRJump subclass:#IRJumpIf
	instanceVariableNames:'boolean otherwise'
	classVariableNames:''
	poolDictionaries:''
	category:'IR Compiler-IR'
!

IRJumpIf comment:'Instruction "if: boolean goto: labelNum1 otherwise: labelNum2"'
!


!IRJumpIf methodsFor:'acessing'!

boolean

	^ boolean
!

boolean: bool

	boolean _ bool
!

otherwise

	^ otherwise
!

otherwise: aSequence

	otherwise := aSequence
!

successorSequences

	^ {destination. otherwise}
! !

!IRJumpIf methodsFor:'interpret'!

executeOn: interpreter

	^ interpreter if: boolean goto: destination orderNumber otherwise: otherwise orderNumber
! !

!IRJumpIf methodsFor:'testing'!

isGoto
	"is unconditional jump"

	^ false
!

isIf

	^ true
! !

!IRJumpIf class methodsFor:'documentation'!

version
    ^ '$Id$'
!

version_CVS
    ^ 'Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRJumpIf.st,v 1.3 2009/10/08 12:05:24 fm Exp '
!

version_SVN
    ^ '$Id::                                                                                                                        $'
! !