IRClosure.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 13 May 2009 09:30:49 +0000
changeset 19 3bb7360f9dff
parent 11 0a50d475c1ff
child 23 377bc46cad12
permissions -rw-r--r--
- method stackSize is now correctly initialized - #makeBlock offsets are now patched when serializing basic blocks

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

IRFunction subclass:#IRClosure
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'NewCompiler-IR'
!


!IRClosure methodsFor:'accessing'!

environmentIr
    ^ environmentIr
!

environmentIr:something
    environmentIr := something.
! !

!IRClosure methodsFor:'accessing - defaults'!

defaultCompiledCodeClass
    "raise an error: must be redefined in concrete subclass(es)"

    ^Block

    "Modified: / 30-03-2009 / 16:36:02 / Jan Vrany <vranyj1@fel.cvut.cz>"
! !

!IRClosure methodsFor:'instructions - helpers'!

tempArgKindForLevel:level
    "Superclass IRFunction says that I am responsible to implement this method"

    ^level isZero 
        ifTrue: [#BArg]
        ifFalse:[#OBArg]

    "Modified: / 30-03-2009 / 18:36:30 / Jan Vrany <vranyj1@fel.cvut.cz>"
!

tempVarKindForLevel:level
    "Superclass IRFunction says that I am responsible to implement this method"

    ^level isZero 
        ifTrue: [#BVar]
        ifFalse:[#OBVar]

    "Modified: / 30-03-2009 / 23:05:37 / Jan Vrany <vranyj1@fel.cvut.cz>"
! !

!IRClosure methodsFor:'testing'!

isIRClosure
    ^ true
! !

!IRClosure class methodsFor:'documentation'!

version
    ^'$Id$'
! !