IRMethod.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 30 Mar 2009 17:49:01 +0000
changeset 10 0fd549e0c784
parent 9 04518c7fb91c
child 23 377bc46cad12
permissions -rw-r--r--
First simple block works. See IRBuilderTest>>testBlock_blockTempArg. More tests are comming.

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

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

IRMethod comment:'I am a method in the IR (intermediate representation) language consisting of IRInstructions grouped by IRSequence (basic block).  The IRSequences form a control graph (therefore I only have to hold onto the starting sequence).  #compiledMethod will convert me to a CompiledMethod.  #methodNode will convert me back to a parse tree.
'
!


!IRMethod methodsFor:'accessing'!

numArgs

        ^ self numRargs - 1

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

!IRMethod methodsFor:'accessing - defaults'!

defaultCompiledCodeClass
    ^ Method
! !

!IRMethod methodsFor:'instructions - helpers'!

tempArgKindForLevel:level

    ^#MArg

    "Modified: / 30-03-2009 / 11:58:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
!

tempVarKindForLevel:level

    ^#MVar

    "Modified: / 30-03-2009 / 11:59:00 / Jan Vrany <vranyj1@fel.cvut.cz>"
! !

!IRMethod methodsFor:'testing'!

isIRMethod
    ^ true
! !

!IRMethod class methodsFor:'documentation'!

version
    ^'$Id$'
! !