Changeset 04570c7 for src/Common/GC.h
- Timestamp:
- Apr 13, 2018, 4:39:28 PM (6 years ago)
- Branches:
- new-env, with_gc
- Children:
- 6f81db3
- Parents:
- 3205495
- git-author:
- Aaron Moss <a3moss@…> (04/13/18 16:27:11)
- git-committer:
- Aaron Moss <a3moss@…> (04/13/18 16:39:28)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/GC.h
r3205495 r04570c7 38 38 void register_static_root(BaseSyntaxNode*); 39 39 40 /// Use younggeneration for subsequent new objects40 /// Start new generation for subsequent new objects 41 41 void new_generation(); 42 42 … … 44 44 void trace_static_roots(); 45 45 46 /// Collects the young generation, placing survivors in old generation. 47 /// Old generation is used for subsequent new objects. 46 /// Collects the youngest generation, placing survivors in previous generation. 47 /// Young generation objects cannot be kept alive by pointers from older generation. 48 /// Older generation is used for subsequent new objects. 48 49 void collect_young(); 49 50 50 /// Collects old generation; use oldgeneration afterward.51 /// Error if currently using young generation51 /// Collects oldest generation; use oldest generation afterward. 52 /// Error if currently using younger generation 52 53 void collect(); 53 54 … … 58 59 GC(); 59 60 60 bool mark; ///< The current collection's mark bit61 bool using_young; ///< Is the young generation in use?62 63 61 using Generation = std::vector<GC_Object*>; 64 Generation old; ///< Old generation 65 Generation young; ///< Young generation 62 std::vector<Generation> gens; ///< Set of generations; always at least one 66 63 67 64 using StaticRoots = std::vector<BaseSyntaxNode*>; 68 StaticRoots static_roots; ///< Set of static-lifetime roots 65 StaticRoots static_roots; ///< Set of static-lifetime roots 66 67 bool mark; ///< The current collection's mark bit 68 unsigned g; ///< The current number generation in use 69 69 }; 70 70
Note: See TracChangeset
for help on using the changeset viewer.