compiler/PPCInlinedMethod.st
changeset 438 20598d7ce9fa
parent 422 116d2b2af905
child 452 9f4558b3be66
equal deleted inserted replaced
437:54b3bc9e3987 438:20598d7ce9fa
     1 "{ Package: 'stx:goodies/petitparser/compiler' }"
     1 "{ Package: 'stx:goodies/petitparser/compiler' }"
     2 
     2 
     3 "{ NameSpace: Smalltalk }"
     3 "{ NameSpace: Smalltalk }"
     4 
     4 
     5 PPCMethod subclass:#PPCInlinedMethod
     5 PPCMethod subclass:#PPCInlinedMethod
     6 	instanceVariableNames:'code'
     6 	instanceVariableNames:''
     7 	classVariableNames:''
     7 	classVariableNames:''
     8 	poolDictionaries:''
     8 	poolDictionaries:''
     9 	category:'PetitCompiler-Core'
     9 	category:'PetitCompiler-Core'
    10 !
    10 !
    11 
    11 
    14 call
    14 call
    15 	^ self code
    15 	^ self code
    16 !
    16 !
    17 
    17 
    18 code
    18 code
    19 	^ buffer contents trim
    19 	^ buffer contents trimRight
       
    20 !
       
    21 
       
    22 isInline
       
    23 	^ true
    20 ! !
    24 ! !
    21 
    25 
       
    26 !PPCInlinedMethod methodsFor:'code generation - variables'!
       
    27 
       
    28 allocateReturnVariable
       
    29 	self error: 'return variable must be assigned by the non-inlined method....'
       
    30 
       
    31    "Created: / 23-04-2015 / 21:06:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    32 !
       
    33 
       
    34 allocateTemporaryVariableNamed:aString
       
    35 	self error: 'sorry, I can''t allocate variables....'
       
    36 
       
    37    "Created: / 23-04-2015 / 21:06:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    38 ! !
       
    39