Skip to content

Commit

Permalink
Change HuCC to make the is_small_array() check public.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrandwood committed Dec 7, 2024
1 parent f5b488a commit 8e4a295
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hucc/optimize.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ inline bool is_usepr (INS *i)
return (icode_flags[i->ins_code] & IS_USEPR);
}

inline bool is_small_array (SYMBOL *sym)
bool is_small_array (SYMBOL *sym)
{
return (sym->identity == ARRAY && sym->alloc_size > 0 && sym->alloc_size <= 256);
}
Expand Down Expand Up @@ -504,7 +504,7 @@ void push_ins (INS *ins)

q_ins[q_wr] = *ins;

/* can't optimize a comment */
/* can't optimize debug information */
if (ins->ins_code == I_DEBUG)
return;

Expand Down
1 change: 1 addition & 0 deletions src/hucc/optimize.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ extern int q_rd;
extern int q_wr;
extern int q_nb;

bool is_small_array (SYMBOL *sym);
void push_ins (INS *ins);
void flush_ins (void);
void flush_ins_label (int nextlabel);
Expand Down

0 comments on commit 8e4a295

Please sign in to comment.