19
19
20
20
#define SHARING
21
21
// #define HASH_CODE
22
- #define USE_MOVE
23
22
// #define NAMED_SUB_IS_FORWARD_LIST
24
23
25
24
#ifdef NAMED_SUB_IS_FORWARD_LIST
@@ -169,19 +168,13 @@ class irept
169
168
bool is_nil () const { return id ()==ID_nil; }
170
169
bool is_not_nil () const { return id ()!=ID_nil; }
171
170
172
- #if !defined(USE_MOVE) || !defined( SHARING)
171
+ #if !defined(SHARING)
173
172
explicit irept (const irep_idt &_id)
174
- #ifdef SHARING
175
- :data(&empty_d)
176
- #endif
177
173
{
178
174
id (_id);
179
175
}
180
176
181
177
irept (const irep_idt &_id, const named_subt &_named_sub, const subt &_sub)
182
- #ifdef SHARING
183
- : data(&empty_d)
184
- #endif
185
178
{
186
179
id (_id);
187
180
get_named_sub () = _named_sub;
@@ -218,7 +211,6 @@ class irept
218
211
}
219
212
}
220
213
221
- #ifdef USE_MOVE
222
214
// Copy from rvalue reference.
223
215
// Note that this does avoid a branch compared to the
224
216
// standard copy constructor above.
@@ -229,7 +221,6 @@ class irept
229
221
#endif
230
222
irep.data =&empty_d;
231
223
}
232
- #endif
233
224
234
225
irept &operator =(const irept &irep)
235
226
{
@@ -249,7 +240,6 @@ class irept
249
240
return *this ;
250
241
}
251
242
252
- #ifdef USE_MOVE
253
243
// Note that the move assignment operator does avoid
254
244
// three branches compared to standard operator above.
255
245
irept &operator =(irept &&irep)
@@ -261,7 +251,6 @@ class irept
261
251
std::swap (data, irep.data );
262
252
return *this ;
263
253
}
264
- #endif
265
254
266
255
~irept ()
267
256
{
@@ -393,7 +382,6 @@ class irept
393
382
394
383
dt () = default ;
395
384
396
- #ifdef USE_MOVE
397
385
explicit dt (irep_idt _data) : data(std::move(_data))
398
386
{
399
387
}
@@ -404,7 +392,6 @@ class irept
404
392
sub(std::move(_sub))
405
393
{
406
394
}
407
- #endif
408
395
};
409
396
410
397
protected:
0 commit comments