compiler/PPCInlinedMethod.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 15 Jun 2015 19:13:49 +0100
changeset 488 19a9c25960ef
parent 481 34ee0d3c72e7
child 503 ff58cd9f1f3c
permissions -rw-r--r--
Avoid creation of intermediate collection for mapped action nodes.

"{ Package: 'stx:goodies/petitparser/compiler' }"

"{ NameSpace: Smalltalk }"

PPCMethod subclass:#PPCInlinedMethod
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'PetitCompiler-Compiler-Codegen'
!


!PPCInlinedMethod methodsFor:'as yet unclassified'!

call
    ^ self code
!

code
    ^ (String streamContents:[:s | buffer codeOn:s ]) trimRight

    "Modified (format): / 01-06-2015 / 21:44:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

isInline
    ^ true
! !

!PPCInlinedMethod methodsFor:'code generation - variables'!

allocateReturnVariableNamed: name
    self error: 'return variable must be assigned by the non-inlined method....'

    "Created: / 15-06-2015 / 17:52:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

allocateTemporaryVariableNamed:aString
    self error: 'sorry, I can''t allocate variables....'

   "Created: / 23-04-2015 / 21:06:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!PPCInlinedMethod class methodsFor:'documentation'!

version_HG

    ^ '$Changeset: <not expanded> $'
! !