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

bacek at svn.parrot.org bacek at svn.parrot.org
Mon Feb 15 21:25:35 UTC 2010


Author: bacek
Date: Mon Feb 15 21:25:33 2010
New Revision: 43969
URL: https://trac.parrot.org/parrot/changeset/43969

Log:
Add headerizer directives to PIRC

Modified:
   trunk/compilers/pirc/src/pir.y
   trunk/compilers/pirc/src/pircompiler.c
   trunk/compilers/pirc/src/pircompunit.c
   trunk/compilers/pirc/src/piremit.c
   trunk/compilers/pirc/src/pirmacro.c
   trunk/compilers/pirc/src/pirparser.c
   trunk/compilers/pirc/src/pirpcc.c
   trunk/compilers/pirc/src/pirregalloc.c
   trunk/compilers/pirc/src/pirsymbol.c

Modified: trunk/compilers/pirc/src/pir.y
==============================================================================
--- trunk/compilers/pirc/src/pir.y	Mon Feb 15 20:52:36 2010	(r43968)
+++ trunk/compilers/pirc/src/pir.y	Mon Feb 15 21:25:33 2010	(r43969)
@@ -88,6 +88,8 @@
 
 #endif
 
+/* HEADERIZER HFILE: none */
+
 char *expand_macro(yyscan_t yyscanner, macro_def * const macro, macro_param * args);
 
 /* Enumeration of mathematical operator types; these are used to index the opnames array. */

Modified: trunk/compilers/pirc/src/pircompiler.c
==============================================================================
--- trunk/compilers/pirc/src/pircompiler.c	Mon Feb 15 20:52:36 2010	(r43968)
+++ trunk/compilers/pirc/src/pircompiler.c	Mon Feb 15 21:25:33 2010	(r43969)
@@ -15,6 +15,8 @@
 #include "pirregalloc.h"
 #include "pirerr.h"
 
+/* HEADERIZER HFILE: none */
+
 /* XXX count memory, so we can check out mem. savings of string reuse
  * Only temporarily used, so no need to "fix" this.
  */
@@ -26,8 +28,7 @@
 
 =over 4
 
-=item C<static allocated_mem_ptrs *
-new_mem_ptrs_block(void)>
+=item C<static allocated_mem_ptrs * new_mem_ptrs_block(void)>
 
 Create a new C<allocated_mem_ptrs> block; all pointers to allocated memory
 within pirc are stored in such blocks. One block has space for a number of
@@ -129,8 +130,8 @@
 
 /*
 
-=item C<void
-init_hashtable(lexer_state * const lexer, hashtable * const table, unsigned size)>
+=item C<void init_hashtable(lexer_state * const lexer, hashtable * const table,
+unsigned size)>
 
 Initialize the hashtable C<table> with space for C<size> buckets.
 
@@ -207,8 +208,7 @@
 
 /*
 
-=item C<bucket *
-new_bucket(lexer_state * const lexer)>
+=item C<bucket * new_bucket(lexer_state * const lexer)>
 
 Constructor for a bucket object.
 
@@ -313,8 +313,7 @@
 
 /*
 
-=item C<char *
-dupstr(lexer_state * const lexer, char const * const source)>
+=item C<char const * dupstr(lexer_state * const lexer, char * const source)>
 
 The C89 standard does not define a strdup() in the C library,
 so define our own strdup. Function names beginning with "str"
@@ -333,8 +332,7 @@
 
 /*
 
-=item C<void
-release_resources(lexer_state *lexer)>
+=item C<void release_resources(lexer_state *lexer)>
 
 Release all resources pointed to by C<lexer>.
 Free all memory that was allocated through C<pir_mem_allocate_zeroed()>.
@@ -375,8 +373,8 @@
 
 /*
 
-=item C<void
-pirwarning(lexer_state * const lexer, int lineno, char const * const message, ...)>
+=item C<void pirwarning(lexer_state * const lexer, int lineno, char const *
+const message, ...)>
 
 Emit a warning message to C<stderr>. The line number (passed in C<lineno>) is reported,
 together with the message. The message can be formatted, meaning it can contain

Modified: trunk/compilers/pirc/src/pircompunit.c
==============================================================================
--- trunk/compilers/pirc/src/pircompunit.c	Mon Feb 15 20:52:36 2010	(r43968)
+++ trunk/compilers/pirc/src/pircompunit.c	Mon Feb 15 21:25:33 2010	(r43969)
@@ -44,6 +44,7 @@
 #include "parrot/dynext.h"
 #include "pmc/pmc_callcontext.h"
 
+/* HEADERIZER HFILE: none */
 
 static unsigned const prime_numbers[] = {113 /* XXX think of more primes */ };
 
@@ -159,8 +160,7 @@
 
 /*
 
-=item C<static void
-add_self_parameter(lexer_state * const lexer)>
+=item C<static void add_self_parameter(lexer_state * const lexer)>
 
 Add a parameter named C<"self"> to the current subroutine, but only
 if both :vtable and :method flags have I<not> been set yet. If either
@@ -180,8 +180,7 @@
 
 /*
 
-=item C<void
-set_sub_vtable(lexer_state * const lexer, char const * vtablename)>
+=item C<void set_sub_vtable(lexer_state * const lexer, char const * vtablename)>
 
 Set the :vtable() flag argument to the current subroutine. If C<vtablename>
 is NULL, the name of the current sub is taken to be the vtable method name.
@@ -300,8 +299,7 @@
 
 /*
 
-=item C<void
-set_sub_flag(lexer_state * const lexer, sub_flag flag)>
+=item C<void set_sub_flag(lexer_state * const lexer, sub_flag flag)>
 
 Set a subroutine flag on the current sub. The C<flag> parameter may encode
 multiple flags.
@@ -496,8 +494,8 @@
 
 /*
 
-=item C<int
-targets_equal(target const * const left, target const * const right)>
+=item C<int targets_equal(target const * const left, target const * const
+right)>
 
 Returns true if C<left> equals C<right>, false otherwise. C<left> is
 considered to be equal to C<right> if any of the following conditions
@@ -611,8 +609,8 @@
 
 /*
 
-=item C<target *
-add_target(lexer_state * const lexer, target *last, target * const t)>
+=item C<target * add_target(lexer_state * const lexer, target *last, target *
+const t)>
 
 Add a new target to the list pointed to by C<list>. C<list> points to
 the last element, C<<last->next>> points to the first. The list is
@@ -722,8 +720,8 @@
 
 /*
 
-=item C<void
-set_param_flag(lexer_state * const lexer, target * const param, target_flag flag)>
+=item C<target * set_param_flag(lexer_state * const lexer, target * const param,
+target_flag flag)>
 
 Set the flag C<flag> on parameter C<param>. The actual value
 of C<flag> may encode several flags at a time. Returns C<param>.
@@ -780,8 +778,7 @@
 
 /*
 
-=item C<argument *
-add_arg(argument *last, argument * const newarg)>
+=item C<argument * add_arg(argument *last, argument * const newarg)>
 
 Add argument C<newarg> at the end of the list pointed to by C<last>.
 The list is circular linked, and C<last> points to the last item.
@@ -809,8 +806,7 @@
 
 /*
 
-=item C<void
-unshift_arg(invocation * const inv, argument * const newarg)>
+=item C<argument * unshift_arg(invocation * const inv, argument * const newarg)>
 
 Unshift argument C<newarg> on an invocation object. The number
 of arguments in the list of C<inv> is incremented to reflect
@@ -854,8 +850,7 @@
 
 /*
 
-=item C<void
-set_arg_flag(argument * const arg, arg_flag flag)>
+=item C<argument * set_arg_flag(argument * const arg, arg_flag flag)>
 
 Set the flag C<flag> on argument C<arg>. Note the C<flag> may
 encode multiple flags. C<arg> is returned.
@@ -954,8 +949,7 @@
 
 /*
 
-=item C<void
-set_instr(lexer_state * const lexer, char const * const opname)>
+=item C<void set_instr(lexer_state * const lexer, char const * const opname)>
 
 Sets C<opname> to the current instruction, without operands. This is a
 wrapper function for C<set_instrf> to prevent calls with an empty format
@@ -1023,8 +1017,8 @@
 
 /*
 
-=item C<void
-set_instrf(lexer_state *lexer, char *opname, char const * const format, ...)>
+=item C<void set_instrf(lexer_state * const lexer, char const * const opname,
+char const * const format, ...)>
 
 Set the specified instruction, using the operands from the vararg list. The
 number and types of operands is specified by C<format>. The type of the
@@ -1092,8 +1086,8 @@
 
 /*
 
-=item C<void
-add_operands(lexer_state * const lexer, char const * const format, ...)>
+=item C<void add_operands(lexer_state * const lexer, char const * const format,
+...)>
 
 Add operands to the current instruction. This is a variable argument function;
 C<format> contains placeholders, see the macro C<get_instr_var_arg> above
@@ -1132,8 +1126,7 @@
 
 /*
 
-=item C<void
-set_op_labelflag(lexer_state * const lexer, int flag)>
+=item C<void set_op_labelflag(lexer_state * const lexer, int flag)>
 
 Set a flag on the current instruction that it contains labels as operands.
 The bit indicates which operand, count starting from bit 1.
@@ -1149,8 +1142,7 @@
 
 /*
 
-=item C<char *
-get_inverse(char *instr)>
+=item C<char const * get_inverse(char const * const instr)>
 
 Returns the instruction with inversed semantics; for instance
 C<if> becomes C<unless>, C<greater-than> becomes C<less-or-equals>.
@@ -1440,8 +1432,8 @@
 
 /*
 
-=item C<constdecl *
-new_pmc_const(char const * const type, char const * const name, constant * const value)>
+=item C<constdecl * new_pmc_const(lexer_state * const lexer, char const * const
+type, char const * const name, constant * const value)>
 
 Create a new PMC constant declaration of type C<type>, name C<name> and having a value C<value>.
 The type must be a string indicating a valid type name (e.g. "Sub"). C<name> is the name
@@ -1727,8 +1719,7 @@
 
 /*
 
-=item C<expression *
-expr_from_int(lexer_state * const lexer, int ival)>
+=item C<expression * expr_from_int(lexer_state * const lexer, int ival)>
 
 Create an expression node from an integer constant. This is a wrapper
 function, which uses C<expr_from_const()> and C<new_const()>.
@@ -1747,8 +1738,7 @@
 
 /*
 
-=item C<expression *
-expr_from_num(lexer_state * const lexer, double nval)>
+=item C<expression * expr_from_num(lexer_state * const lexer, double nval)>
 
 Same as C<expr_from_int()>, except it takes a C<double> parameter,
 not an C<int>.
@@ -1765,8 +1755,8 @@
 
 /*
 
-=item C<expression *
-expr_from_string(lexer_state * const lexer, char const * const sval)>
+=item C<expression * expr_from_string(lexer_state * const lexer, char const *
+const sval)>
 
 Same as C<expr_from_int()>, except it takes a C<string> parameter.
 
@@ -1913,8 +1903,7 @@
 
 /*
 
-=item C<invocation *
-invoke(lexer_state * const lexer, invoke_type type, ...)>
+=item C<invocation * invoke(lexer_state * const lexer, invoke_type type, ...)>
 
 Create a new C<invocation> object of type C<type>. This can be one
 of the C<invoke_types> enumeration. Based on the type, this function
@@ -2054,8 +2043,8 @@
 
 /*
 
-=item C<void
-push_operand(lexer_state * const lexer, expression * const operand)>
+=item C<void push_operand(lexer_state * const lexer, expression * const
+operand)>
 
 Add an operand at the end of the list of operands of the current instruction.
 
@@ -2152,8 +2141,8 @@
 
 /*
 
-=item C<key *
-add_key(lexer_state * const lexer, key * const keylist, expression * const exprkey)>
+=item C<key * add_key(lexer_state * const lexer, key * const keylist, expression
+* const exprkey)>
 
 Adds a new, nested key (in C<exprkey>) to the current key,
 pointed to by C<keylist>. C<keylist> is returned.
@@ -2258,9 +2247,8 @@
 
 /*
 
-=item C<void
-new_sub_instr(lexer_state * const lexer, int opcode, char const * const opname,
-              unsigned num_var_args)>
+=item C<void new_sub_instr(lexer_state * const lexer, int opcode, char const *
+const opname, unsigned num_var_args)>
 
 Create a new instruction node, and initialize the opcode and opinfo on that
 node. This function can be used to create an instruction of which the signature

Modified: trunk/compilers/pirc/src/piremit.c
==============================================================================
--- trunk/compilers/pirc/src/piremit.c	Mon Feb 15 20:52:36 2010	(r43968)
+++ trunk/compilers/pirc/src/piremit.c	Mon Feb 15 21:25:33 2010	(r43969)
@@ -14,6 +14,8 @@
 
 #include "parrot/oplib/ops.h"
 
+/* HEADERIZER HFILE: none */
+
 /*
 
 =head1 DESCRIPTION
@@ -61,8 +63,7 @@
 
 /*
 
-=item C<void
-print_key(lexer_state * const lexer, key * const k)>
+=item C<void print_key(lexer_state * const lexer, key * const k)>
 
 Print the key C<k>. The total key is enclosed in square brackets,
 and different key elements are separated by semicolons. Example:
@@ -95,8 +96,7 @@
 
 /*
 
-=item C<void
-print_target(lexer_state * const lexer, target * const t)>
+=item C<void print_target(lexer_state * const lexer, target * const t)>
 
 Print the target C<t>; if C<t> has a key, that key is
 printed as well. Examples:
@@ -118,8 +118,7 @@
 
 /*
 
-=item C<void
-print_constant(lexer_state * const lexer, constant * const c)>
+=item C<void print_constant(lexer_state * const lexer, constant * const c)>
 
 Print the value of constant C<c>. Based on C<c>'s type, the appropriate
 value is printed.
@@ -153,8 +152,7 @@
 
 /*
 
-=item C<void
-print_expr(lexer_state * const lexer, expression * const expr)>
+=item C<void print_expr(lexer_state * const lexer, expression * const expr)>
 
 Print the expression C<expr>. This is a dispatch function, calling
 a specialized function based on C<expr>'s type.
@@ -187,8 +185,8 @@
 
 /*
 
-=item C<void
-print_expressions(expression * const expr)>
+=item C<void print_expressions(lexer_state * const lexer, expression * const
+expr)>
 
 Print the list of expressions pointed to by C<expr>,
 if C<expr> is not NULL. If C<expr> is NULL, the
@@ -254,8 +252,7 @@
 
 /*
 
-=item C<void
-print_statement(lexer_state * const lexer, subroutine * const sub)>
+=item C<void print_statement(lexer_state * const lexer, subroutine * const sub)>
 
 XXX
 
@@ -280,8 +277,8 @@
 
 /*
 
-=item C<static void
-print_sub_flags(lexer_state * const lexer, subroutine * const subiter)>
+=item C<static void print_sub_flags(lexer_state * const lexer, subroutine *
+const subiter)>
 
 Print the appropriate subflags.
 
@@ -320,8 +317,7 @@
 
 /*
 
-=item C<void
-print_subs(struct lexer_state * const lexer)>
+=item C<void print_subs(struct lexer_state * const lexer)>
 
 Top-level function to print all generated code. This function
 iterates over all subs and prints their instructions.
@@ -371,8 +367,8 @@
 
 /*
 
-=item C<static void
-emit_pir_instruction(lexer_state * const lexer, instruction * const instr)>
+=item C<static void emit_pir_instruction(lexer_state * const lexer, instruction
+* const instr)>
 
 Print the PIR representation of C<instr>. If C<instr> has a label, that
 is printed first.
@@ -395,8 +391,8 @@
 
 /*
 
-=item C<static void
-emit_pir_statement(lexer_state * const lexer, subroutine * const sub)>
+=item C<static void emit_pir_statement(lexer_state * const lexer, subroutine *
+const sub)>
 
 Emit all statements of the subroutine C<sub>. The statements
 are emitted in PIR format. If there are no statements in C<sub>,
@@ -424,8 +420,8 @@
 
 /*
 
-=item C<void
-emit_pir_subs(lexer_state * const lexer)>
+=item C<void emit_pir_subs(lexer_state * const lexer, char const * const
+outfile)>
 
 Print the PIR representation of all subroutines stored
 in the C<lexer>. If there are no subroutines, thre function
@@ -474,8 +470,8 @@
 
 /*
 
-=item C<static void
-emit_pbc_const_arg(lexer_state * const lexer, constant * const c)>
+=item C<static void emit_pbc_const_arg(lexer_state * const lexer, constant *
+const c)>
 
 Emit a constant argument into the bytecode. An integer is emitted
 inline in the bytecode; other types are stored in the constant table,
@@ -538,8 +534,8 @@
 
 /*
 
-=item C<static void
-emit_pbc_label_arg(lexer_state * const lexer, label * const l)>
+=item C<static void emit_pbc_label_arg(lexer_state * const lexer, label * const
+l)>
 
 Emit the value of the label offset of label C<l>.
 
@@ -558,8 +554,8 @@
 
 /*
 
-=item C<static void
-emit_pbc_target_arg(lexer_state * const lexer, target * const t)>
+=item C<static void emit_pbc_target_arg(lexer_state * const lexer, target *
+const t)>
 
 Emit the assigned register of target C<t>. The assigned register is
 stored in the C<color> field, of either the C<pir_reg> or C<symbol>
@@ -581,8 +577,8 @@
 
 /*
 
-=item C<static void
-emit_pbc_expr(lexer_state * const lexer, expression * const operand)>
+=item C<static void emit_pbc_expr(lexer_state * const lexer, expression * const
+operand)>
 
 Emit bytecode for the expression C<operand>. This is a dispatch
 function, invoking the appropriate function depending on C<operand>'s
@@ -620,8 +616,8 @@
 
 /*
 
-=item C<static void
-optimize_instr(lexer_state * const lexer, instruction * const instr)>
+=item C<static void optimize_instr(lexer_state * const lexer, instruction *
+const instr)>
 
 Optimize the instruction C<instr>. Currently, these instructions are optimized:
 
@@ -700,8 +696,8 @@
 
 /*
 
-=item C<static void
-emit_pbc_instr(lexer_state * const lexer, instruction * const instr)>
+=item C<static void emit_pbc_instr(lexer_state * const lexer, instruction *
+const instr)>
 
 Emit PBC for one instruction. If the C<opinfo> attribute of C<instr>
 is NULL, the function does nothing and returns.
@@ -766,8 +762,8 @@
 
 /*
 
-=item C<static void
-emit_pbc_sub(lexer_state * const lexer, subroutine * const sub)>
+=item C<static void emit_pbc_sub(lexer_state * const lexer, subroutine * const
+sub)>
 
 Emit bytecode for the subroutine C<sub>.
 
@@ -803,8 +799,7 @@
 
 /*
 
-=item C<static void
-emit_pbc_annotations(lexer_state * const lexer)>
+=item C<static void emit_pbc_annotations(lexer_state * const lexer)>
 
 Emit all annotations into the PackFile. First a new annotations
 segment is created. Then, for each annotation, its value is stored
@@ -866,8 +861,7 @@
 
 /*
 
-=item C<void
-emit_pbc(lexer_state * const lexer, const char *outfile)>
+=item C<void emit_pbc(lexer_state * const lexer, const char *outfile)>
 
 Generate Parrot Byte Code from the abstract syntax tree.
 This is the top-level function. After all instructions

Modified: trunk/compilers/pirc/src/pirmacro.c
==============================================================================
--- trunk/compilers/pirc/src/pirmacro.c	Mon Feb 15 20:52:36 2010	(r43968)
+++ trunk/compilers/pirc/src/pirmacro.c	Mon Feb 15 21:25:33 2010	(r43969)
@@ -9,7 +9,7 @@
 #include "pircompiler.h"
 #include "parrot/parrot.h"
 
-
+/* HEADERIZER HFILE: none */
 
 /*
 
@@ -31,8 +31,8 @@
 
 /*
 
-=item C<macro_def *
-new_macro(macro_table * const table, char * const name, int lineno)>
+=item C<macro_def * new_macro(macro_table * const table, char const * const
+name, int lineno, int takes_args, unsigned initsize)>
 
 Create a new macro definition node and store it in the macro_table C<table>
 
@@ -106,8 +106,8 @@
 
 /*
 
-=item C<void
-new_macro_const(macro_table * const table, char const * const name, char const * const value)>
+=item C<void new_macro_const(macro_table * const table, char const * const name,
+char const * const value, int lineno)>
 
 Define a new C<.macro_const>, by name of C<name> as an alias for C<value> The new macro
 const is entered in the macro_table C<table>
@@ -179,8 +179,8 @@
 
 /*
 
-=item C<void
-store_macro_string(macro_def * const macro, char * const str, ...)>
+=item C<void store_macro_string(macro_def * const macro, char const * const str,
+...)>
 
 Store the string C<str> in C<macro>'s body buffer. The total number
 of characters to be written should not exceed MAX_NUM_CHARS. It's not known
@@ -270,8 +270,7 @@
 
 /*
 
-=item C<void
-delete_macro_table(macro_table * table)>
+=item C<void delete_macro_table(macro_table * table)>
 
 Free resources allocated for the macro_table C<table>.
 

Modified: trunk/compilers/pirc/src/pirparser.c
==============================================================================
--- trunk/compilers/pirc/src/pirparser.c	Mon Feb 15 20:52:36 2010	(r43968)
+++ trunk/compilers/pirc/src/pirparser.c	Mon Feb 15 21:25:33 2010	(r43969)
@@ -405,6 +405,8 @@
 
 #endif
 
+/* HEADERIZER HFILE: none */
+
 char *expand_macro(yyscan_t yyscanner, macro_def * const macro, macro_param * args);
 
 /* Enumeration of mathematical operator types; these are used to index the opnames array. */
@@ -5450,8 +5452,7 @@
 
 /*
 
-=item C<static int
-evaluate_i_i(int a, pir_rel_operator op, double b)>
+=item C<static int evaluate_i_i(int a, pir_rel_operator op, int b)>
 
 Compare C<a> with C<b> according to the relational operator C<op>.
 Wrapper for C<evaluate_n_n>, which takes arguments of type double.
@@ -5467,8 +5468,7 @@
 
 /*
 
-=item C<static int
-evaluate_n_i(int a, pir_rel_operator op, double b)>
+=item C<static int evaluate_n_i(double a, pir_rel_operator op, int b)>
 
 Compare C<a> with C<b> according to the relational operator C<op>.
 Wrapper for C<evaluate_n_n>, which takes arguments of type double.
@@ -5484,8 +5484,7 @@
 
 /*
 
-=item C<static int
-evaluate_i_n(int a, pir_rel_operator op, double b)>
+=item C<static int evaluate_i_n(int a, pir_rel_operator op, double b)>
 
 Compare C<a> with C<b> according to the relational operator C<op>.
 Wrapper for C<evaluate_n_n>, which takes arguments of type double.
@@ -5633,8 +5632,8 @@
 
 /*
 
-=item C<static char *
-concat_strings(lexer_state * const lexer, char const *a, char const *b)>
+=item C<static char * concat_strings(lexer_state * const lexer, char const * a,
+char const * b)>
 
 Concatenates two strings into a new buffer. The new string is returned.
 
@@ -5659,9 +5658,8 @@
 
 /*
 
-=item C<static void
-create_if_instr(lexer_state *lexer, int invert, int hasnull,
-                char * const name, char * const label)>
+=item C<static void create_if_instr(lexer_state * const lexer, int invert, int
+hasnull, char const * const name, char const * const label)>
 
 Create an C<if> or C<unless> instruction; if C<invert> is non-zero (true), the
 C<if> instruction is inverted, effectively becoming C<unless>.
@@ -5908,8 +5906,7 @@
 
 /*
 
-=item C<static void
-do_strength_reduction(lexer_state * const lexer)>
+=item C<static void do_strength_reduction(lexer_state * const lexer)>
 
 Implement strength reduction for the math operators C<add>, C<sub>, C<mul>, C<div> and C<fdiv>.
 If the current instruction is any of these, then the first two operands are checked; if both
@@ -6043,8 +6040,8 @@
 
 /*
 
-=item C<static void
-check_first_arg_direction(lexer_state * const lexer, char * const opname)>
+=item C<static void check_first_arg_direction(lexer_state * const lexer, char
+const * const opname)>
 
 This function checks the first argument's  direction of the op C<opname>.
 If the direction is not C<OUT>, a syntax error is emitted. This function assumes
@@ -6217,8 +6214,8 @@
 
 /*
 
-=item C<static void
-undeclared_symbol(lexer_state * const lexer, char * const symbol)>
+=item C<static void undeclared_symbol(lexer_state * const lexer, char const *
+const symbol)>
 
 Report an error message saying that C<symbol> was not declared. Then test
 whether the symbol is perhaps a PASM register identifier. The user may have

Modified: trunk/compilers/pirc/src/pirpcc.c
==============================================================================
--- trunk/compilers/pirc/src/pirpcc.c	Mon Feb 15 20:52:36 2010	(r43968)
+++ trunk/compilers/pirc/src/pirpcc.c	Mon Feb 15 21:25:33 2010	(r43969)
@@ -25,6 +25,7 @@
 
 #include "parrot/oplib/ops.h"
 
+/* HEADERIZER HFILE: none */
 
 
 /*
@@ -110,8 +111,8 @@
 
 /*
 
-=item C<static target *
-generate_unique_pir_reg(lexer_state * const lexer, pir_type type)>
+=item C<static target * generate_unique_pir_reg(lexer_state * const lexer,
+pir_type type)>
 
 Generate a unique, temporary PIR register of type C<type>. It uses the C<reg>
 constructor to create a target node, and using C<pir_reg_generator>
@@ -131,8 +132,8 @@
 
 /*
 
-=item C<static int
-generate_signature_pmc(lexer_state * const lexer, unsigned size)>
+=item C<static int generate_signature_pmc(lexer_state * const lexer, unsigned
+size)>
 
 Create a FixedIntegerArray PMC object that encodes the types and flags
 of parameters and add it to the PBC constant table. The index in that
@@ -161,8 +162,7 @@
 
 /*
 
-=item C<void
-emit_sub_epilogue(lexer_state * const lexer)>
+=item C<void emit_sub_epilogue(lexer_state * const lexer)>
 
 Emit final instructions for the current subroutine. In case
 this is a C<:main> sub, the "end" instruction is emitted,
@@ -188,8 +188,8 @@
 
 /*
 
-=item C<static void
-add_alias_operand(lexer_state * const lexer, PMC *array, int index, char const * const alias)>
+=item C<static void add_alias_operand(lexer_state * const lexer, PMC *array, int
+index, char const * const alias)>
 
 Add an alias operand to current instruction; C<array> is the signature
 array, which must hold the right flags for this new operand (at position C<index>).
@@ -209,8 +209,8 @@
 
 /*
 
-=item C<static void
-targets_to_operands(lexer_state * const lexer, target * const targets)>
+=item C<static void targets_to_operands(lexer_state * const lexer, target *
+const targets, unsigned num_targets)>
 
 Convert a list of C<target> nodes into operands. Before the operands
 are added to the I<current> instruction, a FixedIntegerArray is created,
@@ -291,8 +291,8 @@
 
 /*
 
-=item C<static void
-arguments_to_operands(lexer_state * const lexer, argument * const args)>
+=item C<static void arguments_to_operands(lexer_state * const lexer, argument *
+const args, unsigned num_arguments)>
 
 Convert a list of C<argument> nodes into operands. Before the operands are
 added to the I<current> instruction, a FixedIntegerArray PMC is created
@@ -347,8 +347,8 @@
 
 /*
 
-=item C<void
-generate_parameters_instr(lexer_state * const lexer, unsigned num_parameters)>
+=item C<void generate_parameters_instr(lexer_state * const lexer, unsigned
+num_parameters)>
 
 Generate the "get_params" instruction, taking <num_parameters> variable arguments;
 this is the number of parameters of this function.
@@ -372,8 +372,8 @@
 
 /*
 
-=item C<void
-generate_getresults_instr(lexer_state * const lexer, target * const targetlist)>
+=item C<void generate_getresults_instr(lexer_state * const lexer, target * const
+targetlist)>
 
 Generate instruction for the C<.get_results> statement.
 
@@ -397,9 +397,8 @@
 
 /*
 
-=item C<static void
-save_global_reference(lexer_state * const lexer, instruction * const instr,
-                      char const * const label)>
+=item C<static void save_global_reference(lexer_state * const lexer, instruction
+* const instr, char const * const label)>
 
 Store the instruction C<instr>, which references the global label C<label> in a list.
 After the parse phase, this instruction can be patched, if C<label> can be resolved
@@ -494,8 +493,8 @@
 
 /*
 
-=item C<static void
-convert_pcc_call(lexer_state * const lexer, invocation * const inv)>
+=item C<static void convert_pcc_call(lexer_state * const lexer, invocation *
+const inv)>
 
 Generate instructions for a normal invocation using the Parrot Calling
 Conventions (PCC). This is the sequence of the following instructions:
@@ -541,8 +540,8 @@
 
 /*
 
-=item C<static void
-convert_pcc_tailcall(lexer_state * const lexer, invocation * const inv)>
+=item C<static void convert_pcc_tailcall(lexer_state * const lexer, invocation *
+const inv)>
 
 Generate instructions for a tailcall using the Parrot Calling Conventions (PCC).
 The sequence of instructions is:
@@ -568,8 +567,8 @@
 
 /*
 
-=item C<static void
-convert_pcc_return(lexer_state * const lexer, invocation * const inv)>
+=item C<static void convert_pcc_return(lexer_state * const lexer, invocation *
+const inv)>
 
 Generate instructions for a normal return statement using the Parrot Calling
 Conventions (PCC). The sequence of instructions is:
@@ -589,8 +588,8 @@
 
 /*
 
-=item C<static void
-convert_nci_call(lexer_state * const lexer, invocation * const inv)>
+=item C<static void convert_nci_call(lexer_state * const lexer, invocation *
+const inv)>
 
 Generate instructions for a function invocation using the Native Call
 Interface (NCI). The sequence of instructions is:
@@ -620,8 +619,8 @@
 
 /*
 
-=item C<static void
-convert_pcc_yield(lexer_state * const lexer, invocation * const inv)>
+=item C<static void convert_pcc_yield(lexer_state * const lexer, invocation *
+const inv)>
 
 Generate instructions for a yield statement using the Parrot Calling Conventions.
 The sequence of instructions is:
@@ -642,8 +641,8 @@
 
 /*
 
-=item C<static void
-convert_pcc_methodcall(lexer_state * const lexer, invocation * const inv)>
+=item C<static void convert_pcc_methodcall(lexer_state * const lexer, invocation
+* const inv)>
 
 Generate instructions for a method call using the Parrot Calling Conventions (PCC).
 The sequence of instructions is:
@@ -673,8 +672,8 @@
 
 /*
 
-=item C<static void
-convert_pcc_methodtailcall(lexer_state * const lexer, invocation * const inv)>
+=item C<static void convert_pcc_methodtailcall(lexer_state * const lexer,
+invocation * const inv)>
 
 Generate instructions for a method tailcall, using the Parrot Calling Conventions (PCC).
 The sequence of instructions is:
@@ -712,8 +711,8 @@
 
 /*
 
-=item C<void
-convert_inv_to_instr(lexer_state * const lexer, invocation * const inv)>
+=item C<void convert_inv_to_instr(lexer_state * const lexer, invocation * const
+inv)>
 
 Convert an C<invocation> structure into a series of instructions. This is the
 dispatch function, which calls the appropriate conversion function, based

Modified: trunk/compilers/pirc/src/pirregalloc.c
==============================================================================
--- trunk/compilers/pirc/src/pirregalloc.c	Mon Feb 15 20:52:36 2010	(r43968)
+++ trunk/compilers/pirc/src/pirregalloc.c	Mon Feb 15 21:25:33 2010	(r43969)
@@ -7,6 +7,8 @@
 #include "pirregalloc.h"
 #include "parrot/parrot.h"
 
+/* HEADERIZER HFILE: none */
+
 /*
 
 =head1 DESCRIPTION
@@ -108,8 +110,7 @@
 
 /*
 
-=item C<void
-destroy_linear_scan_register_allocator(lsr_allocator *lsr)>
+=item C<void destroy_linear_scan_register_allocator(lsr_allocator *lsr)>
 
 Destructor for linear scan register allocator. All live_interval
 objects are destroyed as well.
@@ -234,8 +235,8 @@
 
 /*
 
-=item C<live_interval *
-new_live_interval(lsr_allocator * const lsr, unsigned firstuse_location, pir_type type)>
+=item C<live_interval * new_live_interval(lsr_allocator * const lsr, unsigned
+firstuse_location, pir_type type)>
 
 Constructor for a live_interval struct object. After creating the new interval object,
 its startpoint and endpoint are initialized to the value in C<firstuse_location>. Note
@@ -388,8 +389,8 @@
 
 /*
 
-=item C<static void
-add_free_reg(lsr_allocator * const lsr, unsigned regno, pir_type type)>
+=item C<static void add_free_reg(lsr_allocator * const lsr, unsigned regno,
+pir_type type)>
 
 Add register C<regno> to the list of free regs that can be reuse.
 
@@ -448,8 +449,8 @@
 
 /*
 
-=item C<static void
-expire_old_intervals(lsr_allocator * const lsr, live_interval * i, pir_type type)>
+=item C<static void expire_old_intervals(lsr_allocator * const lsr,
+live_interval * const i, pir_type type)>
 
 Go over all active intervals; if the endpoint of one of them is >= than
 C<i>'s start point, the action is aborted. This is why the C<active> list must be

Modified: trunk/compilers/pirc/src/pirsymbol.c
==============================================================================
--- trunk/compilers/pirc/src/pirsymbol.c	Mon Feb 15 20:52:36 2010	(r43968)
+++ trunk/compilers/pirc/src/pirsymbol.c	Mon Feb 15 21:25:33 2010	(r43969)
@@ -11,6 +11,7 @@
 #include <string.h>
 #include <stdio.h>
 
+/* HEADERIZER HFILE: none */
 
 /*
 
@@ -83,8 +84,7 @@
 
 /*
 
-=item C<static int
-next_register(lexer_state * const lexer, pir_type type)>
+=item C<static int next_register(lexer_state * const lexer, pir_type type)>
 
 Returns a new register of the specified type.
 This is the vanilla register allocator.
@@ -175,8 +175,7 @@
 
 /*
 
-=item C<bucket *
-get_bucket(hashtable * const table, unsigned long hash)>
+=item C<bucket * get_bucket(hashtable * const table, unsigned long hash)>
 
 Return the bucket at hash index C<hash> from the hashtable C<table>.
 
@@ -216,8 +215,8 @@
 
 /*
 
-=item C<void
-declare_local(lexer_state * const lexer, pir_type type, symbol * const list)>
+=item C<void declare_local(lexer_state * const lexer, pir_type type, symbol *
+const list)>
 
 Declare the local variables in the list pointed to by C<list>, all of which
 are of the type C<type>. The variables are entered into the symbol table for
@@ -272,8 +271,7 @@
 
 /*
 
-=item C<void
-check_unused_symbols(lexer_state * const lexer)>
+=item C<void check_unused_symbols(lexer_state * const lexer)>
 
 Check all subroutines for unused symbols. If a symbol is declared but
 never used, a warning message is printed to C<stderr>. If there's
@@ -439,8 +437,8 @@
 
 /*
 
-=item C<static int
-use_register(lexer_state * const lexer, pir_type type, int regno, int pasmregno)>
+=item C<static int use_register(lexer_state * const lexer, pir_type type, int
+regno, int pasmregno)>
 
 This function registers (no pun intended) register C<regno> of type
 C<type>; it uses register C<pasmregno>; each subsequent
@@ -675,9 +673,8 @@
 
 /*
 
-=item C<static local_label *
-new_local_label(lexer_state * const lexer, char const * const name,
-unsigned offset)>
+=item C<static local_label * new_local_label(lexer_state * const lexer, char
+const * const name, unsigned offset)>
 
 Constructor for a label. Create a new label structure, fill out the details
 and return it. C<name> is the name of the label; C<offset> is its current
@@ -700,8 +697,8 @@
 
 /*
 
-=item C<void
-store_local_label(lexer_state * const lexer, char const * const labelname, unsigned offset)>
+=item C<void store_local_label(lexer_state * const lexer, char const * const
+labelname, unsigned offset)>
 
 Store the (sub-)local label C<labelname>, having I<address> C<offset> in the current
 subroutine structure.


More information about the parrot-commits mailing list