Skip to content

Commit 976dbc4

Browse files
authored
Merge pull request #1656 from clasp-developers/gc-cleanup
Gc cleanup
2 parents 08cf7cf + 2abd0aa commit 976dbc4

File tree

106 files changed

+963
-5056
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+963
-5056
lines changed

include/clasp/clbind/class_registry.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,6 @@ FORWARD(ClassRegistry);
6363
class ClassRegistry_O : public core::General_O {
6464
LISP_CLASS(clbind, ClbindPkg, ClassRegistry_O, "ClassRegistry", core::General_O);
6565
void initialize() override;
66-
67-
public:
68-
ClassRegistry_O(){};
69-
virtual ~ClassRegistry_O(){};
70-
7166
public:
7267
static ClassRegistry_sp get_registry();
7368

include/clasp/clbind/constructor.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ class ConstructorCreator_O : public core::Creator_O {
4747
public:
4848
ConstructorCreator_O(core::SimpleFun_sp ep, core::Symbol_sp c) : Creator_O(ep), _mostDerivedClassSymbol(c){};
4949
core::Symbol_sp _mostDerivedClassSymbol;
50-
virtual ~ConstructorCreator_O(){};
5150
};
5251
}; // namespace clbind
5352

include/clasp/core/array.h

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ size_t calculateArrayTotalSizeAndValidateDimensions(List_sp dim_desig, size_t& r
156156
namespace core {
157157
class Array_O : public General_O {
158158
LISP_ABSTRACT_CLASS(core, ClPkg, Array_O, "array", General_O);
159-
virtual ~Array_O(){};
160159

161160
public:
162161
/*! A hackish (clever?) way to get at the first element of all subclasses
@@ -165,9 +164,6 @@ class Array_O : public General_O {
165164
*/
166165
size_t _Length[0];
167166

168-
public:
169-
Array_O(){};
170-
171167
public:
172168
// Low level functions for access to contents
173169

@@ -259,19 +255,15 @@ namespace core {
259255
struct Rank1 {};
260256
class MDArray_O : public Array_O {
261257
LISP_ABSTRACT_CLASS(core, CorePkg, MDArray_O, "mdarray", Array_O);
262-
virtual ~MDArray_O(){};
263-
264-
public:
265-
MDArray_O(){};
266258

267259
public:
268260
typedef size_t value_type; // this is container - needs value_type
269261
typedef gctools::GCArray_moveable<value_type> vector_type;
270262
struct Flags {
271-
Flags(){};
272263
size_t _Flags;
273264
static const size_t fillPointerFlag = 0x000001;
274265
static const size_t displacedToFlag = 0x000100;
266+
Flags() = default;
275267
Flags(bool fillPointerP, bool displacedToP)
276268
: _Flags((fillPointerP ? fillPointerFlag : 0) | (displacedToP ? displacedToFlag : 0)){};
277269
bool fillPointerP() const { return this->_Flags & fillPointerFlag; };
@@ -367,7 +359,6 @@ class ComplexVector_O : public MDArray_O {
367359
LISP_ABSTRACT_CLASS(core, CorePkg, ComplexVector_O, "ComplexVector", MDArray_O);
368360
// One dimension vector
369361
public:
370-
CLASP_DEFAULT_CTOR ComplexVector_O(){};
371362
ComplexVector_O(size_t dimension, T_sp fillPointer, Array_sp data, bool displacedToP, Fixnum_sp displacedIndexOffset)
372363
: MDArray_O(Rank1(), dimension, fillPointer, data, displacedToP, displacedIndexOffset){};
373364

@@ -380,10 +371,6 @@ namespace core {
380371
class SimpleMDArray_O : public MDArray_O {
381372
LISP_ABSTRACT_CLASS(core, CorePkg, SimpleMDArray_O, "simple-mdarray", MDArray_O);
382373

383-
public:
384-
CLASP_DEFAULT_CTOR SimpleMDArray_O(){};
385-
virtual ~SimpleMDArray_O(){};
386-
387374
public:
388375
// multiple dimensions
389376
SimpleMDArray_O(size_t rank, List_sp dimensions, Array_sp data)
@@ -405,10 +392,6 @@ namespace core {
405392

406393
class AbstractSimpleVector_O : public Array_O {
407394
LISP_ABSTRACT_CLASS(core, CorePkg, AbstractSimpleVector_O, "AbstractSimpleVector", Array_O);
408-
virtual ~AbstractSimpleVector_O(){};
409-
410-
public:
411-
AbstractSimpleVector_O(){};
412395

413396
public:
414397
virtual T_sp array_type() const override { return cl::_sym_simple_array; };
@@ -455,9 +438,6 @@ class AbstractSimpleVector_O : public Array_O {
455438

456439
namespace core {
457440
template <typename MyLeafType, typename ValueType, typename MyParentType> class template_SimpleVector : public MyParentType {
458-
public:
459-
template_SimpleVector(){};
460-
461441
public:
462442
// The types that define what this class does
463443
typedef MyParentType Base;
@@ -488,9 +468,6 @@ template <typename MyLeafType, typename ValueType, typename MyParentType> class
488468
template_SimpleVector(I first, S last)
489469
: Base(), _Data(first, last) {};
490470

491-
public:
492-
static void never_invoke_allocator() { gctools::GCAbstractAllocator<template_SimpleVector>::never_invoke_allocator(); };
493-
494471
public:
495472
leaf_smart_ptr_type copy(size_t length, value_type initialElement, bool initialElementSupplied) {
496473
return leaf_type::make(length, initialElement, initialElementSupplied, MIN(length, this->length()), this->begin());
@@ -549,8 +526,6 @@ template <typename MyLeafType, typename ValueType, typename MyParentType> class
549526
namespace core {
550527
template <typename MyLeafType, int BitUnitBitWidth, int Signedp>
551528
class template_SimpleBitUnitVector : public AbstractSimpleVector_O {
552-
public:
553-
CLASP_DEFAULT_CTOR template_SimpleBitUnitVector(){};
554529

555530
public:
556531
typedef AbstractSimpleVector_O Base;
@@ -668,9 +643,6 @@ MDArray_sp core__make_mdarray(List_sp dimensions, T_sp element_type, bool adjust
668643
namespace core {
669644
template <typename MyArrayType, typename MySimpleArrayType, typename MySimpleType, typename MyParentType>
670645
class template_Array : public MyParentType {
671-
public:
672-
CLASP_DEFAULT_CTOR template_Array(){};
673-
674646
public:
675647
// The types that define what this class does
676648
typedef MyParentType Base; /* e.g. MDArray_O */
@@ -787,9 +759,6 @@ class template_Array : public MyParentType {
787759

788760
namespace core {
789761
template <typename MyArrayType, typename MySimpleType, typename MyParentType> class template_Vector : public MyParentType {
790-
public:
791-
CLASP_DEFAULT_CTOR template_Vector(){};
792-
793762
public:
794763
// The types that define what this class does
795764
typedef MyParentType Base;
@@ -920,9 +889,6 @@ template <typename MyArrayType, typename MySimpleType, typename MyParentType> cl
920889

921890
namespace core {
922891
template <typename MyArrayType, typename MySimpleType, typename MyParentType> class template_SimpleArray : public MyParentType {
923-
public:
924-
CLASP_DEFAULT_CTOR template_SimpleArray(){};
925-
926892
public:
927893
// The types that define what this class does
928894
typedef MyParentType Base;

include/clasp/core/array_bit.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ namespace core {
2929
typedef template_SimpleBitUnitVector<SimpleBitVector_O, 1, false> specialized_SimpleBitVector;
3030
class SimpleBitVector_O : public specialized_SimpleBitVector {
3131
LISP_CLASS(core, ClPkg, SimpleBitVector_O, "simple-bit-vector", AbstractSimpleVector_O);
32-
virtual ~SimpleBitVector_O(){};
3332

3433
public:
3534
typedef specialized_SimpleBitVector TemplatedBase;
@@ -76,7 +75,6 @@ class SimpleBitVector_O : public specialized_SimpleBitVector {
7675
namespace core {
7776
class BitVectorNs_O : public template_Vector<BitVectorNs_O, SimpleBitVector_O, ComplexVector_O> {
7877
LISP_CLASS(core, CorePkg, BitVectorNs_O, "BitVectorNs", ComplexVector_O);
79-
virtual ~BitVectorNs_O(){};
8078

8179
public:
8280
typedef template_Vector<BitVectorNs_O, SimpleBitVector_O, ComplexVector_O> TemplatedBase;
@@ -116,7 +114,6 @@ class BitVectorNs_O : public template_Vector<BitVectorNs_O, SimpleBitVector_O, C
116114
namespace core {
117115
class MDArrayBit_O : public template_Array<MDArrayBit_O, SimpleMDArrayBit_O, SimpleBitVector_O, MDArray_O> {
118116
LISP_CLASS(core, CorePkg, MDArrayBit_O, "MDArrayBit", MDArray_O);
119-
virtual ~MDArrayBit_O(){};
120117

121118
public:
122119
typedef template_Array<MDArrayBit_O, SimpleMDArrayBit_O, SimpleBitVector_O, MDArray_O> TemplatedBase;
@@ -130,7 +127,6 @@ class MDArrayBit_O : public template_Array<MDArrayBit_O, SimpleMDArrayBit_O, Sim
130127
namespace core {
131128
class SimpleMDArrayBit_O : public template_SimpleArray<SimpleMDArrayBit_O, SimpleBitVector_O, SimpleMDArray_O> {
132129
LISP_CLASS(core, CorePkg, SimpleMDArrayBit_O, "SimpleMDArrayBit", SimpleMDArray_O);
133-
virtual ~SimpleMDArrayBit_O(){};
134130

135131
public:
136132
typedef template_SimpleArray<SimpleMDArrayBit_O, SimpleBitVector_O, SimpleMDArray_O> TemplatedBase;

include/clasp/core/array_double.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ class SimpleVector_double_O;
2020
typedef template_SimpleVector<SimpleVector_double_O, double, AbstractSimpleVector_O> specialized_SimpleVector_double;
2121
class SimpleVector_double_O : public specialized_SimpleVector_double {
2222
LISP_CLASS(core, CorePkg, SimpleVector_double_O, "SimpleVector_double", AbstractSimpleVector_O);
23-
virtual ~SimpleVector_double_O(){};
2423

2524
public:
2625
typedef specialized_SimpleVector_double TemplatedBase;
@@ -59,7 +58,6 @@ class SimpleVector_double_O : public specialized_SimpleVector_double {
5958
namespace core {
6059
class MDArray_double_O : public template_Array<MDArray_double_O, SimpleMDArray_double_O, SimpleVector_double_O, MDArray_O> {
6160
LISP_CLASS(core, CorePkg, MDArray_double_O, "MDArray_double", MDArray_O);
62-
virtual ~MDArray_double_O(){};
6361

6462
public:
6563
typedef template_Array<MDArray_double_O, SimpleMDArray_double_O, SimpleVector_double_O, MDArray_O> TemplatedBase;
@@ -73,7 +71,6 @@ class MDArray_double_O : public template_Array<MDArray_double_O, SimpleMDArray_d
7371
namespace core {
7472
class SimpleMDArray_double_O : public template_SimpleArray<SimpleMDArray_double_O, SimpleVector_double_O, SimpleMDArray_O> {
7573
LISP_CLASS(core, CorePkg, SimpleMDArray_double_O, "SimpleMDArray_double", SimpleMDArray_O);
76-
virtual ~SimpleMDArray_double_O(){};
7774

7875
public:
7976
typedef template_SimpleArray<SimpleMDArray_double_O, SimpleVector_double_O, SimpleMDArray_O> TemplatedBase;
@@ -86,7 +83,6 @@ class SimpleMDArray_double_O : public template_SimpleArray<SimpleMDArray_double_
8683
namespace core {
8784
class ComplexVector_double_O : public template_Vector<ComplexVector_double_O, SimpleVector_double_O, ComplexVector_O> {
8885
LISP_CLASS(core, CorePkg, ComplexVector_double_O, "ComplexVector_double", ComplexVector_O);
89-
virtual ~ComplexVector_double_O(){};
9086

9187
public:
9288
typedef template_Vector<ComplexVector_double_O, SimpleVector_double_O, ComplexVector_O> TemplatedBase;

include/clasp/core/array_fixnum.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ class SimpleVector_fixnum_O;
2020
typedef template_SimpleVector<SimpleVector_fixnum_O, Fixnum, AbstractSimpleVector_O> specialized_SimpleVector_fixnum;
2121
class SimpleVector_fixnum_O : public specialized_SimpleVector_fixnum {
2222
LISP_CLASS(core, CorePkg, SimpleVector_fixnum_O, "SimpleVector_fixnum", AbstractSimpleVector_O);
23-
virtual ~SimpleVector_fixnum_O(){};
2423

2524
public:
2625
typedef specialized_SimpleVector_fixnum TemplatedBase;
@@ -50,7 +49,6 @@ class SimpleVector_fixnum_O : public specialized_SimpleVector_fixnum {
5049
namespace core {
5150
class MDArray_fixnum_O : public template_Array<MDArray_fixnum_O, SimpleMDArray_fixnum_O, SimpleVector_fixnum_O, MDArray_O> {
5251
LISP_CLASS(core, CorePkg, MDArray_fixnum_O, "MDArray_fixnum", MDArray_O);
53-
virtual ~MDArray_fixnum_O(){};
5452

5553
public:
5654
typedef template_Array<MDArray_fixnum_O, SimpleMDArray_fixnum_O, SimpleVector_fixnum_O, MDArray_O> TemplatedBase;
@@ -64,7 +62,6 @@ class MDArray_fixnum_O : public template_Array<MDArray_fixnum_O, SimpleMDArray_f
6462
namespace core {
6563
class SimpleMDArray_fixnum_O : public template_SimpleArray<SimpleMDArray_fixnum_O, SimpleVector_fixnum_O, SimpleMDArray_O> {
6664
LISP_CLASS(core, CorePkg, SimpleMDArray_fixnum_O, "SimpleMDArray_fixnum", SimpleMDArray_O);
67-
virtual ~SimpleMDArray_fixnum_O(){};
6865

6966
public:
7067
typedef template_SimpleArray<SimpleMDArray_fixnum_O, SimpleVector_fixnum_O, SimpleMDArray_O> TemplatedBase;
@@ -77,7 +74,6 @@ class SimpleMDArray_fixnum_O : public template_SimpleArray<SimpleMDArray_fixnum_
7774
namespace core {
7875
class ComplexVector_fixnum_O : public template_Vector<ComplexVector_fixnum_O, SimpleVector_fixnum_O, ComplexVector_O> {
7976
LISP_CLASS(core, CorePkg, ComplexVector_fixnum_O, "ComplexVector_fixnum", ComplexVector_O);
80-
virtual ~ComplexVector_fixnum_O(){};
8177

8278
public:
8379
typedef template_Vector<ComplexVector_fixnum_O, SimpleVector_fixnum_O, ComplexVector_O> TemplatedBase;

include/clasp/core/array_float.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ class SimpleVector_float_O;
2020
typedef template_SimpleVector<SimpleVector_float_O, float, AbstractSimpleVector_O> specialized_SimpleVector_float;
2121
class SimpleVector_float_O : public specialized_SimpleVector_float {
2222
LISP_CLASS(core, CorePkg, SimpleVector_float_O, "SimpleVector_float", AbstractSimpleVector_O);
23-
virtual ~SimpleVector_float_O(){};
2423

2524
public:
2625
typedef specialized_SimpleVector_float TemplatedBase;
@@ -65,7 +64,6 @@ class SimpleVector_float_O : public specialized_SimpleVector_float {
6564
namespace core {
6665
class MDArray_float_O : public template_Array<MDArray_float_O, SimpleMDArray_float_O, SimpleVector_float_O, MDArray_O> {
6766
LISP_CLASS(core, CorePkg, MDArray_float_O, "MDArray_float", MDArray_O);
68-
virtual ~MDArray_float_O(){};
6967

7068
public:
7169
typedef template_Array<MDArray_float_O, SimpleMDArray_float_O, SimpleVector_float_O, MDArray_O> TemplatedBase;
@@ -79,7 +77,6 @@ class MDArray_float_O : public template_Array<MDArray_float_O, SimpleMDArray_flo
7977
namespace core {
8078
class SimpleMDArray_float_O : public template_SimpleArray<SimpleMDArray_float_O, SimpleVector_float_O, SimpleMDArray_O> {
8179
LISP_CLASS(core, CorePkg, SimpleMDArray_float_O, "SimpleMDArray_float", SimpleMDArray_O);
82-
virtual ~SimpleMDArray_float_O(){};
8380

8481
public:
8582
typedef template_SimpleArray<SimpleMDArray_float_O, SimpleVector_float_O, SimpleMDArray_O> TemplatedBase;
@@ -92,7 +89,6 @@ class SimpleMDArray_float_O : public template_SimpleArray<SimpleMDArray_float_O,
9289
namespace core {
9390
class ComplexVector_float_O : public template_Vector<ComplexVector_float_O, SimpleVector_float_O, ComplexVector_O> {
9491
LISP_CLASS(core, CorePkg, ComplexVector_float_O, "ComplexVector_float", ComplexVector_O);
95-
virtual ~ComplexVector_float_O(){};
9692

9793
public:
9894
typedef template_Vector<ComplexVector_float_O, SimpleVector_float_O, ComplexVector_O> TemplatedBase;

include/clasp/core/array_int16.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ class SimpleVector_byte16_t_O;
2020
typedef template_SimpleVector<SimpleVector_byte16_t_O, byte16_t, AbstractSimpleVector_O> specialized_SimpleVector_byte16_t;
2121
class SimpleVector_byte16_t_O : public specialized_SimpleVector_byte16_t {
2222
LISP_CLASS(core, CorePkg, SimpleVector_byte16_t_O, "SimpleVector_byte16_t", AbstractSimpleVector_O);
23-
virtual ~SimpleVector_byte16_t_O(){};
2423

2524
public:
2625
typedef specialized_SimpleVector_byte16_t TemplatedBase;
@@ -50,7 +49,6 @@ class SimpleVector_byte16_t_O : public specialized_SimpleVector_byte16_t {
5049
namespace core {
5150
class MDArray_byte16_t_O : public template_Array<MDArray_byte16_t_O, SimpleMDArray_byte16_t_O, SimpleVector_byte16_t_O, MDArray_O> {
5251
LISP_CLASS(core, CorePkg, MDArray_byte16_t_O, "MDArray_byte16_t", MDArray_O);
53-
virtual ~MDArray_byte16_t_O(){};
5452

5553
public:
5654
typedef template_Array<MDArray_byte16_t_O, SimpleMDArray_byte16_t_O, SimpleVector_byte16_t_O, MDArray_O> TemplatedBase;
@@ -64,7 +62,6 @@ class MDArray_byte16_t_O : public template_Array<MDArray_byte16_t_O, SimpleMDArr
6462
namespace core {
6563
class SimpleMDArray_byte16_t_O : public template_SimpleArray<SimpleMDArray_byte16_t_O, SimpleVector_byte16_t_O, SimpleMDArray_O> {
6664
LISP_CLASS(core, CorePkg, SimpleMDArray_byte16_t_O, "SimpleMDArray_byte16_t", SimpleMDArray_O);
67-
virtual ~SimpleMDArray_byte16_t_O(){};
6865

6966
public:
7067
typedef template_SimpleArray<SimpleMDArray_byte16_t_O, SimpleVector_byte16_t_O, SimpleMDArray_O> TemplatedBase;
@@ -77,7 +74,6 @@ class SimpleMDArray_byte16_t_O : public template_SimpleArray<SimpleMDArray_byte1
7774
namespace core {
7875
class ComplexVector_byte16_t_O : public template_Vector<ComplexVector_byte16_t_O, SimpleVector_byte16_t_O, ComplexVector_O> {
7976
LISP_CLASS(core, CorePkg, ComplexVector_byte16_t_O, "ComplexVector_byte16_t", ComplexVector_O);
80-
virtual ~ComplexVector_byte16_t_O(){};
8177

8278
public:
8379
typedef template_Vector<ComplexVector_byte16_t_O, SimpleVector_byte16_t_O, ComplexVector_O> TemplatedBase;
@@ -124,7 +120,6 @@ class SimpleVector_int16_t_O;
124120
typedef template_SimpleVector<SimpleVector_int16_t_O, int16_t, AbstractSimpleVector_O> specialized_SimpleVector_int16_t;
125121
class SimpleVector_int16_t_O : public specialized_SimpleVector_int16_t {
126122
LISP_CLASS(core, CorePkg, SimpleVector_int16_t_O, "SimpleVector_int16_t", AbstractSimpleVector_O);
127-
virtual ~SimpleVector_int16_t_O(){};
128123

129124
public:
130125
typedef specialized_SimpleVector_int16_t TemplatedBase;
@@ -154,7 +149,6 @@ class SimpleVector_int16_t_O : public specialized_SimpleVector_int16_t {
154149
namespace core {
155150
class MDArray_int16_t_O : public template_Array<MDArray_int16_t_O, SimpleMDArray_int16_t_O, SimpleVector_int16_t_O, MDArray_O> {
156151
LISP_CLASS(core, CorePkg, MDArray_int16_t_O, "MDArray_int16_t", MDArray_O);
157-
virtual ~MDArray_int16_t_O(){};
158152

159153
public:
160154
typedef template_Array<MDArray_int16_t_O, SimpleMDArray_int16_t_O, SimpleVector_int16_t_O, MDArray_O> TemplatedBase;
@@ -168,7 +162,6 @@ class MDArray_int16_t_O : public template_Array<MDArray_int16_t_O, SimpleMDArray
168162
namespace core {
169163
class SimpleMDArray_int16_t_O : public template_SimpleArray<SimpleMDArray_int16_t_O, SimpleVector_int16_t_O, SimpleMDArray_O> {
170164
LISP_CLASS(core, CorePkg, SimpleMDArray_int16_t_O, "SimpleMDArray_int16_t", SimpleMDArray_O);
171-
virtual ~SimpleMDArray_int16_t_O(){};
172165

173166
public:
174167
typedef template_SimpleArray<SimpleMDArray_int16_t_O, SimpleVector_int16_t_O, SimpleMDArray_O> TemplatedBase;
@@ -181,7 +174,6 @@ class SimpleMDArray_int16_t_O : public template_SimpleArray<SimpleMDArray_int16_
181174
namespace core {
182175
class ComplexVector_int16_t_O : public template_Vector<ComplexVector_int16_t_O, SimpleVector_int16_t_O, ComplexVector_O> {
183176
LISP_CLASS(core, CorePkg, ComplexVector_int16_t_O, "ComplexVector_int16_t", ComplexVector_O);
184-
virtual ~ComplexVector_int16_t_O(){};
185177

186178
public:
187179
typedef template_Vector<ComplexVector_int16_t_O, SimpleVector_int16_t_O, ComplexVector_O> TemplatedBase;

0 commit comments

Comments
 (0)