src
go_destruct.cc
Go to the documentation of this file.
1 #include "src/util/c99_stdint.h"
2 #include <utility>
3 #include <vector>
4 
5 #include "src/codegen/go.h"
6 
7 namespace re2c
8 {
9 
11 {
12  delete [] cases;
13 }
14 
16 {
17  delete cond;
18  delete thn;
19  delete els;
20 }
21 
23 {
24  for (uint32_t i = 0; i < branches.size (); ++i)
25  {
26  delete branches[i].first;
27  }
28 }
29 
31 {
32  switch (type)
33  {
34  case BINARY:
35  delete info.binary;
36  break;
37  case LINEAR:
38  delete info.linear;
39  break;
40  }
41 }
42 
44 {
45  switch (type)
46  {
47  case SWITCH:
48  delete info.cases;
49  break;
50  case IF:
51  delete info.ifs;
52  break;
53  }
54 }
55 
57 {
58  delete hgo;
59  delete lgo;
60 }
61 
63 {
64  delete [] table;
65 }
66 
68 {
69  delete hgo;
70  delete table;
71 }
72 
74 {
75  delete cases;
76 }
77 
79 {
80  switch (type)
81  {
82  case EMPTY:
83  break;
84  case SWITCH_IF:
85  delete info.switchif;
86  break;
87  case BITMAP:
88  delete info.bitmap;
89  break;
90  case CPGOTO:
91  delete info.cpgoto;
92  break;
93  case DOT:
94  delete info.dot;
95  break;
96  }
97 }
98 
99 } // namespace re2c
If * thn
Definition: go.h:65
SwitchIf * hgo
Definition: go.h:124
CpgotoTable * table
Definition: go.h:152
enum re2c::Go::@3 type
SwitchIf * hgo
Definition: go.h:151
enum re2c::SwitchIf::@1 type
const State ** table
Definition: go.h:137
Case * cases
Definition: go.h:44
Cond * cond
Definition: go.h:64
SwitchIf * lgo
Definition: go.h:125
std::vector< std::pair< const Cond *, const State * > > branches
Definition: go.h:77
Cases * cases
Definition: go.h:164
union re2c::If::@0 info
union re2c::SwitchIf::@2 info
If * els
Definition: go.h:66
union re2c::Go::@4 info
enum re2c::If::type_t type
Definition: bitmap.cc:10