Permalink
Browse files

PIRC: Add ASSERT_ARGS

git-svn-id: https://svn.parrot.org/parrot/trunk@44017 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
bacek committed Feb 16, 2010
1 parent 25a0897 commit 19132795d2c7aa8efaddabb552c5f7f05335e1e4
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/pirpcc.c
View
@@ -192,6 +192,7 @@ C<result>.
static int
calculate_pcc_target_flags(ARGIN(target * const result))
{
+ ASSERT_ARGS(calculate_pcc_target_flags)
int flag = 0;
@@ -227,6 +228,7 @@ argument C<arg>. An int encoding the flags is returned.
static int
calculate_pcc_argument_flags(ARGIN(argument * const arg))
{
+ ASSERT_ARGS(calculate_pcc_argument_flags)
int flag = 0;
switch (arg->value->type) {
@@ -330,6 +332,7 @@ otherwise it's a standard return sequence.
void
emit_sub_epilogue(ARGIN(lexer_state * const lexer))
{
+ ASSERT_ARGS(emit_sub_epilogue)
if (TEST_FLAG(lexer->subs->flags, PIRC_SUB_FLAG_MAIN))
new_sub_instr(lexer, PARROT_OP_end, "end", 0);
@@ -527,6 +530,7 @@ this is the number of parameters of this function.
void
generate_parameters_instr(ARGIN(lexer_state * const lexer), unsigned num_parameters)
{
+ ASSERT_ARGS(generate_parameters_instr)
if (TEST_FLAG(CURRENT_SUB(lexer)->flags , (PIRC_SUB_FLAG_METHOD | PIRC_SUB_FLAG_VTABLE))) {
++num_parameters; /* didn't count implicit "self" parameter yet. */
}
@@ -553,6 +557,7 @@ void
generate_getresults_instr(ARGIN(lexer_state * const lexer),
ARGIN(target * const targetlist))
{
+ ASSERT_ARGS(generate_getresults_instr)
/* add this point we know that there's only 1 target, as that's the convention for
* exception handlers:
*
@@ -616,6 +621,7 @@ static target *
get_invoked_sub(ARGIN(lexer_state * const lexer),
ARGIN(target * const sub))
{
+ ASSERT_ARGS(get_invoked_sub)
target *subreg = NULL;
symbol *sym = NULL;
global_label *glob = NULL;
@@ -929,6 +935,7 @@ void
convert_inv_to_instr(ARGIN(lexer_state * const lexer),
ARGIN(invocation * const inv))
{
+ ASSERT_ARGS(convert_inv_to_instr)
switch (inv->type) {
case CALL_PCC:
convert_pcc_call(lexer, inv);

0 comments on commit 1913279

Please sign in to comment.