Changeset ca8c0362
- Timestamp:
- Jan 31, 2022, 10:31:48 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
- Children:
- dd3263c
- Parents:
- 51ec1ab
- Location:
- src/ControlStruct
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ControlStruct/LabelGenerator.cc
r51ec1ab rca8c0362 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jan 31 18:48:26 202213 // Update Count : 2 712 // Last Modified On : Mon Jan 31 22:30:26 2022 13 // Update Count : 28 14 14 // 15 15 … … 26 26 27 27 namespace ControlStruct { 28 29 28 int LabelGenerator::current = 0; 30 29 LabelGenerator * LabelGenerator::labelGenerator = nullptr; … … 47 46 return l; 48 47 } 49 50 48 } // namespace ControlStruct 51 49 -
src/ControlStruct/LabelGenerator.h
r51ec1ab rca8c0362 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Mon Nov 8 10:16:00 202113 // Update Count : 811 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jan 31 22:30:10 2022 13 // Update Count : 16 14 14 // 15 15 … … 21 21 22 22 class Statement; 23 23 24 namespace ast { 24 25 25 class Stmt; 26 class Label; 26 27 } 27 28 28 29 namespace ControlStruct { 29 30 30 class LabelGenerator { 31 31 static int current; 32 32 static LabelGenerator *labelGenerator; 33 protected:33 protected: 34 34 LabelGenerator() {} 35 public:35 public: 36 36 static LabelGenerator *getGenerator(); 37 37 static Label newLabel(std::string suffix, Statement * stmt = nullptr); 38 static ast::Label newLabel( const std::string&, const ast::Stmt * );39 static void reset() { current = 0; }40 static void rewind() { current--; }41 38 }; 42 43 39 } // namespace ControlStruct 44 40
Note: See TracChangeset
for help on using the changeset viewer.