-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move MarkBag* funcs into GCs so they can inline MarkBag
- Loading branch information
1 parent
acb61ab
commit aadaecd
Showing
4 changed files
with
66 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/**************************************************************************** | ||
** | ||
** This file is part of GAP, a system for computational discrete algebra. | ||
** | ||
** Copyright of GAP belongs to its developers, whose names are too numerous | ||
** to list here. Please refer to the COPYRIGHT file for details. | ||
** | ||
** SPDX-License-Identifier: GPL-2.0-or-later | ||
** | ||
** This file includes functions which are required by all GCs. For efficiency | ||
** it is important these are defined in the same function as "MarkBag", so | ||
** this file should be included in each GC. | ||
*/ | ||
|
||
#include "error.h" | ||
#include "gasman.h" | ||
|
||
void MarkArrayOfBags(const Bag array[], UInt count) | ||
{ | ||
for (UInt i = 0; i < count; i++) { | ||
MarkBag(array[i]); | ||
} | ||
} | ||
|
||
void MarkNoSubBags(Bag bag) | ||
{ | ||
} | ||
|
||
void MarkOneSubBags(Bag bag) | ||
{ | ||
MarkArrayOfBags(CONST_PTR_BAG(bag), 1); | ||
} | ||
|
||
void MarkTwoSubBags(Bag bag) | ||
{ | ||
MarkArrayOfBags(CONST_PTR_BAG(bag), 2); | ||
} | ||
|
||
void MarkThreeSubBags(Bag bag) | ||
{ | ||
MarkArrayOfBags(CONST_PTR_BAG(bag), 3); | ||
} | ||
|
||
void MarkFourSubBags(Bag bag) | ||
{ | ||
MarkArrayOfBags(CONST_PTR_BAG(bag), 4); | ||
} | ||
|
||
void MarkAllSubBags(Bag bag) | ||
{ | ||
MarkArrayOfBags(CONST_PTR_BAG(bag), SIZE_BAG(bag) / sizeof(Bag)); | ||
} | ||
|
||
void MarkAllButFirstSubBags(Bag bag) | ||
{ | ||
MarkArrayOfBags(CONST_PTR_BAG(bag) + 1, SIZE_BAG(bag) / sizeof(Bag) - 1); | ||
} | ||
|
||
void MarkAllSubBagsDefault(Bag bag) | ||
{ | ||
MarkArrayOfBags(CONST_PTR_BAG(bag), SIZE_BAG(bag) / sizeof(Bag)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters