compiler/PPCCodeGenerator.st
changeset 538 16e8536f5cfb
parent 534 a949c4fe44df
equal deleted inserted replaced
537:fb212e14d1f4 538:16e8536f5cfb
   354                 variableNode parent isMessage ifTrue:[ 
   354                 variableNode parent isMessage ifTrue:[ 
   355                     | parent |
   355                     | parent |
   356 
   356 
   357                     parent := variableNode parent.
   357                     parent := variableNode parent.
   358                     "Check for <barg> at: <number>"
   358                     "Check for <barg> at: <number>"
   359                     ((parent selector == #at:) and:[ parent options first isLiteralNumber ]) ifTrue:[ 
   359                     ((parent selector == #at:) and:[ parent arguments first isLiteralNumber ]) ifTrue:[ 
   360                         blockMatches at: parent put: (childValueVars at: parent options first value).
   360                         blockMatches at: parent put: (childValueVars at: parent arguments first value).
   361                     ] ifFalse:[ 
   361                     ] ifFalse:[ 
   362                         "Check for <barg> first / second / ..."
   362                         "Check for <barg> first / second / ..."
   363                         | i |
   363                         | i |
   364 
   364 
   365                         i := #(first second third fourth fifth sixth) indexOf: parent selector.
   365                         i := #(first second third fourth fifth sixth) indexOf: parent selector.
   415         codeGen codeReturn: 'failure'. 
   415         codeGen codeReturn: 'failure'. 
   416     ] else: [
   416     ] else: [
   417         codeGen code: blockBody.    
   417         codeGen code: blockBody.    
   418     ]
   418     ]
   419 
   419 
   420     "Modified: / 27-07-2015 / 15:49:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   420     "Modified: / 07-09-2015 / 13:00:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   421 !
   421 !
   422 
   422 
   423 visitAndNode: node
   423 visitAndNode: node
   424     | mementoVar |
   424     | mementoVar |
   425     
   425