IRBuilder.st
changeset 37 be8c2dd09dff
parent 29 2f154b67e1e8
child 41 f3898a3b378d
equal deleted inserted replaced
36:1bfd09c6b3d8 37:be8c2dd09dff
   104     ir addTemps: newKeys
   104     ir addTemps: newKeys
   105 
   105 
   106     "Modified: / 30-03-2009 / 11:15:46 / Jan Vrany <vranyj1@fel.cvut.cz>"
   106     "Modified: / 30-03-2009 / 11:15:46 / Jan Vrany <vranyj1@fel.cvut.cz>"
   107 !
   107 !
   108 
   108 
   109 tempNames
       
   110 
       
   111     ^ir tempNames
       
   112 
       
   113     "Modified: / 30-03-2009 / 11:15:46 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
   114 !
       
   115 
       
   116 testJumpAheadTarget: label
   109 testJumpAheadTarget: label
   117 
   110 
   118 	jumpAheadStacks at: label ifPresent: [:stack |
   111 	jumpAheadStacks at: label ifPresent: [:stack |
   119 		[stack isEmpty] whileFalse: [self jumpAheadTarget: label]
   112 		[stack isEmpty] whileFalse: [self jumpAheadTarget: label]
   120 	]
   113 	]
   123 !IRBuilder methodsFor:'initialize'!
   116 !IRBuilder methodsFor:'initialize'!
   124 
   117 
   125 addTemp: tempKey
   118 addTemp: tempKey
   126 
   119 
   127 	self addTemps: {tempKey}
   120 	self addTemps: {tempKey}
   128 !
       
   129 
       
   130 addTempIfNotDefined: tempKey
       
   131 
       
   132         self addTempsIfNotDefined: (Array with: tempKey)
       
   133 
       
   134     "Created: / 23-03-2010 / 13:46:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   135 !
       
   136 
       
   137 addTempsIfNotDefined: temps
       
   138 
       
   139     ir addTempsIfNotDefined: temps
       
   140 
       
   141     "Created: / 23-03-2010 / 13:46:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   142 !
   121 !
   143 
   122 
   144 initialize
   123 initialize
   145 
   124 
   146     ^self initializeFor: IRMethod new.
   125     ^self initializeFor: IRMethod new.
   476 ! !
   455 ! !
   477 
   456 
   478 !IRBuilder class methodsFor:'documentation'!
   457 !IRBuilder class methodsFor:'documentation'!
   479 
   458 
   480 version
   459 version
   481     ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRBuilder.st,v 1.3 2009/10/08 11:57:58 fm Exp $'
   460     ^ '$Id$'
   482 !
   461 !
   483 
   462 
   484 version_CVS
   463 version_CVS
   485     ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRBuilder.st,v 1.3 2009/10/08 11:57:58 fm Exp $'
   464     ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRBuilder.st,v 1.3 2009/10/08 11:57:58 fm Exp §'
   486 !
   465 !
   487 
   466 
   488 version_SVN
   467 version_SVN
   489     ^ '$Id$'
   468     ^ '$Id::                                                                                                                        $'
   490 ! !
   469 ! !