--- a/IRFunction.st Mon Feb 15 17:55:26 2010 +0000
+++ b/IRFunction.st Tue Mar 23 13:38:08 2010 +0000
@@ -50,6 +50,23 @@
"Modified: / 12-08-2009 / 09:22:05 / Jan Vrany <vranyj1@fel.cvut.cz>"
!
+addTempsIfNotDefined: temps
+
+ | ir tempsToAdd |
+ ir := self.
+ tempsToAdd := temps asSet.
+ [ ir isNil ] whileFalse:
+ [ir tempNames do:
+ [:temp|
+ (tempsToAdd includes:temp)
+ ifTrue:[tempsToAdd := tempsToAdd remove: temp]].
+ ir := ir environmentIr].
+ tempsToAdd isEmpty ifTrue:[^self].
+ self addTemps: tempsToAdd
+
+ "Created: / 23-03-2010 / 13:51:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
additionalLiterals
^additionalLiterals.
!
@@ -93,6 +110,10 @@
^self allInstructionsMatching: [:bc | bc isTempStore].
!
+environmentIr
+ ^ environmentIr
+!
+
ir
^self.
!