[svn:parrot] r44014 - trunk/compilers/pirc/src

bacek at svn.parrot.org bacek at svn.parrot.org
Tue Feb 16 11:53:39 UTC 2010


Author: bacek
Date: Tue Feb 16 11:53:39 2010
New Revision: 44014
URL: https://trac.parrot.org/parrot/changeset/44014

Log:
PIRC: Add ASSERT_ARG

Modified:
   trunk/compilers/pirc/src/piremit.c

Modified: trunk/compilers/pirc/src/piremit.c
==============================================================================
--- trunk/compilers/pirc/src/piremit.c	Tue Feb 16 11:17:58 2010	(r44013)
+++ trunk/compilers/pirc/src/piremit.c	Tue Feb 16 11:53:39 2010	(r44014)
@@ -179,6 +179,7 @@
 void
 print_key(ARGIN(lexer_state * const lexer), ARGIN(key * const k))
 {
+    ASSERT_ARGS(print_key)
     key_entry *iter;
 
     fprintf(out, "[");
@@ -211,6 +212,7 @@
 void
 print_target(ARGIN(lexer_state * const lexer),  ARGIN(target * const t))
 {
+    ASSERT_ARGS(print_target)
     PARROT_ASSERT(t->info);
     fprintf(out, "%c%d", pir_register_types[t->info->type], t->info->color);
 
@@ -233,6 +235,7 @@
 print_constant(ARGIN(lexer_state * const lexer),
         ARGIN(constant * const c))
 {
+    ASSERT_ARGS(print_constant)
     switch (c->type) {
       case INT_VAL:
         fprintf(out, "%d", c->val.ival);
@@ -269,6 +272,7 @@
 print_expr(ARGIN(lexer_state * const lexer),
         ARGIN(expression * const expr))
 {
+    ASSERT_ARGS(print_expr)
     switch (expr->type) {
       case EXPR_TARGET:
         print_target(lexer, expr->expr.t);
@@ -307,6 +311,7 @@
 print_expressions(ARGIN(lexer_state * const lexer),
         ARGIN(expression * const expr))
 {
+    ASSERT_ARGS(print_expressions)
     expression *iter;
 
     if (expr == NULL)
@@ -337,7 +342,7 @@
 print_instruction(ARGIN(lexer_state * const lexer),
         ARGIN(instruction * const ins))
 {
-    PARROT_ASSERT(ins != NULL);
+    ASSERT_ARGS(print_instruction)
 
     if (ins->label) {
         if (TEST_FLAG(lexer->flags, LEXER_FLAG_EMIT_PASM))
@@ -374,6 +379,7 @@
 print_statement(ARGIN(lexer_state * const lexer),
         ARGIN(subroutine * const sub))
 {
+    ASSERT_ARGS(print_statement)
     instruction *statiter;
 
     if (sub->statements == NULL)
@@ -445,6 +451,7 @@
 void
 print_subs(struct ARGIN(lexer_state * const lexer))
 {
+    ASSERT_ARGS(print_subs)
     subroutine *subiter;
 
     if (lexer->subs == NULL)
@@ -559,6 +566,7 @@
 emit_pir_subs(ARGIN(lexer_state * const lexer),
         ARGIN(char const * const outfile))
 {
+    ASSERT_ARGS(emit_pir_subs)
     subroutine *subiter;
 
     if (lexer->subs == NULL)
@@ -1031,6 +1039,7 @@
 emit_pbc(ARGIN(lexer_state * const lexer),
         ARGIN(const char *outfile))
 {
+    ASSERT_ARGS(emit_pbc)
     subroutine *subiter;
 
     if (!outfile)


More information about the parrot-commits mailing list