[svn:parrot] r44004 - trunk/compilers/pirc/src
bacek at svn.parrot.org
bacek at svn.parrot.org
Tue Feb 16 10:39:03 UTC 2010
Author: bacek
Date: Tue Feb 16 10:39:03 2010
New Revision: 44004
URL: https://trac.parrot.org/parrot/changeset/44004
Log:
PIRC: Really use headerizer
Modified:
trunk/compilers/pirc/src/pircompunit.c
trunk/compilers/pirc/src/pircompunit.h
Modified: trunk/compilers/pirc/src/pircompunit.c
==============================================================================
--- trunk/compilers/pirc/src/pircompunit.c Tue Feb 16 10:38:43 2010 (r44003)
+++ trunk/compilers/pirc/src/pircompunit.c Tue Feb 16 10:39:03 2010 (r44004)
@@ -901,7 +901,7 @@
PARROT_IGNORABLE_RESULT
PARROT_CANNOT_RETURN_NULL
argument *
-add_arg(argument *last, argument * const newarg)
+add_arg(ARGMOD(argument *last), argument * const newarg)
{
PARROT_ASSERT(last);
PARROT_ASSERT(newarg);
@@ -2193,7 +2193,7 @@
*/
void
-push_operand(ARGIN(lexer_state * const lexer), NOTNULL(expression * const operand))
+push_operand(ARGIN(lexer_state * const lexer), ARGIN(expression * const operand))
{
PARROT_ASSERT(CURRENT_INSTRUCTION(lexer));
@@ -2236,7 +2236,7 @@
PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
expression *
-expr_from_key(ARGIN(lexer_state * const lexer), NOTNULL(key * const k))
+expr_from_key(ARGIN(lexer_state * const lexer), ARGIN(key * const k))
{
expression *e = new_expr(lexer, EXPR_KEY);
e->expr.k = k;
@@ -2278,7 +2278,7 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
key *
-new_key(ARGIN(lexer_state * const lexer), NOTNULL(expression * const expr))
+new_key(ARGIN(lexer_state * const lexer), ARGIN(expression * const expr))
{
key *k = pir_mem_allocate_zeroed_typed(lexer, key);
k->head = new_key_entry(lexer, expr);
@@ -2301,8 +2301,8 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
key *
-add_key(ARGIN(lexer_state * const lexer), NOTNULL(key * const keylist),
- NOTNULL(expression * const exprkey))
+add_key(ARGIN(lexer_state * const lexer), ARGIN(key * const keylist),
+ ARGIN(expression * const exprkey))
{
key_entry *newkey = new_key_entry(lexer, exprkey);
key_entry *iter = keylist->head;
@@ -2444,7 +2444,7 @@
*/
void
-update_op(ARGIN(lexer_state * const lexer), NOTNULL(instruction * const instr), int newop)
+update_op(ARGIN(lexer_state * const lexer), ARGIN(instruction * const instr), int newop)
{
/* Deduct number of ints needed for the old instruction, if there is one.
* This is necessary during strength reduction and other optimizations, once
Modified: trunk/compilers/pirc/src/pircompunit.h
==============================================================================
--- trunk/compilers/pirc/src/pircompunit.h Tue Feb 16 10:38:43 2010 (r44003)
+++ trunk/compilers/pirc/src/pircompunit.h Tue Feb 16 10:39:03 2010 (r44004)
@@ -399,14 +399,16 @@
PARROT_IGNORABLE_RESULT
PARROT_CANNOT_RETURN_NULL
-argument * add_arg(argument *last, argument * const newarg);
+argument * add_arg(ARGMOD(argument *last), argument * const newarg)
+ __attribute__nonnull__(1)
+ FUNC_MODIFIES(*last);
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
key * add_key(
ARGIN(lexer_state * const lexer),
- NOTNULL(key * const keylist),
- NOTNULL(expression * const exprkey))
+ ARGIN(key * const keylist),
+ ARGIN(expression * const exprkey))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
__attribute__nonnull__(3);
@@ -469,7 +471,7 @@
PARROT_WARN_UNUSED_RESULT
expression * expr_from_key(
ARGIN(lexer_state * const lexer),
- NOTNULL(key * const k))
+ ARGIN(key * const k))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
@@ -543,7 +545,7 @@
PARROT_CANNOT_RETURN_NULL
key * new_key(
ARGIN(lexer_state * const lexer),
- NOTNULL(expression * const expr))
+ ARGIN(expression * const expr))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
@@ -587,7 +589,7 @@
void push_operand(
ARGIN(lexer_state * const lexer),
- NOTNULL(expression * const operand))
+ ARGIN(expression * const operand))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
@@ -756,7 +758,7 @@
void update_op(
ARGIN(lexer_state * const lexer),
- NOTNULL(instruction * const instr),
+ ARGIN(instruction * const instr),
int newop)
__attribute__nonnull__(1)
__attribute__nonnull__(2);
@@ -766,7 +768,8 @@
unsigned reg_usage[NUM_PARROT_TYPES])
__attribute__nonnull__(1);
-#define ASSERT_ARGS_add_arg __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_add_arg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(last))
#define ASSERT_ARGS_add_key __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(lexer) \
, PARROT_ASSERT_ARG(keylist) \
More information about the parrot-commits
mailing list