Skip to content

Commit

Permalink
Rename Alloc_Series_Node() to Alloc_Stub()
Browse files Browse the repository at this point in the history
Stub is a relatively new term, and is what should have been
used in naming this routine.
  • Loading branch information
hostilefork committed Aug 4, 2023
1 parent 6926f08 commit 55100df
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/core/c-word.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ Symbol(const*) Intern_UTF8_Managed_Core(
new_interning: {

Binary(*) s = BIN(Make_Series_Into(
preallocated ? unwrap(preallocated) : Alloc_Series_Node(),
preallocated ? unwrap(preallocated) : Alloc_Stub(),
size + 1, // if small, fits in a REBSER node (no data allocation)
FLAG_FLAVOR(SYMBOL) | SERIES_FLAG_FIXED_SIZE | NODE_FLAG_MANAGED
));
Expand Down
2 changes: 1 addition & 1 deletion src/core/evaluator/c-action.c
Original file line number Diff line number Diff line change
Expand Up @@ -1233,7 +1233,7 @@ void Push_Action(
assert(f->varlist == nullptr);

Stub* s = Prep_Stub(
Alloc_Series_Node(), // not preallocated
Alloc_Stub(), // not preallocated
SERIES_MASK_VARLIST
| SERIES_FLAG_FIXED_SIZE // FRAME!s don't expand ATM
);
Expand Down
2 changes: 1 addition & 1 deletion src/include/datatypes/sys-array.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ inline static Array(*) Make_Array_Core_Into(
}

#define Make_Array_Core(capacity,flags) \
Make_Array_Core_Into(Alloc_Series_Node(), (capacity), (flags))
Make_Array_Core_Into(Alloc_Stub(), (capacity), (flags))

#define Make_Array(capacity) \
Make_Array_Core((capacity), ARRAY_MASK_HAS_FILE_LINE)
Expand Down
2 changes: 1 addition & 1 deletion src/include/datatypes/sys-context.h
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ inline static Context(*) Steal_Context_Vars(Context(*) c, Node* keysource) {
// etc.--use constant assignments and only copy the remaining fields.
//
Stub* copy = Prep_Stub(
Alloc_Series_Node(), // not preallocated
Alloc_Stub(), // not preallocated
SERIES_MASK_VARLIST
| SERIES_FLAG_FIXED_SIZE
);
Expand Down
4 changes: 2 additions & 2 deletions src/include/sys-node.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ inline static void *Alloc_Pooled(PoolID pool_id) {
fail (Error_No_Memory(pool->wide * pool->num_units_per_segment));
}

#define Alloc_Series_Node() ( \
(GC_Ballast -= sizeof(REBSER)) <= 0 ? SET_SIGNAL(SIG_RECYCLE) : NOOP, \
#define Alloc_Stub() ( \
(GC_Ballast -= sizeof(Stub)) <= 0 ? SET_SIGNAL(SIG_RECYCLE) : NOOP, \
Alloc_Pooled(STUB_POOL)) // won't pass SER() yet, don't cast it


Expand Down

0 comments on commit 55100df

Please sign in to comment.