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

bacek at svn.parrot.org bacek at svn.parrot.org
Tue Feb 16 10:39:58 UTC 2010


Author: bacek
Date: Tue Feb 16 10:39:57 2010
New Revision: 44006
URL: https://trac.parrot.org/parrot/changeset/44006

Log:
PIRC: Really use headerizer

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

Modified: trunk/compilers/pirc/src/piremit.c
==============================================================================
--- trunk/compilers/pirc/src/piremit.c	Tue Feb 16 10:39:31 2010	(r44005)
+++ trunk/compilers/pirc/src/piremit.c	Tue Feb 16 10:39:57 2010	(r44006)
@@ -14,7 +14,7 @@
 
 #include "parrot/oplib/ops.h"
 
-/* HEADERIZER HFILE: none */
+/* HEADERIZER HFILE: compilers/pirc/src/piremit.h */
 
 /* HEADERIZER BEGIN: static */
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
@@ -177,7 +177,7 @@
 
 */
 void
-print_key(ARGIN(lexer_state * const lexer), key * const k)
+print_key(ARGIN(lexer_state * const lexer), ARGIN(key * const k))
 {
     key_entry *iter;
 
@@ -209,7 +209,7 @@
 
 */
 void
-print_target(ARGIN(lexer_state * const lexer), target * const t)
+print_target(ARGIN(lexer_state * const lexer),  ARGIN(target * const t))
 {
     PARROT_ASSERT(t->info);
     fprintf(out, "%c%d", pir_register_types[t->info->type], t->info->color);
@@ -230,7 +230,8 @@
 
 */
 void
-print_constant(ARGIN(lexer_state * const lexer), constant * const c)
+print_constant(ARGIN(lexer_state * const lexer),
+        ARGIN(constant * const c))
 {
     switch (c->type) {
       case INT_VAL:
@@ -265,7 +266,8 @@
 
 */
 void
-print_expr(ARGIN(lexer_state * const lexer), expression * const expr)
+print_expr(ARGIN(lexer_state * const lexer),
+        ARGIN(expression * const expr))
 {
     switch (expr->type) {
       case EXPR_TARGET:
@@ -302,7 +304,8 @@
 
 */
 void
-print_expressions(ARGIN(lexer_state * const lexer), expression * const expr)
+print_expressions(ARGIN(lexer_state * const lexer),
+        ARGIN(expression * const expr))
 {
     expression *iter;
 
@@ -331,7 +334,8 @@
 
 */
 void
-print_instruction(ARGIN(lexer_state * const lexer), instruction * const ins)
+print_instruction(ARGIN(lexer_state * const lexer),
+        ARGIN(instruction * const ins))
 {
     PARROT_ASSERT(ins != NULL);
 
@@ -367,7 +371,8 @@
 
 */
 void
-print_statement(ARGIN(lexer_state * const lexer), subroutine * const sub)
+print_statement(ARGIN(lexer_state * const lexer),
+        ARGIN(subroutine * const sub))
 {
     instruction *statiter;
 
@@ -551,7 +556,8 @@
 
 */
 void
-emit_pir_subs(ARGIN(lexer_state * const lexer), char const * const outfile)
+emit_pir_subs(ARGIN(lexer_state * const lexer),
+        ARGIN(char const * const outfile))
 {
     subroutine *subiter;
 

Modified: trunk/compilers/pirc/src/piremit.h
==============================================================================
--- trunk/compilers/pirc/src/piremit.h	Tue Feb 16 10:39:31 2010	(r44005)
+++ trunk/compilers/pirc/src/piremit.h	Tue Feb 16 10:39:57 2010	(r44006)
@@ -10,12 +10,91 @@
 struct lexer_state;
 struct constant;
 
-void print_subs(struct lexer_state * const lexer);
-void emit_pir_subs(struct lexer_state * const lexer, char const * const outfile);
-void emit_pbc(struct lexer_state * const lexer, const char *outfile);
+/* HEADERIZER BEGIN: compilers/pirc/src/piremit.c */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 
+void emit_pbc(ARGIN(lexer_state * const lexer), ARGIN(const char *outfile))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
 
-int emit_pbc_const(struct lexer_state * const lexer, struct constant * const pirconst);
+void emit_pir_subs(
+    ARGIN(lexer_state * const lexer),
+    ARGIN(char const * const outfile))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
+
+void print_constant(
+    ARGIN(lexer_state * const lexer),
+    ARGIN(constant * const c))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
+
+void print_expr(
+    ARGIN(lexer_state * const lexer),
+    ARGIN(expression * const expr))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
+
+void print_expressions(
+    ARGIN(lexer_state * const lexer),
+    ARGIN(expression * const expr))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
+
+void print_instruction(
+    ARGIN(lexer_state * const lexer),
+    ARGIN(instruction * const ins))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
+
+void print_key(ARGIN(lexer_state * const lexer), ARGIN(key * const k))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
+
+void print_statement(
+    ARGIN(lexer_state * const lexer),
+    ARGIN(subroutine * const sub))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
+
+void print_subs(struct ARGIN(lexer_state * const lexer))
+        __attribute__nonnull__(1);
+
+void print_target(ARGIN(lexer_state * const lexer), ARGIN(target * const t))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
+
+#define ASSERT_ARGS_emit_pbc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(lexer) \
+    , PARROT_ASSERT_ARG(outfile))
+#define ASSERT_ARGS_emit_pir_subs __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(lexer) \
+    , PARROT_ASSERT_ARG(outfile))
+#define ASSERT_ARGS_print_constant __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(lexer) \
+    , PARROT_ASSERT_ARG(c))
+#define ASSERT_ARGS_print_expr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(lexer) \
+    , PARROT_ASSERT_ARG(expr))
+#define ASSERT_ARGS_print_expressions __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(lexer) \
+    , PARROT_ASSERT_ARG(expr))
+#define ASSERT_ARGS_print_instruction __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(lexer) \
+    , PARROT_ASSERT_ARG(ins))
+#define ASSERT_ARGS_print_key __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(lexer) \
+    , PARROT_ASSERT_ARG(k))
+#define ASSERT_ARGS_print_statement __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(lexer) \
+    , PARROT_ASSERT_ARG(sub))
+#define ASSERT_ARGS_print_subs __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_print_target __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(lexer) \
+    , PARROT_ASSERT_ARG(t))
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
+/* HEADERIZER END: compilers/pirc/src/piremit.c */
 
 #endif /* PARROT_PIR_PIREMIT_H_GUARD */
 


More information about the parrot-commits mailing list