[stdlib] Reduce inline code volume from sorting macros (#2831)

* reduce codegen in sorting macros

* remove testing file...

* Fix and some renaming, removing some sub-modules that should not be in use.

---------

Co-authored-by: Christoffer Lerno <christoffer@aegik.com>
This commit is contained in:
Zack Puhl
2026-01-31 14:19:57 -05:00
committed by GitHub
parent 3d512abaf7
commit 12975d07ac
8 changed files with 68 additions and 63 deletions

View File

@@ -712,6 +712,7 @@ typedef struct Decl_
bool no_strip : 1;
bool is_cond : 1;
bool is_if : 1;
bool is_body_checked : 1;
bool attr_nopadding : 1;
bool attr_compact : 1;
bool resolved_attributes : 1;

View File

@@ -200,6 +200,7 @@ static inline bool sema_analyse_assert_stmt(SemaContext *context, Ast *statement
*/
static inline bool sema_analyse_break_stmt(SemaContext *context, Ast *statement)
{
ASSERT(!statement->contbreak_stmt.is_resolved);
// If there is no break target and there is no label,
// we skip.
if (!context->break_jump.target && !statement->contbreak_stmt.is_label)
@@ -3430,7 +3431,8 @@ bool sema_analyse_function_body(SemaContext *context, Decl *func)
{
// Stop if it's already poisoned.
if (!decl_ok(func)) return false;
if (func->is_body_checked) return true;
func->is_body_checked = true;
context->generic_instance = func->is_templated ? declptr(func->instance_id) : NULL;
// Check the signature here we test for variadic raw, since we don't support it.
Signature *signature = &func->func_decl.signature;