Ignore:
Timestamp:
Apr 30, 2011, 12:24:47 AM (11 years ago)
Author:
Sam Hocevar
Message:

lisp: some refactoring and code removal in the Lisp GC.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/lisp/lisp_gc.h

    r555 r558  
    1313#define __LISP_GC_HPP_
    1414
    15 extern grow_stack<void> l_user_stack;       // stack user progs can push data and have it GCed
     15// Stack user progs can push data and have it GCed
     16extern grow_stack<void> l_user_stack;
    1617
    17 void collect_space(int which_space, int grow); // should be tmp or permenant
     18class LispGC
     19{
     20public:
     21    // Collect temporary or permanent spaces
     22    static void CollectSpace(int which_space, int grow);
    1823
    19 void register_pointer(void *&addr);
    20 void unregister_pointer(void *&addr);
     24private:
     25    static LArray *CollectArray(LArray *x);
     26    static LList *CollectList(LList *x);
     27    static LObject *CollectObject(LObject *x);
     28    static void CollectSymbols(LSymbol *root);
     29    static void CollectStacks();
     30};
    2131
    2232// This pointer reference stack lists all pointers to temporary lisp
     
    4151    }
    4252
    43     // stack of user pointers, user pointers get remapped on GC
    44     static grow_stack<void *>stack;
     53    // Stack of user pointers, user pointers get remapped on GC
     54    static grow_stack<void *> stack;
    4555};
    4656
Note: See TracChangeset for help on using the changeset viewer.