Skip to content

Commit

Permalink
PIRC: Really use headerizer
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.parrot.org/parrot/trunk@44011 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
bacek committed Feb 16, 2010
1 parent 51336ab commit 7531ab5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
24 changes: 12 additions & 12 deletions src/pirsymbol.c
Expand Up @@ -167,7 +167,7 @@ Assign a new register to symbol C<sym>, and create a new live interval for C<sym
*/
void
assign_vanilla_register(NOTNULL(lexer_state * const lexer),
assign_vanilla_register(ARGIN(lexer_state * const lexer),
ARGMOD(symbol * const sym))
{
sym->info.color = next_register(lexer, sym->info.type);
Expand Down Expand Up @@ -204,7 +204,7 @@ This code is taken from IMCC.
PARROT_PURE_FUNCTION
PARROT_WARN_UNUSED_RESULT
unsigned
get_hashcode(NOTNULL(char const * const str), unsigned num_buckets)
get_hashcode(ARGIN(char const * const str), unsigned num_buckets)
{
unsigned long key = 0;
char const *s;
Expand All @@ -226,8 +226,8 @@ Store the bucket C<buck> in the hashtable C<table> at index C<hash>.
*/
void
store_bucket(NOTNULL(hashtable * const table),
NOTNULL(bucket * const buck), unsigned long hash)
store_bucket(ARGIN(hashtable * const table),
ARGIN(bucket * const buck), unsigned long hash)
{
buck->next = table->contents[hash];
table->contents[hash] = buck;
Expand All @@ -245,7 +245,7 @@ Return the bucket at hash index C<hash> from the hashtable C<table>.
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
bucket *
get_bucket(NOTNULL(hashtable * const table), unsigned long hash)
get_bucket(ARGIN(hashtable * const table), unsigned long hash)
{
return table->contents[hash];
}
Expand All @@ -263,8 +263,8 @@ Create a new symbol node, returns it after initialization.
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
symbol *
new_symbol(NOTNULL(lexer_state * const lexer),
NOTNULL(char const * const name), pir_type type)
new_symbol(ARGIN(lexer_state * const lexer),
ARGIN(char const * const name), pir_type type)
{
symbol *sym = pir_mem_allocate_zeroed_typed(lexer, symbol);

Expand All @@ -290,8 +290,8 @@ own symbol table).
*/
void
declare_local(NOTNULL(lexer_state * const lexer), pir_type type,
NOTNULL(symbol * const list))
declare_local(ARGIN(lexer_state * const lexer), pir_type type,
ARGIN(symbol * const list))
{
symbol *iter = list;
hashtable *table = &CURRENT_SUB(lexer)->symbols;
Expand Down Expand Up @@ -344,7 +344,7 @@ no subroutines, the function will do nothing and return.
*/
void
check_unused_symbols(NOTNULL(lexer_state * const lexer))
check_unused_symbols(ARGIN(lexer_state * const lexer))
{
subroutine *subiter;

Expand Down Expand Up @@ -393,8 +393,8 @@ allocate a PASM register for it.
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
symbol *
find_symbol(NOTNULL(lexer_state * const lexer),
NOTNULL(char const * const name))
find_symbol(ARGIN(lexer_state * const lexer),
ARGIN(char const * const name))
{
hashtable *table = &CURRENT_SUB(lexer)->symbols;
unsigned long hashcode = get_hashcode(name, table->size);
Expand Down
24 changes: 12 additions & 12 deletions src/pirsymbol.h
Expand Up @@ -79,22 +79,22 @@ extern const int valuetype_pirtype_clut[10];
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */

void assign_vanilla_register(
NOTNULL(lexer_state * const lexer),
ARGIN(lexer_state * const lexer),
ARGMOD(symbol * const sym))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
FUNC_MODIFIES(* const sym);

void check_unused_symbols(NOTNULL(lexer_state * const lexer))
void check_unused_symbols(ARGIN(lexer_state * const lexer))
__attribute__nonnull__(1);

int color_reg(ARGIN(lexer_state * const lexer), pir_type type, int regno)
__attribute__nonnull__(1);

void declare_local(
NOTNULL(lexer_state * const lexer),
ARGIN(lexer_state * const lexer),
pir_type type,
NOTNULL(symbol * const list))
ARGIN(symbol * const list))
__attribute__nonnull__(1)
__attribute__nonnull__(3);

Expand Down Expand Up @@ -132,33 +132,33 @@ pir_reg * find_register(
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
symbol * find_symbol(
NOTNULL(lexer_state * const lexer),
NOTNULL(char const * const name))
ARGIN(lexer_state * const lexer),
ARGIN(char const * const name))
__attribute__nonnull__(1)
__attribute__nonnull__(2);

PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
bucket * get_bucket(NOTNULL(hashtable * const table), unsigned long hash)
bucket * get_bucket(ARGIN(hashtable * const table), unsigned long hash)
__attribute__nonnull__(1);

PARROT_PURE_FUNCTION
PARROT_WARN_UNUSED_RESULT
unsigned get_hashcode(NOTNULL(char const * const str), unsigned num_buckets)
unsigned get_hashcode(ARGIN(char const * const str), unsigned num_buckets)
__attribute__nonnull__(1);

PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
symbol * new_symbol(
NOTNULL(lexer_state * const lexer),
NOTNULL(char const * const name),
ARGIN(lexer_state * const lexer),
ARGIN(char const * const name),
pir_type type)
__attribute__nonnull__(1)
__attribute__nonnull__(2);

void store_bucket(
NOTNULL(hashtable * const table),
NOTNULL(bucket * const buck),
ARGIN(hashtable * const table),
ARGIN(bucket * const buck),
unsigned long hash)
__attribute__nonnull__(1)
__attribute__nonnull__(2);
Expand Down

0 comments on commit 7531ab5

Please sign in to comment.