Skip to content

Commit

Permalink
Mark variable cells as needing cleanup
Browse files Browse the repository at this point in the history
Symbols should have had cleanup for the same reason - reusing
TL indices - but don't seem to have for quite some time. It's
probably not that important in practice since symbols/cells are
hardly ever gonna be garbage collected, but we might as well try
to get it right.
  • Loading branch information
Bike committed Sep 25, 2023
1 parent daf729b commit 0f686f4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions include/clasp/core/symbol.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ THE SOFTWARE.
#define IS_CONSTANT 0x02
#define IS_MACRO 0x04

template <>
struct gctools::GCInfo<core::VariableCell_O> {
static bool constexpr NeedsInitialization = false;
#ifdef CLASP_THREADS
// Gotta release the binding index.
static bool constexpr NeedsFinalization = true;
#else
static bool constexpr NeedsFinalization = false;
#endif
static GCInfo_policy constexpr Policy = normal;
};

template <>
struct gctools::GCInfo<core::Symbol_O> {
Expand Down

0 comments on commit 0f686f4

Please sign in to comment.