[svn:parrot] r37854 - in trunk: compilers/imcc include/parrot src src/call src/gc src/io src/packfile src/string src/string/charset src/string/encoding
coke at svn.parrot.org
coke at svn.parrot.org
Wed Apr 1 20:00:52 UTC 2009
Author: coke
Date: Wed Apr 1 20:00:45 2009
New Revision: 37854
URL: https://trac.parrot.org/parrot/changeset/37854
Log:
[cage] run 'make headerizer'
big change, as headerizer now includes function signatures in docs.
adds this to a bunch of files where it wasn't already, and may
change due to whitespace in others done manually earlier.
Modified:
trunk/compilers/imcc/cfg.c
trunk/compilers/imcc/debug.c
trunk/compilers/imcc/instructions.c
trunk/compilers/imcc/main.c
trunk/compilers/imcc/optimizer.c
trunk/compilers/imcc/parser_util.c
trunk/compilers/imcc/pbc.c
trunk/compilers/imcc/pcc.c
trunk/compilers/imcc/reg_alloc.c
trunk/compilers/imcc/sets.c
trunk/compilers/imcc/symreg.c
trunk/include/parrot/io_unix.h
trunk/src/call/ops.c
trunk/src/call/pcc.c
trunk/src/debug.c
trunk/src/dynext.c
trunk/src/embed.c
trunk/src/events.c
trunk/src/exceptions.c
trunk/src/exit.c
trunk/src/extend.c
trunk/src/gc/api.c
trunk/src/gc/generational_ms.c
trunk/src/gc/incremental_ms.c
trunk/src/gc/mark_sweep.c
trunk/src/gc/memory.c
trunk/src/gc/pools.c
trunk/src/gc/register.c
trunk/src/gc/resources.c
trunk/src/gc/system.c
trunk/src/global.c
trunk/src/hash.c
trunk/src/hll.c
trunk/src/inter_cb.c
trunk/src/inter_create.c
trunk/src/inter_misc.c
trunk/src/interpreter.c
trunk/src/io/api.c
trunk/src/io/buffer.c
trunk/src/io/filehandle.c
trunk/src/io/portable.c
trunk/src/io/socket_api.c
trunk/src/io/socket_unix.c
trunk/src/io/socket_win32.c
trunk/src/io/unix.c
trunk/src/io/utf8.c
trunk/src/io/win32.c
trunk/src/key.c
trunk/src/library.c
trunk/src/list.c
trunk/src/longopt.c
trunk/src/misc.c
trunk/src/multidispatch.c
trunk/src/oo.c
trunk/src/packdump.c
trunk/src/packfile.c
trunk/src/packfile/pf_items.c
trunk/src/packout.c
trunk/src/pbc_merge.c
trunk/src/pic.c
trunk/src/pic_jit.c
trunk/src/pmc.c
trunk/src/pmc_freeze.c
trunk/src/scheduler.c
trunk/src/spf_render.c
trunk/src/spf_vtable.c
trunk/src/stacks.c
trunk/src/string/api.c
trunk/src/string/charset.c
trunk/src/string/charset/ascii.c
trunk/src/string/charset/binary.c
trunk/src/string/charset/iso-8859-1.c
trunk/src/string/charset/unicode.c
trunk/src/string/encoding.c
trunk/src/string/encoding/fixed_8.c
trunk/src/string/encoding/ucs2.c
trunk/src/string/encoding/utf16.c
trunk/src/string/encoding/utf8.c
trunk/src/string/primitives.c
trunk/src/sub.c
trunk/src/thread.c
trunk/src/trace.c
trunk/src/utils.c
trunk/src/warnings.c
Modified: trunk/compilers/imcc/cfg.c
==============================================================================
--- trunk/compilers/imcc/cfg.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/compilers/imcc/cfg.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -206,8 +206,8 @@
/*
-=item C<static int check_invoke_type(PARROT_INTERP, const IMC_Unit *unit,
-const Instruction *ins)>
+=item C<static int check_invoke_type(PARROT_INTERP, const IMC_Unit *unit, const
+Instruction *ins)>
Given an invoke-type instruction, returns the type of the invocation.
@@ -359,8 +359,8 @@
/*
-=item C<static void bb_check_set_addr(PARROT_INTERP, IMC_Unit *unit,
-Basic_block *bb, const SymReg *label)>
+=item C<static void bb_check_set_addr(PARROT_INTERP, IMC_Unit *unit, Basic_block
+*bb, const SymReg *label)>
Looks for a C<set_addr> op in the current unit referring to the given label.
@@ -538,8 +538,8 @@
/*
-=item C<static void bb_findadd_edge(PARROT_INTERP, IMC_Unit *unit,
-Basic_block *from, const SymReg *label)>
+=item C<static void bb_findadd_edge(PARROT_INTERP, IMC_Unit *unit, Basic_block
+*from, const SymReg *label)>
Finds the placement of the given label and links its containing block to the
given basic block.
@@ -580,7 +580,8 @@
/*
-=item C<int blocks_are_connected(const Basic_block *from, const Basic_block *to)>
+=item C<int blocks_are_connected(const Basic_block *from, const Basic_block
+*to)>
Returns true or false whether the given blocks are linked.
@@ -610,7 +611,8 @@
/*
-=item C<static void bb_add_edge(IMC_Unit *unit, Basic_block *from, Basic_block *to)>
+=item C<static void bb_add_edge(IMC_Unit *unit, Basic_block *from, Basic_block
+*to)>
Adds an edge between the two given blocks.
@@ -1647,8 +1649,7 @@
/*
-=item C<static Basic_block* make_basic_block(IMC_Unit *unit,
-Instruction *ins)>
+=item C<static Basic_block* make_basic_block(IMC_Unit *unit, Instruction *ins)>
Creates, initializes, and returns a new Basic_block.
Modified: trunk/compilers/imcc/debug.c
==============================================================================
--- trunk/compilers/imcc/debug.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/compilers/imcc/debug.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -79,7 +79,8 @@
/*
-=item C<void IMCC_fatal_standalone(PARROT_INTERP, int code, const char *fmt, ...)>
+=item C<void IMCC_fatal_standalone(PARROT_INTERP, int code, const char *fmt,
+...)>
Prints an error message from IMCC and exits Parrot. This is not a
recoverable exception but a forced exit.
@@ -104,7 +105,8 @@
/*
-=item C<void IMCC_fataly_standalone(PARROT_INTERP, int code, const char *fmt, ...)>
+=item C<void IMCC_fataly_standalone(PARROT_INTERP, int code, const char *fmt,
+...)>
Prints an error message and exits Parrot. This is not a recoverable
error.
@@ -576,7 +578,6 @@
=item C<void dump_dominance_frontiers(const IMC_Unit *unit)>
-
Dumps the list of dominance frontiers for the current IMC_Unit C<unit>.
=cut
Modified: trunk/compilers/imcc/instructions.c
==============================================================================
--- trunk/compilers/imcc/instructions.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/compilers/imcc/instructions.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -82,7 +82,8 @@
/*
-=item C<Instruction * _mk_instruction>
+=item C<Instruction * _mk_instruction(const char *op, const char *fmt, int n,
+SymReg * const *r, int flags)>
Creates a new instruction
@@ -126,7 +127,7 @@
/*
-=item C<void imcc_init_tables>
+=item C<void imcc_init_tables(PARROT_INTERP)>
Initializes IMCC's table of opcodes, based on the list maintained
by the Parrot interpreter. Stores the results in global variable
@@ -156,7 +157,7 @@
/*
-=item C<int ins_writes2>
+=item C<int ins_writes2(const Instruction *ins, int t)>
Returns TRUE if instruction ins writes to a register of type t
@@ -189,7 +190,7 @@
/*
-=item C<int instruction_reads>
+=item C<int instruction_reads(const Instruction *ins, const SymReg *r)>
next two functions are called very often, says gprof
they should be fast
@@ -259,7 +260,7 @@
/*
-=item C<int instruction_writes>
+=item C<int instruction_writes(const Instruction *ins, const SymReg *r)>
Determines whether the instruction C<ins> writes to the SymReg C<r>.
Returns 1 if it does, 0 if not.
@@ -344,7 +345,7 @@
/*
-=item C<int get_branch_regno>
+=item C<int get_branch_regno(const Instruction *ins)>
Get the register number of an address which is a branch target
@@ -367,7 +368,7 @@
/*
-=item C<SymReg * get_branch_reg>
+=item C<SymReg * get_branch_reg(const Instruction *ins)>
Get the register corresponding to an address which is a branch target
@@ -393,7 +394,7 @@
/*
-=item C<Instruction * _delete_ins>
+=item C<Instruction * _delete_ins(IMC_Unit *unit, Instruction *ins)>
Delete instruction ins. It's up to the caller to actually free the memory
of ins, if appropriate.
@@ -428,7 +429,7 @@
/*
-=item C<Instruction * delete_ins>
+=item C<Instruction * delete_ins(IMC_Unit *unit, Instruction *ins)>
Delete instruction ins, and then free it.
@@ -454,7 +455,7 @@
/*
-=item C<void insert_ins>
+=item C<void insert_ins(IMC_Unit *unit, Instruction *ins, Instruction *tmp)>
Insert Instruction C<tmp> in the execution flow after Instruction
C<ins>.
@@ -501,7 +502,7 @@
/*
-=item C<void prepend_ins>
+=item C<void prepend_ins(IMC_Unit *unit, Instruction *ins, Instruction *tmp)>
Insert Instruction C<tmp> into the execution flow before
Instruction C<ins>.
@@ -540,7 +541,8 @@
/*
-=item C<void subst_ins>
+=item C<void subst_ins(IMC_Unit *unit, Instruction *ins, Instruction *tmp, int
+needs_freeing)>
Substitute Instruction C<tmp> for Instruction C<ins>.
Free C<ins> if C<needs_freeing> is true.
@@ -579,7 +581,8 @@
/*
-=item C<Instruction * move_ins>
+=item C<Instruction * move_ins(IMC_Unit *unit, Instruction *ins, Instruction
+*to)>
Move instruction ins from its current position to the position
following instruction to. Returns the instruction following the
@@ -602,7 +605,7 @@
/*
-=item C<Instruction * emitb>
+=item C<Instruction * emitb(PARROT_INTERP, IMC_Unit *unit, Instruction *i)>
Emit a single instruction into the current unit buffer.
@@ -634,7 +637,7 @@
/*
-=item C<void free_ins>
+=item C<void free_ins(Instruction *ins)>
Free the Instruction structure ins.
@@ -653,7 +656,7 @@
/*
-=item C<int ins_print>
+=item C<int ins_print(PARROT_INTERP, PMC *io, const Instruction *ins)>
Print details of instruction ins in file fd.
@@ -780,7 +783,7 @@
/*
-=item C<static int e_file_open>
+=item C<static int e_file_open(PARROT_INTERP, void *param)>
Prints a message to STDOUT.
@@ -809,7 +812,7 @@
/*
-=item C<static int e_file_close>
+=item C<static int e_file_close(PARROT_INTERP, void *param)>
=cut
@@ -827,7 +830,8 @@
/*
-=item C<static int e_file_emit>
+=item C<static int e_file_emit(PARROT_INTERP, void *param, const IMC_Unit *unit,
+const Instruction *ins)>
=cut
@@ -856,7 +860,7 @@
/*
-=item C<int emit_open>
+=item C<int emit_open(PARROT_INTERP, int type, void *param)>
Opens the emitter function C<open> of the given C<type>. Passes
the C<param> to the open function.
@@ -879,7 +883,7 @@
/*
-=item C<int emit_flush>
+=item C<int emit_flush(PARROT_INTERP, void *param, IMC_Unit *unit)>
Flushes the emitter by emitting all the instructions in the current
IMC_Unit C<unit>.
@@ -912,7 +916,7 @@
/*
-=item C<int emit_close>
+=item C<int emit_close(PARROT_INTERP, void *param)>
Closes the given emitter.
Modified: trunk/compilers/imcc/main.c
==============================================================================
--- trunk/compilers/imcc/main.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/compilers/imcc/main.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -133,7 +133,7 @@
/*
-=item C<static void usage>
+=item C<static void usage(FILE *fp)>
Outputs usage error message.
@@ -152,7 +152,7 @@
/*
-=item C<static void help_debug>
+=item C<static void help_debug(void)>
Print out list of debugging flag values.
@@ -197,7 +197,7 @@
/*
-=item C<static void help>
+=item C<static void help(void)>
Print out "help" list of options.
@@ -255,7 +255,7 @@
/*
-=item C<static void Parrot_version>
+=item C<static void Parrot_version(PARROT_INTERP)>
Print out parrot version number.
@@ -323,7 +323,7 @@
/*
-=item C<static int is_all_hex_digits>
+=item C<static int is_all_hex_digits(const char *s)>
Tests all characters in a string are hexadecimal digits.
Returns 1 if true, 0 as soon as a non-hex found
@@ -346,7 +346,7 @@
/*
-=item C<const char * parseflags>
+=item C<const char * parseflags(PARROT_INTERP, int *argc, char **argv[])>
Parse Parrot's command line for options and set appropriate flags.
@@ -570,7 +570,7 @@
/*
-=item C<static void do_pre_process>
+=item C<static void do_pre_process(PARROT_INTERP)>
Pre-processor step. Turn parser's output codes into Parrot instructions.
@@ -692,7 +692,8 @@
/*
-=item C<static void imcc_get_optimization_description>
+=item C<static void imcc_get_optimization_description(const PARROT_INTERP, int
+opt_level, char *opt_desc)>
Create list (opt_desc[]) describing optimisation flags.
@@ -729,7 +730,7 @@
/*
-=item C<void imcc_initialize>
+=item C<void imcc_initialize(PARROT_INTERP)>
Initialise interpreter and set optimisation level.
@@ -764,7 +765,8 @@
/*
-=item C<static void imcc_run_pbc>
+=item C<static void imcc_run_pbc(PARROT_INTERP, int obj_file, const char
+*output_file, int argc, char **argv)>
Write out or run Parrot bytecode.
@@ -800,7 +802,7 @@
/*
-=item C<static void imcc_write_pbc>
+=item C<static void imcc_write_pbc(PARROT_INTERP, const char *output_file)>
Output packed bytecode file.
@@ -839,7 +841,8 @@
/*
-=item C<static void determine_input_file_type>
+=item C<static void determine_input_file_type(PARROT_INTERP, const char * const
+sourcefile)>
Read in the source and determine whether it's Parrot bytecode or PASM
@@ -883,7 +886,8 @@
/*
-=item C<static void determine_output_file_type>
+=item C<static void determine_output_file_type(PARROT_INTERP, int *obj_file,
+const char *output_file)>
Decide what kind of file we are to output.
@@ -918,7 +922,8 @@
/*
-=item C<static void compile_to_bytecode>
+=item C<static void compile_to_bytecode(PARROT_INTERP, const char * const
+sourcefile, const char * const output_file)>
Compile source code into bytecode (or die trying).
@@ -997,7 +1002,8 @@
/*
-=item C<int imcc_run>
+=item C<int imcc_run(PARROT_INTERP, const char *sourcefile, int argc, char
+**argv)>
Entry point of IMCC, as invoked by Parrot's main function.
Compile source code (if required), write bytecode file (if required)
Modified: trunk/compilers/imcc/optimizer.c
==============================================================================
--- trunk/compilers/imcc/optimizer.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/compilers/imcc/optimizer.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -193,7 +193,7 @@
/*
-=item C<int pre_optimize>
+=item C<int pre_optimize(PARROT_INTERP, IMC_Unit *unit)>
Handles optimizations occuring before the construction of the CFG.
@@ -219,7 +219,7 @@
/*
-=item C<int cfg_optimize>
+=item C<int cfg_optimize(PARROT_INTERP, IMC_Unit *unit)>
Handles optimizations occuring during the construction of the CFG.
Returns TRUE if any optimization was performed. Otherwise, returns
@@ -255,7 +255,7 @@
/*
-=item C<int optimize>
+=item C<int optimize(PARROT_INTERP, IMC_Unit *unit)>
=cut
@@ -277,7 +277,7 @@
/*
-=item C<const char * get_neg_op>
+=item C<const char * get_neg_op(const char *op, int *n)>
Get negated form of operator. If no negated form is known, return NULL.
@@ -317,7 +317,7 @@
*/
/*
-=item C<static int if_branch>
+=item C<static int if_branch(PARROT_INTERP, IMC_Unit *unit)>
Convert if/branch/label constructs of the form:
@@ -387,7 +387,7 @@
/*
-=item C<static int strength_reduce>
+=item C<static int strength_reduce(PARROT_INTERP, IMC_Unit *unit)>
strength_reduce ... rewrites e.g add Ix, Ix, y => add Ix, y
@@ -633,7 +633,7 @@
/*
-=item C<static int constant_propagation>
+=item C<static int constant_propagation(PARROT_INTERP, IMC_Unit *unit)>
Does conservative constant propagation.
This code will not propagate constants past labels or saves,
@@ -740,7 +740,8 @@
/*
-=item C<Instruction * IMCC_subst_constants_umix>
+=item C<Instruction * IMCC_subst_constants_umix(PARROT_INTERP, IMC_Unit *unit,
+const char *name, SymReg **r, int n)>
rewrite e.g. add_n_ic => add_n_nc
@@ -781,7 +782,8 @@
/*
-=item C<static int eval_ins>
+=item C<static int eval_ins(PARROT_INTERP, const char *op, size_t ops, SymReg
+**r)>
Run one parrot instruction, registers are filled with the
according constants. If an exception occurs, return -1, aborting
@@ -860,7 +862,8 @@
/*
-=item C<Instruction * IMCC_subst_constants>
+=item C<Instruction * IMCC_subst_constants(PARROT_INTERP, IMC_Unit *unit, const
+char *name, SymReg **r, int n, int *ok)>
rewrite e.g. add_n_nc_nc => set_n_nc
abs_i_ic => set_i_ic
@@ -1069,7 +1072,7 @@
/*
-=item C<static int branch_branch>
+=item C<static int branch_branch(PARROT_INTERP, IMC_Unit *unit)>
if I0 goto L1 => if IO goto L2
...
@@ -1125,7 +1128,7 @@
/*
-=item C<static int branch_reorg>
+=item C<static int branch_reorg(PARROT_INTERP, IMC_Unit *unit)>
branch L2 => ...
L1: branch L4
@@ -1218,7 +1221,8 @@
/*
-=item C<static int branch_cond_loop_swap>
+=item C<static int branch_cond_loop_swap(PARROT_INTERP, IMC_Unit *unit,
+Instruction *branch, Instruction *start, Instruction *cond)>
=cut
@@ -1296,7 +1300,7 @@
/*
-=item C<static int branch_cond_loop>
+=item C<static int branch_cond_loop(PARROT_INTERP, IMC_Unit *unit)>
start: => start:
if cond goto end if cond goto end
@@ -1377,7 +1381,7 @@
/*
-=item C<static int unused_label>
+=item C<static int unused_label(PARROT_INTERP, IMC_Unit *unit)>
Removes unused labels.
@@ -1454,7 +1458,7 @@
/*
-=item C<static int dead_code_remove>
+=item C<static int dead_code_remove(PARROT_INTERP, IMC_Unit *unit)>
=cut
@@ -1536,7 +1540,7 @@
/* optimizations with CFG & life info built */
/*
-=item C<static int used_once>
+=item C<static int used_once(PARROT_INTERP, IMC_Unit *unit)>
=cut
Modified: trunk/compilers/imcc/parser_util.c
==============================================================================
--- trunk/compilers/imcc/parser_util.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/compilers/imcc/parser_util.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -129,7 +129,8 @@
=over 4
-=item C<Instruction * iNEW>
+=item C<Instruction * iNEW(PARROT_INTERP, IMC_Unit *unit, SymReg *r0, char
+*type, SymReg *init, int emit)>
* P = new type, [init]
* PASM like:
@@ -182,7 +183,8 @@
/*
-=item C<void op_fullname>
+=item C<void op_fullname(char *dest, const char *name, SymReg * const *args, int
+narg, int keyvec)>
Lookup the full opcode given the short name
@@ -265,7 +267,8 @@
/*
-=item C<int check_op>
+=item C<int check_op(PARROT_INTERP, char *fullname, const char *name, SymReg *
+const * r, int narg, int keyvec)>
Return opcode value for op name
@@ -286,7 +289,7 @@
/*
-=item C<int is_op>
+=item C<int is_op(PARROT_INTERP, const char *name)>
Is instruction a parrot opcode?
@@ -305,7 +308,8 @@
/*
-=item C<static Instruction * var_arg_ins>
+=item C<static Instruction * var_arg_ins(PARROT_INTERP, IMC_Unit *unit, const
+char *name, SymReg **r, int n, int emit)>
TODO: Needs to be documented!!!
@@ -348,7 +352,8 @@
/*
-=item C<Instruction * INS>
+=item C<Instruction * INS(PARROT_INTERP, IMC_Unit *unit, const char *name, const
+char *fmt, SymReg **r, int n, int keyvec, int emit)>
Makes an instruction.
@@ -570,7 +575,7 @@
/*
-=item C<int do_yylex_init>
+=item C<int do_yylex_init(PARROT_INTERP, yyscan_t* yyscanner)>
TODO: Needs to be documented!!!
@@ -594,7 +599,8 @@
/*
-=item C<PMC * imcc_compile>
+=item C<PMC * imcc_compile(PARROT_INTERP, const char *s, int pasm_file, STRING
+**error_message)>
Compile a pasm or imcc string
@@ -738,7 +744,7 @@
/*
-=item C<PMC * imcc_compile_pasm>
+=item C<PMC * imcc_compile_pasm(PARROT_INTERP, const char *s)>
TODO: Needs to be documented!!!
@@ -761,7 +767,7 @@
/*
-=item C<PMC * imcc_compile_pir>
+=item C<PMC * imcc_compile_pir(PARROT_INTERP, const char *s)>
TODO: Needs to be documented!!!
@@ -784,7 +790,8 @@
/*
-=item C<PMC * IMCC_compile_pir_s>
+=item C<PMC * IMCC_compile_pir_s(PARROT_INTERP, const char *s, STRING
+**error_message)>
TODO: Needs to be documented!!!
@@ -804,7 +811,8 @@
/*
-=item C<PMC * IMCC_compile_pasm_s>
+=item C<PMC * IMCC_compile_pasm_s(PARROT_INTERP, const char *s, STRING
+**error_message)>
TODO: Needs to be documented!!!
@@ -824,7 +832,7 @@
/*
-=item C<PMC * imcc_compile_pasm_ex>
+=item C<PMC * imcc_compile_pasm_ex(PARROT_INTERP, const char *s)>
TODO: Needs to be documented!!!
@@ -851,7 +859,7 @@
/*
-=item C<PMC * imcc_compile_pir_ex>
+=item C<PMC * imcc_compile_pir_ex(PARROT_INTERP, const char *s)>
TODO: Needs to be documented!!!
@@ -877,7 +885,8 @@
/*
-=item C<static void * imcc_compile_file>
+=item C<static void * imcc_compile_file(PARROT_INTERP, const char *fullname,
+STRING **error_message)>
Compile a file by filename (can be either PASM or IMCC code)
@@ -989,7 +998,7 @@
/*
-=item C<void * IMCC_compile_file>
+=item C<void * IMCC_compile_file(PARROT_INTERP, const char *s)>
TODO: Needs to be documented!!!
@@ -1011,7 +1020,8 @@
/*
-=item C<void * IMCC_compile_file_s>
+=item C<void * IMCC_compile_file_s(PARROT_INTERP, const char *s, STRING
+**error_message)>
TODO: Needs to be documented!!!
@@ -1030,7 +1040,7 @@
/*
-=item C<void register_compilers>
+=item C<void register_compilers(PARROT_INTERP)>
Register additional compilers with the interpreter
@@ -1054,7 +1064,8 @@
/*
-=item C<static int change_op>
+=item C<static int change_op(PARROT_INTERP, IMC_Unit *unit, SymReg **r, int num,
+int emit)>
TODO: Needs to be documented!!!
@@ -1105,7 +1116,8 @@
/*
-=item C<int try_find_op>
+=item C<int try_find_op(PARROT_INTERP, IMC_Unit *unit, const char *name, SymReg
+**r, int n, int keyvec, int emit)>
Try to find valid op doing the same operation e.g.
@@ -1198,7 +1210,7 @@
/*
-=item C<static const char * try_rev_cmp>
+=item C<static const char * try_rev_cmp(const char *name, SymReg **r)>
TODO: Needs to be documented!!!
@@ -1247,7 +1259,8 @@
/*
-=item C<int imcc_vfprintf>
+=item C<int imcc_vfprintf(PARROT_INTERP, PMC *io, const char *format, va_list
+ap)>
Formats a given series of arguments per a given format string and prints it to
the given Parrot IO PMC.
@@ -1267,7 +1280,7 @@
/*
-=item C<void imcc_init>
+=item C<void imcc_init(PARROT_INTERP)>
TODO: Needs to be documented!!!
@@ -1289,7 +1302,7 @@
/*
-=item C<static void imcc_destroy_macro_values>
+=item C<static void imcc_destroy_macro_values(void *value)>
A callback for parrot_chash_destroy_values() to free all macro-allocated memory.
@@ -1319,7 +1332,7 @@
/*
-=item C<void imcc_destroy>
+=item C<void imcc_destroy(PARROT_INTERP)>
TODO: Needs to be documented!!!
Modified: trunk/compilers/imcc/pbc.c
==============================================================================
--- trunk/compilers/imcc/pbc.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/compilers/imcc/pbc.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -301,7 +301,7 @@
/*
-=item C<static void imcc_globals_destroy>
+=item C<static void imcc_globals_destroy(PARROT_INTERP, int ex, void *param)>
Frees memory allocated for IMCC globals for one particular compilation unit.
@@ -337,7 +337,7 @@
/*
-=item C<static int add_const_table>
+=item C<static int add_const_table(PARROT_INTERP)>
Adds an empty item to constant table, returning its position.
@@ -373,7 +373,7 @@
/*
-=item C<static int add_const_table_pmc>
+=item C<static int add_const_table_pmc(PARROT_INTERP, PMC *pmc)>
Adds a PMC to the const table, returning its position.
@@ -396,7 +396,7 @@
/*
-=item C<static int add_const_table_key>
+=item C<static int add_const_table_key(PARROT_INTERP, PMC *key)>
Adds a key to the const table, returning its position.
@@ -419,7 +419,7 @@
/*
-=item C<int e_pbc_open>
+=item C<int e_pbc_open(PARROT_INTERP, void *param)>
Opens a compilation unit to emit PBC.
@@ -485,7 +485,7 @@
/*
-=item C<static int old_blocks>
+=item C<static int old_blocks(PARROT_INTERP)>
Gets the size/line of bytecode in ops at this point.
@@ -511,7 +511,7 @@
/*
-=item C<opcode_t * make_jit_info>
+=item C<opcode_t * make_jit_info(PARROT_INTERP, const IMC_Unit *unit)>
Creates JIT information for this compilation unit.
@@ -560,7 +560,7 @@
/*
-=item C<static void make_new_sub>
+=item C<static void make_new_sub(PARROT_INTERP, IMC_Unit *unit)>
Allocates a new globals->cs->subs structure.
@@ -592,7 +592,7 @@
/*
-=item C<static int get_old_size>
+=item C<static int get_old_size(PARROT_INTERP, int *ins_line)>
Get the size/line of bytecode in ops to this point.
@@ -623,7 +623,7 @@
/*
-=item C<static void store_sub_size>
+=item C<static void store_sub_size(PARROT_INTERP, size_t size, size_t ins_line)>
Sets the given size and line parameters for the current compilation unit.
@@ -642,7 +642,8 @@
/*
-=item C<static void store_fixup>
+=item C<static void store_fixup(PARROT_INTERP, const SymReg *r, int pc, int
+offset)>
Stores fixup information for the given register, program counter, and offset.
@@ -674,7 +675,7 @@
/*
-=item C<static void store_key_const>
+=item C<static void store_key_const(PARROT_INTERP, const char *str, int idx)>
Stores a constant key for the current compilation unit.
@@ -693,7 +694,8 @@
/*
-=item C<static size_t get_codesize>
+=item C<static size_t get_codesize(PARROT_INTERP, const IMC_Unit *unit, size_t
+*src_lines)>
Stores globals for later fixup, returning the code size in number of ops.
@@ -757,7 +759,8 @@
/*
-=item C<static subs_t * find_global_label>
+=item C<static subs_t * find_global_label(PARROT_INTERP, const char *name, const
+subs_t *sym, int *pc)>
Finds a global label, returning the symreg (and setting the (absolute) pc
through the out parameter).
@@ -818,7 +821,7 @@
/*
-=item C<static void fixup_globals>
+=item C<static void fixup_globals(PARROT_INTERP)>
Fixes global information -- particularly locations of global symbols.
@@ -927,7 +930,7 @@
/*
-=item C<STRING * IMCC_string_from_reg>
+=item C<STRING * IMCC_string_from_reg(PARROT_INTERP, const SymReg *r)>
Creates and returns a constant STRING, given a stringish SymReg.
@@ -1022,7 +1025,7 @@
/*
-=item C<static int add_const_str>
+=item C<static int add_const_str(PARROT_INTERP, const SymReg *r)>
Adds a constant string to constant_table.
@@ -1047,7 +1050,7 @@
/*
-=item C<static int add_const_num>
+=item C<static int add_const_num(PARROT_INTERP, const char *buf)>
Adds a constant num to constant_table.
@@ -1072,7 +1075,7 @@
/*
-=item C<static PMC* mk_multi_sig>
+=item C<static PMC* mk_multi_sig(PARROT_INTERP, const SymReg *r)>
Creates and returns a multi-signature PMC given a SymReg.
@@ -1135,7 +1138,8 @@
/*
-=item C<static PMC* create_lexinfo>
+=item C<static PMC* create_lexinfo(PARROT_INTERP, IMC_Unit *unit, PMC *sub_pmc,
+int need_lex)>
Creates and returns a new LexInfo PMC for all lexicals in the given sub in the
current compilation unit.
@@ -1209,7 +1213,7 @@
/*
-=item C<static PMC* find_outer>
+=item C<static PMC* find_outer(PARROT_INTERP, const IMC_Unit *unit)>
Returns any :outer sub for the current compilation unit.
@@ -1270,7 +1274,8 @@
/*
-=item C<static int add_const_pmc_sub>
+=item C<static int add_const_pmc_sub(PARROT_INTERP, SymReg *r, size_t offs,
+size_t end)>
Adds a constant Sub in the current compilation unit, denoted by the offset and
end positions.
@@ -1501,7 +1506,8 @@
/*
-=item C<static int add_const_key>
+=item C<static int add_const_key(PARROT_INTERP, const opcode_t *key, int size,
+const char *s_key)>
Adds a constant key to constant_table.
@@ -1550,7 +1556,7 @@
/*
-=item C<static const char * slice_deb>
+=item C<static const char * slice_deb(int bits)>
Returns debugging information for the indicated slice type.
@@ -1586,7 +1592,7 @@
/*
-=item C<static opcode_t build_key>
+=item C<static opcode_t build_key(PARROT_INTERP, SymReg *key_reg)>
Builds a Key PMC from the given SymReg.
@@ -1718,7 +1724,7 @@
/*
-=item C<INTVAL IMCC_int_from_reg>
+=item C<INTVAL IMCC_int_from_reg(PARROT_INTERP, const SymReg *r)>
Creates and returns an INTEGER given an integer-like SymReg.
@@ -1763,7 +1769,7 @@
/*
-=item C<static void make_pmc_const>
+=item C<static void make_pmc_const(PARROT_INTERP, SymReg *r)>
Creates a constant PMC, given a SymReg.
@@ -1797,7 +1803,7 @@
/*
-=item C<static void add_1_const>
+=item C<static void add_1_const(PARROT_INTERP, SymReg *r)>
Adds a constant SymReg to the constant table, depending on its type.
@@ -1854,7 +1860,7 @@
/*
-=item C<static void constant_folding>
+=item C<static void constant_folding(PARROT_INTERP, const IMC_Unit *unit)>
Stores a constant's idx for later reuse.
@@ -1912,7 +1918,7 @@
/*
-=item C<int e_pbc_new_sub>
+=item C<int e_pbc_new_sub(PARROT_INTERP, void *param, IMC_Unit *unit)>
Starts a new PBC emitting of a compilation unit, if the given compilation unit
has any instructions.
@@ -1936,7 +1942,7 @@
/*
-=item C<int e_pbc_end_sub>
+=item C<int e_pbc_end_sub(PARROT_INTERP, void *param, IMC_Unit *unit)>
Finishes the PBC emitting of a given compilation unit.
@@ -1991,7 +1997,8 @@
/*
-=item C<static void verify_signature>
+=item C<static void verify_signature(PARROT_INTERP, const Instruction *ins,
+opcode_t *pc)>
Checks if any get_ argument contains constants and fills in type bits for
argument types and constants, if missing.
@@ -2069,7 +2076,8 @@
/*
-=item C<int e_pbc_emit>
+=item C<int e_pbc_emit(PARROT_INTERP, void *param, const IMC_Unit *unit, const
+Instruction *ins)>
Starts to emit code for one instruction.
@@ -2345,7 +2353,7 @@
/*
-=item C<int e_pbc_close>
+=item C<int e_pbc_close(PARROT_INTERP, void *param)>
Closes this PMC unit.
Modified: trunk/compilers/imcc/pcc.c
==============================================================================
--- trunk/compilers/imcc/pcc.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/compilers/imcc/pcc.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -150,7 +150,8 @@
/*
-=item C<static Instruction * insINS>
+=item C<static Instruction * insINS(PARROT_INTERP, IMC_Unit *unit, Instruction
+*ins, const char *name, SymReg **regs, int n)>
Utility instruction routine. Creates and inserts an instruction
into the current block in one call.
@@ -175,7 +176,7 @@
/*
-=item C<SymReg* get_pasm_reg>
+=item C<SymReg* get_pasm_reg(PARROT_INTERP, const char *name)>
get or create the SymReg
@@ -199,7 +200,7 @@
/*
-=item C<SymReg* get_const>
+=item C<SymReg* get_const(PARROT_INTERP, const char *name, int type)>
get or create a constant
@@ -223,7 +224,9 @@
/*
-=item C<static Instruction* pcc_get_args>
+=item C<static Instruction* pcc_get_args(PARROT_INTERP, IMC_Unit *unit,
+Instruction *ins, const char *op_name, int n, SymReg * const *args, const int
+*arg_flags)>
set arguments or return values
get params or results
@@ -337,7 +340,7 @@
/*
-=item C<static void unshift_self>
+=item C<static void unshift_self(SymReg *sub, SymReg *obj)>
prepend the object to args or self to params
@@ -368,7 +371,7 @@
/*
-=item C<void expand_pcc_sub>
+=item C<void expand_pcc_sub(PARROT_INTERP, IMC_Unit *unit, Instruction *ins)>
Expand a PCC (Parrot Calling Convention) subroutine
by generating the appropriate prologue and epilogue
@@ -448,7 +451,8 @@
/*
-=item C<void expand_pcc_sub_ret>
+=item C<void expand_pcc_sub_ret(PARROT_INTERP, IMC_Unit *unit, Instruction
+*ins)>
Expand a PCC sub return directive into its PASM instructions
@@ -492,7 +496,8 @@
/*
-=item C<static int pcc_reg_mov>
+=item C<static int pcc_reg_mov(PARROT_INTERP, unsigned char d, unsigned char s,
+void *vinfo)>
=cut
@@ -562,7 +567,8 @@
/*
-=item C<static Instruction * move_regs>
+=item C<static Instruction * move_regs(PARROT_INTERP, IMC_Unit *unit,
+Instruction *ins, size_t n, SymReg **dest, SymReg **src)>
=cut
@@ -618,7 +624,8 @@
/*
-=item C<static int recursive_tail_call>
+=item C<static int recursive_tail_call(PARROT_INTERP, IMC_Unit *unit,
+Instruction *ins, SymReg *sub)>
convert a recursive tailcall into a loop
@@ -682,7 +689,8 @@
/*
-=item C<static void insert_tail_call>
+=item C<static void insert_tail_call(PARROT_INTERP, IMC_Unit *unit, Instruction
+*ins, SymReg *sub, SymReg *meth)>
=cut
@@ -712,7 +720,8 @@
/*
-=item C<void expand_pcc_sub_call>
+=item C<void expand_pcc_sub_call(PARROT_INTERP, IMC_Unit *unit, Instruction
+*ins)>
Expand a PCC subroutine call (IMC) into its PASM instructions
This is the nuts and bolts of pdd03 routine call style
Modified: trunk/compilers/imcc/reg_alloc.c
==============================================================================
--- trunk/compilers/imcc/reg_alloc.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/compilers/imcc/reg_alloc.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -224,7 +224,8 @@
/*
-=item C<static unsigned int* ig_get_word>
+=item C<static unsigned int* ig_get_word(int i, int j, int N, unsigned int
+*graph, int *bit_ofs)>
=cut
@@ -244,7 +245,7 @@
/*
-=item C<static void ig_set>
+=item C<static void ig_set(int i, int j, int N, unsigned int *graph)>
=cut
@@ -261,7 +262,7 @@
/*
-=item C<unsigned int ig_test>
+=item C<unsigned int ig_test(int i, int j, int N, unsigned int *graph)>
=cut
@@ -278,7 +279,7 @@
/*
-=item C<static unsigned int* ig_allocate>
+=item C<static unsigned int* ig_allocate(int N)>
=cut
@@ -299,7 +300,7 @@
/*
-=item C<void imc_reg_alloc>
+=item C<void imc_reg_alloc(PARROT_INTERP, IMC_Unit *unit)>
imc_reg_alloc is the main loop of the allocation algorithm. It operates
on a single compilation unit at a time.
@@ -406,7 +407,7 @@
/*
-=item C<void free_reglist>
+=item C<void free_reglist(IMC_Unit *unit)>
=cut
@@ -438,7 +439,7 @@
/*
-=item C<void graph_coloring_reg_alloc>
+=item C<void graph_coloring_reg_alloc(PARROT_INTERP, IMC_Unit *unit)>
=cut
@@ -456,7 +457,7 @@
/*
-=item C<static void make_stat>
+=item C<static void make_stat(IMC_Unit *unit, int *sets, int *cols)>
some statistics about register usage
printed with --verbose --verbose
@@ -511,7 +512,7 @@
/*
-=item C<static void imc_stat_init>
+=item C<static void imc_stat_init(IMC_Unit *unit)>
registes usage of .pir
@@ -537,7 +538,7 @@
/*
-=item C<static void print_stat>
+=item C<static void print_stat(PARROT_INTERP, IMC_Unit *unit)>
and final
@@ -585,7 +586,7 @@
/*
-=item C<static int reg_sort_f>
+=item C<static int reg_sort_f(const void *a, const void *b)>
sort list by line nr
@@ -611,7 +612,7 @@
/*
-=item C<static void sort_reglist>
+=item C<static void sort_reglist(IMC_Unit *unit)>
=cut
@@ -626,7 +627,7 @@
/*
-=item C<static void build_reglist>
+=item C<static void build_reglist(NULLOK_INTERP, IMC_Unit *unit)>
make a linear list of IDENTs and VARs, set n_symbols
TODO
@@ -696,7 +697,7 @@
/*
-=item C<static void rebuild_reglist>
+=item C<static void rebuild_reglist(IMC_Unit *unit)>
Exclude all already allocated registers (< first_avail)
from reglist. This reduced the size of the interference graph
@@ -744,7 +745,7 @@
/*
-=item C<static void build_interference_graph>
+=item C<static void build_interference_graph(PARROT_INTERP, IMC_Unit *unit)>
Creates the interference graph between the variables.
@@ -799,7 +800,7 @@
/*
-=item C<static void compute_du_chain>
+=item C<static void compute_du_chain(IMC_Unit *unit)>
Compute a DU-chain for each symbolic in a compilation unit
@@ -838,7 +839,7 @@
/*
-=item C<static void compute_one_du_chain>
+=item C<static void compute_one_du_chain(SymReg *r, IMC_Unit *unit)>
=cut
@@ -883,7 +884,8 @@
/*
-=item C<static int interferes>
+=item C<static int interferes(PARROT_INTERP, const IMC_Unit *unit, const SymReg
+*r0, const SymReg *r1)>
See if r0's chain interferes with r1.
@@ -977,7 +979,7 @@
/*
-=item C<static int ig_find_color>
+=item C<static int ig_find_color(const IMC_Unit *unit, const char *avail)>
find available color for register #x in available colors
@@ -1000,7 +1002,7 @@
/*
-=item C<static int try_allocate>
+=item C<static int try_allocate(PARROT_INTERP, IMC_Unit *unit)>
Color the graph, assigning registers to each symbol:
@@ -1076,7 +1078,8 @@
/*
-=item C<static void map_colors>
+=item C<static void map_colors(const IMC_Unit* unit, int x, unsigned int *graph,
+char *avail, int typ, int already_allocated)>
map_colors: calculates what colors can be assigned to the x-th symbol.
@@ -1107,7 +1110,7 @@
/*
-=item C<static int first_avail>
+=item C<static int first_avail(const IMC_Unit *unit, int reg_set, Set **avail)>
find first available register of the given reg_set
@@ -1152,7 +1155,7 @@
/*
-=item C<static void allocate_uniq>
+=item C<static void allocate_uniq(PARROT_INTERP, IMC_Unit *unit, int usage)>
allocate lexicals or non-volatile in ascending order
@@ -1215,7 +1218,7 @@
/*
-=item C<static void vanilla_reg_alloc>
+=item C<static void vanilla_reg_alloc(PARROT_INTERP, IMC_Unit *unit)>
=cut
@@ -1267,7 +1270,7 @@
/*
-=item C<static void allocate_lexicals>
+=item C<static void allocate_lexicals(PARROT_INTERP, IMC_Unit *unit)>
=cut
@@ -1283,7 +1286,7 @@
/*
-=item C<static void allocate_non_volatile>
+=item C<static void allocate_non_volatile(PARROT_INTERP, IMC_Unit *unit)>
=cut
Modified: trunk/compilers/imcc/sets.c
==============================================================================
--- trunk/compilers/imcc/sets.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/compilers/imcc/sets.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -38,7 +38,7 @@
/*
-=item C<Set* set_make>
+=item C<Set* set_make(unsigned int length)>
Creates a new Set object.
@@ -63,7 +63,7 @@
/*
-=item C<Set* set_make_full>
+=item C<Set* set_make_full(unsigned int length)>
Creates a new Set object of C<length> items, setting them all to full.
@@ -89,7 +89,7 @@
/*
-=item C<void set_free>
+=item C<void set_free(Set *s)>
Frees the given Set and its allocated memory.
@@ -110,7 +110,7 @@
/*
-=item C<void set_clear>
+=item C<void set_clear(Set *s)>
Clears all bits in the Set.
@@ -128,7 +128,7 @@
/*
-=item C<Set* set_copy>
+=item C<Set* set_copy(const Set *s)>
Copies the set C<s>, returning a new set pointer.
@@ -151,7 +151,7 @@
/*
-=item C<int set_equal>
+=item C<int set_equal(const Set *s1, const Set *s2)>
Compares two sets for equality; sets are equal if they contain the same
elements.
@@ -190,7 +190,7 @@
/*
-=item C<void set_add>
+=item C<void set_add(Set *s, unsigned int element)>
Adds to set C<s> the element C<element>.
@@ -217,7 +217,7 @@
/*
-=item C<unsigned int set_first_zero>
+=item C<unsigned int set_first_zero(const Set *s)>
Sets the first unused item in the set.
@@ -255,7 +255,7 @@
/*
-=item C<int set_contains>
+=item C<int set_contains(const Set *s, unsigned int element)>
Checks whether the specified element is present in the specified Set argument.
Returns 1 if it is, 0 otherwise.
@@ -286,7 +286,7 @@
/*
-=item C<Set * set_union>
+=item C<Set * set_union(const Set *s1, const Set *s2)>
Computes the union of the two Set arguments, returning it as a new Set.
@@ -318,7 +318,7 @@
/*
-=item C<Set * set_intersec>
+=item C<Set * set_intersec(const Set *s1, const Set *s2)>
Creates a new Set object that is the intersection of the Set arguments (defined
through the binary C<and> operator.)
@@ -351,7 +351,7 @@
/*
-=item C<void set_intersec_inplace>
+=item C<void set_intersec_inplace(Set *s1, const Set *s2)>
Performs a set intersection in place -- the first Set argument changes to
contain the result.
Modified: trunk/compilers/imcc/symreg.c
==============================================================================
--- trunk/compilers/imcc/symreg.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/compilers/imcc/symreg.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -176,7 +176,8 @@
/*
-=item C<static SymReg * _get_sym_typed(const SymHash *hsh, const char *name, int t)>
+=item C<static SymReg * _get_sym_typed(const SymHash *hsh, const char *name, int
+t)>
Gets a symbol from the hash, with the given C<name> of the specific type C<t>.
@@ -641,8 +642,8 @@
/*
-=item C<static SymReg * mk_pmc_const_2(PARROT_INTERP, IMC_Unit *unit,
-SymReg *left, SymReg *rhs)>
+=item C<static SymReg * mk_pmc_const_2(PARROT_INTERP, IMC_Unit *unit, SymReg
+*left, SymReg *rhs)>
Makes a constant PMC and inserts instructions to access it.
@@ -699,8 +700,8 @@
/*
-=item C<SymReg * mk_const_ident(PARROT_INTERP, const char *name, int t,
-SymReg *val, int global)>
+=item C<SymReg * mk_const_ident(PARROT_INTERP, const char *name, int t, SymReg
+*val, int global)>
Makes a new identifier constant with value val.
@@ -894,8 +895,8 @@
/*
-=item C<SymReg * _mk_address(PARROT_INTERP, SymHash *hsh, const char *name,
-int uniq)>
+=item C<SymReg * _mk_address(PARROT_INTERP, SymHash *hsh, const char *name, int
+uniq)>
Makes a new address (internal use only).
@@ -1426,8 +1427,8 @@
/*
-=item C<SymReg * _find_sym(PARROT_INTERP, const Namespace *nspace,
-const SymHash *hsh, const char *name)>
+=item C<SymReg * _find_sym(PARROT_INTERP, const Namespace *nspace, const SymHash
+*hsh, const char *name)>
Find a symbol hash or ghash (internal use only);
Modified: trunk/include/parrot/io_unix.h
==============================================================================
--- trunk/include/parrot/io_unix.h Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/include/parrot/io_unix.h Wed Apr 1 20:00:45 2009 (r37854)
@@ -1,7 +1,7 @@
/* io_unix.h
* Copyright (C) 2001-2003, Parrot Foundation.
* SVN Info
- * $Id: io_unix.h 36833 2009-02-17 20:09:26Z allison $
+ * $Id$
* Overview:
* Parrot IO subsystem
* Data Structure and Algorithms:
Modified: trunk/src/call/ops.c
==============================================================================
--- trunk/src/call/ops.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/call/ops.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -165,8 +165,8 @@
/*
-=item C<static Parrot_Context * runops_args(PARROT_INTERP, PMC *sub,
-PMC *obj, STRING *meth, const char *sig, va_list ap)>
+=item C<static Parrot_Context * runops_args(PARROT_INTERP, PMC *sub, PMC *obj,
+STRING *meth, const char *sig, va_list ap)>
Calls the PMC subroutine C<sub> with optional name C<meth>. If PMC object
C<obj> is provided, the call is treated as a method call on that object.
@@ -259,8 +259,8 @@
/*
-=item C<void * Parrot_run_meth_fromc(PARROT_INTERP, PMC *sub, PMC *obj,
-STRING *meth)>
+=item C<void * Parrot_run_meth_fromc(PARROT_INTERP, PMC *sub, PMC *obj, STRING
+*meth)>
Run a method sub from C. The function arguments are
already setup according to Parrot calling conventions, the C<sub> argument
@@ -298,8 +298,8 @@
/*
-=item C<PMC * Parrot_runops_fromc_args(PARROT_INTERP, PMC *sub,
-const char *sig, ...)>
+=item C<PMC * Parrot_runops_fromc_args(PARROT_INTERP, PMC *sub, const char *sig,
+...)>
Run parrot ops, called from C code, function arguments are passed as
C<va_args> according to the signature. The C<sub> argument is an
@@ -330,8 +330,8 @@
/*
-=item C<void * Parrot_runops_fromc_args_event(PARROT_INTERP, PMC *sub,
-const char *sig, ...)>
+=item C<void * Parrot_runops_fromc_args_event(PARROT_INTERP, PMC *sub, const
+char *sig, ...)>
Run code from within event handlers. This variant deals with some reentrency
issues. It also should do sanity checks, if e.g. the handler subroutine
@@ -377,8 +377,8 @@
/*
-=item C<INTVAL Parrot_runops_fromc_args_reti(PARROT_INTERP, PMC *sub,
-const char *sig, ...)>
+=item C<INTVAL Parrot_runops_fromc_args_reti(PARROT_INTERP, PMC *sub, const char
+*sig, ...)>
Called from C code, runs a Parrot subroutine C<sub>. The subroutine has
function signature C<sig> and a C variadic argument list. Returns an
@@ -409,8 +409,8 @@
/*
-=item C<FLOATVAL Parrot_runops_fromc_args_retf(PARROT_INTERP, PMC *sub,
-const char *sig, ...)>
+=item C<FLOATVAL Parrot_runops_fromc_args_retf(PARROT_INTERP, PMC *sub, const
+char *sig, ...)>
Called from C code, runs a Parrot subroutine C<sub>. The subroutine has
function signature C<sig> and a C variadic argument list. Returns a
@@ -474,8 +474,8 @@
/*
-=item C<INTVAL Parrot_run_meth_fromc_args_reti(PARROT_INTERP, PMC *sub,
-PMC *obj, STRING *meth, const char *sig, ...)>
+=item C<INTVAL Parrot_run_meth_fromc_args_reti(PARROT_INTERP, PMC *sub, PMC
+*obj, STRING *meth, const char *sig, ...)>
Called from C code, runs a Parrot subroutine C<sub> as a method on object
C<obj>. The subroutine has function signature C<sig> and a C variadic argument
@@ -506,8 +506,8 @@
/*
-=item C<FLOATVAL Parrot_run_meth_fromc_args_retf(PARROT_INTERP, PMC *sub,
-PMC *obj, STRING *meth, const char *sig, ...)>
+=item C<FLOATVAL Parrot_run_meth_fromc_args_retf(PARROT_INTERP, PMC *sub, PMC
+*obj, STRING *meth, const char *sig, ...)>
Called from C code, runs a Parrot subroutine C<sub> as a method on object
C<obj>. The subroutine has function signature C<sig> and a C variadic argument
@@ -538,8 +538,8 @@
/*
-=item C<void * Parrot_runops_fromc_arglist(PARROT_INTERP, PMC *sub,
-const char *sig, va_list args)>
+=item C<void * Parrot_runops_fromc_arglist(PARROT_INTERP, PMC *sub, const char
+*sig, va_list args)>
Called from C code, runs a Parrot subroutine C<sub>.
The subroutine has function signature C<sig> and a C C<va_list>
@@ -567,8 +567,8 @@
/*
-=item C<INTVAL Parrot_runops_fromc_arglist_reti(PARROT_INTERP, PMC *sub,
-const char *sig, va_list args)>
+=item C<INTVAL Parrot_runops_fromc_arglist_reti(PARROT_INTERP, PMC *sub, const
+char *sig, va_list args)>
Called from C code, runs a Parrot subroutine C<sub>.
The subroutine has function signature C<sig> and a C C<va_list>
@@ -595,8 +595,8 @@
/*
-=item C<FLOATVAL Parrot_runops_fromc_arglist_retf(PARROT_INTERP, PMC *sub,
-const char *sig, va_list args)>
+=item C<FLOATVAL Parrot_runops_fromc_arglist_retf(PARROT_INTERP, PMC *sub, const
+char *sig, va_list args)>
Called from C code, runs a Parrot subroutine C<sub>.
The subroutine has function signature C<sig> and a C C<va_list>
@@ -623,8 +623,8 @@
/*
-=item C<void* Parrot_run_meth_fromc_arglist(PARROT_INTERP, PMC *sub,
-PMC *obj, STRING *meth, const char *sig, va_list args)>
+=item C<void* Parrot_run_meth_fromc_arglist(PARROT_INTERP, PMC *sub, PMC *obj,
+STRING *meth, const char *sig, va_list args)>
Calls the subroutine C<sub> as a method on object C<obj>. The method to be
called is named C<meth>, has the function signature C<sig> and arguments
@@ -653,8 +653,8 @@
/*
-=item C<INTVAL Parrot_run_meth_fromc_arglist_reti(PARROT_INTERP, PMC *sub,
-PMC *obj, STRING *meth, const char *sig, va_list args)>
+=item C<INTVAL Parrot_run_meth_fromc_arglist_reti(PARROT_INTERP, PMC *sub, PMC
+*obj, STRING *meth, const char *sig, va_list args)>
Calls the subroutine C<sub> as a method on object C<obj>. The method to be
called is named C<meth>, has the function signature C<sig> and arguments
@@ -683,8 +683,8 @@
/*
-=item C<FLOATVAL Parrot_run_meth_fromc_arglist_retf(PARROT_INTERP, PMC *sub,
-PMC *obj, STRING *meth, const char *sig, va_list args)>
+=item C<FLOATVAL Parrot_run_meth_fromc_arglist_retf(PARROT_INTERP, PMC *sub, PMC
+*obj, STRING *meth, const char *sig, va_list args)>
Calls the subroutine C<sub> as a method on object C<obj>. The method to be
called is named C<meth>, has the function signature C<sig> and arguments
Modified: trunk/src/call/pcc.c
==============================================================================
--- trunk/src/call/pcc.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/call/pcc.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -350,7 +350,8 @@
/*
-=item C<PMC* Parrot_pcc_build_sig_object_from_varargs>
+=item C<PMC* Parrot_pcc_build_sig_object_from_varargs(PARROT_INTERP, PMC* obj,
+const char *sig, va_list args)>
Take a varargs list, and convert it into a CallSignature PMC. The CallSignature
stores the original short signature string, and an array of integer types to
@@ -467,7 +468,8 @@
/*
-=item C<void Parrot_init_arg_nci>
+=item C<void Parrot_init_arg_nci(PARROT_INTERP, call_state *st, const char
+*sig)>
Initializes the argument passing state C<call_state> for the given NCI
signature.
@@ -497,7 +499,8 @@
/*
-=item C<void Parrot_init_ret_nci>
+=item C<void Parrot_init_ret_nci(PARROT_INTERP, call_state *st, const char
+*sig)>
Initializes the return value, passing state C<call_state> for the given NCI
signature.
@@ -535,7 +538,8 @@
/*
-=item C<int Parrot_init_arg_indexes_and_sig_pmc>
+=item C<int Parrot_init_arg_indexes_and_sig_pmc(PARROT_INTERP, Parrot_Context
+*ctx, opcode_t *indexes, PMC *sig_pmc, call_state_item *sti)>
Initializes argument transfer with given context registers, register indexes,
and a signature PMC.
@@ -588,7 +592,8 @@
/*
-=item C<int Parrot_init_arg_op>
+=item C<int Parrot_init_arg_op(PARROT_INTERP, Parrot_Context *ctx, opcode_t *pc,
+call_state_item *sti)>
Initializes argument transfer with given context registers and opcode location
of a C<get_*> or C<set_*> argument opcode.
@@ -618,7 +623,8 @@
/*
-=item C<int Parrot_init_arg_sig>
+=item C<int Parrot_init_arg_sig(PARROT_INTERP, Parrot_Context *ctx, const char
+*sig, void *ap, call_state_item *sti)>
Initializes argument transfer with given code segment (holding the
const_table), registers, function signature, and arguments.
@@ -657,7 +663,7 @@
/*
-=item C<static void start_flatten>
+=item C<static void start_flatten(PARROT_INTERP, call_state *st, PMC *p_arg)>
Marks the source state as flattening with the passed PMC being flattened and
fetches the first arg from the flattened set.
@@ -701,7 +707,7 @@
/*
-=item C<static void next_arg_sig>
+=item C<static void next_arg_sig(PARROT_INTERP, call_state_item *sti)>
Moves the call state to the next argument in the signature, calculating which
type of argument/parameter to get next. The index gets increased elsewhere.
@@ -746,7 +752,7 @@
/*
-=item C<static int fetch_arg_sig>
+=item C<static int fetch_arg_sig(PARROT_INTERP, call_state *st)>
Fetches the next argument from the signature in the given call state.
@@ -804,7 +810,7 @@
/*
-=item C<static int fetch_arg_op>
+=item C<static int fetch_arg_op(PARROT_INTERP, call_state *st)>
Fetches an argument from the appropriate context.
@@ -869,7 +875,7 @@
/*
-=item C<int Parrot_fetch_arg>
+=item C<int Parrot_fetch_arg(PARROT_INTERP, call_state *st)>
Fetches an argument from the current call state object. Retrieves the
next argument in the parameter list, or the next argument in a flattened
@@ -947,7 +953,7 @@
/*
-=item C<int Parrot_fetch_arg_nci>
+=item C<int Parrot_fetch_arg_nci(PARROT_INTERP, call_state *st)>
Fetches the next argument from the call state and converts it to the proper
data type for the call signature. If the next argument is a slurpy array,
@@ -991,7 +997,7 @@
/*
-=item C<static void convert_arg_from_int>
+=item C<static void convert_arg_from_int(PARROT_INTERP, call_state *st)>
Autoboxes an int into the expected container type.
@@ -1026,7 +1032,7 @@
/*
-=item C<static void convert_arg_from_num>
+=item C<static void convert_arg_from_num(PARROT_INTERP, call_state *st)>
Autoboxes a num into the expected container type.
@@ -1062,7 +1068,7 @@
/*
-=item C<static void convert_arg_from_str>
+=item C<static void convert_arg_from_str(PARROT_INTERP, call_state *st)>
Autoboxes a string primitive to the expected container type.
@@ -1097,7 +1103,7 @@
/*
-=item C<static void convert_arg_from_pmc>
+=item C<static void convert_arg_from_pmc(PARROT_INTERP, call_state *st)>
Unboxes a PMC to the expected primitive type.
@@ -1127,7 +1133,8 @@
/*
-=item C<static void check_for_opt_flag>
+=item C<static void check_for_opt_flag(PARROT_INTERP, call_state *st, int
+has_arg)>
Processes the next argument, if it has the optional flag set.
Otherwise moves on.
@@ -1170,7 +1177,7 @@
/*
-=item C<static void clone_key_arg>
+=item C<static void clone_key_arg(PARROT_INTERP, call_state *st)>
Replaces any src registers by their values (done inside clone). This needs a
test for tailcalls too, but I think there is no syntax to pass a key to a
@@ -1209,7 +1216,7 @@
/*
-=item C<static void init_first_dest_named>
+=item C<static void init_first_dest_named(PARROT_INTERP, call_state *st)>
Initializes dest calling state for the first named arg.
@@ -1274,7 +1281,7 @@
/*
-=item C<static int locate_named_named>
+=item C<static int locate_named_named(PARROT_INTERP, call_state *st)>
Locates a destination argument name, returning 0 if not found.
@@ -1330,7 +1337,7 @@
/*
-=item C<static void store_arg>
+=item C<static void store_arg(const call_state *st, INTVAL idx)>
Stores the next argument in the destination register appropriately.
@@ -1363,7 +1370,7 @@
/*
-=item C<int Parrot_store_arg>
+=item C<int Parrot_store_arg(PARROT_INTERP, const call_state *st)>
Stores the next function argument into the appropriate destination register.
Calls C<store_arg> to do most of the work. Returns 0 if an attempt is made
@@ -1393,7 +1400,8 @@
/*
-=item C<static void too_few>
+=item C<static void too_few(PARROT_INTERP, const call_state *st, const char
+*action)>
Throws an exception if there are too few arguments passed.
@@ -1420,7 +1428,8 @@
/*
-=item C<static void too_many>
+=item C<static void too_many(PARROT_INTERP, const call_state *st, const char
+*action)>
Throws an exception if there are too many arguments passed.
@@ -1447,7 +1456,7 @@
/*
-=item C<static void null_val>
+=item C<static void null_val(int sig, call_state *st)>
Adds a null value to the appropriate register.
@@ -1472,7 +1481,7 @@
/*
-=item C<static void check_named>
+=item C<static void check_named(PARROT_INTERP, call_state *st)>
Makes sure that all required named args are set and that all optional
args and flags are set to null and false if not present.
@@ -1571,7 +1580,7 @@
/*
-=item C<static void init_call_stats>
+=item C<static void init_call_stats(call_state *st)>
Sets the default values of the passed C<call_state>.
@@ -1596,7 +1605,8 @@
/*
-=item C<void Parrot_process_args>
+=item C<void Parrot_process_args(PARROT_INTERP, call_state *st, arg_pass_t
+param_or_result)>
Gets args for the current function call and puts them into position.
First it gets the positional non-slurpy parameters, then the positional
@@ -1800,7 +1810,7 @@
/*
-=item C<void Parrot_convert_arg>
+=item C<void Parrot_convert_arg(PARROT_INTERP, call_state *st)>
Converts a source argument to the expected destination type.
@@ -1835,7 +1845,9 @@
/*
-=item C<void parrot_pass_args>
+=item C<void parrot_pass_args(PARROT_INTERP, Parrot_Context *src_ctx,
+Parrot_Context *dest_ctx, opcode_t *src_indexes, opcode_t *dest_indexes,
+arg_pass_t param_or_result)>
Main argument passing routine.
@@ -1891,7 +1903,8 @@
/*
-=item C<opcode_t * parrot_pass_args_fromc>
+=item C<opcode_t * parrot_pass_args_fromc(PARROT_INTERP, const char *sig,
+opcode_t *dest, Parrot_Context *old_ctxp, va_list ap)>
Passes arguments from C code with given signature to a Parrot Sub.
Prerequisites are like above.
@@ -1918,7 +1931,8 @@
/*
-=item C<static int set_retval_util>
+=item C<static int set_retval_util(PARROT_INTERP, const char *sig,
+Parrot_Context *ctx, call_state *st)>
Adds the current return parameter to the current context, and fetches
the next return parameter from the call state object.
@@ -1954,7 +1968,7 @@
/*
-=item C<void * set_retval>
+=item C<void * set_retval(PARROT_INTERP, int sig_ret, Parrot_Context *ctx)>
Handles void and pointer (PMC *, STRING *) return values. Returns a PMC,
STRING, or NULL pointer as appropriate.
@@ -1991,7 +2005,7 @@
/*
-=item C<INTVAL set_retval_i>
+=item C<INTVAL set_retval_i(PARROT_INTERP, int sig_ret, Parrot_Context *ctx)>
Handles an INTVAL return value, returning its value if present and 0 otherwise.
@@ -2018,7 +2032,7 @@
/*
-=item C<FLOATVAL set_retval_f>
+=item C<FLOATVAL set_retval_f(PARROT_INTERP, int sig_ret, Parrot_Context *ctx)>
Handles a FLOATVAL return value, returning its value if present and 0.0
otherwise.
@@ -2046,7 +2060,7 @@
/*
-=item C<STRING* set_retval_s>
+=item C<STRING* set_retval_s(PARROT_INTERP, int sig_ret, Parrot_Context *ctx)>
Handles a STRING return value, returning its pointer if present and NULL
otherwise.
@@ -2076,7 +2090,7 @@
/*
-=item C<PMC* set_retval_p>
+=item C<PMC* set_retval_p(PARROT_INTERP, int sig_ret, Parrot_Context *ctx)>
Handles a PMC return value, returning the PMC pointer if present and NULL
otherwise.
@@ -2106,7 +2120,9 @@
/*
-=item C<static void commit_last_arg>
+=item C<static void commit_last_arg(PARROT_INTERP, int index, int cur, opcode_t
+*n_regs_used, int seen_arrow, PMC * const *sigs, opcode_t **indexes,
+Parrot_Context *ctx, PMC *pmc, va_list *list)>
Called by C<Parrot_PCCINVOKE> when it reaches the end of each arg in the arg
signature. See C<Parrot_PCCINVOKE> for signature syntax.
@@ -2171,7 +2187,8 @@
/*
-=item C<static Parrot_Context * count_signature_elements>
+=item C<static Parrot_Context * count_signature_elements(PARROT_INTERP, const
+char *signature, PMC *args_sig, PMC *results_sig, int flag)>
Counts the number of each type of register in a signature object. Returns
the total number of parameter arguments, the total number of result
@@ -2281,7 +2298,9 @@
/*
-=item C<static void commit_last_arg_sig_object>
+=item C<static void commit_last_arg_sig_object(PARROT_INTERP, int index, int
+cur, opcode_t *n_regs_used, int seen_arrow, PMC * const *sigs, opcode_t
+**indexes, Parrot_Context *ctx, PMC *sig_obj)>
Called by Parrot_pcc_invoke_from_sig_object when it reaches the end of each
arg in the arg signature. See C<Parrot_pcc_invoke_from_sig_object> for
@@ -2365,7 +2384,8 @@
/*
-=item C<static void set_context_sig_returns>
+=item C<static void set_context_sig_returns(PARROT_INTERP, Parrot_Context *ctx,
+opcode_t **indexes, const char *ret_x, PMC *result_list)>
Sets the subroutine return arguments in the context C<ctx>. Takes a C string
for the return signature C<ret_x> and a list of return parameters C<result_list>.
@@ -2433,7 +2453,8 @@
/*
-=item C<static void set_context_sig_returns_varargs>
+=item C<static void set_context_sig_returns_varargs(PARROT_INTERP,
+Parrot_Context *ctx, opcode_t **indexes, const char *ret_x, va_list returns)>
Sets the subroutine return arguments in the context C<ctx>. Takes a C string
for the return signature C<ret_x> and a varargs list of return parameters C<returns>.
@@ -2497,7 +2518,9 @@
/*
-=item C<static const char * set_context_sig_params>
+=item C<static const char * set_context_sig_params(PARROT_INTERP, const char
+*signature, INTVAL *n_regs_used, PMC **sigs, opcode_t **indexes, Parrot_Context
+*ctx, PMC *sig_obj)>
Sets the subroutine arguments in the C<ctx> context, according to the
signature string C<signature>. Currently this function is only called
@@ -2605,7 +2628,8 @@
/*
-=item C<void Parrot_pcc_invoke_sub_from_c_args>
+=item C<void Parrot_pcc_invoke_sub_from_c_args(PARROT_INTERP, PMC *sub_obj,
+const char *sig, ...)>
Follows the same conventions as C<Parrot_PCCINVOKE>, but the subroutine object
to invoke is passed as an argument rather than looked up by name. The signature
@@ -2632,7 +2656,8 @@
/*
-=item C<void Parrot_PCCINVOKE>
+=item C<void Parrot_PCCINVOKE(PARROT_INTERP, PMC* pmc, STRING *method_name,
+const char *signature, ...)>
C<pmc> is the invocant.
@@ -2859,7 +2884,8 @@
/*
-=item C<void Parrot_pcc_invoke_method_from_c_args>
+=item C<void Parrot_pcc_invoke_method_from_c_args(PARROT_INTERP, PMC* pmc,
+STRING *method_name, const char *signature, ...)>
Makes a method call given the name of the method and the arguments as a
C variadic argument list. C<pmc> is the invocant, C<method_name> is the
@@ -2901,7 +2927,8 @@
/*
-=item C<void Parrot_pcc_invoke_from_sig_object>
+=item C<void Parrot_pcc_invoke_from_sig_object(PARROT_INTERP, PMC *sub_obj, PMC
+*sig_obj)>
Follows the same conventions as C<Parrot_PCCINVOKE>, but the subroutine object
to invoke is passed as an argument rather than looked up by name, and the
Modified: trunk/src/debug.c
==============================================================================
--- trunk/src/debug.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/debug.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -801,7 +801,8 @@
/*
-=item C<static const char * parse_string(PARROT_INTERP, const char *str, STRING **strP)>
+=item C<static const char * parse_string(PARROT_INTERP, const char *str, STRING
+**strP)>
Parse a double-quoted string out of a C string and return a pointer to
just after the string. The parsed string is converted to a Parrot
@@ -850,7 +851,8 @@
/*
-=item C<static const char* parse_key(PARROT_INTERP, const char *str, PMC **keyP)>
+=item C<static const char* parse_key(PARROT_INTERP, const char *str, PMC
+**keyP)>
Parse an aggregate key out of a string and return a pointer to just
after the key. Currently only string and integer keys are allowed.
@@ -1947,7 +1949,8 @@
/*
-=item C<PDB_breakpoint_t * PDB_find_breakpoint(PARROT_INTERP, const char *command)>
+=item C<PDB_breakpoint_t * PDB_find_breakpoint(PARROT_INTERP, const char
+*command)>
Find breakpoint number N; returns C<NULL> if the breakpoint doesn't
exist or if no breakpoint was specified.
@@ -2161,7 +2164,8 @@
/*
-=item C<char PDB_check_condition(PARROT_INTERP, const PDB_condition_t *condition)>
+=item C<char PDB_check_condition(PARROT_INTERP, const PDB_condition_t
+*condition)>
Returns true if the condition was met.
@@ -2493,9 +2497,9 @@
/*
-=item C<size_t PDB_disassemble_op(PARROT_INTERP, char *dest, size_t space,
-const op_info_t *info, const opcode_t *op, PDB_file_t *file,
-const opcode_t *code_start, int full_name)>
+=item C<size_t PDB_disassemble_op(PARROT_INTERP, char *dest, size_t space, const
+op_info_t *info, const opcode_t *op, PDB_file_t *file, const opcode_t
+*code_start, int full_name)>
Disassembles C<op>.
Modified: trunk/src/dynext.c
==============================================================================
--- trunk/src/dynext.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/dynext.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -129,7 +129,8 @@
/*
-=item C<static void set_cstring_prop>
+=item C<static void set_cstring_prop(PARROT_INTERP, PMC *lib_pmc, const char
+*what, STRING *name)>
Set a property C<name> with value C<what> on the C<ParrotLibrary>
C<lib_pmc>.
@@ -152,7 +153,8 @@
/*
-=item C<static void store_lib_pmc>
+=item C<static void store_lib_pmc(PARROT_INTERP, PMC *lib_pmc, STRING *path,
+STRING *type, STRING *lib_name)>
Store a C<ParrotLibrary> PMC in the interpreter's C<iglobals>.
@@ -181,7 +183,7 @@
/*
-=item C<static PMC* is_loaded>
+=item C<static PMC* is_loaded(PARROT_INTERP, STRING *path)>
Check if a C<ParrotLibrary> PMC with the filename path exists.
If it does, return it. Otherwise, return NULL.
@@ -206,7 +208,8 @@
/*
-=item C<static STRING * get_path>
+=item C<static STRING * get_path(PARROT_INTERP, STRING *lib, void **handle,
+STRING *wo_ext, STRING *ext)>
Return path and handle of a dynamic lib, setting lib_name to just the filestem
(i.e. without path or extension) as a freshly-allocated C string.
@@ -326,7 +329,8 @@
/*
-=item C<PMC * Parrot_init_lib>
+=item C<PMC * Parrot_init_lib(PARROT_INTERP, PMC *(*load_func(PARROT_INTERP)),
+void (*init_func(PARROT_INTERP, PMC *)))>
Initializes a new library. First, calls C<load_func> to load the library
(if C<load_func> is provided) and then calls C<init_func>. Returns a
@@ -362,7 +366,8 @@
/*
-=item C<static PMC * run_init_lib>
+=item C<static PMC * run_init_lib(PARROT_INTERP, void *handle, STRING *lib_name,
+STRING *wo_ext)>
Loads and Initializes a new library and returns a ParrotLibrary PMC.
Takes the name of a library C<libname>, that is loaded with handle C<handle>.
@@ -438,7 +443,7 @@
/*
-=item C<static STRING * clone_string_into>
+=item C<static STRING * clone_string_into(Interp *d, Interp *s, PMC *value)>
Extracts a STRING value from PMC C<value> in interpreter C<s>. Copies that
string into the pool of interpreter C<d> using the default encoding
@@ -466,7 +471,7 @@
/*
-=item C<static PMC * make_string_pmc>
+=item C<static PMC * make_string_pmc(PARROT_INTERP, STRING *string)>
Converts a STRING C<string> into a String PMC.
@@ -488,7 +493,7 @@
/*
-=item C<PMC * Parrot_clone_lib_into>
+=item C<PMC * Parrot_clone_lib_into(Interp *d, Interp *s, PMC *lib_pmc)>
Clones a ParrotLibrary PMC C<lib_pmc> from interpreter C<s> into interpreter
C<d>.
@@ -554,7 +559,7 @@
/*
-=item C<PMC * Parrot_load_lib>
+=item C<PMC * Parrot_load_lib(PARROT_INTERP, STRING *lib, PMC *initializer)>
Dynamic library loader.
Modified: trunk/src/embed.c
==============================================================================
--- trunk/src/embed.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/embed.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -377,8 +377,8 @@
/*
-=item C<PackFile * Parrot_pbc_read(PARROT_INTERP, const char *fullname,
-const int debug)>
+=item C<PackFile * Parrot_pbc_read(PARROT_INTERP, const char *fullname, const
+int debug)>
Read in a bytecode, unpack it into a C<PackFile> structure, and do fixups.
@@ -1015,7 +1015,8 @@
/*
-=item C<opcode_t * Parrot_debug(PARROT_INTERP, Parrot_Interp debugger, opcode_t * pc)>
+=item C<opcode_t * Parrot_debug(PARROT_INTERP, Parrot_Interp debugger, opcode_t
+* pc)>
Runs the interpreter's bytecode in debugging mode.
Modified: trunk/src/events.c
==============================================================================
--- trunk/src/events.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/events.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -229,7 +229,7 @@
=over 4
-=item C<static void sig_handler>
+=item C<static void sig_handler(int signum)>
Handle signal C<signum>.
@@ -257,7 +257,7 @@
/*
-=item C<static void Parrot_sigaction>
+=item C<static void Parrot_sigaction(int sig, void (*handler(int)))>
Signal handlers are common to all threads, signal block masks are
specific, so we install one handler then block that signal and unblock
@@ -294,7 +294,7 @@
/*
-=item C<static void Parrot_unblock_signal>
+=item C<static void Parrot_unblock_signal(int sig)>
unblock a signal
@@ -320,7 +320,7 @@
/*
-=item C<void Parrot_init_signals>
+=item C<void Parrot_init_signals(void)>
Set up actions to handle signals.
Only SIGHUP handled at the moment.
@@ -350,7 +350,7 @@
=over 4
-=item C<static void init_events_first>
+=item C<static void init_events_first(PARROT_INTERP)>
Init event system for first interpreter.
@@ -410,7 +410,7 @@
/*
-=item C<static void init_events_all>
+=item C<static void init_events_all(PARROT_INTERP)>
Init events for all interpreters.
@@ -430,7 +430,7 @@
/*
-=item C<void Parrot_init_events>
+=item C<void Parrot_init_events(PARROT_INTERP)>
Initialize the event system.
@@ -459,7 +459,7 @@
=over 4
-=item C<void Parrot_schedule_event>
+=item C<void Parrot_schedule_event(PARROT_INTERP, parrot_event* ev)>
Create queue entry and insert event into task queue.
@@ -497,7 +497,7 @@
/*
-=item C<static void schedule_signal_event>
+=item C<static void schedule_signal_event(int signum)>
create and schedule a signal event
@@ -525,7 +525,8 @@
/*
-=item C<void Parrot_new_timer_event>
+=item C<void Parrot_new_timer_event(PARROT_INTERP, PMC *timer, FLOATVAL diff,
+FLOATVAL interval, int repeat, PMC *sub, parrot_event_type_enum typ)>
Create a new timer event due at C<diff> from now, repeated at C<interval>
and running the passed C<sub>.
@@ -559,7 +560,7 @@
/*
-=item C<void Parrot_new_cb_event>
+=item C<void Parrot_new_cb_event(PARROT_INTERP, PMC *cbi, char *ext)>
Prepare and schedule a callback event.
@@ -586,7 +587,7 @@
/*
-=item C<void Parrot_del_timer_event>
+=item C<void Parrot_del_timer_event(PARROT_INTERP, const PMC *timer)>
Deactivate the timer identified by C<timer>.
@@ -621,7 +622,7 @@
/*
-=item C<void Parrot_new_terminate_event>
+=item C<void Parrot_new_terminate_event(PARROT_INTERP)>
Create a terminate event, interpreter will leave the run-loop when this
event arrives.
@@ -642,7 +643,7 @@
/*
-=item C<void Parrot_new_suspend_for_gc_event>
+=item C<void Parrot_new_suspend_for_gc_event(PARROT_INTERP)>
Create a suspend-for-GC event, interpreter will wait on a condition
variable for GC to finish when the event arrives.
@@ -671,7 +672,7 @@
/*
-=item C<void Parrot_kill_event_loop>
+=item C<void Parrot_kill_event_loop(PARROT_INTERP)>
Schedule event-loop terminate event. This shuts down the event thread.
@@ -691,7 +692,8 @@
/*
-=item C<void Parrot_schedule_interp_qentry>
+=item C<void Parrot_schedule_interp_qentry(PARROT_INTERP, struct QUEUE_ENTRY
+*entry)>
Put a queue entry into the interpreters task queue and enable event
checking for the interpreter.
@@ -732,7 +734,7 @@
/*
-=item C<void Parrot_schedule_broadcast_qentry>
+=item C<void Parrot_schedule_broadcast_qentry(struct QUEUE_ENTRY *entry)>
Broadcast an event.
@@ -812,7 +814,7 @@
/*
-=item C<static void store_io_event>
+=item C<static void store_io_event(pending_io_events *ios, parrot_event *ev)>
Stores an event in the event stack. Allocates memory if necessary.
@@ -837,7 +839,7 @@
/*
-=item C<static void io_thread_ready_rd>
+=item C<static void io_thread_ready_rd(pending_io_events *ios, int ready_rd)>
Takes a list of pending i/o events and a file descriptor.
If the fd is ready to read, the event is removed from the
@@ -873,7 +875,7 @@
/*
-=item C<static void* io_thread>
+=item C<static void* io_thread(void *data)>
The IO thread uses select/poll to handle IO events and signals.
@@ -1005,7 +1007,7 @@
/*
-=item C<static void stop_io_thread>
+=item C<static void stop_io_thread(void)>
Tell the IO thread to stop.
@@ -1031,7 +1033,8 @@
/*
-=item C<void Parrot_event_add_io_event>
+=item C<void Parrot_event_add_io_event(PARROT_INTERP, PMC *pio, PMC *sub, PMC
+*data, INTVAL which)>
Create new i/o event.
@@ -1077,7 +1080,7 @@
=over 4
-=item C<static QUEUE_ENTRY* dup_entry>
+=item C<static QUEUE_ENTRY* dup_entry(const QUEUE_ENTRY *entry)>
Duplicate queue entry.
@@ -1103,7 +1106,8 @@
/*
-=item C<static QUEUE_ENTRY* dup_entry_interval>
+=item C<static QUEUE_ENTRY* dup_entry_interval(QUEUE_ENTRY *entry, FLOATVAL
+now)>
Duplicate timed entry and add interval to C<abs_time>.
@@ -1127,7 +1131,7 @@
/*
-=item C<static int process_events>
+=item C<static int process_events(QUEUE *event_q)>
Do something, when an event arrived caller has locked the mutex returns
0 if event thread terminates.
@@ -1210,7 +1214,7 @@
/*
-=item C<static void* event_thread>
+=item C<static void* event_thread(void *data)>
The event thread is started by the first interpreter. It handles all
events for all interpreters.
@@ -1283,7 +1287,7 @@
=over 4
-=item C<static opcode_t * wait_for_wakeup>
+=item C<static opcode_t * wait_for_wakeup(PARROT_INTERP, opcode_t *next)>
Sleep on the event queue condition. If an event arrives, the event
is processed. Terminate the loop if sleeping is finished.
@@ -1331,7 +1335,8 @@
/*
-=item C<opcode_t * Parrot_sleep_on_event>
+=item C<opcode_t * Parrot_sleep_on_event(PARROT_INTERP, FLOATVAL t, opcode_t
+*next)>
Go to sleep. This is called from the C<sleep> opcode.
@@ -1374,7 +1379,7 @@
=over 4
-=item C<opcode_t * Parrot_do_check_events>
+=item C<opcode_t * Parrot_do_check_events(PARROT_INTERP, opcode_t *next)>
Explicitly C<sync> called by the check_event opcode from run loops.
@@ -1397,7 +1402,8 @@
/*
-=item C<static void event_to_exception>
+=item C<static void event_to_exception(PARROT_INTERP, const parrot_event*
+event)>
Convert event to exception and throw it.
@@ -1435,7 +1441,8 @@
/*
-=item C<static opcode_t * do_event>
+=item C<static opcode_t * do_event(PARROT_INTERP, parrot_event* event, opcode_t
+*next)>
Run user code or such. The C<event> argument is freed after execution.
@@ -1497,7 +1504,8 @@
/*
-=item C<opcode_t * Parrot_do_handle_events>
+=item C<opcode_t * Parrot_do_handle_events(PARROT_INTERP, int restore, opcode_t
+*next)>
Called by the C<check_event__> opcode from run loops or from above. When
called from the C<check_events__> opcode, we have to restore the
Modified: trunk/src/exceptions.c
==============================================================================
--- trunk/src/exceptions.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/exceptions.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -62,7 +62,8 @@
/*
-=item C<PMC * Parrot_ex_build_exception>
+=item C<PMC * Parrot_ex_build_exception(PARROT_INTERP, INTVAL severity, long
+error, STRING *msg)>
Constructs a new exception object from the passed in arguments.
@@ -88,7 +89,7 @@
/*
-=item C<void die_from_exception>
+=item C<void die_from_exception(PARROT_INTERP, PMC *exception)>
Print a stack trace for C<exception>, a message if there is one, and then exit.
@@ -155,7 +156,7 @@
/*
-=item C<void Parrot_ex_add_c_handler>
+=item C<void Parrot_ex_add_c_handler(PARROT_INTERP, Parrot_runloop *jp)>
Adds a new exception handler (defined in C) to the concurrency scheduler. Since
the exception handler is C code, it stores a runloop jump point to the start of
@@ -179,7 +180,8 @@
/*
-=item C<opcode_t * Parrot_ex_throw_from_op>
+=item C<opcode_t * Parrot_ex_throw_from_op(PARROT_INTERP, PMC *exception, void
+*dest)>
Runs the exception handler.
@@ -268,7 +270,7 @@
/*
-=item C<void Parrot_ex_throw_from_c>
+=item C<void Parrot_ex_throw_from_c(PARROT_INTERP, PMC *exception)>
Throws an exception object.
@@ -341,7 +343,8 @@
/*
-=item C<opcode_t * Parrot_ex_throw_from_op_args>
+=item C<opcode_t * Parrot_ex_throw_from_op_args(PARROT_INTERP, void *dest, int
+ex_type, const char *format, ...)>
Throws an exception from an opcode, with an error message constructed
from a format string and arguments.
@@ -372,7 +375,8 @@
/*
-=item C<void Parrot_ex_throw_from_c_args>
+=item C<void Parrot_ex_throw_from_c_args(PARROT_INTERP, void *ret_addr, int
+exitcode, const char *format, ...)>
Throws an exception, with an error message constructed from a format string and
arguments. C<ret_addr> is the address from which to resume, if some handler
@@ -405,7 +409,7 @@
/*
-=item C<opcode_t * Parrot_ex_rethrow_from_op>
+=item C<opcode_t * Parrot_ex_rethrow_from_op(PARROT_INTERP, PMC *exception)>
Rethrow the exception.
@@ -430,7 +434,7 @@
/*
-=item C<void Parrot_ex_rethrow_from_c>
+=item C<void Parrot_ex_rethrow_from_c(PARROT_INTERP, PMC *exception)>
Return back to runloop, assumes exception is still in todo (see RT #45915) and
that this is called from within a handler setup with C<new_c_exception>.
@@ -452,7 +456,7 @@
/*
-=item C<void Parrot_ex_mark_unhandled>
+=item C<void Parrot_ex_mark_unhandled(PARROT_INTERP, PMC *exception)>
Mark an exception as unhandled, as part of rethrowing it.
@@ -470,7 +474,7 @@
/*
-=item C<size_t Parrot_ex_calc_handler_offset>
+=item C<size_t Parrot_ex_calc_handler_offset(PARROT_INTERP)>
Retrieve an exception from the concurrency scheduler, prepare a call to the
handler, and return the offset to the handler so it can become the next op in
@@ -506,7 +510,8 @@
=over 4
-=item C<void Parrot_assert>
+=item C<PARROT_DOES_NOT_RETURN_WHEN_FALSE void Parrot_assert(INTVAL condition,
+const char *condition_string, const char *file, unsigned int line)>
A better version of assert() that gives a backtrace.
@@ -527,7 +532,8 @@
/*
-=item C<void Parrot_confess>
+=item C<void Parrot_confess(const char *cond, const char *file, unsigned int
+line)>
Prints a backtrace and message for a failed assertion.
@@ -548,7 +554,7 @@
/*
-=item C<void Parrot_print_backtrace>
+=item C<void Parrot_print_backtrace(void)>
Displays the primrose path to disaster, (the stack frames leading up to the
abort). Used by C<Parrot_confess>.
@@ -612,7 +618,7 @@
/*
-=item C<void exit_fatal>
+=item C<void exit_fatal(int exitcode, const char *format, ...)>
Signal a fatal error condition. This should only be used with dire errors that
cannot throw an exception (because no interpreter is available, or the nature
@@ -656,7 +662,8 @@
/*
-=item C<void do_panic>
+=item C<void do_panic(NULLOK_INTERP, const char *message, const char *file,
+unsigned int line)>
Panic handler.
Modified: trunk/src/exit.c
==============================================================================
--- trunk/src/exit.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/exit.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -28,8 +28,7 @@
/*
-=item C<void Parrot_on_exit(PARROT_INTERP, exit_handler_f function,
-void *arg)>
+=item C<void Parrot_on_exit(PARROT_INTERP, exit_handler_f function, void *arg)>
Register the specified function to be called on exit.
Modified: trunk/src/extend.c
==============================================================================
--- trunk/src/extend.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/extend.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -66,19 +66,20 @@
/*
-=item C<int Parrot_vfprintf>
+=item C<int Parrot_vfprintf(PARROT_INTERP, Parrot_PMC pio, const char *s,
+va_list args)>
Writes a C string format with a varargs list to a PIO.
-=item C<int Parrot_fprintf>
+=item C<int Parrot_fprintf(PARROT_INTERP, Parrot_PMC pio, const char *s, ...)>
Writes a C string format with varargs to a PIO.
-=item C<int Parrot_printf>
+=item C<int Parrot_printf(NULLOK_INTERP, const char *s, ...)>
Writes a C string format with varargs to C<stdout>.
-=item C<int Parrot_eprintf>
+=item C<int Parrot_eprintf(NULLOK_INTERP, const char *s, ...)>
Writes a C string format with varargs to C<stderr>.
@@ -169,7 +170,7 @@
/*
-=item C<Parrot_PMC Parrot_get_root_namespace>
+=item C<Parrot_PMC Parrot_get_root_namespace(PARROT_INTERP)>
Return the root namespace
@@ -187,7 +188,8 @@
/*
-=item C<Parrot_String Parrot_PMC_get_string_intkey>
+=item C<Parrot_String Parrot_PMC_get_string_intkey(PARROT_INTERP, Parrot_PMC
+pmc, Parrot_Int key)>
Return the integer keyed string value of the passed-in PMC
@@ -211,7 +213,8 @@
/*
-=item C<void * Parrot_PMC_get_pointer_intkey>
+=item C<void * Parrot_PMC_get_pointer_intkey(PARROT_INTERP, Parrot_PMC pmc,
+Parrot_Int key)>
Return a pointer to the PMC indicated by an integer key.
@@ -236,7 +239,8 @@
/*
-=item C<Parrot_PMC Parrot_PMC_get_pmc_intkey>
+=item C<Parrot_PMC Parrot_PMC_get_pmc_intkey(PARROT_INTERP, Parrot_PMC pmc,
+Parrot_Int key)>
Return the integer keyed PMC value of the passed-in PMC
@@ -259,7 +263,8 @@
/*
-=item C<Parrot_PMC Parrot_PMC_get_pmc_strkey>
+=item C<Parrot_PMC Parrot_PMC_get_pmc_strkey(PARROT_INTERP, Parrot_PMC pmc,
+Parrot_String key)>
Return the string keyed PMC value of the passed-in PMC
@@ -282,7 +287,7 @@
/*
-=item C<Parrot_Int Parrot_PMC_get_intval>
+=item C<Parrot_Int Parrot_PMC_get_intval(PARROT_INTERP, Parrot_PMC pmc)>
Return the signed integer value of the value in the PMC.
@@ -304,7 +309,8 @@
/*
-=item C<Parrot_Int Parrot_PMC_get_intval_intkey>
+=item C<Parrot_Int Parrot_PMC_get_intval_intkey(PARROT_INTERP, Parrot_PMC pmc,
+Parrot_Int key)>
Return the keyed, signed integer value of the value in the PMC.
@@ -327,7 +333,8 @@
/*
-=item C<Parrot_Int Parrot_PMC_get_intval_pmckey>
+=item C<Parrot_Int Parrot_PMC_get_intval_pmckey(PARROT_INTERP, Parrot_PMC pmc,
+Parrot_PMC key)>
Return the keyed, signed integer value of the value in the PMC.
@@ -350,7 +357,7 @@
/*
-=item C<Parrot_Float Parrot_PMC_get_numval>
+=item C<Parrot_Float Parrot_PMC_get_numval(PARROT_INTERP, Parrot_PMC pmc)>
Return the floating-point value of the PMC.
@@ -372,7 +379,8 @@
/*
-=item C<Parrot_Float Parrot_PMC_get_numval_intkey>
+=item C<Parrot_Float Parrot_PMC_get_numval_intkey(PARROT_INTERP, Parrot_PMC pmc,
+Parrot_Int key)>
Return the keyed, signed integer value of the value in the PMC.
@@ -395,7 +403,8 @@
/*
-=item C<char * Parrot_PMC_get_cstring_intkey>
+=item C<char * Parrot_PMC_get_cstring_intkey(PARROT_INTERP, Parrot_PMC pmc,
+Parrot_Int key)>
Return a null-terminated string that represents the string value of the PMC.
@@ -426,7 +435,7 @@
/*
-=item C<char * Parrot_PMC_get_cstring>
+=item C<char * Parrot_PMC_get_cstring(PARROT_INTERP, Parrot_PMC pmc)>
Return a null-terminated string that represents the string value of the PMC.
@@ -456,7 +465,8 @@
/*
-=item C<char * Parrot_PMC_get_cstringn>
+=item C<char * Parrot_PMC_get_cstringn(PARROT_INTERP, Parrot_PMC pmc, Parrot_Int
+*length)>
Return a null-terminated string for the PMC, along with the length.
@@ -489,7 +499,8 @@
/*
-=item C<char * Parrot_PMC_get_cstringn_intkey>
+=item C<char * Parrot_PMC_get_cstringn_intkey(PARROT_INTERP, Parrot_PMC pmc,
+Parrot_Int *length, Parrot_Int key)>
Return a null-terminated string for the PMC, along with the length.
@@ -523,7 +534,8 @@
/*
-=item C<void Parrot_PMC_set_string>
+=item C<void Parrot_PMC_set_string(PARROT_INTERP, Parrot_PMC pmc, Parrot_String
+value)>
Assign the passed-in Parrot string to the passed-in PMC.
@@ -544,7 +556,8 @@
/*
-=item C<void Parrot_PMC_set_string_intkey>
+=item C<void Parrot_PMC_set_string_intkey(PARROT_INTERP, Parrot_PMC pmc,
+Parrot_Int key, Parrot_String value)>
Assign the passed-in Parrot string to the passed-in PMC.
@@ -565,7 +578,8 @@
/*
-=item C<void Parrot_PMC_set_pmc_intkey>
+=item C<void Parrot_PMC_set_pmc_intkey(PARROT_INTERP, Parrot_PMC pmc, Parrot_Int
+key, Parrot_PMC value)>
Assign the passed-in pmc to the passed-in slot of the passed-in PMC.
@@ -586,7 +600,8 @@
/*
-=item C<void Parrot_PMC_set_pmc_strkey>
+=item C<void Parrot_PMC_set_pmc_strkey(PARROT_INTERP, Parrot_PMC pmc,
+Parrot_String key, Parrot_PMC value)>
Assign the passed-in pmc to the passed-in slot of the passed-in PMC.
@@ -607,7 +622,8 @@
/*
-=item C<void Parrot_PMC_set_pmc_pmckey>
+=item C<void Parrot_PMC_set_pmc_pmckey(PARROT_INTERP, Parrot_PMC pmc, Parrot_PMC
+key, Parrot_PMC value)>
Assign the passed-in pmc to the passed-in slot of the passed-in PMC.
@@ -628,7 +644,8 @@
/*
-=item C<void Parrot_PMC_set_pointer_intkey>
+=item C<void Parrot_PMC_set_pointer_intkey(PARROT_INTERP, Parrot_PMC pmc,
+Parrot_Int key, void *value)>
Assign the passed-in pointer to the passed-in PMC.
@@ -649,7 +666,8 @@
/*
-=item C<void Parrot_PMC_set_intval>
+=item C<void Parrot_PMC_set_intval(PARROT_INTERP, Parrot_PMC pmc, Parrot_Int
+value)>
Assign the passed-in Parrot integer to the passed-in PMC.
@@ -669,7 +687,8 @@
/*
-=item C<void Parrot_PMC_set_intval_intkey>
+=item C<void Parrot_PMC_set_intval_intkey(PARROT_INTERP, Parrot_PMC pmc,
+Parrot_Int key, Parrot_Int value)>
Assign the passed-in Parrot integer to the passed-in PMC.
@@ -690,7 +709,8 @@
/*
-=item C<void Parrot_PMC_set_numval>
+=item C<void Parrot_PMC_set_numval(PARROT_INTERP, Parrot_PMC pmc, Parrot_Float
+value)>
Assign the passed-in Parrot number to the passed-in PMC.
@@ -710,7 +730,8 @@
/*
-=item C<void Parrot_PMC_set_numval_intkey>
+=item C<void Parrot_PMC_set_numval_intkey(PARROT_INTERP, Parrot_PMC pmc,
+Parrot_Int key, Parrot_Float value)>
Assign the passed-in Parrot number to the passed-in PMC.
@@ -731,7 +752,8 @@
/*
-=item C<void Parrot_PMC_set_cstring>
+=item C<void Parrot_PMC_set_cstring(PARROT_INTERP, Parrot_PMC pmc, const char
+*value)>
Assign the passed-in null-terminated C string to the passed-in PMC.
@@ -752,7 +774,8 @@
/*
-=item C<void Parrot_PMC_set_cstring_intkey>
+=item C<void Parrot_PMC_set_cstring_intkey(PARROT_INTERP, Parrot_PMC pmc,
+Parrot_Int key, const char *value)>
Assign the passed-in null-terminated C string to the passed-in PMC.
@@ -774,7 +797,8 @@
/*
-=item C<void Parrot_PMC_set_cstringn>
+=item C<void Parrot_PMC_set_cstringn(PARROT_INTERP, Parrot_PMC pmc, const char
+*value, Parrot_UInt length)>
Assign the passed-in length-noted string to the passed-in PMC.
@@ -796,7 +820,8 @@
/*
-=item C<void Parrot_PMC_push_intval>
+=item C<void Parrot_PMC_push_intval(PARROT_INTERP, Parrot_PMC pmc, Parrot_Int
+value)>
Push the passed-in Parrot integer onto the passed in PMC
@@ -817,7 +842,8 @@
/*
-=item C<void Parrot_PMC_push_numval>
+=item C<void Parrot_PMC_push_numval(PARROT_INTERP, Parrot_PMC pmc, Parrot_Float
+value)>
Push the passed-in Parrot number onto the passed in PMC
@@ -837,7 +863,8 @@
/*
-=item C<void Parrot_PMC_push_pmcval>
+=item C<void Parrot_PMC_push_pmcval(PARROT_INTERP, Parrot_PMC pmc, Parrot_PMC
+value)>
Push the passed-in Parrot PMC onto the passed in PMC
@@ -857,7 +884,8 @@
/*
-=item C<void Parrot_PMC_delete_pmckey>
+=item C<void Parrot_PMC_delete_pmckey(PARROT_INTERP, Parrot_PMC pmc, Parrot_PMC
+key)>
Deletes the value associated with the passed-in PMC from the PMC.
@@ -877,7 +905,8 @@
/*
-=item C<void Parrot_PMC_set_cstringn_intkey>
+=item C<void Parrot_PMC_set_cstringn_intkey(PARROT_INTERP, Parrot_PMC pmc,
+Parrot_Int key, const char *value, Parrot_UInt length)>
Assign the passed-in length-noted string to the passed-in PMC.
@@ -900,7 +929,7 @@
/*
-=item C<Parrot_PMC Parrot_PMC_new>
+=item C<Parrot_PMC Parrot_PMC_new(PARROT_INTERP, Parrot_Int type)>
Create and return a new PMC.
@@ -923,7 +952,7 @@
/*
-=item C<Parrot_Int Parrot_PMC_typenum>
+=item C<Parrot_Int Parrot_PMC_typenum(PARROT_INTERP, const char *_class)>
Returns the internal identifier that represents the named class.
@@ -945,7 +974,7 @@
/*
-=item C<Parrot_PMC Parrot_PMC_null>
+=item C<Parrot_PMC Parrot_PMC_null(void)>
Returns the special C<NULL> PMC.
@@ -963,7 +992,7 @@
/*
-=item C<void Parrot_free_cstring>
+=item C<void Parrot_free_cstring(char *string)>
Deallocate a C string that the interpreter has handed to you.
@@ -981,7 +1010,8 @@
/*
-=item C<void* Parrot_call_sub>
+=item C<void* Parrot_call_sub(PARROT_INTERP, Parrot_PMC sub_pmc, const char
+*signature, ...)>
Call a parrot subroutine with the given function signature. The first char in
C<signature> denotes the return value. Next chars are arguments.
@@ -1026,7 +1056,8 @@
/*
-=item C<Parrot_Int Parrot_call_sub_ret_int>
+=item C<Parrot_Int Parrot_call_sub_ret_int(PARROT_INTERP, Parrot_PMC sub_pmc,
+const char *signature, ...)>
Like C<Parrot_call_sub>, with Parrot_Int return result.
@@ -1058,7 +1089,8 @@
/*
-=item C<Parrot_Float Parrot_call_sub_ret_float>
+=item C<Parrot_Float Parrot_call_sub_ret_float(PARROT_INTERP, Parrot_PMC
+sub_pmc, const char *signature, ...)>
Like C<Parrot_call_sub>, with Parrot_Float return result.
@@ -1090,7 +1122,8 @@
/*
-=item C<void * Parrot_call_method>
+=item C<void * Parrot_call_method(PARROT_INTERP, Parrot_PMC sub, Parrot_PMC obj,
+Parrot_String method, const char *signature, ...)>
Call the parrot subroutine C<sub> as a method on PMC object C<obj>. The method
should have the name C<method> as a Parrot_string, and should have a function
@@ -1123,7 +1156,8 @@
/*
-=item C<Parrot_Int Parrot_call_method_ret_int>
+=item C<Parrot_Int Parrot_call_method_ret_int(PARROT_INTERP, Parrot_PMC sub,
+Parrot_PMC obj, Parrot_String method, const char *signature, ...)>
Call the parrot subroutine C<sub> as a method on PMC object C<obj>. The method
should have the name C<method> as a Parrot_string, and should have a function
@@ -1154,7 +1188,8 @@
/*
-=item C<Parrot_Float Parrot_call_method_ret_float>
+=item C<Parrot_Float Parrot_call_method_ret_float(PARROT_INTERP, Parrot_PMC sub,
+Parrot_PMC obj, Parrot_String method, const char *signature, ...)>
Call a parrot method for the given object.
@@ -1182,7 +1217,7 @@
/*
-=item C<Parrot_Int Parrot_get_intreg>
+=item C<Parrot_Int Parrot_get_intreg(PARROT_INTERP, Parrot_Int regnum)>
Return the value of an integer register.
@@ -1200,7 +1235,7 @@
/*
-=item C<Parrot_Float Parrot_get_numreg>
+=item C<Parrot_Float Parrot_get_numreg(PARROT_INTERP, Parrot_Int regnum)>
Return the value of a numeric register.
@@ -1218,7 +1253,7 @@
/*
-=item C<Parrot_String Parrot_get_strreg>
+=item C<Parrot_String Parrot_get_strreg(PARROT_INTERP, Parrot_Int regnum)>
Return the value of a string register.
@@ -1236,7 +1271,7 @@
/*
-=item C<Parrot_PMC Parrot_get_pmcreg>
+=item C<Parrot_PMC Parrot_get_pmcreg(PARROT_INTERP, Parrot_Int regnum)>
Return the value of a PMC register.
@@ -1254,7 +1289,8 @@
/*
-=item C<void Parrot_set_intreg>
+=item C<void Parrot_set_intreg(PARROT_INTERP, Parrot_Int regnum, Parrot_Int
+value)>
Set the value of an I register.
@@ -1273,7 +1309,8 @@
/*
-=item C<void Parrot_set_numreg>
+=item C<void Parrot_set_numreg(PARROT_INTERP, Parrot_Int regnum, Parrot_Float
+value)>
Set the value of an N register.
@@ -1292,7 +1329,8 @@
/*
-=item C<void Parrot_set_strreg>
+=item C<void Parrot_set_strreg(PARROT_INTERP, Parrot_Int regnum, Parrot_String
+value)>
Set the value of an S register.
@@ -1311,7 +1349,8 @@
/*
-=item C<void Parrot_set_pmcreg>
+=item C<void Parrot_set_pmcreg(PARROT_INTERP, Parrot_Int regnum, Parrot_PMC
+value)>
Set the value of a P register.
@@ -1333,7 +1372,8 @@
*/
/*
-=item C<Parrot_String Parrot_new_string>
+=item C<Parrot_String Parrot_new_string(PARROT_INTERP, const char *buffer,
+Parrot_UInt length, const char * const encoding_name, Parrot_UInt flags)>
Create a new Parrot string from a passed-in buffer. Pass in a 0 for
flags for right now.
@@ -1362,7 +1402,7 @@
/*
-=item C<Parrot_Language Parrot_find_language>
+=item C<Parrot_Language Parrot_find_language(PARROT_INTERP, char *language)>
Find the magic language token for a language, by language name.
@@ -1381,7 +1421,7 @@
/*
-=item C<void Parrot_register_pmc>
+=item C<void Parrot_register_pmc(PARROT_INTERP, Parrot_PMC pmc)>
Add a reference of the PMC to the interpreter's GC registry. This prevents PMCs
only known to extension from getting destroyed during GC runs.
@@ -1402,7 +1442,7 @@
/*
-=item C<void Parrot_unregister_pmc>
+=item C<void Parrot_unregister_pmc(PARROT_INTERP, Parrot_PMC pmc)>
Remove a reference of the PMC from the interpreter's GC registry. If the
reference count reaches zero, the PMC will be destroyed during the next GC run.
@@ -1423,7 +1463,8 @@
/*
-=item C<void Parrot_PMC_set_vtable>
+=item C<void Parrot_PMC_set_vtable(PARROT_INTERP, Parrot_PMC pmc, Parrot_VTABLE
+vtable)>
Replaces the vtable of the PMC.
@@ -1441,7 +1482,7 @@
/*
-=item C<Parrot_VTABLE Parrot_get_vtable>
+=item C<Parrot_VTABLE Parrot_get_vtable(PARROT_INTERP, Parrot_Int id)>
Returns the vtable corresponding to the given PMC ID.
@@ -1460,7 +1501,8 @@
/*
-=item C<Parrot_PMC Parrot_sub_new_from_c_func>
+=item C<Parrot_PMC Parrot_sub_new_from_c_func(PARROT_INTERP, void (*func(void)),
+const char * signature)>
Returns a PMC sub wrapper for a c function.
@@ -1484,7 +1526,7 @@
/*
-=item C<Parrot_PMC Parrot_PMC_newclass>
+=item C<Parrot_PMC Parrot_PMC_newclass(PARROT_INTERP, Parrot_PMC classtype)>
Create a class with the type given
Modified: trunk/src/gc/api.c
==============================================================================
--- trunk/src/gc/api.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/gc/api.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -263,7 +263,8 @@
/*
-=item C<void Parrot_gc_free_pmc(PARROT_INTERP, Small_Object_Pool *pool, PObj *p)>
+=item C<void Parrot_gc_free_pmc(PARROT_INTERP, Small_Object_Pool *pool, PObj
+*p)>
Frees a PMC that is no longer being used. Calls a custom C<destroy> VTABLE
method if one is available. If the PMC uses a PMC_EXT structure, that is freed
@@ -335,7 +336,8 @@
/*
-=item C<void Parrot_gc_free_sysmem(PARROT_INTERP, Small_Object_Pool *pool, PObj *b)>
+=item C<void Parrot_gc_free_sysmem(PARROT_INTERP, Small_Object_Pool *pool, PObj
+*b)>
If the PMC uses memory allocated directly from the system, this function
frees that memory.
@@ -359,7 +361,8 @@
/*
-=item C<void Parrot_gc_free_buffer_malloc(PARROT_INTERP, Small_Object_Pool *pool, PObj *b)>
+=item C<void Parrot_gc_free_buffer_malloc(PARROT_INTERP, Small_Object_Pool
+*pool, PObj *b)>
Frees the given buffer, returning the storage space to the operating system
and removing it from Parrot's memory management system. If the buffer is COW,
@@ -394,7 +397,8 @@
/*
-=item C<void Parrot_gc_free_buffer(PARROT_INTERP, Small_Object_Pool *pool, PObj *b)>
+=item C<void Parrot_gc_free_buffer(PARROT_INTERP, Small_Object_Pool *pool, PObj
+*b)>
Frees a buffer, returning it to the memory pool for Parrot to possibly
reuse later.
Modified: trunk/src/gc/generational_ms.c
==============================================================================
--- trunk/src/gc/generational_ms.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/gc/generational_ms.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -584,7 +584,8 @@
=over 4
-=item C<static void gc_gms_add_free_object(PARROT_INTERP, Small_Object_Pool *pool, PObj *to_add)>
+=item C<static void gc_gms_add_free_object(PARROT_INTERP, Small_Object_Pool
+*pool, PObj *to_add)>
Unused. White (dead) objects are added in a bunch to the free_list.
@@ -694,7 +695,8 @@
/*
-=item C<static void gc_gms_alloc_objects(PARROT_INTERP, Small_Object_Pool *pool)>
+=item C<static void gc_gms_alloc_objects(PARROT_INTERP, Small_Object_Pool
+*pool)>
Allocate new objects for the given pool.
@@ -754,7 +756,8 @@
/*
-=item C<static PObj * gc_gms_get_free_object(PARROT_INTERP, Small_Object_Pool *pool)>
+=item C<static PObj * gc_gms_get_free_object(PARROT_INTERP, Small_Object_Pool
+*pool)>
Get a new object off the free_list in the given pool.
@@ -810,8 +813,8 @@
=over 4
-=item C<static Gc_gms_gen * gc_gms_create_gen(PARROT_INTERP,
-Small_Object_Pool *pool, size_t gen_no)>
+=item C<static Gc_gms_gen * gc_gms_create_gen(PARROT_INTERP, Small_Object_Pool
+*pool, size_t gen_no)>
Create a generation structure for the given generation number.
@@ -872,7 +875,8 @@
/*
-=item C<static Gc_gms_gen * gc_gms_find_gen(PARROT_INTERP, const Gc_gms_hdr *h, UINTVAL gen_no)>
+=item C<static Gc_gms_gen * gc_gms_find_gen(PARROT_INTERP, const Gc_gms_hdr *h,
+UINTVAL gen_no)>
=cut
@@ -908,7 +912,8 @@
/*
-=item C<static void gc_gms_promote(PARROT_INTERP, Gc_gms_hdr *h, UINTVAL gen_no)>
+=item C<static void gc_gms_promote(PARROT_INTERP, Gc_gms_hdr *h, UINTVAL
+gen_no)>
=cut
@@ -954,7 +959,8 @@
/*
-=item C<static void gc_gms_store_hdr_list(PARROT_INTERP, Gc_gms_hdr_list *l, Gc_gms_hdr *h)>
+=item C<static void gc_gms_store_hdr_list(PARROT_INTERP, Gc_gms_hdr_list *l,
+Gc_gms_hdr *h)>
=cut
@@ -1079,8 +1085,8 @@
/*
-=item C<void parrot_gc_gms_wb_key(PARROT_INTERP, PMC *agg, void *old,
-void *old_key, void *_new, void *new_key)>
+=item C<void parrot_gc_gms_wb_key(PARROT_INTERP, PMC *agg, void *old, void
+*old_key, void *_new, void *new_key)>
=cut
@@ -1114,8 +1120,8 @@
/*
-=item C<static void gc_gms_merge_gen(PARROT_INTERP, Small_Object_Pool *pool,
-int flag, Gc_gms_plan *plan)>
+=item C<static void gc_gms_merge_gen(PARROT_INTERP, Small_Object_Pool *pool, int
+flag, Gc_gms_plan *plan)>
=cut
@@ -1148,8 +1154,8 @@
/*
-=item C<static void gc_gms_use_gen(PARROT_INTERP, Small_Object_Pool *pool,
-int flag, const Gc_gms_plan *plan)>
+=item C<static void gc_gms_use_gen(PARROT_INTERP, Small_Object_Pool *pool, int
+flag, const Gc_gms_plan *plan)>
=cut
@@ -1183,7 +1189,8 @@
/*
-=item C<static int set_gen_cb(PARROT_INTERP, Small_Object_Pool *pool, int flag, void *arg)>
+=item C<static int set_gen_cb(PARROT_INTERP, Small_Object_Pool *pool, int flag,
+void *arg)>
=cut
@@ -1320,7 +1327,8 @@
/*
-=item C<static void gc_gms_setto_gray(PARROT_INTERP, Gc_gms_hdr *h, int priority)>
+=item C<static void gc_gms_setto_gray(PARROT_INTERP, Gc_gms_hdr *h, int
+priority)>
Set the white header C<h> to gray.
@@ -1383,7 +1391,8 @@
/*
-=item C<static void gc_gms_setto_black(PARROT_INTERP, Gc_gms_hdr *h, int priority)>
+=item C<static void gc_gms_setto_black(PARROT_INTERP, Gc_gms_hdr *h, int
+priority)>
Set the white header C<h> to black.
@@ -1473,8 +1482,8 @@
/*
-=item C<static int init_mark_cb(PARROT_INTERP, Small_Object_Pool *pool,
-int flag, void *arg)>
+=item C<static int init_mark_cb(PARROT_INTERP, Small_Object_Pool *pool, int
+flag, void *arg)>
=cut
@@ -1517,8 +1526,8 @@
/*
-=item C<static int trace_igp_cb(PARROT_INTERP, Small_Object_Pool *pool,
-int flag, void *arg)>
+=item C<static int trace_igp_cb(PARROT_INTERP, Small_Object_Pool *pool, int
+flag, void *arg)>
=cut
@@ -1566,8 +1575,8 @@
/*
-=item C<static int trace_children_cb(PARROT_INTERP, Small_Object_Pool *pool,
-int flag, void *arg)>
+=item C<static int trace_children_cb(PARROT_INTERP, Small_Object_Pool *pool, int
+flag, void *arg)>
=cut
@@ -1631,7 +1640,8 @@
/*
-=item C<static int sweep_cb_pmc(PARROT_INTERP, Small_Object_Pool *pool, int flag, void *arg)>
+=item C<static int sweep_cb_pmc(PARROT_INTERP, Small_Object_Pool *pool, int
+flag, void *arg)>
move everything from white up to the free_list to the free_list
scan for active destroy objects
@@ -1671,8 +1681,8 @@
/*
-=item C<static int sweep_cb_buf(PARROT_INTERP, Small_Object_Pool *pool,
-int flag, void *arg)>
+=item C<static int sweep_cb_buf(PARROT_INTERP, Small_Object_Pool *pool, int
+flag, void *arg)>
=cut
@@ -1756,8 +1766,8 @@
/*
-=item C<static int end_cycle_cb(PARROT_INTERP, Small_Object_Pool *pool,
-int flag, void *arg)>
+=item C<static int end_cycle_cb(PARROT_INTERP, Small_Object_Pool *pool, int
+flag, void *arg)>
=cut
@@ -1859,7 +1869,8 @@
/*
-=item C<static void gms_debug_verify(PARROT_INTERP, Small_Object_Pool *pool, const char *action)>
+=item C<static void gms_debug_verify(PARROT_INTERP, Small_Object_Pool *pool,
+const char *action)>
=cut
Modified: trunk/src/gc/incremental_ms.c
==============================================================================
--- trunk/src/gc/incremental_ms.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/gc/incremental_ms.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -504,8 +504,8 @@
/*
-=item C<static void gc_ims_add_free_object(PARROT_INTERP,
-Small_Object_Pool *pool, void *to_add)>
+=item C<static void gc_ims_add_free_object(PARROT_INTERP, Small_Object_Pool
+*pool, void *to_add)>
Add object C<to_add> to the free_list in the given pool.
C<pool->num_free_objects> has to be updated by the caller.
@@ -532,7 +532,8 @@
/*
-=item C<static void * gc_ims_get_free_object(PARROT_INTERP, Small_Object_Pool *pool)>
+=item C<static void * gc_ims_get_free_object(PARROT_INTERP, Small_Object_Pool
+*pool)>
Get a new object off the free_list in the given pool.
@@ -575,7 +576,8 @@
/*
-=item C<static void gc_ims_alloc_objects(PARROT_INTERP, Small_Object_Pool *pool)>
+=item C<static void gc_ims_alloc_objects(PARROT_INTERP, Small_Object_Pool
+*pool)>
Allocate new objects for the given pool.
@@ -754,7 +756,8 @@
/*
-=item C<static int sweep_cb(PARROT_INTERP, Small_Object_Pool *pool, int flag, void *arg)>
+=item C<static int sweep_cb(PARROT_INTERP, Small_Object_Pool *pool, int flag,
+void *arg)>
Callback to sweep a header pool (see Parrot_forall_header_pools).
Modified: trunk/src/gc/mark_sweep.c
==============================================================================
--- trunk/src/gc/mark_sweep.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/gc/mark_sweep.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -525,7 +525,8 @@
/*
-=item C<INTVAL contained_in_pool(const Small_Object_Pool *pool, const void *ptr)>
+=item C<INTVAL contained_in_pool(const Small_Object_Pool *pool, const void
+*ptr)>
Returns whether the given C<*ptr> points to a location in C<pool>.
@@ -680,7 +681,8 @@
/*
-=item C<static void more_traceable_objects(PARROT_INTERP, Small_Object_Pool *pool)>
+=item C<static void more_traceable_objects(PARROT_INTERP, Small_Object_Pool
+*pool)>
We're out of traceable objects. First we try a GC run to free some up. If
that doesn't work, allocate a new arena.
@@ -714,7 +716,8 @@
/*
-=item C<static void gc_ms_add_free_pmc_ext(PARROT_INTERP, Small_Object_Pool *pool, void *to_add)>
+=item C<static void gc_ms_add_free_pmc_ext(PARROT_INTERP, Small_Object_Pool
+*pool, void *to_add)>
Add a freed PMC_EXT structure to the free list in the PMC_EXT pool. Objects
on the free list can be reused later.
@@ -737,7 +740,8 @@
/*
-=item C<static void gc_ms_add_free_object(PARROT_INTERP, Small_Object_Pool *pool, void *to_add)>
+=item C<static void gc_ms_add_free_object(PARROT_INTERP, Small_Object_Pool
+*pool, void *to_add)>
Add an unused object back to the pool's free list for later reuse. Set
the PObj flags to indicate that the item is free.
@@ -761,7 +765,8 @@
/*
-=item C<static void * gc_ms_get_free_object(PARROT_INTERP, Small_Object_Pool *pool)>
+=item C<static void * gc_ms_get_free_object(PARROT_INTERP, Small_Object_Pool
+*pool)>
Free object allocator for the MS garbage collector system. If there are no
free objects, call C<gc_ms_add_free_object> to either free them up with a
@@ -800,7 +805,8 @@
/*
-=item C<static void * gc_ms_get_free_pmc_ext(PARROT_INTERP, Small_Object_Pool *pool)>
+=item C<static void * gc_ms_get_free_pmc_ext(PARROT_INTERP, Small_Object_Pool
+*pool)>
Get a new PMC_EXT structure from the free pool and return it.
@@ -835,7 +841,8 @@
/*
-=item C<static int sweep_cb(PARROT_INTERP, Small_Object_Pool *pool, int flag, void *arg)>
+=item C<static int sweep_cb(PARROT_INTERP, Small_Object_Pool *pool, int flag,
+void *arg)>
Sweeps the given pool for the MS collector. This function also ends
the profiling timer, if profiling is enabled. Returns the total number
@@ -1053,8 +1060,8 @@
/*
-=item C<void Parrot_append_arena_in_pool(PARROT_INTERP,
-Small_Object_Pool *pool, Small_Object_Arena *new_arena, size_t size)>
+=item C<void Parrot_append_arena_in_pool(PARROT_INTERP, Small_Object_Pool *pool,
+Small_Object_Arena *new_arena, size_t size)>
Insert the new arena into the pool's structure. Arenas are stored in a
linked list, so add the new arena to the list. Set information in the
@@ -1146,7 +1153,8 @@
/*
-=item C<Small_Object_Pool * new_small_object_pool(size_t object_size, size_t objects_per_alloc)>
+=item C<Small_Object_Pool * new_small_object_pool(size_t object_size, size_t
+objects_per_alloc)>
Creates a new C<Small_Object_Pool> and returns a pointer to it.
Initializes the pool structure based on the size of objects in the
@@ -1247,8 +1255,8 @@
/*
-=item C<void Parrot_small_object_pool_merge(PARROT_INTERP,
-Small_Object_Pool *dest, Small_Object_Pool *source)>
+=item C<void Parrot_small_object_pool_merge(PARROT_INTERP, Small_Object_Pool
+*dest, Small_Object_Pool *source)>
Merge pool C<source> into pool C<dest>. Combines the free lists directly,
moves all arenas to the new pool, and remove the old pool. To merge, the
Modified: trunk/src/gc/memory.c
==============================================================================
--- trunk/src/gc/memory.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/gc/memory.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -113,7 +113,8 @@
/*
-=item C<void * mem__internal_allocate_zeroed(size_t size, const char *file, int line)>
+=item C<void * mem__internal_allocate_zeroed(size_t size, const char *file, int
+line)>
Uses C<calloc> to allocate system memory. Guaranteed to succeed, Panics
otherwise. If C<DETAIL_MEMORY_DEBUG> macro is defined, prints
@@ -216,8 +217,8 @@
/*
-=item C<void * mem__internal_realloc(void *from, size_t size,
-const char *file, int line)>
+=item C<void * mem__internal_realloc(void *from, size_t size, const char *file,
+int line)>
Resizes a chunk of system memory. Unlike C<realloc>, it can handle a
NULL pointer, in which case a new memory block is allocated for the
@@ -254,8 +255,8 @@
/*
-=item C<void * mem__internal_realloc_zeroed(void *from, size_t size,
-size_t old_size, const char *file, int line)>
+=item C<void * mem__internal_realloc_zeroed(void *from, size_t size, size_t
+old_size, const char *file, int line)>
Reallocates a given buffer of size C<old_size> to C<size>. If the new size
is larger then the old size, the difference is filled with zeros. Contains
Modified: trunk/src/gc/pools.c
==============================================================================
--- trunk/src/gc/pools.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/gc/pools.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -150,7 +150,8 @@
/*
-=item C<Small_Object_Pool * new_bufferlike_pool(PARROT_INTERP, size_t actual_buffer_size)>
+=item C<Small_Object_Pool * new_bufferlike_pool(PARROT_INTERP, size_t
+actual_buffer_size)>
Creates a new pool for buffer-like structures. This is called from
C<get_bufferlike_pool()>, and should probably not be called directly.
@@ -241,7 +242,8 @@
/*
-=item C<Small_Object_Pool * get_bufferlike_pool(PARROT_INTERP, size_t buffer_size)>
+=item C<Small_Object_Pool * get_bufferlike_pool(PARROT_INTERP, size_t
+buffer_size)>
Makes and return a bufferlike header pool for objects of a given size. If a
pool for objects of that size already exists, no new pool will be created and
@@ -626,8 +628,8 @@
/*
-=item C<static int sweep_cb_buf(PARROT_INTERP, Small_Object_Pool *pool,
-int flag, void *arg)>
+=item C<static int sweep_cb_buf(PARROT_INTERP, Small_Object_Pool *pool, int
+flag, void *arg)>
Performs a final garbage collection sweep, then frees the pool. Calls
C<Parrot_gc_sweep> to perform the sweep, and C<free_pool> to free the pool and
@@ -663,8 +665,8 @@
/*
-=item C<static int sweep_cb_pmc(PARROT_INTERP, Small_Object_Pool *pool,
-int flag, void *arg)>
+=item C<static int sweep_cb_pmc(PARROT_INTERP, Small_Object_Pool *pool, int
+flag, void *arg)>
Performs a garbage collection sweep of the given pmc pool, then frees it. Calls
C<Parrot_gc_sweep> to perform the sweep, and C<free_pool> to free the pool and
@@ -773,7 +775,8 @@
/*
-=item C<void Parrot_merge_header_pools(Interp *dest_interp, Interp *source_interp)>
+=item C<void Parrot_merge_header_pools(Interp *dest_interp, Interp
+*source_interp)>
Merges the header pools of C<source_interp> into those of C<dest_interp>.
(Used to deal with shared objects left after interpreter destruction.)
Modified: trunk/src/gc/register.c
==============================================================================
--- trunk/src/gc/register.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/gc/register.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -294,8 +294,8 @@
/*
-=item C<static void init_context(PARROT_INTERP, Parrot_Context *ctx,
-const Parrot_Context *old)>
+=item C<static void init_context(PARROT_INTERP, Parrot_Context *ctx, const
+Parrot_Context *old)>
Initializes a freshly allocated or recycled context.
@@ -339,7 +339,8 @@
/*
-=item C<Parrot_Context * Parrot_push_context(PARROT_INTERP, const INTVAL *n_regs_used)>
+=item C<Parrot_Context * Parrot_push_context(PARROT_INTERP, const INTVAL
+*n_regs_used)>
Creates and sets the current context to a new context, remembering the old
context in C<caller_ctx>. Suitable to use with C<Parrot_pop_context>.
@@ -406,8 +407,8 @@
/*
-=item C<Parrot_Context * Parrot_alloc_context(PARROT_INTERP,
-const INTVAL *number_regs_used, Parrot_Context *old)>
+=item C<Parrot_Context * Parrot_alloc_context(PARROT_INTERP, const INTVAL
+*number_regs_used, Parrot_Context *old)>
Allocates and returns a new context. Does not set this new context as the
current context. Note that the register usage C<n_regs_used> is copied. Use
@@ -507,7 +508,8 @@
/*
-=item C<Parrot_Context * Parrot_set_new_context(PARROT_INTERP, const INTVAL *number_regs_used)>
+=item C<Parrot_Context * Parrot_set_new_context(PARROT_INTERP, const INTVAL
+*number_regs_used)>
Allocates and returns a new context as the current context. Note that the
register usage C<n_regs_used> is copied.
@@ -642,8 +644,8 @@
/*
-=item C<Parrot_Context * Parrot_context_ref_trace(PARROT_INTERP,
-Parrot_Context *ctx, const char *file, int line)>
+=item C<Parrot_Context * Parrot_context_ref_trace(PARROT_INTERP, Parrot_Context
+*ctx, const char *file, int line)>
Helper function to trace references when CTX_LEAK_DEBUG is set.
Modified: trunk/src/gc/resources.c
==============================================================================
--- trunk/src/gc/resources.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/gc/resources.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -131,8 +131,8 @@
/*
-=item C<static void alloc_new_block(PARROT_INTERP, size_t size,
-Memory_Pool *pool, const char *why)>
+=item C<static void alloc_new_block(PARROT_INTERP, size_t size, Memory_Pool
+*pool, const char *why)>
Allocate a new memory block. We allocate either the requested size or the
default size, whichever is larger. Add the new block to the given memory
@@ -191,7 +191,8 @@
/*
-=item C<static void * mem_allocate(PARROT_INTERP, size_t size, Memory_Pool *pool)>
+=item C<static void * mem_allocate(PARROT_INTERP, size_t size, Memory_Pool
+*pool)>
Allocates memory for headers.
@@ -795,7 +796,8 @@
/*
-=item C<void Parrot_reallocate_string(PARROT_INTERP, STRING *str, size_t newsize)>
+=item C<void Parrot_reallocate_string(PARROT_INTERP, STRING *str, size_t
+newsize)>
Reallocate the STRING's buffer memory to the given size. The allocated
buffer will not shrink. This function sets also C<str-E<gt>strstart> to the
@@ -891,7 +893,8 @@
/*
-=item C<void Parrot_allocate_aligned(PARROT_INTERP, Buffer *buffer, size_t size)>
+=item C<void Parrot_allocate_aligned(PARROT_INTERP, Buffer *buffer, size_t
+size)>
Like above, except the C<size> will be rounded up and the address of
the buffer will have the same alignment as a pointer returned by
@@ -965,7 +968,8 @@
/*
-=item C<static Memory_Pool * new_memory_pool(size_t min_block, compact_f compact)>
+=item C<static Memory_Pool * new_memory_pool(size_t min_block, compact_f
+compact)>
Allocate a new C<Memory_Pool> structures, and set some initial values.
return a pointer to the new pool.
@@ -1104,7 +1108,8 @@
/*
-=item C<void Parrot_merge_memory_pools(Interp *dest_interp, Interp *source_interp)>
+=item C<void Parrot_merge_memory_pools(Interp *dest_interp, Interp
+*source_interp)>
Merge the memory pools of two interpreter structures. Merge the general
memory pool and the constant string pools from C<source_interp> into
Modified: trunk/src/gc/system.c
==============================================================================
--- trunk/src/gc/system.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/gc/system.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -208,7 +208,8 @@
/*
-=item C<void trace_mem_block(PARROT_INTERP, size_t lo_var_ptr, size_t hi_var_ptr)>
+=item C<void trace_mem_block(PARROT_INTERP, size_t lo_var_ptr, size_t
+hi_var_ptr)>
Traces the memory block between C<lo_var_ptr> and C<hi_var_ptr>.
Attempt to find pointers to PObjs or buffers, and mark them as "alive"
Modified: trunk/src/global.c
==============================================================================
--- trunk/src/global.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/global.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -110,7 +110,8 @@
/*
-=item C<static PMC * internal_ns_keyed>
+=item C<static PMC * internal_ns_keyed(PARROT_INTERP, PMC *base_ns, PMC
+*pmc_key, int flags)>
internal_ns_keyed: Internal function to do keyed namespace lookup relative to a
given namespace PMC. Understands String, Key, and array PMCs containing
@@ -166,7 +167,8 @@
/*
-=item C<static PMC * internal_ns_keyed_str>
+=item C<static PMC * internal_ns_keyed_str(PARROT_INTERP, PMC *base_ns, STRING
+*key, int flags)>
Internal function to do keyed namespace lookup relative to a given namespace
PMC. Understands STRINGs.
@@ -192,7 +194,8 @@
/*
-=item C<static PMC * internal_ns_keyed_key>
+=item C<static PMC * internal_ns_keyed_key(PARROT_INTERP, PMC *ns, PMC *key, int
+flags)>
Internal function to do keyed namespace lookup relative to a given namespace
PMC. Understands Key PMCs. Used from C<internal_ns_keyed>.
@@ -228,7 +231,8 @@
/*
-=item C<static PMC * internal_ns_maybe_create>
+=item C<static PMC * internal_ns_maybe_create(PARROT_INTERP, PMC *ns, STRING
+*key, int flags)>
Given the a namespace PMC, a STRING containing a name, and flags from
C<internal_ns_keyed> or C<internal_ns_keyed_str>, creates and returns a new
@@ -266,7 +270,8 @@
/*
-=item C<PMC * Parrot_get_namespace_keyed>
+=item C<PMC * Parrot_get_namespace_keyed(PARROT_INTERP, PMC *base_ns, PMC
+*pmc_key)>
Find the namespace relative to the namespace C<base_ns> with the key
C<pmc_key>, which may be a String, a Key, or an array of strings. Return
@@ -288,7 +293,8 @@
/*
-=item C<PMC * Parrot_get_namespace_keyed_str>
+=item C<PMC * Parrot_get_namespace_keyed_str(PARROT_INTERP, PMC *base_ns, STRING
+*str_key)>
Find the namespace relative to the namespace C<base_ns> with the string key
C<str_key>. Return the namespace, or NULL if not found.
@@ -310,7 +316,8 @@
/*
-=item C<PMC * Parrot_make_namespace_keyed>
+=item C<PMC * Parrot_make_namespace_keyed(PARROT_INTERP, PMC *base_ns, PMC
+*pmc_key)>
Find, or create if necessary, the namespace relative to the namespace
C<base_ns> with the key C<pmc_key>, which may be a String, a Key, or an
@@ -333,7 +340,8 @@
/*
-=item C<PMC * Parrot_make_namespace_keyed_str>
+=item C<PMC * Parrot_make_namespace_keyed_str(PARROT_INTERP, PMC *base_ns,
+STRING *str_key)>
Find, or create if necessary, the namespace relative to the namespace
C<base_ns> with the string key C<str_key>. Return the namespace. Errors
@@ -357,7 +365,7 @@
/*
-=item C<PMC * Parrot_make_namespace_autobase>
+=item C<PMC * Parrot_make_namespace_autobase(PARROT_INTERP, PMC *key)>
Find, or create if necessary, a namespace with the key C<key>, which may be a
String, a Key, or an array of strings. If it is a String, then the lookup is
@@ -386,7 +394,7 @@
/*
-=item C<PMC * Parrot_get_namespace_autobase>
+=item C<PMC * Parrot_get_namespace_autobase(PARROT_INTERP, PMC *key)>
Find a namespace with the key C<key>, which may be a String, a Key, or an
array of strings. If it is a String, then the lookup is relative to the
@@ -415,7 +423,7 @@
/*
-=item C<PMC * Parrot_ns_get_name>
+=item C<PMC * Parrot_ns_get_name(PARROT_INTERP, PMC *_namespace)>
Retrieve an array of names from a namespace object.
@@ -437,7 +445,7 @@
/*
-=item C<PMC * Parrot_get_global>
+=item C<PMC * Parrot_get_global(PARROT_INTERP, PMC *ns, STRING *globalname)>
Parrot_get_global allows a null namespace without throwing an exception; it
simply returns PMCNULL in that case.
@@ -482,7 +490,8 @@
/*
-=item C<void Parrot_set_global>
+=item C<void Parrot_set_global(PARROT_INTERP, PMC *ns, STRING *globalname, PMC
+*val)>
Set the global named C<globalname> in the namespace C<ns> to the value C<val>.
@@ -502,7 +511,7 @@
/*
-=item C<PMC * Parrot_find_global_n>
+=item C<PMC * Parrot_find_global_n(PARROT_INTERP, PMC *ns, STRING *globalname)>
Search the namespace PMC C<ns> for an object with name C<globalname>.
Return the object, or NULL if not found.
@@ -546,7 +555,7 @@
/*
-=item C<PMC * Parrot_find_global_cur>
+=item C<PMC * Parrot_find_global_cur(PARROT_INTERP, STRING *globalname)>
Finds and returns the data time named C<globalname> in the current namespace.
@@ -567,7 +576,8 @@
/*
-=item C<PMC * Parrot_find_global_k>
+=item C<PMC * Parrot_find_global_k(PARROT_INTERP, PMC *pmc_key, STRING
+*globalname)>
Search the namespace designated by C<pmc_key>, which may be a key PMC,
an array of namespace name strings, or a string PMC, for an object
@@ -596,7 +606,8 @@
/*
-=item C<PMC * Parrot_find_global_s>
+=item C<PMC * Parrot_find_global_s(PARROT_INTERP, STRING *str_key, STRING
+*globalname)>
Search the namespace designated by C<str_key>, or the HLL root if
C<str_key> is NULL, for an object with name C<globalname>. Return the
@@ -626,7 +637,8 @@
/*
-=item C<void Parrot_store_global_n>
+=item C<void Parrot_store_global_n(PARROT_INTERP, PMC *ns, STRING *globalname,
+PMC *val)>
Store the PMC C<val> into the namespace PMC C<ns> with name C<globalname>.
@@ -653,7 +665,8 @@
/*
-=item C<void Parrot_store_global_s>
+=item C<void Parrot_store_global_s(PARROT_INTERP, STRING *str_key, STRING
+*globalname, PMC *val)>
Store the PMC C<val> into the namespace designated by C<str_key>, or
the HLL root if C<str_key> is NULL, with the name C<globalname>.
@@ -681,7 +694,8 @@
/*
-=item C<PMC * Parrot_find_global_op>
+=item C<PMC * Parrot_find_global_op(PARROT_INTERP, PMC *ns, STRING *globalname,
+void *next)>
If the global exists in the given namespace PMC, return it. If not, return
PMCNULL.
@@ -714,7 +728,7 @@
/*
-=item C<PMC * Parrot_find_name_op>
+=item C<PMC * Parrot_find_name_op(PARROT_INTERP, STRING *name, void *next)>
RT #46171 - THIS IS BROKEN - it doesn't walk up the scopes yet
@@ -758,7 +772,7 @@
/*
-=item C<static PMC * get_namespace_pmc>
+=item C<static PMC * get_namespace_pmc(PARROT_INTERP, PMC *sub_pmc)>
Return the namespace PMC associated with the PMC C<sub>. If C<sub> is NULL,
return the Associated HLL namespace PMC instead.
@@ -794,7 +808,7 @@
/*
-=item C<static void store_sub_in_multi>
+=item C<static void store_sub_in_multi(PARROT_INTERP, PMC *sub_pmc, PMC *ns)>
Adds the sub C<sub> into a mulisub of the same name in the namespace C<ns>.
If no multisub by that name currently exists, we create one.
@@ -829,7 +843,7 @@
/*
-=item C<void Parrot_store_sub_in_namespace>
+=item C<void Parrot_store_sub_in_namespace(PARROT_INTERP, PMC *sub_pmc)>
Adds the PMC C<sub> into the current namespace. Adds the sub to a multi of the
same name if it's defined as a multi.
Modified: trunk/src/hash.c
==============================================================================
--- trunk/src/hash.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/hash.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -155,7 +155,7 @@
/*
-=item C<static size_t key_hash_STRING>
+=item C<static size_t key_hash_STRING(PARROT_INTERP, STRING *s, size_t seed)>
Returns the hashed value of the key C<value>. See also string.c.
@@ -179,7 +179,8 @@
/*
-=item C<static int STRING_compare>
+=item C<static int STRING_compare(PARROT_INTERP, const void *search_key, const
+void *bucket_key)>
Compares the two strings, returning 0 if they are identical.
@@ -211,7 +212,7 @@
/*
-=item C<static int pointer_compare>
+=item C<static int pointer_compare(PARROT_INTERP, const void *a, const void *b)>
Compares the two pointers, returning 0 if they are identical
@@ -231,7 +232,8 @@
/*
-=item C<static size_t key_hash_pointer>
+=item C<static size_t key_hash_pointer(PARROT_INTERP, const void *value, size_t
+seed)>
Returns a hashvalue for a pointer.
@@ -251,7 +253,8 @@
/*
-=item C<static size_t key_hash_cstring>
+=item C<static size_t key_hash_cstring(PARROT_INTERP, const void *value, size_t
+seed)>
Creates and returns a hash value from a string.
@@ -284,7 +287,7 @@
/*
-=item C<static int cstring_compare>
+=item C<static int cstring_compare(PARROT_INTERP, const char *a, const char *b)>
Compares two C strings for equality, returning -1, 0, and 1 if the first string
is less than, equal to, or greater than the second, respectively.
@@ -305,7 +308,7 @@
/*
-=item C<size_t key_hash_int>
+=item C<size_t key_hash_int(PARROT_INTERP, const void *value, size_t seed)>
Returns a hashed value for an integer key (passed as a void pointer, sadly).
@@ -325,7 +328,7 @@
/*
-=item C<int int_compare>
+=item C<int int_compare(PARROT_INTERP, const void *a, const void *b)>
Compares two integers for equality, returning -1, 0, and 1 if the first is less
than, equal to, or greater than the second, respectively. Uses void pointers
@@ -347,7 +350,7 @@
/*
-=item C<void parrot_dump_hash>
+=item C<void parrot_dump_hash(PARROT_INTERP, const Hash *hash)>
Prints out the hash in human-readable form, at least once someone implements
this.
@@ -367,7 +370,7 @@
/*
-=item C<void parrot_mark_hash>
+=item C<void parrot_mark_hash(PARROT_INTERP, Hash *hash)>
Marks the hash and its contents as live. Assumes that key and value are non
null in all buckets.
@@ -407,7 +410,7 @@
/*
-=item C<static void parrot_mark_hash_keys>
+=item C<static void parrot_mark_hash_keys(PARROT_INTERP, Hash *hash)>
Marks the hash and only its keys as live.
@@ -443,7 +446,7 @@
/*
-=item C<static void parrot_mark_hash_values>
+=item C<static void parrot_mark_hash_values(PARROT_INTERP, Hash *hash)>
Marks the hash and only its values as live.
@@ -479,7 +482,7 @@
/*
-=item C<static void parrot_mark_hash_both>
+=item C<static void parrot_mark_hash_both(PARROT_INTERP, Hash *hash)>
Marks the hash and both its keys and values as live.
@@ -518,7 +521,7 @@
/*
-=item C<static void hash_thaw>
+=item C<static void hash_thaw(PARROT_INTERP, Hash *hash, visit_info *info)>
Visits the contents of a hash during freeze/thaw.
@@ -588,7 +591,8 @@
/*
-=item C<static void hash_freeze>
+=item C<static void hash_freeze(PARROT_INTERP, const Hash * const hash,
+visit_info *info)>
Freezes hash into a string.
@@ -642,7 +646,7 @@
/*
-=item C<void parrot_hash_visit>
+=item C<void parrot_hash_visit(PARROT_INTERP, Hash *hash, void *pinfo)>
Freezes or thaws a hash as specified. Takes an interpreter, a pointer to the
hash, and a pointer to the structure identifying what to do and the location of
@@ -677,7 +681,7 @@
/*
-=item C<static void expand_hash>
+=item C<static void expand_hash(PARROT_INTERP, Hash *hash)>
Expands a hash when necessary.
@@ -808,7 +812,7 @@
/*
-=item C<Hash* parrot_new_hash>
+=item C<Hash* parrot_new_hash(PARROT_INTERP)>
Creates a new Parrot STRING hash in C<hptr>.
@@ -832,7 +836,7 @@
/*
-=item C<void parrot_new_pmc_hash>
+=item C<void parrot_new_pmc_hash(PARROT_INTERP, PMC *container)>
Creates a new Parrot STRING hash in C<container>.
@@ -852,7 +856,7 @@
/*
-=item C<Hash* parrot_new_cstring_hash>
+=item C<Hash* parrot_new_cstring_hash(PARROT_INTERP)>
Creates a new C string hash in C<hptr>.
@@ -876,7 +880,7 @@
/*
-=item C<Hash * parrot_new_pointer_hash>
+=item C<Hash * parrot_new_pointer_hash(PARROT_INTERP)>
Create and return a new hash with void * keys and values.
@@ -900,7 +904,7 @@
/*
-=item C<Hash* parrot_new_intval_hash>
+=item C<Hash* parrot_new_intval_hash(PARROT_INTERP)>
Creates and returns new Hash PMC with INTVAL keys and values. C<flags> can be
C<PObj_constant_FLAG> or 0.
@@ -926,7 +930,8 @@
/*
-=item C<Hash * parrot_create_hash>
+=item C<Hash * parrot_create_hash(PARROT_INTERP, PARROT_DATA_TYPE val_type,
+Hash_key_type hkey_type, hash_comp_fn compare, hash_hash_key_fn keyhash)>
Creates and initializes a hash. Function pointers determine its behaviors.
The container passed in is the address of the hash PMC that is using it. The
@@ -993,7 +998,7 @@
/*
-=item C<void parrot_hash_destroy>
+=item C<void parrot_hash_destroy(PARROT_INTERP, Hash *hash)>
Frees the memory allocated to the specified hash and its bucket store. Used by
Parrot_chash_destroy.
@@ -1014,7 +1019,7 @@
/*
-=item C<void parrot_chash_destroy>
+=item C<void parrot_chash_destroy(PARROT_INTERP, Hash *hash)>
Deletes the specified hash by freeing the memory allocated to all the key-value
pairs, and finally the hash itself.
@@ -1044,7 +1049,8 @@
/*
-=item C<void parrot_chash_destroy_values>
+=item C<void parrot_chash_destroy_values(PARROT_INTERP, Hash *hash, value_free
+func)>
Deletes the specified hash by freeing the memory allocated to all the key-value
pairs, calling the provided callback to free the values, and finally the hash
@@ -1078,7 +1084,7 @@
/*
-=item C<INTVAL parrot_hash_size>
+=item C<INTVAL parrot_hash_size(PARROT_INTERP, const Hash *hash)>
Returns the number of used entries in the hash.
@@ -1100,7 +1106,7 @@
/*
-=item C<void * parrot_hash_get_idx>
+=item C<void * parrot_hash_get_idx(PARROT_INTERP, const Hash *hash, PMC *key)>
Finds the next index into the hash's internal storage for the given Key. Used
by iterators. Ugly.
@@ -1166,7 +1172,8 @@
/*
-=item C<HashBucket * parrot_hash_get_bucket>
+=item C<HashBucket * parrot_hash_get_bucket(PARROT_INTERP, const Hash *hash,
+const void *key)>
Returns the bucket for C<key>, if found, and NULL otherwise.
@@ -1199,7 +1206,7 @@
/*
-=item C<void * parrot_hash_get>
+=item C<void * parrot_hash_get(PARROT_INTERP, Hash *hash, const void *key)>
Returns the value keyed by C<key>, or C<NULL> if no bucket is found.
@@ -1221,7 +1228,7 @@
/*
-=item C<INTVAL parrot_hash_exists>
+=item C<INTVAL parrot_hash_exists(PARROT_INTERP, Hash *hash, void *key)>
Returns whether the key exists in the hash.
@@ -1242,7 +1249,8 @@
/*
-=item C<HashBucket* parrot_hash_put>
+=item C<HashBucket* parrot_hash_put(PARROT_INTERP, Hash *hash, void *key, void
+*value)>
Puts the key and value into the hash. Note that C<key> is B<not> copied.
@@ -1302,7 +1310,7 @@
/*
-=item C<void parrot_hash_delete>
+=item C<void parrot_hash_delete(PARROT_INTERP, Hash *hash, void *key)>
Deletes the key from the hash.
@@ -1342,7 +1350,7 @@
/*
-=item C<void parrot_hash_clone>
+=item C<void parrot_hash_clone(PARROT_INTERP, const Hash *hash, Hash *dest)>
Clones C<hash> to C<dest>.
Modified: trunk/src/hll.c
==============================================================================
--- trunk/src/hll.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/hll.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -340,8 +340,8 @@
/*
-=item C<void Parrot_register_HLL_type(PARROT_INTERP, INTVAL hll_id,
-INTVAL core_type, INTVAL hll_type)>
+=item C<void Parrot_register_HLL_type(PARROT_INTERP, INTVAL hll_id, INTVAL
+core_type, INTVAL hll_type)>
Register a type mapping of C<< core_type => hll_type >> for the given HLL.
@@ -385,7 +385,8 @@
/*
-=item C<INTVAL Parrot_get_HLL_type(PARROT_INTERP, INTVAL hll_id, INTVAL core_type)>
+=item C<INTVAL Parrot_get_HLL_type(PARROT_INTERP, INTVAL hll_id, INTVAL
+core_type)>
Get an equivalent HLL type number for the language C<hll_id>. If the given HLL
doesn't remap the given type, or if C<hll_id> is the special value
Modified: trunk/src/inter_cb.c
==============================================================================
--- trunk/src/inter_cb.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/inter_cb.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -58,7 +58,8 @@
/*
-=item C<PMC* Parrot_make_cb>
+=item C<PMC* Parrot_make_cb(PARROT_INTERP, PMC* sub, PMC* user_data, STRING
+*cb_signature)>
Create a callback function according to pdd16.
@@ -149,7 +150,7 @@
/*
-=item C<static void verify_CD>
+=item C<static void verify_CD(char *external_data, PMC *user_data)>
Verify user_data PMC then continue with callback_CD
@@ -212,7 +213,8 @@
/*
-=item C<static void callback_CD>
+=item C<static void callback_CD(PARROT_INTERP, char *external_data, PMC
+*user_data)>
Common callback function handler. See pdd16.
@@ -272,7 +274,8 @@
/*
-=item C<void Parrot_run_callback>
+=item C<void Parrot_run_callback(PARROT_INTERP, PMC* user_data, char*
+external_data)>
Run a callback function. The PMC* user_data holds all
necessary items in its properties.
@@ -368,9 +371,9 @@
}
/*
-=item C<void Parrot_callback_C>
+=item C<void Parrot_callback_C(char *external_data, PMC *user_data)>
-=item C<void Parrot_callback_D>
+=item C<void Parrot_callback_D(PMC *user_data, char *external_data)>
NCI callback functions. See pdd16.
Modified: trunk/src/inter_create.c
==============================================================================
--- trunk/src/inter_create.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/inter_create.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -55,7 +55,7 @@
/*
-=item C<static int is_env_var_set>
+=item C<static int is_env_var_set(const char* var)>
Checks whether the specified environment variable is set.
@@ -83,7 +83,7 @@
/*
-=item C<static void setup_default_compreg>
+=item C<static void setup_default_compreg(PARROT_INTERP)>
Setup default compiler for PASM.
@@ -103,7 +103,7 @@
/*
-=item C<Parrot_Interp make_interpreter>
+=item C<Parrot_Interp make_interpreter(Interp *parent, INTVAL flags)>
Create the Parrot interpreter. Allocate memory and clear the registers.
@@ -279,7 +279,7 @@
/*
-=item C<void Parrot_destroy>
+=item C<void Parrot_destroy(PARROT_INTERP)>
Does nothing if C<ATEXIT_DESTROY> is defined. Otherwise calls
C<Parrot_really_destroy()> with exit code 0.
@@ -304,7 +304,7 @@
/*
-=item C<void Parrot_really_destroy>
+=item C<void Parrot_really_destroy(PARROT_INTERP, int exit_code, void *arg)>
Waits for any threads to complete, then frees all allocated memory, and
closes any open file handles, etc.
Modified: trunk/src/inter_misc.c
==============================================================================
--- trunk/src/inter_misc.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/inter_misc.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -33,7 +33,8 @@
/*
-=item C<void register_nci_method>
+=item C<void register_nci_method(PARROT_INTERP, const int type, void *func,
+const char *name, const char *proto)>
Create an entry in the C<nci_method_table> for the given NCI method of PMC
class C<type>.
@@ -65,7 +66,8 @@
/*
-=item C<void register_raw_nci_method_in_ns>
+=item C<void register_raw_nci_method_in_ns(PARROT_INTERP, const int type, void
+*func, const char *name)>
Create an entry in the C<nci_method_table> for the given raw NCI method
of PMC class C<type>.
@@ -94,7 +96,8 @@
/*
-=item C<void Parrot_mark_method_writes>
+=item C<void Parrot_mark_method_writes(PARROT_INTERP, int type, const char
+*name)>
Mark the method C<name> on PMC type C<type> as one that modifies the PMC.
@@ -117,7 +120,8 @@
/*
-=item C<void Parrot_compreg>
+=item C<void Parrot_compreg(PARROT_INTERP, STRING *type, Parrot_compiler_func_t
+func)>
Register a parser/compiler function.
@@ -152,7 +156,8 @@
/*
-=item C<void * Parrot_compile_file>
+=item C<void * Parrot_compile_file(PARROT_INTERP, const char *fullname, STRING
+**error)>
Compile code file.
@@ -190,7 +195,7 @@
/*
-=item C<INTVAL interpinfo>
+=item C<INTVAL interpinfo(PARROT_INTERP, INTVAL what)>
C<what> specifies the type of information you want about the
interpreter.
@@ -279,7 +284,7 @@
/*
-=item C<PMC* interpinfo_p>
+=item C<PMC* interpinfo_p(PARROT_INTERP, INTVAL what)>
C<what> specifies the type of information you want about the
interpreter.
@@ -318,7 +323,7 @@
/*
-=item C<STRING* interpinfo_s>
+=item C<STRING* interpinfo_s(PARROT_INTERP, INTVAL what)>
Takes an interpreter name and an information type as arguments.
Returns corresponding information strings about the interpreter:
@@ -386,7 +391,7 @@
/*
-=item C<INTVAL sysinfo_i>
+=item C<INTVAL sysinfo_i(PARROT_INTERP, INTVAL info_wanted)>
Returns the system info.
@@ -427,7 +432,7 @@
/*
-=item C<STRING * sysinfo_s>
+=item C<STRING * sysinfo_s(PARROT_INTERP, INTVAL info_wanted)>
Returns the system info string.
Modified: trunk/src/interpreter.c
==============================================================================
--- trunk/src/interpreter.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/interpreter.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -171,7 +171,8 @@
/*
-=item C<static void prederef_args>
+=item C<static void prederef_args(void **pc_prederef, PARROT_INTERP, opcode_t
+*pc, const op_info_t *opinfo)>
Called from C<do_prederef()> to deal with any arguments.
@@ -286,7 +287,7 @@
/*
-=item C<void do_prederef>
+=item C<void do_prederef(void **pc_prederef, PARROT_INTERP, int type)>
This is called from within the run cores to predereference the current
opcode.
@@ -366,7 +367,7 @@
/*
-=item C<static void turn_ev_check>
+=item C<static void turn_ev_check(PARROT_INTERP, int on)>
Turn on or off event checking for prederefed cores.
@@ -404,7 +405,7 @@
/*
-=item C<static oplib_init_f get_core_op_lib_init>
+=item C<static oplib_init_f get_core_op_lib_init(PARROT_INTERP, int which)>
Returns an opcode's library C<op_lib> init function.
@@ -455,7 +456,8 @@
/*
-=item C<static oplib_init_f get_dynamic_op_lib_init>
+=item C<static oplib_init_f get_dynamic_op_lib_init(PARROT_INTERP, const PMC
+*lib)>
Returns an dynamic oplib's opcode's library C<op_lib> init function.
@@ -478,7 +480,7 @@
/*
-=item C<static void load_prederef>
+=item C<static void load_prederef(PARROT_INTERP, int which)>
C<< interp->op_lib >> = prederefed oplib.
@@ -509,7 +511,7 @@
/*
-=item C<static void init_prederef>
+=item C<static void init_prederef(PARROT_INTERP, int which)>
Initialize: load prederef C<func_table>, file prederef.code.
@@ -575,7 +577,7 @@
/*
-=item C<static void stop_prederef>
+=item C<static void stop_prederef(PARROT_INTERP)>
Restore the interpreter's op function tables to their initial state.
Also recreate the event function pointers. This is only necessary
@@ -604,7 +606,7 @@
/*
-=item C<void exec_init_prederef>
+=item C<void exec_init_prederef(PARROT_INTERP, void *prederef_arena)>
C<< interp->op_lib >> = prederefed oplib
@@ -634,7 +636,7 @@
/*
-=item C<void * init_jit>
+=item C<void * init_jit(PARROT_INTERP, opcode_t *pc)>
Initializes JIT function for the specified opcode and returns it.
@@ -683,7 +685,7 @@
/*
-=item C<void prepare_for_run>
+=item C<void prepare_for_run(PARROT_INTERP)>
Prepares to run the interpreter's run core.
@@ -719,7 +721,7 @@
/*
-=item C<static opcode_t * runops_jit>
+=item C<static opcode_t * runops_jit(PARROT_INTERP, opcode_t *pc)>
Runs the JIT code for the specified opcode.
@@ -761,7 +763,7 @@
/*
-=item C<static opcode_t * runops_exec>
+=item C<static opcode_t * runops_exec(PARROT_INTERP, opcode_t *pc)>
Runs the native executable version of the specified opcode.
@@ -816,7 +818,7 @@
/*
-=item C<static opcode_t * runops_cgp>
+=item C<static opcode_t * runops_cgp(PARROT_INTERP, opcode_t *pc)>
Runs the C C<goto>, predereferenced core.
@@ -851,7 +853,7 @@
/*
-=item C<static opcode_t * runops_switch>
+=item C<static opcode_t * runops_switch(PARROT_INTERP, opcode_t *pc)>
Runs the C<switch> core.
@@ -877,7 +879,7 @@
/*
-=item C<void runops_int>
+=item C<void runops_int(PARROT_INTERP, size_t offset)>
Run Parrot operations of loaded code segment until an end opcode is
reached. Run core is selected depending on the C<Interp_flags>. When a
@@ -994,7 +996,7 @@
/*
-=item C<void Parrot_setup_event_func_ptrs>
+=item C<void Parrot_setup_event_func_ptrs(PARROT_INTERP)>
Setup a C<func_table> containing pointers (or addresses) of the
C<check_event__> opcode.
@@ -1039,7 +1041,7 @@
=over 4
-=item C<void dynop_register>
+=item C<void dynop_register(PARROT_INTERP, PMC *lib_pmc)>
Register a dynamic oplib.
@@ -1157,7 +1159,8 @@
/*
-=item C<static void dynop_register_xx>
+=item C<static void dynop_register_xx(PARROT_INTERP, size_t n_old, size_t n_new,
+oplib_init_f init_func)>
Register C<op_lib> with other cores.
@@ -1269,7 +1272,7 @@
/*
-=item C<static void dynop_register_switch>
+=item C<static void dynop_register_switch(size_t n_old, size_t n_new)>
Used only at the end of dynop_register. Sums the old and new op_counts
storing the result into the operations count field of the interpreter
@@ -1290,7 +1293,7 @@
/*
-=item C<static void notify_func_table>
+=item C<static void notify_func_table(PARROT_INTERP, op_func_t* table, int on)>
Tell the interpreter's running core about the new function table.
@@ -1325,7 +1328,7 @@
/*
-=item C<void disable_event_checking>
+=item C<void disable_event_checking(PARROT_INTERP)>
Restore old function table.
@@ -1347,7 +1350,7 @@
/*
-=item C<void enable_event_checking>
+=item C<void enable_event_checking(PARROT_INTERP)>
Replace func table with one that does event checking for all opcodes.
Modified: trunk/src/io/api.c
==============================================================================
--- trunk/src/io/api.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/io/api.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -91,7 +91,8 @@
/*
-=item C<PMC * Parrot_io_open(PARROT_INTERP, PMC *pmc, STRING *path, STRING *mode)>
+=item C<PMC * Parrot_io_open(PARROT_INTERP, PMC *pmc, STRING *path, STRING
+*mode)>
Return an open filehandle for a given string path and flags. Defaults to
creating a new FileHandle PMC. If a PMC object is passed in, it uses that
@@ -124,7 +125,8 @@
/*
-=item C<PMC * Parrot_io_fdopen(PARROT_INTERP, PMC *pmc, PIOHANDLE fd, STRING *sflags)>
+=item C<PMC * Parrot_io_fdopen(PARROT_INTERP, PMC *pmc, PIOHANDLE fd, STRING
+*sflags)>
Creates and returns a C<FileHandle> PMC for a given set of flags on an
existing, open file descriptor.
@@ -285,7 +287,8 @@
/*
-=item C<INTVAL Parrot_io_write(PARROT_INTERP, PMC *pmc, const void *buffer, size_t length)>
+=item C<INTVAL Parrot_io_write(PARROT_INTERP, PMC *pmc, const void *buffer,
+size_t length)>
Writes C<len> bytes from C<*buffer> to C<*pmc>.
@@ -317,7 +320,8 @@
/*
-=item C<PIOOFF_T Parrot_io_seek(PARROT_INTERP, PMC *pmc, PIOOFF_T offset, INTVAL w)>
+=item C<PIOOFF_T Parrot_io_seek(PARROT_INTERP, PMC *pmc, PIOOFF_T offset, INTVAL
+w)>
Moves the read/write position of C<*pmc> to offset C<bytes> from the
position indicated by C<w>. Typically C<w> will be C<0> for the start of
Modified: trunk/src/io/buffer.c
==============================================================================
--- trunk/src/io/buffer.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/io/buffer.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -264,7 +264,8 @@
/*
-=item C<size_t Parrot_io_read_buffer(PARROT_INTERP, PMC *filehandle, STRING **buf)>
+=item C<size_t Parrot_io_read_buffer(PARROT_INTERP, PMC *filehandle, STRING
+**buf)>
The buffer layer's C<Read> function.
@@ -394,7 +395,8 @@
/*
-=item C<size_t Parrot_io_peek_buffer(PARROT_INTERP, PMC *filehandle, STRING **buf)>
+=item C<size_t Parrot_io_peek_buffer(PARROT_INTERP, PMC *filehandle, STRING
+**buf)>
Retrieve the next character in the buffer without modifying the stream.
@@ -452,7 +454,8 @@
/*
-=item C<size_t Parrot_io_readline_buffer(PARROT_INTERP, PMC *filehandle, STRING **buf)>
+=item C<size_t Parrot_io_readline_buffer(PARROT_INTERP, PMC *filehandle, STRING
+**buf)>
This is called from C<Parrot_io_read_buffer()> to do line buffered reading if
that is what is required.
@@ -555,7 +558,8 @@
/*
-=item C<size_t Parrot_io_write_buffer(PARROT_INTERP, PMC *filehandle, STRING *s)>
+=item C<size_t Parrot_io_write_buffer(PARROT_INTERP, PMC *filehandle, STRING
+*s)>
The buffer layer's C<Write> function.
@@ -673,8 +677,8 @@
/*
-=item C<PIOOFF_T Parrot_io_seek_buffer(PARROT_INTERP, PMC *filehandle,
-PIOOFF_T offset, INTVAL whence)>
+=item C<PIOOFF_T Parrot_io_seek_buffer(PARROT_INTERP, PMC *filehandle, PIOOFF_T
+offset, INTVAL whence)>
The buffer layer's C<Seek> function.
Modified: trunk/src/io/filehandle.c
==============================================================================
--- trunk/src/io/filehandle.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/io/filehandle.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -134,8 +134,8 @@
/*
-=item C<void Parrot_io_set_os_handle(PARROT_INTERP, PMC *filehandle,
-PIOHANDLE file_descriptor)>
+=item C<void Parrot_io_set_os_handle(PARROT_INTERP, PMC *filehandle, PIOHANDLE
+file_descriptor)>
Sets the C<os_handle> attribute of the FileHandle object, which stores the
low-level filehandle for the OS.
@@ -237,7 +237,8 @@
/*
-=item C<void Parrot_io_set_file_size(PARROT_INTERP, PMC *filehandle, PIOOFF_T file_size)>
+=item C<void Parrot_io_set_file_size(PARROT_INTERP, PMC *filehandle, PIOOFF_T
+file_size)>
Set the C<file_size> attribute of the FileHandle object, which stores the
current file size.
@@ -287,8 +288,8 @@
/*
-=item C<void Parrot_io_set_buffer_start(PARROT_INTERP, PMC *filehandle,
-unsigned char *new_start)>
+=item C<void Parrot_io_set_buffer_start(PARROT_INTERP, PMC *filehandle, unsigned
+char *new_start)>
Set the C<buffer_start> attribute of the FileHandle object, which stores
the position of the start of the buffer.
@@ -312,7 +313,8 @@
/*
-=item C<unsigned char * Parrot_io_get_buffer_start(PARROT_INTERP, PMC *filehandle)>
+=item C<unsigned char * Parrot_io_get_buffer_start(PARROT_INTERP, PMC
+*filehandle)>
Get the C<buffer_start> attribute of the FileHandle object, which stores
the position of the start of the buffer.
@@ -337,7 +339,8 @@
/*
-=item C<unsigned char * Parrot_io_get_buffer_next(PARROT_INTERP, PMC *filehandle)>
+=item C<unsigned char * Parrot_io_get_buffer_next(PARROT_INTERP, PMC
+*filehandle)>
Get the C<buffer_next> attribute of the FileHandle object, which stores
the current position within the buffer.
@@ -362,8 +365,8 @@
/*
-=item C<void Parrot_io_set_buffer_next(PARROT_INTERP, PMC *filehandle,
-unsigned char *new_next)>
+=item C<void Parrot_io_set_buffer_next(PARROT_INTERP, PMC *filehandle, unsigned
+char *new_next)>
Set the C<buffer_next> attribute of the FileHandle object, which stores
the current position within the buffer.
@@ -387,7 +390,8 @@
/*
-=item C<unsigned char * Parrot_io_get_buffer_end(PARROT_INTERP, PMC *filehandle)>
+=item C<unsigned char * Parrot_io_get_buffer_end(PARROT_INTERP, PMC
+*filehandle)>
Get the C<buffer_end> attribute of the FileHandle object, which stores
the position of the end of the buffer.
@@ -412,8 +416,8 @@
/*
-=item C<void Parrot_io_set_buffer_end(PARROT_INTERP, PMC *filehandle,
-unsigned char *new_end)>
+=item C<void Parrot_io_set_buffer_end(PARROT_INTERP, PMC *filehandle, unsigned
+char *new_end)>
Set the C<buffer_end> attribute of the FileHandle object, which stores
the position of the end of the buffer.
@@ -461,7 +465,8 @@
/*
-=item C<void Parrot_io_set_buffer_flags(PARROT_INTERP, PMC *filehandle, INTVAL new_flags)>
+=item C<void Parrot_io_set_buffer_flags(PARROT_INTERP, PMC *filehandle, INTVAL
+new_flags)>
Set the C<buffer_flags> attribute of the FileHandle object, which stores
a collection of flags specific to the buffer.
@@ -508,7 +513,8 @@
/*
-=item C<void Parrot_io_set_buffer_size(PARROT_INTERP, PMC *filehandle, size_t new_size)>
+=item C<void Parrot_io_set_buffer_size(PARROT_INTERP, PMC *filehandle, size_t
+new_size)>
Set the C<buffer_size> attribute of the FileHandle object, which stores
the size of the buffer (in bytes).
@@ -582,7 +588,8 @@
/*
-=item C<PIOOFF_T Parrot_io_get_last_file_position(PARROT_INTERP, PMC *filehandle)>
+=item C<PIOOFF_T Parrot_io_get_last_file_position(PARROT_INTERP, PMC
+*filehandle)>
Get the C<file_pos> attribute of the FileHandle object, which stores
the current file position of the filehandle.
@@ -606,7 +613,8 @@
/*
-=item C<void Parrot_io_set_file_position(PARROT_INTERP, PMC *filehandle, PIOOFF_T file_pos)>
+=item C<void Parrot_io_set_file_position(PARROT_INTERP, PMC *filehandle,
+PIOOFF_T file_pos)>
Get the C<file_pos> attribute of the FileHandle object, which stores the
current file position of the filehandle. Also set the C<last_pos> attribute to
@@ -633,7 +641,8 @@
/*
-=item C<INTVAL Parrot_io_is_encoding(PARROT_INTERP, PMC *filehandle, STRING *value)>
+=item C<INTVAL Parrot_io_is_encoding(PARROT_INTERP, PMC *filehandle, STRING
+*value)>
Check whether the encoding attribute of the filehandle matches a passed in
string.
Modified: trunk/src/io/portable.c
==============================================================================
--- trunk/src/io/portable.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/io/portable.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -117,8 +117,8 @@
/*
-=item C<PMC * Parrot_io_open_portable(PARROT_INTERP, PMC *filehandle,
-STRING *path, INTVAL flags)>
+=item C<PMC * Parrot_io_open_portable(PARROT_INTERP, PMC *filehandle, STRING
+*path, INTVAL flags)>
Opens a new FileHandle PMC from a given STRING path with the provided modes.
@@ -284,7 +284,8 @@
/*
-=item C<size_t Parrot_io_peek_portable(PARROT_INTERP, PMC *filehandle, STRING **buf)>
+=item C<size_t Parrot_io_peek_portable(PARROT_INTERP, PMC *filehandle, STRING
+**buf)>
Retrieves the next character in the stream without modifying the stream.
@@ -357,8 +358,8 @@
/*
-=item C<size_t Parrot_io_read_portable(PARROT_INTERP, PMC *filehandle,
-STRING **buf)>
+=item C<size_t Parrot_io_read_portable(PARROT_INTERP, PMC *filehandle, STRING
+**buf)>
Reads from the given filehandle into the provided STRING, returning the number
of bytes read.
@@ -392,7 +393,8 @@
/*
-=item C<size_t Parrot_io_write_portable(PARROT_INTERP, PMC *filehandle, STRING *s)>
+=item C<size_t Parrot_io_write_portable(PARROT_INTERP, PMC *filehandle, STRING
+*s)>
Writes the given STRING to the provided IO PMC.
Modified: trunk/src/io/socket_api.c
==============================================================================
--- trunk/src/io/socket_api.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/io/socket_api.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -115,8 +115,8 @@
/*
-=item C<INTVAL Parrot_io_poll(PARROT_INTERP, PMC *pmc, INTVAL which,
-INTVAL sec, INTVAL usec)>
+=item C<INTVAL Parrot_io_poll(PARROT_INTERP, PMC *pmc, INTVAL which, INTVAL sec,
+INTVAL usec)>
Polls C<*pmc> for the events in C<which> every C<sec> seconds + C<usec>
microseconds.
@@ -139,8 +139,8 @@
/*
-=item C<INTVAL Parrot_io_socket(PARROT_INTERP, PMC * socket, INTVAL fam,
-INTVAL type, INTVAL proto)>
+=item C<INTVAL Parrot_io_socket(PARROT_INTERP, PMC * socket, INTVAL fam, INTVAL
+type, INTVAL proto)>
Creates and returns a socket using the specified address family, socket type,
and protocol number. Check the returned PMC with a boolean test to see whether
Modified: trunk/src/io/socket_unix.c
==============================================================================
--- trunk/src/io/socket_unix.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/io/socket_unix.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -386,8 +386,8 @@
/*
-=item C<INTVAL Parrot_io_poll_unix(PARROT_INTERP, PMC *socket, int which,
-int sec, int usec)>
+=item C<INTVAL Parrot_io_poll_unix(PARROT_INTERP, PMC *socket, int which, int
+sec, int usec)>
Utility function for polling a single IO stream with a timeout.
@@ -439,8 +439,8 @@
/*
-=item C<static void get_sockaddr_in(PARROT_INTERP, PMC * sockaddr,
-const char* host, int port)>
+=item C<static void get_sockaddr_in(PARROT_INTERP, PMC * sockaddr, const char*
+host, int port)>
=cut
Modified: trunk/src/io/socket_win32.c
==============================================================================
--- trunk/src/io/socket_win32.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/io/socket_win32.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -61,8 +61,8 @@
/*
-=item C<INTVAL Parrot_io_socket_win32(PARROT_INTERP, PMC * s, int fam,
-int type, int proto)>
+=item C<INTVAL Parrot_io_socket_win32(PARROT_INTERP, PMC * s, int fam, int type,
+int proto)>
Uses C<socket()> to create a socket with the specified address family,
socket type and protocol number.
@@ -332,8 +332,8 @@
/*
-=item C<INTVAL Parrot_io_poll_win32(PARROT_INTERP, PMC *socket, int which,
-int sec, int usec)>
+=item C<INTVAL Parrot_io_poll_win32(PARROT_INTERP, PMC *socket, int which, int
+sec, int usec)>
Utility function for polling a single IO stream with a timeout.
@@ -385,8 +385,8 @@
/*
-=item C<static void get_sockaddr_in(PARROT_INTERP, PMC * sockaddr,
-const char* host, int port)>
+=item C<static void get_sockaddr_in(PARROT_INTERP, PMC * sockaddr, const char*
+host, int port)>
=cut
Modified: trunk/src/io/unix.c
==============================================================================
--- trunk/src/io/unix.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/io/unix.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -128,8 +128,8 @@
/*
-=item C<PMC * Parrot_io_open_unix(PARROT_INTERP, PMC *filehandle,
-STRING *path, INTVAL flags)>
+=item C<PMC * Parrot_io_open_unix(PARROT_INTERP, PMC *filehandle, STRING *path,
+INTVAL flags)>
Opens a string C<path>. C<flags> is a bitwise C<or> combination of C<PIO_F_*>
flag values.
@@ -286,8 +286,8 @@
/*
-=item C<PMC * Parrot_io_fdopen_unix(PARROT_INTERP, PMC *filehandle,
-PIOHANDLE fd, INTVAL flags)>
+=item C<PMC * Parrot_io_fdopen_unix(PARROT_INTERP, PMC *filehandle, PIOHANDLE
+fd, INTVAL flags)>
Returns a new C<FileHandle> PMC with the file descriptor passed in.
@@ -451,7 +451,8 @@
/*
-=item C<size_t Parrot_io_read_unix(PARROT_INTERP, PMC *filehandle, STRING **buf)>
+=item C<size_t Parrot_io_read_unix(PARROT_INTERP, PMC *filehandle, STRING
+**buf)>
Calls C<read()> to return up to C<len> bytes in the memory starting at
C<buffer>.
@@ -545,8 +546,8 @@
/*
-=item C<PIOOFF_T Parrot_io_seek_unix(PARROT_INTERP, PMC *filehandle,
-PIOOFF_T offset, INTVAL whence)>
+=item C<PIOOFF_T Parrot_io_seek_unix(PARROT_INTERP, PMC *filehandle, PIOOFF_T
+offset, INTVAL whence)>
Hard seek.
@@ -617,8 +618,8 @@
/*
-=item C<PMC * Parrot_io_open_pipe_unix(PARROT_INTERP, PMC *filehandle,
-STRING *command, int flags)>
+=item C<PMC * Parrot_io_open_pipe_unix(PARROT_INTERP, PMC *filehandle, STRING
+*command, int flags)>
Very limited C<exec> for now.
@@ -729,7 +730,8 @@
/*
-=item C<size_t Parrot_io_peek_unix(PARROT_INTERP, PMC *filehandle, STRING **buf)>
+=item C<size_t Parrot_io_peek_unix(PARROT_INTERP, PMC *filehandle, STRING
+**buf)>
Retrieve the next character in the stream without modifying the stream. Not
implemented on this platform.
Modified: trunk/src/io/utf8.c
==============================================================================
--- trunk/src/io/utf8.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/io/utf8.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -33,7 +33,8 @@
/*
-=item C<size_t Parrot_io_read_utf8(PARROT_INTERP, PMC *filehandle, STRING **buf)>
+=item C<size_t Parrot_io_read_utf8(PARROT_INTERP, PMC *filehandle, STRING
+**buf)>
Read a string from a filehandle in UTF-8 format and convert it to a Parrot
string.
Modified: trunk/src/io/win32.c
==============================================================================
--- trunk/src/io/win32.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/io/win32.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -190,8 +190,8 @@
/*
-=item C<PMC * Parrot_io_open_win32(PARROT_INTERP, PMC *filehandle,
-STRING *path, INTVAL flags)>
+=item C<PMC * Parrot_io_open_win32(PARROT_INTERP, PMC *filehandle, STRING *path,
+INTVAL flags)>
Calls C<CreateFile()> to open C<*spath> with the Win32 translation of
C<flags>.
@@ -255,8 +255,8 @@
/*
-=item C<PMC * Parrot_io_fdopen_win32(PARROT_INTERP, PMC *filehandle,
-PIOHANDLE fd, INTVAL flags)>
+=item C<PMC * Parrot_io_fdopen_win32(PARROT_INTERP, PMC *filehandle, PIOHANDLE
+fd, INTVAL flags)>
Returns a new C<PMC> with C<fd> as its file descriptor.
@@ -384,7 +384,8 @@
/*
-=item C<size_t Parrot_io_read_win32(PARROT_INTERP, PMC *filehandle, STRING **buf)>
+=item C<size_t Parrot_io_read_win32(PARROT_INTERP, PMC *filehandle, STRING
+**buf)>
Calls C<ReadFile()> to read up to C<len> bytes from C<*io>'s file
descriptor to the memory starting at C<buffer>.
@@ -472,8 +473,8 @@
/*
-=item C<PIOOFF_T Parrot_io_seek_win32(PARROT_INTERP, PMC *filehandle,
-PIOOFF_T off, INTVAL whence)>
+=item C<PIOOFF_T Parrot_io_seek_win32(PARROT_INTERP, PMC *filehandle, PIOOFF_T
+off, INTVAL whence)>
Hard seek.
@@ -531,7 +532,8 @@
/*
-=item C<size_t Parrot_io_peek_win32(PARROT_INTERP, PMC *filehandle, STRING **buf)>
+=item C<size_t Parrot_io_peek_win32(PARROT_INTERP, PMC *filehandle, STRING
+**buf)>
Retrieve the next character in the stream without modifying the stream. Not
implemented for this platform.
@@ -552,8 +554,8 @@
/*
-=item C<PMC * Parrot_io_open_pipe_win32(PARROT_INTERP, PMC *filehandle,
-STRING *command, int flags)>
+=item C<PMC * Parrot_io_open_pipe_win32(PARROT_INTERP, PMC *filehandle, STRING
+*command, int flags)>
Open a pipe. Not implemented for this platform.
Modified: trunk/src/key.c
==============================================================================
--- trunk/src/key.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/key.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -27,7 +27,7 @@
/*
-=item C<PMC * key_new>
+=item C<PMC * key_new(PARROT_INTERP)>
Returns a new C<Key> PMC.
@@ -48,7 +48,7 @@
/*
-=item C<PMC * key_new_integer>
+=item C<PMC * key_new_integer(PARROT_INTERP, INTVAL value)>
Returns a new integer C<Key> PMC with value C<value>.
@@ -74,7 +74,7 @@
/*
-=item C<PMC * key_new_number>
+=item C<PMC * key_new_number(PARROT_INTERP, FLOATVAL value)>
Returns a new number C<Key> PMC with value C<value>.
@@ -100,7 +100,7 @@
/*
-=item C<PMC * key_new_string>
+=item C<PMC * key_new_string(PARROT_INTERP, STRING *value)>
Returns a new string C<Key> PMC with value C<value>.
@@ -126,7 +126,7 @@
/*
-=item C<PMC * key_new_cstring>
+=item C<PMC * key_new_cstring(PARROT_INTERP, const char *value)>
Returns a new string C<Key> PMC with value C<value> converted to a
C<STRING>.
@@ -148,7 +148,7 @@
/*
-=item C<PMC * key_new_pmc>
+=item C<PMC * key_new_pmc(PARROT_INTERP, PMC *value)>
Returns a new PMC C<Key> PMC with value C<value>.
@@ -172,7 +172,7 @@
/*
-=item C<void key_set_integer>
+=item C<void key_set_integer(PARROT_INTERP, PMC *key, INTVAL value)>
Set the integer C<value> in C<key>.
@@ -195,7 +195,8 @@
/*
-=item C<void key_set_register>
+=item C<void key_set_register(PARROT_INTERP, PMC *key, INTVAL value, INTVAL
+flag)>
Set the register C<value> in C<key>.
@@ -218,7 +219,7 @@
/*
-=item C<void key_set_number>
+=item C<void key_set_number(PARROT_INTERP, PMC *key, FLOATVAL value)>
Set the number C<value> in C<key>.
@@ -241,7 +242,7 @@
/*
-=item C<void key_set_string>
+=item C<void key_set_string(PARROT_INTERP, PMC *key, STRING *value)>
Set the string C<value> in C<key>.
@@ -264,7 +265,7 @@
/*
-=item C<void key_set_pmc>
+=item C<void key_set_pmc(PARROT_INTERP, PMC *key, PMC *value)>
Set the PMC C<value> in C<key>.
@@ -290,7 +291,7 @@
/*
-=item C<INTVAL key_type>
+=item C<INTVAL key_type(PARROT_INTERP, const PMC *key)>
Returns the type of C<key>.
@@ -310,7 +311,7 @@
/*
-=item C<INTVAL key_integer>
+=item C<INTVAL key_integer(PARROT_INTERP, PMC *key)>
Translates a key value into an integer.
Takes an interpreter name and pointer to a key.
@@ -386,7 +387,7 @@
/*
-=item C<FLOATVAL key_number>
+=item C<FLOATVAL key_number(PARROT_INTERP, PMC *key)>
Translates a key value into a number.
Takes an interpreter name and pointer to a key.
@@ -432,7 +433,7 @@
/*
-=item C<STRING * key_string>
+=item C<STRING * key_string(PARROT_INTERP, PMC *key)>
Translates a key value into a string. Takes an interpreter name and pointer to
a key. Returns a string value corresponding to the key.
@@ -500,7 +501,7 @@
/*
-=item C<PMC * key_pmc>
+=item C<PMC * key_pmc(PARROT_INTERP, PMC *key)>
These functions return the integer/number/string/PMC values of C<key> if
possible. Otherwise they throw exceptions.
@@ -530,7 +531,7 @@
/*
-=item C<PMC * key_next>
+=item C<PMC * key_next(PARROT_INTERP, PMC *key)>
Returns the next key if C<key> is in a sequence of linked keys.
@@ -559,7 +560,7 @@
/*
-=item C<PMC * key_append>
+=item C<PMC * key_append(PARROT_INTERP, PMC *key1, PMC *key2)>
Appends C<key2> to C<key1>.
@@ -597,7 +598,7 @@
/*
-=item C<void key_mark>
+=item C<void key_mark(PARROT_INTERP, PMC *key)>
Marks C<key> as live.
@@ -637,7 +638,7 @@
/*
-=item C<STRING * key_set_to_string>
+=item C<STRING * key_set_to_string(PARROT_INTERP, PMC *key)>
Translates a series of key values into strings, quoted or bracketed if
appropriate. Takes an interpreter name and pointer to a key. Returns a
Modified: trunk/src/library.c
==============================================================================
--- trunk/src/library.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/library.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -401,7 +401,8 @@
/*
-=item C<static STRING* path_guarantee_trailing_separator(PARROT_INTERP, STRING *path)>
+=item C<static STRING* path_guarantee_trailing_separator(PARROT_INTERP, STRING
+*path)>
unary path argument. the path string will have a
trailing path-separator appended if it is not
@@ -429,7 +430,8 @@
/*
-=item C<static STRING* path_append(PARROT_INTERP, STRING *l_path, STRING *r_path)>
+=item C<static STRING* path_append(PARROT_INTERP, STRING *l_path, STRING
+*r_path)>
binary path arguments, the left arg is modified.
a trailing separator is guaranteed for the left
@@ -453,7 +455,8 @@
/*
-=item C<static STRING* path_concat(PARROT_INTERP, STRING *l_path, STRING *r_path)>
+=item C<static STRING* path_concat(PARROT_INTERP, STRING *l_path, STRING
+*r_path)>
binary path arguments. A new string is created
that is the concatenation of the two path components
@@ -591,8 +594,8 @@
/*
-=item C<void Parrot_add_library_path(PARROT_INTERP, STRING *path,
-enum_lib_paths which)>
+=item C<void Parrot_add_library_path(PARROT_INTERP, STRING *path, enum_lib_paths
+which)>
Add a path to the library searchpath of the given type.
@@ -616,8 +619,8 @@
/*
-=item C<void Parrot_add_library_path_from_cstring(PARROT_INTERP,
-const char *path, enum_lib_paths which)>
+=item C<void Parrot_add_library_path_from_cstring(PARROT_INTERP, const char
+*path, enum_lib_paths which)>
Add a path to the library searchpath of the given type (passing in a C string).
@@ -845,8 +848,8 @@
/*
-=item C<STRING * parrot_split_path_ext(PARROT_INTERP, STRING *in,
-STRING **wo_ext, STRING **ext)>
+=item C<STRING * parrot_split_path_ext(PARROT_INTERP, STRING *in, STRING
+**wo_ext, STRING **ext)>
Split the pathstring C<in> into <path><filestem><ext>. Return the
C<filestem> of the pathstring. Set C<wo_ext> to the part without
Modified: trunk/src/list.c
==============================================================================
--- trunk/src/list.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/list.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -339,7 +339,8 @@
/*
-=item C<static List_chunk * allocate_chunk>
+=item C<static List_chunk * allocate_chunk(PARROT_INTERP, List *list, UINTVAL
+items, UINTVAL size)>
Makes a new chunk, and allocates C<size> bytes for buffer storage from the
generic memory pool. The chunk holds C<items> items. Marks the chunk as
@@ -381,7 +382,7 @@
/*
-=item C<static void rebuild_chunk_ptrs>
+=item C<static void rebuild_chunk_ptrs(List *list, int cut)>
Rebuilds C<list> and updates/optimizes chunk usage. Deletes empty chunks,
counts chunks and fixes C<prev> pointers.
@@ -432,7 +433,7 @@
/*
-=item C<static void rebuild_sparse>
+=item C<static void rebuild_sparse(List *list)>
Combines together adjacent sparse chunks in C<list>.
@@ -464,7 +465,7 @@
/*
-=item C<static void rebuild_other>
+=item C<static void rebuild_other(PARROT_INTERP, List *list)>
Combines together adjacent irregular chunks in C<list>.
@@ -533,7 +534,7 @@
/*
-=item C<static void rebuild_fix_ends>
+=item C<static void rebuild_fix_ends(List *list)>
Resets some values in C<list> and the lists's first chunk.
Called by C<rebuild_chunk_list()>.
@@ -563,7 +564,7 @@
/*
-=item C<static UINTVAL rebuild_chunk_list>
+=item C<static UINTVAL rebuild_chunk_list(PARROT_INTERP, List *list)>
Optimises C<list> when it's been modified in some way. Combines adjacent
chunks if they are both sparse or irregular. Updates the grow policies
@@ -677,7 +678,8 @@
/*
-=item C<static List_chunk * alloc_next_size>
+=item C<static List_chunk * alloc_next_size(PARROT_INTERP, List *list, int
+where, UINTVAL idx)>
Calculates the size and number of items for the next chunk and allocates it.
Adds the number of allocated items to the list's total, but does not
@@ -782,7 +784,8 @@
/*
-=item C<static List_chunk * add_chunk>
+=item C<static List_chunk * add_chunk(PARROT_INTERP, List *list, int where,
+UINTVAL idx)>
Adds a new chunk to the C<list>. If C<where> is 0, the chunk is added to
the front of the list. If 0, it is added to the end of the list.
@@ -820,7 +823,7 @@
/*
-=item C<UINTVAL ld>
+=item C<UINTVAL ld(UINTVAL x)>
Calculates log2(x), or a useful approximation thereof. Stolen from
F<src/malloc.c>.
@@ -867,7 +870,7 @@
/*
-=item C<static List_chunk * get_chunk>
+=item C<static List_chunk * get_chunk(PARROT_INTERP, List *list, UINTVAL *idx)>
Get the chunk for C<idx>, also update the C<idx> to point into the chunk.
@@ -1030,7 +1033,8 @@
/*
-=item C<static void split_chunk>
+=item C<static void split_chunk(PARROT_INTERP, List *list, List_chunk *chunk,
+UINTVAL ix)>
Splits a sparse chunk, so that we have
@@ -1103,7 +1107,8 @@
/*
-=item C<static void list_set>
+=item C<static void list_set(PARROT_INTERP, List *list, void *item, INTVAL type,
+INTVAL idx)>
Sets C<item> of type C<type> in chunk at C<idx>.
@@ -1171,7 +1176,8 @@
/*
-=item C<static void * list_item>
+=item C<static void * list_item(PARROT_INTERP, List *list, int type, INTVAL
+idx)>
Get the pointer to the item of type C<type> in the chunk at C<idx>.
@@ -1223,7 +1229,8 @@
/*
-=item C<static void list_append>
+=item C<static void list_append(PARROT_INTERP, List *list, void *item, int type,
+UINTVAL idx)>
Adds one or more chunks to end of list.
@@ -1252,7 +1259,7 @@
=over 4
-=item C<List * list_new>
+=item C<List * list_new(PARROT_INTERP, PARROT_DATA_TYPE type)>
Returns a new list of type C<type>.
@@ -1303,7 +1310,7 @@
/*
-=item C<void list_pmc_new>
+=item C<void list_pmc_new(PARROT_INTERP, PMC *container)>
Creates a new list containing PMC* values in C<PMC_data(container)>.
@@ -1325,7 +1332,7 @@
/*
-=item C<List * list_new_init>
+=item C<List * list_new_init(PARROT_INTERP, PARROT_DATA_TYPE type, PMC *init)>
C<list_new_init()> uses these initializers:
@@ -1418,7 +1425,7 @@
/*
-=item C<void list_pmc_new_init>
+=item C<void list_pmc_new_init(PARROT_INTERP, PMC *container, PMC *init)>
Creates a new list of PMC* values in C<PMC_data(container)>.
@@ -1440,7 +1447,7 @@
/*
-=item C<List * list_clone>
+=item C<List * list_clone(PARROT_INTERP, const List *other)>
Returns a clone of the C<other> list.
@@ -1517,7 +1524,7 @@
/*
-=item C<void list_mark>
+=item C<void list_mark(PARROT_INTERP, List *list)>
Marks the list and its contents as live for the memory management system.
@@ -1554,7 +1561,7 @@
/*
-=item C<void list_visit>
+=item C<void list_visit(PARROT_INTERP, List *list, void *pinfo)>
This is used by freeze/thaw to visit the contents of the list.
@@ -1594,7 +1601,7 @@
/*
-=item C<INTVAL list_length>
+=item C<INTVAL list_length(PARROT_INTERP, const List *list)>
Returns the length of the list.
@@ -1613,7 +1620,7 @@
/*
-=item C<void list_set_length>
+=item C<void list_set_length(PARROT_INTERP, List *list, INTVAL len)>
Sets the length of the list to C<len>.
@@ -1653,7 +1660,7 @@
/*
-=item C<void list_insert>
+=item C<void list_insert(PARROT_INTERP, List *list, INTVAL idx, INTVAL n_items)>
Makes room for C<n_items> at C<idx>.
@@ -1727,7 +1734,7 @@
/*
-=item C<void list_delete>
+=item C<void list_delete(PARROT_INTERP, List *list, INTVAL idx, INTVAL n_items)>
Deletes C<n_items> at C<idx>.
@@ -1810,7 +1817,7 @@
/*
-=item C<void list_push>
+=item C<void list_push(PARROT_INTERP, List *list, void *item, int type)>
Pushes C<item> of type C<type> on to the end of the list.
@@ -1830,7 +1837,7 @@
/*
-=item C<void list_unshift>
+=item C<void list_unshift(PARROT_INTERP, List *list, void *item, int type)>
Pushes C<item> of type C<type> on to the start of the list.
@@ -1857,7 +1864,7 @@
/*
-=item C<void * list_pop>
+=item C<void * list_pop(PARROT_INTERP, List *list, int type)>
Removes and returns the last item of type C<type> from the end of the list.
@@ -1896,7 +1903,7 @@
/*
-=item C<void * list_shift>
+=item C<void * list_shift(PARROT_INTERP, List *list, int type)>
Removes and returns the first item of type C<type> from the start of the list.
@@ -1936,7 +1943,8 @@
/*
-=item C<void list_assign>
+=item C<void list_assign(PARROT_INTERP, List *list, INTVAL idx, void *item, int
+type)>
Assigns C<item> of type C<type> to index C<idx>.
@@ -1966,7 +1974,7 @@
/*
-=item C<void * list_get>
+=item C<void * list_get(PARROT_INTERP, List *list, INTVAL idx, int type)>
Returns the item of type C<type> at index C<idx>.
@@ -1995,7 +2003,8 @@
/*
-=item C<void list_splice>
+=item C<void list_splice(PARROT_INTERP, List *list, List *value_list, INTVAL
+offset, INTVAL count)>
Replaces C<count> items starting at C<offset> with the items in C<value>.
Modified: trunk/src/longopt.c
==============================================================================
--- trunk/src/longopt.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/longopt.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -65,8 +65,8 @@
/*
-=item C<int longopt_get(PARROT_INTERP, int argc, const char* argv[],
-const struct longopt_opt_decl options[], struct longopt_opt_info* info_buf)>
+=item C<int longopt_get(PARROT_INTERP, int argc, const char* argv[], const
+struct longopt_opt_decl options[], struct longopt_opt_info* info_buf)>
Gets long or short options, specified in C<options[]> (see
F<docs/dev/longopt.dev>).
@@ -120,9 +120,9 @@
/*
-=item C<static int longopt_get_longopt(PARROT_INTERP, int argc,
-const char* argv[], const struct longopt_opt_decl options[],
-struct longopt_opt_info* info_buf)>
+=item C<static int longopt_get_longopt(PARROT_INTERP, int argc, const char*
+argv[], const struct longopt_opt_decl options[], struct longopt_opt_info*
+info_buf)>
Find the option identifier of a long option.
@@ -216,9 +216,9 @@
/*
-=item C<static int longopt_get_shortopt(PARROT_INTERP, int argc,
-const char* argv[], const struct longopt_opt_decl options[],
-struct longopt_opt_info* info_buf)>
+=item C<static int longopt_get_shortopt(PARROT_INTERP, int argc, const char*
+argv[], const struct longopt_opt_decl options[], struct longopt_opt_info*
+info_buf)>
Find the option identifier of the next short option.
Modified: trunk/src/misc.c
==============================================================================
--- trunk/src/misc.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/misc.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -71,7 +71,8 @@
/*
-=item C<STRING * Parrot_vsprintf_c(PARROT_INTERP, const char *pat, va_list args)>
+=item C<STRING * Parrot_vsprintf_c(PARROT_INTERP, const char *pat, va_list
+args)>
C string version of C<Parrot_vsprintf_s()>.
@@ -95,8 +96,8 @@
/*
-=item C<void Parrot_vsnprintf(PARROT_INTERP, char *targ,
-size_t len, const char *pat, va_list args)>
+=item C<void Parrot_vsnprintf(PARROT_INTERP, char *targ, size_t len, const char
+*pat, va_list args)>
Similar to C<Parrot_vsprintf()> but with an option to specify the length
(C<len>) of the returned C string.
@@ -188,8 +189,8 @@
/*
-=item C<void Parrot_snprintf(PARROT_INTERP, char *targ, size_t len,
-const char *pat, ...)>
+=item C<void Parrot_snprintf(PARROT_INTERP, char *targ, size_t len, const char
+*pat, ...)>
Similar to C<Parrot_sprintf()> but with an option to specify the length
(C<len>) of the returned C string.
@@ -239,8 +240,8 @@
/*
-=item C<int Parrot_secret_snprintf(char *buffer, const size_t len,
-const char *format, ...)>
+=item C<int Parrot_secret_snprintf(char *buffer, const size_t len, const char
+*format, ...)>
A simulation of C<snprintf> for systems that do not support it.
Modified: trunk/src/multidispatch.c
==============================================================================
--- trunk/src/multidispatch.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/multidispatch.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -255,8 +255,8 @@
/*
-=item C<PMC* Parrot_mmd_find_multi_from_sig_obj(PARROT_INTERP, STRING *name,
-PMC *invoke_sig)>
+=item C<PMC* Parrot_mmd_find_multi_from_sig_obj(PARROT_INTERP, STRING *name, PMC
+*invoke_sig)>
Collect a list of possible candidates for a given sub name and call signature.
Rank the possible candidates by Manhattan Distance, and return the best
@@ -286,8 +286,8 @@
/*
-=item C<void Parrot_mmd_multi_dispatch_from_c_args(PARROT_INTERP,
-const char *name, const char *sig, ...)>
+=item C<void Parrot_mmd_multi_dispatch_from_c_args(PARROT_INTERP, const char
+*name, const char *sig, ...)>
Dispatches to a MultiSub from a variable-sized list of C arguments. The
multiple dispatch system will figure out which sub should be called based on
@@ -381,8 +381,8 @@
/*
-=item C<PMC * Parrot_mmd_sort_manhattan_by_sig_pmc(PARROT_INTERP,
-PMC *candidates, PMC *invoke_sig)>
+=item C<PMC * Parrot_mmd_sort_manhattan_by_sig_pmc(PARROT_INTERP, PMC
+*candidates, PMC *invoke_sig)>
Given an array PMC (usually a MultiSub) and a CallSignature PMC, sorts the mmd
candidates by their manhattan distance to the signature args and returns the
@@ -548,8 +548,8 @@
/*
-=item C<static void Parrot_mmd_search_classes(PARROT_INTERP, STRING *meth,
-PMC *arg_tuple, PMC *cl, INTVAL start_at_parent)>
+=item C<static void Parrot_mmd_search_classes(PARROT_INTERP, STRING *meth, PMC
+*arg_tuple, PMC *cl, INTVAL start_at_parent)>
Search all the classes in all MultiSubs of the candidates C<cl> and return
a list of all candidates. C<start_at_parent> is 0 to start at the class itself
@@ -637,7 +637,8 @@
/*
-=item C<static PMC* mmd_build_type_tuple_from_type_list(PARROT_INTERP, PMC *type_list)>
+=item C<static PMC* mmd_build_type_tuple_from_type_list(PARROT_INTERP, PMC
+*type_list)>
Construct a FixedIntegerArray of type numbers from an array of
type names. Used for multiple dispatch.
@@ -682,7 +683,8 @@
/*
-=item C<static PMC* mmd_build_type_tuple_from_long_sig(PARROT_INTERP, STRING *long_sig)>
+=item C<static PMC* mmd_build_type_tuple_from_long_sig(PARROT_INTERP, STRING
+*long_sig)>
Construct a FixedIntegerArray of type numbers from a comma-delimited string of
type names. Used for multiple dispatch.
@@ -705,7 +707,8 @@
/*
-=item C<PMC* Parrot_mmd_build_type_tuple_from_sig_obj(PARROT_INTERP, PMC *sig_obj)>
+=item C<PMC* Parrot_mmd_build_type_tuple_from_sig_obj(PARROT_INTERP, PMC
+*sig_obj)>
Construct a FixedIntegerArray of type numbers from the arguments of a Call
Signature object. Used for multiple dispatch.
@@ -862,7 +865,8 @@
/*
-=item C<static PMC * Parrot_mmd_get_cached_multi_sig(PARROT_INTERP, PMC *sub_pmc)>
+=item C<static PMC * Parrot_mmd_get_cached_multi_sig(PARROT_INTERP, PMC
+*sub_pmc)>
=cut
@@ -1039,7 +1043,8 @@
/*
-=item C<static PMC * Parrot_mmd_sort_candidates(PARROT_INTERP, PMC *arg_tuple, PMC *cl)>
+=item C<static PMC * Parrot_mmd_sort_candidates(PARROT_INTERP, PMC *arg_tuple,
+PMC *cl)>
Sort the candidate list C<cl> by Manhattan Distance, returning the best
candidate.
@@ -1147,7 +1152,8 @@
/*
-=item C<static int mmd_search_local(PARROT_INTERP, STRING *name, PMC *candidates)>
+=item C<static int mmd_search_local(PARROT_INTERP, STRING *name, PMC
+*candidates)>
Search the current package namespace for matching candidates. Return
TRUE if the MMD search should stop.
@@ -1168,8 +1174,8 @@
/*
-=item C<static void mmd_search_by_sig_obj(PARROT_INTERP, STRING *name,
-PMC *sig_obj, PMC *candidates)>
+=item C<static void mmd_search_by_sig_obj(PARROT_INTERP, STRING *name, PMC
+*sig_obj, PMC *candidates)>
Search the namespace of the first argument to the sub call for matching
candidates.
@@ -1231,7 +1237,8 @@
/*
-=item C<static void mmd_add_multi_global(PARROT_INTERP, STRING *sub_name, PMC *sub_obj)>
+=item C<static void mmd_add_multi_global(PARROT_INTERP, STRING *sub_name, PMC
+*sub_obj)>
Create a MultiSub, or add a variant to an existing MultiSub. The MultiSub is
stored in the global MULTI namespace.
@@ -1293,8 +1300,8 @@
/*
-=item C<void Parrot_mmd_add_multi_from_long_sig(PARROT_INTERP,
-STRING *sub_name, STRING *long_sig, PMC *sub_obj)>
+=item C<void Parrot_mmd_add_multi_from_long_sig(PARROT_INTERP, STRING *sub_name,
+STRING *long_sig, PMC *sub_obj)>
Create a MultiSub, or add a variant to an existing MultiSub. The MultiSub is
stored in the global MULTI namespace.
@@ -1334,9 +1341,9 @@
/*
-=item C<void Parrot_mmd_add_multi_from_c_args(PARROT_INTERP,
-const char *sub_name, const char *short_sig,
-const char *long_sig, funcptr_t multi_func_ptr)>
+=item C<void Parrot_mmd_add_multi_from_c_args(PARROT_INTERP, const char
+*sub_name, const char *short_sig, const char *long_sig, funcptr_t
+multi_func_ptr)>
Create a MultiSub, or add a variant to an existing MultiSub. The MultiSub is
stored in the specified namespace.
@@ -1376,8 +1383,8 @@
/*
-=item C<void Parrot_mmd_add_multi_list_from_c_args(PARROT_INTERP,
-const multi_func_list *mmd_info, INTVAL elements)>
+=item C<void Parrot_mmd_add_multi_list_from_c_args(PARROT_INTERP, const
+multi_func_list *mmd_info, INTVAL elements)>
Create a collection of multiple dispatch subs from a C structure of
information. Iterate through the list of details passed in. For each entry
@@ -1435,8 +1442,8 @@
/*
-=item C<static STRING * mmd_cache_key_from_values(PARROT_INTERP,
-const char *name, PMC *values)>
+=item C<static STRING * mmd_cache_key_from_values(PARROT_INTERP, const char
+*name, PMC *values)>
Generates an MMD cache key from an array of values.
@@ -1533,8 +1540,8 @@
/*
-=item C<static STRING * mmd_cache_key_from_types(PARROT_INTERP,
-const char *name, PMC *types)>
+=item C<static STRING * mmd_cache_key_from_types(PARROT_INTERP, const char
+*name, PMC *types)>
Generates an MMD cache key from an array of types.
Modified: trunk/src/oo.c
==============================================================================
--- trunk/src/oo.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/oo.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -322,8 +322,8 @@
/*
-=item C<PMC * Parrot_oo_find_vtable_override_for_class(PARROT_INTERP,
-PMC *classobj, STRING *name)>
+=item C<PMC * Parrot_oo_find_vtable_override_for_class(PARROT_INTERP, PMC
+*classobj, STRING *name)>
Lookup a vtable override in a specific class object.
@@ -544,7 +544,8 @@
/*
-=item C<INTVAL Parrot_oo_register_type(PARROT_INTERP, PMC *name, PMC *_namespace)>
+=item C<INTVAL Parrot_oo_register_type(PARROT_INTERP, PMC *name, PMC
+*_namespace)>
This function registers a type in the global registry, first checking if it
already exists. The global type registry will go away eventually, but this
@@ -779,8 +780,8 @@
/*
-=item C<PMC * Parrot_find_method_direct(PARROT_INTERP, PMC *_class,
-STRING *method_name)>
+=item C<PMC * Parrot_find_method_direct(PARROT_INTERP, PMC *_class, STRING
+*method_name)>
Find a method PMC for a named method, given the class PMC, current
interpreter, and name of the method. Don't use a possible method cache.
@@ -811,8 +812,8 @@
/*
-=item C<PMC * Parrot_find_method_with_cache(PARROT_INTERP, PMC *_class,
-STRING *method_name)>
+=item C<PMC * Parrot_find_method_with_cache(PARROT_INTERP, PMC *_class, STRING
+*method_name)>
Find a method PMC for a named method, given the class PMC, current
interp, and name of the method.
@@ -951,8 +952,8 @@
/*
-=item C<static PMC * find_method_direct_1(PARROT_INTERP, PMC *_class,
-STRING *method_name)>
+=item C<static PMC * find_method_direct_1(PARROT_INTERP, PMC *_class, STRING
+*method_name)>
=cut
@@ -1151,8 +1152,8 @@
/*
-=item C<void Parrot_ComposeRole(PARROT_INTERP, PMC *role, PMC *exclude,
-int got_exclude, PMC *alias, int got_alias, PMC *methods_hash, PMC *roles_list)>
+=item C<void Parrot_ComposeRole(PARROT_INTERP, PMC *role, PMC *exclude, int
+got_exclude, PMC *alias, int got_alias, PMC *methods_hash, PMC *roles_list)>
Used by the Class and Object PMCs internally to compose a role into either of
them. The C<role> parameter is the role that we are composing into the class
Modified: trunk/src/packdump.c
==============================================================================
--- trunk/src/packdump.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/packdump.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -52,7 +52,8 @@
/*
-=item C<void PackFile_ConstTable_dump(PARROT_INTERP, const PackFile_ConstTable *self)>
+=item C<void PackFile_ConstTable_dump(PARROT_INTERP, const PackFile_ConstTable
+*self)>
Dumps the constant table C<self>.
@@ -75,8 +76,8 @@
/*
-=item C<static void PackFile_Constant_dump(PARROT_INTERP,
-const PackFile_ConstTable *ct, const PackFile_Constant *self)>
+=item C<static void PackFile_Constant_dump(PARROT_INTERP, const
+PackFile_ConstTable *ct, const PackFile_Constant *self)>
Dumps the constant C<self>.
Modified: trunk/src/packfile.c
==============================================================================
--- trunk/src/packfile.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/packfile.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -494,7 +494,7 @@
/*
-=item C<void PackFile_destroy>
+=item C<void PackFile_destroy(PARROT_INTERP, PackFile *pf)>
Deletes a C<PackFile>.
@@ -533,7 +533,7 @@
/*
-=item C<static void make_code_pointers>
+=item C<static void make_code_pointers(PackFile_Segment *seg)>
Makes compact/shorthand pointers.
@@ -582,7 +582,8 @@
/*
-=item C<static int sub_pragma>
+=item C<static int sub_pragma(PARROT_INTERP, pbc_action_enum_t action, const PMC
+*sub_pmc)>
Checks B<sub_pmc>'s pragmas (e.g. flags like C<:load>, C<:main>, etc.)
returning 1 if the sub should be run for C<action>, a C<pbc_action_enum_t>.
@@ -642,7 +643,7 @@
/*
-=item C<static PMC* run_sub>
+=item C<static PMC* run_sub(PARROT_INTERP, PMC *sub_pmc)>
Runs the B<sub_pmc> due to its B<:load>, B<:immediate>, ... pragma
@@ -677,7 +678,8 @@
/*
-=item C<static PMC* do_1_sub_pragma>
+=item C<static PMC* do_1_sub_pragma(PARROT_INTERP, PMC *sub_pmc,
+pbc_action_enum_t action)>
Runs autoloaded or immediate bytecode, marking the MAIN subroutine entry.
@@ -771,7 +773,7 @@
/*
-=item C<static void mark_1_seg>
+=item C<static void mark_1_seg(PARROT_INTERP, PackFile_ConstTable *ct)>
While the PMCs should be constant, their possible contents such as
properties aren't constructed const, so we have to mark them.
@@ -799,7 +801,8 @@
/*
-=item C<static INTVAL find_const_iter>
+=item C<static INTVAL find_const_iter(PARROT_INTERP, PackFile_Segment *seg, void
+*user_data)>
Iterates over a PackFile_Directory, marking any constant segments. Internal
use only.
@@ -825,7 +828,7 @@
/*
-=item C<void mark_const_subs>
+=item C<void mark_const_subs(PARROT_INTERP)>
Iterates over all directories and PackFile_Segments, finding and marking any
constant Subs.
@@ -855,7 +858,8 @@
/*
-=item C<void do_sub_pragmas>
+=item C<void do_sub_pragmas(PARROT_INTERP, PackFile_ByteCode *self,
+pbc_action_enum_t action, PMC *eval_pmc)>
C<action> is one of C<PBC_PBC>, C<PBC_LOADED>, C<PBC_INIT>, or C<PBC_MAIN>.
Also store the C<eval_pmc> in the sub structure, so that the eval PMC is kept
@@ -922,7 +926,8 @@
/*
-=item C<opcode_t PackFile_unpack>
+=item C<opcode_t PackFile_unpack(PARROT_INTERP, PackFile *self, const opcode_t
+*packed, size_t packed_size)>
Unpacks a C<PackFile> from a block of memory, ensuring that the magic number is
valid and that Parrot can read this bytecode version, Parrot, and performing
@@ -1087,7 +1092,8 @@
/*
-=item C<INTVAL PackFile_map_segments>
+=item C<INTVAL PackFile_map_segments(PARROT_INTERP, const PackFile_Directory
+*dir, PackFile_map_segments_func_t callback, void *user_data)>
Calls the callback function C<callback> for each segment in the directory
C<dir> called. The pointer C<user_data> is included in each call.
@@ -1119,7 +1125,8 @@
/*
-=item C<INTVAL PackFile_add_segment>
+=item C<INTVAL PackFile_add_segment(PARROT_INTERP, PackFile_Directory *dir,
+PackFile_Segment *seg)>
Adds the Segment C<seg> to the directory C<dir>. The PackFile becomes the
owner of the segment; it gets destroyed when the PackFile does.
@@ -1145,7 +1152,8 @@
/*
-=item C<PackFile_Segment * PackFile_find_segment>
+=item C<PackFile_Segment * PackFile_find_segment(PARROT_INTERP,
+PackFile_Directory *dir, const char *name, int sub_dir)>
Finds the segment with the name C<name> in the C<PackFile_Directory> if
C<sub_dir> is true, searches directories recursively. The returned segment is
@@ -1190,7 +1198,8 @@
/*
-=item C<PackFile_Segment * PackFile_remove_segment_by_name>
+=item C<PackFile_Segment * PackFile_remove_segment_by_name(PARROT_INTERP,
+PackFile_Directory *dir, const char *name)>
Finds, removes, and returns the segment with name C<name> in the
C<PackFile_Directory>. The caller is responsible for destroying the segment.
@@ -1236,7 +1245,7 @@
=over 4
-=item C<static void PackFile_set_header>
+=item C<static void PackFile_set_header(PackFile_Header *header)>
Fills a C<PackFile> header with system specific data.
@@ -1276,7 +1285,7 @@
/*
-=item C<PackFile * PackFile_new>
+=item C<PackFile * PackFile_new(PARROT_INTERP, INTVAL is_mapped)>
Allocates a new empty C<PackFile> and sets up the directory.
@@ -1358,7 +1367,7 @@
/*
-=item C<PackFile * PackFile_new_dummy>
+=item C<PackFile * PackFile_new_dummy(PARROT_INTERP, const char *name)>
Creates a new (initial) dummy PackFile. This is necessary if the interpreter
doesn't load any bytecode but instead uses C<Parrot_compile_string>.
@@ -1386,7 +1395,8 @@
/*
-=item C<INTVAL PackFile_funcs_register>
+=item C<INTVAL PackFile_funcs_register(PARROT_INTERP, PackFile *pf, UINTVAL
+type, const PackFile_funcs funcs)>
Registers the C<pack>/C<unpack>/... functions for a packfile type.
@@ -1408,7 +1418,8 @@
/*
-=item C<static const opcode_t * default_unpack>
+=item C<static const opcode_t * default_unpack(PackFile_Segment *self, const
+opcode_t *cursor)>
Unpacks a PackFile given a cursor into PBC. This is the default unpack.
@@ -1477,7 +1488,7 @@
/*
-=item C<void default_dump_header>
+=item C<void default_dump_header(PARROT_INTERP, const PackFile_Segment *self)>
Dumps the header of a given PackFile_Segment.
@@ -1499,7 +1510,7 @@
/*
-=item C<static void default_dump>
+=item C<static void default_dump(PARROT_INTERP, const PackFile_Segment *self)>
Dumps a PackFile_Segment.
@@ -1534,7 +1545,7 @@
/*
-=item C<static void pf_register_standard_funcs>
+=item C<static void pf_register_standard_funcs(PARROT_INTERP, PackFile *pf)>
Registers a PackFile's functions; called from within C<PackFile_new()>.
@@ -1623,7 +1634,8 @@
/*
-=item C<PackFile_Segment * PackFile_Segment_new_seg>
+=item C<PackFile_Segment * PackFile_Segment_new_seg(PARROT_INTERP,
+PackFile_Directory *dir, UINTVAL type, const char *name, int add)>
Creates a new segment in the given PackFile_Directory of the given C<type> with
the given C<name>. If C<add> is true, adds the segment to the directory.
@@ -1656,7 +1668,8 @@
/*
-=item C<static PackFile_Segment * create_seg>
+=item C<static PackFile_Segment * create_seg(PARROT_INTERP, PackFile_Directory
+*dir, pack_file_types t, const char *name, const char *file_name, int add)>
Creates a new PackFile_Segment for the given C<file_name>. See
C<PackFile_Segment_new_seg()> for the other arguments.
@@ -1686,7 +1699,8 @@
/*
-=item C<PackFile_ByteCode * PF_create_default_segs>
+=item C<PackFile_ByteCode * PF_create_default_segs(PARROT_INTERP, const char
+*file_name, int add)>
Creates the bytecode, constant, and fixup segments for C<file_name>. If C<add>
is true, the current packfile becomes the owner of these segments by adding the
@@ -1729,7 +1743,7 @@
/*
-=item C<void PackFile_Segment_destroy>
+=item C<void PackFile_Segment_destroy(PARROT_INTERP, PackFile_Segment *self)>
Destroys the given PackFile_Segment.
@@ -1755,7 +1769,8 @@
/*
-=item C<size_t PackFile_Segment_packed_size>
+=item C<size_t PackFile_Segment_packed_size(PARROT_INTERP, PackFile_Segment
+*self)>
Returns the size of the given segment, when packed, taking into account padding
and alignment.
@@ -1787,7 +1802,8 @@
/*
-=item C<opcode_t * PackFile_Segment_pack>
+=item C<opcode_t * PackFile_Segment_pack(PARROT_INTERP, PackFile_Segment *self,
+opcode_t *cursor)>
Packs a PackFile_Segment, returning a cursor to the start of the results.
@@ -1829,7 +1845,8 @@
/*
-=item C<const opcode_t * PackFile_Segment_unpack>
+=item C<const opcode_t * PackFile_Segment_unpack(PARROT_INTERP, PackFile_Segment
+*self, const opcode_t *cursor)>
Unpacks a PackFile_Segment, returning a cursor to the results on success and
NULL otherwise.
@@ -1882,7 +1899,7 @@
/*
-=item C<void PackFile_Segment_dump>
+=item C<void PackFile_Segment_dump(PARROT_INTERP, PackFile_Segment *self)>
Dumps the segment C<self>.
@@ -1907,7 +1924,8 @@
=over 4
-=item C<static PackFile_Segment * directory_new>
+=item C<static PackFile_Segment * directory_new(PARROT_INTERP, PackFile *pf,
+const char *name, int add)>
Returns a new C<PackFile_Directory> cast as a C<PackFile_Segment>.
@@ -1928,7 +1946,7 @@
/*
-=item C<static void directory_dump>
+=item C<static void directory_dump(PARROT_INTERP, const PackFile_Segment *self)>
Dumps the directory C<self>.
@@ -1969,7 +1987,8 @@
/*
-=item C<static const opcode_t * directory_unpack>
+=item C<static const opcode_t * directory_unpack(PARROT_INTERP, PackFile_Segment
+*segp, const opcode_t *cursor)>
Unpacks the directory from the provided cursor.
@@ -2123,7 +2142,7 @@
/*
-=item C<static void directory_destroy>
+=item C<static void directory_destroy(PARROT_INTERP, PackFile_Segment *self)>
Destroys the directory.
@@ -2150,7 +2169,7 @@
/*
-=item C<static void sort_segs>
+=item C<static void sort_segs(PackFile_Directory *dir)>
Sorts the segments in C<dir>.
@@ -2197,7 +2216,8 @@
/*
-=item C<static size_t directory_packed_size>
+=item C<static size_t directory_packed_size(PARROT_INTERP, PackFile_Segment
+*self)>
Returns the size of the directory minus the value returned by
C<default_packed_size()>.
@@ -2249,7 +2269,8 @@
/*
-=item C<static opcode_t * directory_pack>
+=item C<static opcode_t * directory_pack(PARROT_INTERP, PackFile_Segment *self,
+opcode_t *cursor)>
Packs the directory C<self>, using the given cursor.
@@ -2306,7 +2327,8 @@
=over 4
-=item C<static void segment_init>
+=item C<static void segment_init(PackFile_Segment *self, PackFile *pf, const
+char *name)>
Initializes the segment C<self> with the provided PackFile and the given name.
Note that this duplicates the given name.
@@ -2334,7 +2356,8 @@
/*
-=item C<PackFile_Segment * PackFile_Segment_new>
+=item C<PackFile_Segment * PackFile_Segment_new(PARROT_INTERP, PackFile *pf,
+const char *name, int add)>
Creates a new default section.
@@ -2366,7 +2389,7 @@
=over 4
-=item C<static void default_destroy>
+=item C<static void default_destroy(PackFile_Segment *self)>
The default destroy function. Destroys a PackFile_Segment.
@@ -2394,7 +2417,7 @@
/*
-=item C<static size_t default_packed_size>
+=item C<static size_t default_packed_size(const PackFile_Segment *self)>
Returns the default size of the segment C<self>.
@@ -2415,7 +2438,8 @@
/*
-=item C<static opcode_t * default_pack>
+=item C<static opcode_t * default_pack(const PackFile_Segment *self, opcode_t
+*dest)>
Performs the default pack.
@@ -2449,7 +2473,7 @@
=over 4
-=item C<static void byte_code_destroy>
+=item C<static void byte_code_destroy(PARROT_INTERP, PackFile_Segment *self)>
Destroys the C<PackFile_ByteCode> segment C<self>.
@@ -2486,7 +2510,8 @@
/*
-=item C<static PackFile_Segment * byte_code_new>
+=item C<static PackFile_Segment * byte_code_new(PARROT_INTERP, PackFile *pf,
+const char *name, int add)>
Creates a new C<PackFile_ByteCode> segment. Ignores C<pf>, C<name>, and C<add>
are ignored.
@@ -2515,7 +2540,7 @@
=over 4
-=item C<static void pf_debug_destroy>
+=item C<static void pf_debug_destroy(PARROT_INTERP, PackFile_Segment *self)>
Destroys the C<PackFile_Debug> segment C<self>.
@@ -2543,7 +2568,8 @@
/*
-=item C<static PackFile_Segment * pf_debug_new>
+=item C<static PackFile_Segment * pf_debug_new(PARROT_INTERP, PackFile *pf,
+const char *name, int add)>
Creates and returns a new C<PackFile_Debug> segment. Ignores C<pf>, C<name>,
and C<add> ignored.
@@ -2569,7 +2595,8 @@
/*
-=item C<static size_t pf_debug_packed_size>
+=item C<static size_t pf_debug_packed_size(PARROT_INTERP, PackFile_Segment
+*self)>
Returns the size of the C<PackFile_Debug> segment's filename in C<opcode_t>
units.
@@ -2601,7 +2628,8 @@
/*
-=item C<static opcode_t * pf_debug_pack>
+=item C<static opcode_t * pf_debug_pack(PARROT_INTERP, PackFile_Segment *self,
+opcode_t *cursor)>
Packs the debug segment, using the given cursor.
@@ -2635,7 +2663,8 @@
/*
-=item C<static const opcode_t * pf_debug_unpack>
+=item C<static const opcode_t * pf_debug_unpack(PARROT_INTERP, PackFile_Segment
+*self, const opcode_t *cursor)>
Unpacks a debug segment into a PackFile_Debug structure, given the cursor.
@@ -2699,7 +2728,7 @@
/*
-=item C<static void pf_debug_dump>
+=item C<static void pf_debug_dump(PARROT_INTERP, const PackFile_Segment *self)>
Dumps a debug segment to a human readable form.
@@ -2753,7 +2782,8 @@
/*
-=item C<PackFile_Debug * Parrot_new_debug_seg>
+=item C<PackFile_Debug * Parrot_new_debug_seg(PARROT_INTERP, PackFile_ByteCode
+*cs, size_t size)>
Creates and appends (or resizes) a new debug seg for a code segment. Uses the
given size as its size.
@@ -2805,7 +2835,8 @@
/*
-=item C<void Parrot_debug_add_mapping>
+=item C<void Parrot_debug_add_mapping(PARROT_INTERP, PackFile_Debug *debug,
+opcode_t offset, const char *filename)>
Adds a bytecode offset to a filename mapping for a PackFile_Debug.
@@ -2890,7 +2921,8 @@
/*
-=item C<STRING * Parrot_debug_pc_to_filename>
+=item C<STRING * Parrot_debug_pc_to_filename(PARROT_INTERP, const PackFile_Debug
+*debug, opcode_t pc)>
Returns the filename of the source for the given position in the bytecode.
@@ -2927,7 +2959,7 @@
/*
-=item C<void Parrot_switch_to_cs_by_nr>
+=item C<void Parrot_switch_to_cs_by_nr(PARROT_INTERP, opcode_t seg)>
Switches the current bytecode segment to the segment keyed by number C<seg>.
@@ -2965,7 +2997,8 @@
/*
-=item C<PackFile_ByteCode * Parrot_switch_to_cs>
+=item C<PackFile_ByteCode * Parrot_switch_to_cs(PARROT_INTERP, PackFile_ByteCode
+*new_cs, int really)>
Switches to a bytecode segment C<new_cs>, returning the old segment.
@@ -3013,7 +3046,8 @@
/*
-=item C<static PackFile_Constant * clone_constant>
+=item C<static PackFile_Constant * clone_constant(PARROT_INTERP,
+PackFile_Constant *old_const)>
Clones a constant (at least, if it's a Sub PMC), returning the clone.
@@ -3059,7 +3093,8 @@
/*
-=item C<static PackFile_Constant ** find_constants>
+=item C<static PackFile_Constant ** find_constants(PARROT_INTERP,
+PackFile_ConstTable *ct)>
Finds the constant table associated with a thread. For now, we need to copy
constant tables because some entries aren't really constant; e.g. subroutines
@@ -3113,7 +3148,7 @@
/*
-=item C<void Parrot_destroy_constants>
+=item C<void Parrot_destroy_constants(PARROT_INTERP)>
Destroys the constants for an interpreter.
@@ -3170,7 +3205,8 @@
=over 4
-=item C<void PackFile_FixupTable_clear>
+=item C<void PackFile_FixupTable_clear(PARROT_INTERP, PackFile_FixupTable
+*self)>
Clears a PackFile FixupTable.
@@ -3212,7 +3248,7 @@
/*
-=item C<static void fixup_destroy>
+=item C<static void fixup_destroy(PARROT_INTERP, PackFile_Segment *self)>
Calls C<PackFile_FixupTable_clear()> with C<self>.
@@ -3231,7 +3267,7 @@
/*
-=item C<static size_t fixup_packed_size>
+=item C<static size_t fixup_packed_size(PARROT_INTERP, PackFile_Segment *self)>
I<What does this do?>
@@ -3270,7 +3306,8 @@
/*
-=item C<static opcode_t * fixup_pack>
+=item C<static opcode_t * fixup_pack(PARROT_INTERP, PackFile_Segment *self,
+opcode_t *cursor)>
Packs the fixup table for a given packfile.
@@ -3311,7 +3348,8 @@
/*
-=item C<static PackFile_Segment * fixup_new>
+=item C<static PackFile_Segment * fixup_new(PARROT_INTERP, PackFile *pf, const
+char *name, int add)>
Returns a new C<PackFile_FixupTable> segment.
@@ -3333,7 +3371,8 @@
/*
-=item C<static const opcode_t * fixup_unpack>
+=item C<static const opcode_t * fixup_unpack(PARROT_INTERP, PackFile_Segment
+*seg, const opcode_t *cursor)>
Unpacks a PackFile FixupTable from a block of memory, given a cursor.
@@ -3412,7 +3451,8 @@
/*
-=item C<void PackFile_FixupTable_new_entry>
+=item C<void PackFile_FixupTable_new_entry(PARROT_INTERP, const char *label,
+INTVAL type, opcode_t offs)>
Adds a new fix-up entry with label and type. Creates a new PackFile FixupTable
if none is present.
@@ -3452,7 +3492,8 @@
/*
-=item C<static PackFile_FixupEntry * find_fixup>
+=item C<static PackFile_FixupEntry * find_fixup(PackFile_FixupTable *ft, INTVAL
+type, const char *name)>
Finds the fix-up entry in a given FixupTable C<ft> for C<type> and C<name> and
returns it.
@@ -3485,7 +3526,8 @@
/*
-=item C<static INTVAL find_fixup_iter>
+=item C<static INTVAL find_fixup_iter(PARROT_INTERP, PackFile_Segment *seg, void
+*user_data)>
Internal iterator for C<PackFile_find_fixup_entry>; recurses into directories.
@@ -3519,7 +3561,8 @@
/*
-=item C<PackFile_FixupEntry * PackFile_find_fixup_entry>
+=item C<PackFile_FixupEntry * PackFile_find_fixup_entry(PARROT_INTERP, INTVAL
+type, char *name)>
Searches the whole PackFile recursively for a fix-up entry with the given
C<type> and C<name>, and returns the found entry or NULL.
@@ -3561,7 +3604,8 @@
=over 4
-=item C<void PackFile_ConstTable_clear>
+=item C<void PackFile_ConstTable_clear(PARROT_INTERP, PackFile_ConstTable
+*self)>
Clear the C<PackFile_ConstTable> C<self>.
@@ -3598,7 +3642,8 @@
/*
-=item C<const opcode_t * PackFile_ConstTable_unpack>
+=item C<const opcode_t * PackFile_ConstTable_unpack(PARROT_INTERP,
+PackFile_Segment *seg, const opcode_t *cursor)>
Unpacks a PackFile ConstTable from a block of memory. The format is:
@@ -3664,7 +3709,8 @@
/*
-=item C<static PackFile_Segment * const_new>
+=item C<static PackFile_Segment * const_new(PARROT_INTERP, PackFile *pf, const
+char *name, int add)>
Returns a new C<PackFile_ConstTable> segment.
@@ -3686,7 +3732,7 @@
/*
-=item C<static void const_destroy>
+=item C<static void const_destroy(PARROT_INTERP, PackFile_Segment *self)>
Destroys the C<PackFile_ConstTable> C<self>.
@@ -3711,7 +3757,7 @@
=over 4
-=item C<PackFile_Constant * PackFile_Constant_new>
+=item C<PackFile_Constant * PackFile_Constant_new(PARROT_INTERP)>
Allocates a new empty PackFile Constant.
@@ -3738,7 +3784,7 @@
/*
-=item C<void PackFile_Constant_destroy>
+=item C<void PackFile_Constant_destroy(PARROT_INTERP, PackFile_Constant *self)>
Deletes the C<PackFile_Constant> C<self>.
@@ -3759,7 +3805,8 @@
/*
-=item C<size_t PackFile_Constant_pack_size>
+=item C<size_t PackFile_Constant_pack_size(PARROT_INTERP, const
+PackFile_Constant *self)>
Determines the size of the buffer needed in order to pack the PackFile Constant
into a contiguous region of memory.
@@ -3822,7 +3869,8 @@
/*
-=item C<const opcode_t * PackFile_Constant_unpack>
+=item C<const opcode_t * PackFile_Constant_unpack(PARROT_INTERP,
+PackFile_ConstTable *constt, PackFile_Constant *self, const opcode_t *cursor)>
Unpacks a PackFile Constant from a block of memory. The format is:
@@ -3882,7 +3930,8 @@
/*
-=item C<const opcode_t * PackFile_Constant_unpack_pmc>
+=item C<const opcode_t * PackFile_Constant_unpack_pmc(PARROT_INTERP,
+PackFile_ConstTable *constt, PackFile_Constant *self, const opcode_t *cursor)>
Unpacks a constant PMC.
@@ -3934,7 +3983,8 @@
/*
-=item C<const opcode_t * PackFile_Constant_unpack_key>
+=item C<const opcode_t * PackFile_Constant_unpack_key(PARROT_INTERP,
+PackFile_ConstTable *constt, PackFile_Constant *self, const opcode_t *cursor)>
Unpacks a PackFile Constant from a block of memory. The format consists of a
sequence of key atoms, each with the following format:
@@ -4025,7 +4075,8 @@
/*
-=item C<PackFile_Segment * PackFile_Annotations_new>
+=item C<PackFile_Segment * PackFile_Annotations_new(PARROT_INTERP, struct
+PackFile *pf, const char *name, int add)>
Creates a new annotations segment structure. Ignores the parameters C<name> and
C<add>.
@@ -4050,7 +4101,7 @@
/*
-=item C<void PackFile_Annotations_destroy>
+=item C<void PackFile_Annotations_destroy(PARROT_INTERP, PackFile_Segment *seg)>
Frees all memory associated with an annotations segment.
@@ -4091,7 +4142,8 @@
/*
-=item C<size_t PackFile_Annotations_packed_size>
+=item C<size_t PackFile_Annotations_packed_size(PARROT_INTERP, PackFile_Segment
+*seg)>
Computes the number of opcode_ts needed to store the passed annotations
segment.
@@ -4114,7 +4166,8 @@
/*
-=item C<opcode_t * PackFile_Annotations_pack>
+=item C<opcode_t * PackFile_Annotations_pack(PARROT_INTERP, PackFile_Segment
+*seg, opcode_t *cursor)>
Packs this segment into bytecode.
@@ -4162,7 +4215,8 @@
/*
-=item C<const opcode_t * PackFile_Annotations_unpack>
+=item C<const opcode_t * PackFile_Annotations_unpack(PARROT_INTERP,
+PackFile_Segment *seg, const opcode_t *cursor)>
Unpacks this segment from the bytecode.
@@ -4248,7 +4302,8 @@
/*
-=item C<void PackFile_Annotations_dump>
+=item C<void PackFile_Annotations_dump(PARROT_INTERP, const PackFile_Segment
+*seg)>
Produces a dump of the annotations segment.
@@ -4317,7 +4372,8 @@
/*
-=item C<void PackFile_Annotations_add_group>
+=item C<void PackFile_Annotations_add_group(PARROT_INTERP, PackFile_Annotations
+*self, opcode_t offset)>
Starts a new bytecode annotation group. Takes the offset in the bytecode where
the new annotations group starts.
@@ -4354,7 +4410,8 @@
/*
-=item C<void PackFile_Annotations_add_entry>
+=item C<void PackFile_Annotations_add_entry(PARROT_INTERP, PackFile_Annotations
+*self, opcode_t offset, opcode_t key, opcode_t type, opcode_t value)>
Adds a new bytecode annotation entry. Takes the annotations segment to add the
entry to, the current bytecode offset (assumed to be the greatest one so far in
@@ -4436,7 +4493,8 @@
/*
-=item C<static PMC * make_annotation_value_pmc>
+=item C<static PMC * make_annotation_value_pmc(PARROT_INTERP,
+PackFile_Annotations *self, INTVAL type, opcode_t value)>
Makes a PMC of the right type holding the value. Helper for
C<PackFile_Annotations_lookup()>.
@@ -4475,7 +4533,8 @@
/*
-=item C<PMC * PackFile_Annotations_lookup>
+=item C<PMC * PackFile_Annotations_lookup(PARROT_INTERP, PackFile_Annotations
+*self, opcode_t offset, STRING *key)>
Looks up the annotation(s) in force at the given bytecode offset. If just one
particular annotation is required, it can be passed as key, and the value will
@@ -4581,7 +4640,8 @@
/*
-=item C<static void compile_or_load_file>
+=item C<static void compile_or_load_file(PARROT_INTERP, STRING *path,
+enum_runtime_ft file_type)>
Either load a bytecode file and append it to the current packfile directory, or
compile a PIR or PASM file from source.
@@ -4622,7 +4682,7 @@
/*
-=item C<void Parrot_load_language>
+=item C<void Parrot_load_language(PARROT_INTERP, STRING *lang_name)>
Load the compiler libraries for a given high-level language into the
interpreter.
@@ -4693,7 +4753,8 @@
/*
-=item C<static PackFile * PackFile_append_pbc>
+=item C<static PackFile * PackFile_append_pbc(PARROT_INTERP, const char
+*filename)>
Reads and appends a PBC it to the current directory. Fixes up sub addresses in
newly loaded bytecode and runs C<:load> subs.
@@ -4723,7 +4784,7 @@
/*
-=item C<void Parrot_load_bytecode>
+=item C<void Parrot_load_bytecode(PARROT_INTERP, STRING *file_str)>
Load a bytecode, PIR, or PASM file into the interpreter.
@@ -4776,7 +4837,8 @@
/*
-=item C<void PackFile_fixup_subs>
+=item C<void PackFile_fixup_subs(PARROT_INTERP, pbc_action_enum_t what, PMC
+*eval)>
Runs C<:load> or C<:immediate> subroutines for the current code segment. If
C<eval> is given, set this as the owner of the subroutines.
Modified: trunk/src/packfile/pf_items.c
==============================================================================
--- trunk/src/packfile/pf_items.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/packfile/pf_items.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -244,7 +244,8 @@
/*
-=item C<static void cvt_num12_num8>
+=item C<static void cvt_num12_num8(unsigned char *dest, const unsigned char
+*src)>
Converts i386 LE 12-byte long double to IEEE 754 8-byte double.
@@ -331,7 +332,8 @@
/*
-=item C<static void cvt_num16_num12>
+=item C<static void cvt_num16_num12(unsigned char *dest, const unsigned char
+*src)>
Converts IEEE 754 LE 16-byte long double to i386 LE 12-byte long double .
See http://babbage.cs.qc.cuny.edu/IEEE-754/References.xhtml
@@ -390,7 +392,8 @@
/*
-=item C<static void cvt_num12_num16>
+=item C<static void cvt_num12_num16(unsigned char *dest, const unsigned char
+*src)>
Converts i386 LE 12-byte long double to IEEE 754 LE 16-byte long double.
@@ -452,7 +455,8 @@
#endif
/*
-=item C<static void cvt_num16_num8>
+=item C<static void cvt_num16_num8(unsigned char *dest, const unsigned char
+*src)>
Converts IEEE 754 16-byte long double to IEEE 754 8 byte double.
@@ -558,7 +562,8 @@
/*
-=item C<static void cvt_num8_num16>
+=item C<static void cvt_num8_num16(unsigned char *dest, const unsigned char
+*src)>
Converts IEEE 754 8-byte double to IEEE 754 16 byte long double.
@@ -585,7 +590,8 @@
/*
-=item C<static void cvt_num8_num12>
+=item C<static void cvt_num8_num12(unsigned char *dest, const unsigned char
+*src)>
Converts i386 8-byte double to i386 12 byte long double.
@@ -612,7 +618,8 @@
/*
-=item C<static void cvt_num8_num12_be>
+=item C<static void cvt_num8_num12_be(unsigned char *dest, const unsigned char
+*src)>
Converts a big-endian IEEE 754 8-byte double to i386 LE 12-byte long double.
@@ -636,7 +643,8 @@
/*
-=item C<static void cvt_num8_num16_le>
+=item C<static void cvt_num8_num16_le(unsigned char *dest, const unsigned char
+*src)>
Converts a little-endian IEEE 754 8-byte double to big-endian 16-byte long double.
@@ -660,7 +668,8 @@
/*
-=item C<static void cvt_num12_num16_le>
+=item C<static void cvt_num12_num16_le(unsigned char *dest, const unsigned char
+*src)>
Converts a little-endian 12-byte double to big-endian 16-byte long double.
@@ -684,7 +693,8 @@
/*
-=item C<static void cvt_num12_num8_le>
+=item C<static void cvt_num12_num8_le(unsigned char *dest, const unsigned char
+*src)>
Converts a little-endian 12-byte i386 long double into a big-endian IEEE 754 8-byte double.
@@ -709,7 +719,8 @@
/*
-=item C<static void cvt_num16_num8_le>
+=item C<static void cvt_num16_num8_le(unsigned char *dest, const unsigned char
+*src)>
Converts a little-endian IEEE 754 intel 16-byte long double into a
big-endian IEEE 754 8-byte double.
@@ -735,7 +746,8 @@
/*
-=item C<static void cvt_num16_num8_be>
+=item C<static void cvt_num16_num8_be(unsigned char *dest, const unsigned char
+*src)>
Converts a big-endian IEEE 754 16-byte long double into a IEEE 754 8-byte double.
@@ -759,7 +771,8 @@
/*
-=item C<static void cvt_num16_num12_be>
+=item C<static void cvt_num16_num12_be(unsigned char *dest, const unsigned char
+*src)>
Converts a big-endian IEEE 754 16-byte long double into a 12-byte i386 long double.
@@ -783,7 +796,8 @@
/*
-=item C<static void cvt_num8_num16_be>
+=item C<static void cvt_num8_num16_be(unsigned char *dest, const unsigned char
+*src)>
Converts a big-endian IEEE 754 8-byte double to little-endian IEEE 754 16 byte
long double.
@@ -809,7 +823,7 @@
/*
-=item C<static opcode_t fetch_op_mixed_le>
+=item C<static opcode_t fetch_op_mixed_le(const unsigned char *b)>
opcode fetch helper function
@@ -849,7 +863,7 @@
/*
-=item C<static opcode_t fetch_op_mixed_be>
+=item C<static opcode_t fetch_op_mixed_be(const unsigned char *b)>
Fetch an opcode and convert to BE. Determines size of opcode from
C<OPCODE_T_SIZE> macro, and proceeds accordingly.
@@ -887,7 +901,7 @@
/*
-=item C<static opcode_t fetch_op_be_4>
+=item C<static opcode_t fetch_op_be_4(const unsigned char *b)>
Fetches a 4-byte big-endian opcode.
@@ -922,7 +936,7 @@
/*
-=item C<static opcode_t fetch_op_be_8>
+=item C<static opcode_t fetch_op_be_8(const unsigned char *b)>
Fetches an 8-byte big-endian opcode.
@@ -953,7 +967,7 @@
/*
-=item C<static opcode_t fetch_op_le_4>
+=item C<static opcode_t fetch_op_le_4(const unsigned char *b)>
Fetches a 4-byte little-endian opcode
@@ -989,7 +1003,7 @@
/*
-=item C<static opcode_t fetch_op_le_8>
+=item C<static opcode_t fetch_op_le_8(const unsigned char *b)>
Fetches an 8-byte little-endian opcode
@@ -1020,7 +1034,7 @@
/*
-=item C<opcode_t PF_fetch_opcode>
+=item C<opcode_t PF_fetch_opcode(const PackFile *pf, const opcode_t **stream)>
Fetches an C<opcode_t> from the stream, converting byteorder if needed.
@@ -1048,7 +1062,7 @@
/*
-=item C<opcode_t* PF_store_opcode>
+=item C<opcode_t* PF_store_opcode(opcode_t *cursor, opcode_t val)>
Stores an C<opcode_t> to stream as-is.
@@ -1068,7 +1082,7 @@
/*
-=item C<size_t PF_size_opcode>
+=item C<size_t PF_size_opcode(void)>
Returns the size of an item in C<opcode_t> units. The size of C<opcode_t>
is 1 I<per definition>.
@@ -1087,7 +1101,7 @@
/*
-=item C<INTVAL PF_fetch_integer>
+=item C<INTVAL PF_fetch_integer(PackFile *pf, const opcode_t **stream)>
Fetches an C<INTVAL> from the stream, converting byteorder if needed.
@@ -1126,7 +1140,7 @@
/*
-=item C<opcode_t* PF_store_integer>
+=item C<opcode_t* PF_store_integer(opcode_t *cursor, INTVAL val)>
Stores an C<INTVAL> to stream as is.
@@ -1146,7 +1160,7 @@
/*
-=item C<size_t PF_size_integer>
+=item C<size_t PF_size_integer(void)>
Returns stored size of C<INTVAL> in C<opcode_t> units.
@@ -1164,7 +1178,7 @@
/*
-=item C<FLOATVAL PF_fetch_number>
+=item C<FLOATVAL PF_fetch_number(PackFile *pf, const opcode_t **stream)>
Fetches a C<FLOATVAL> from the stream, converting byteorder if needed.
Then advances the stream pointer by the packfile float size.
@@ -1226,7 +1240,7 @@
/*
-=item C<opcode_t* PF_store_number>
+=item C<opcode_t* PF_store_number(opcode_t *cursor, const FLOATVAL *val)>
Writes a C<FLOATVAL> to the opcode stream as-is.
@@ -1249,7 +1263,7 @@
/*
-=item C<size_t PF_size_number>
+=item C<size_t PF_size_number(void)>
Returns stored size of FLOATVAL in C<opcode_t> units.
@@ -1267,7 +1281,8 @@
/*
-=item C<STRING * PF_fetch_string>
+=item C<STRING * PF_fetch_string(PARROT_INTERP, PackFile *pf, const opcode_t
+**cursor)>
Fetches a C<STRING> from bytecode and return a new C<STRING>.
@@ -1329,7 +1344,7 @@
/*
-=item C<opcode_t* PF_store_string>
+=item C<opcode_t* PF_store_string(opcode_t *cursor, const STRING *s)>
Writes a C<STRING> to the opcode stream.
@@ -1386,7 +1401,7 @@
/*
-=item C<size_t PF_size_string>
+=item C<size_t PF_size_string(const STRING *s)>
Reports stored size of C<STRING> in C<opcode_t> units.
@@ -1411,7 +1426,7 @@
/*
-=item C<char * PF_fetch_cstring>
+=item C<char * PF_fetch_cstring(PackFile *pf, const opcode_t **cursor)>
Fetches a cstring from bytecode and returns an allocated copy
@@ -1444,7 +1459,7 @@
/*
-=item C<opcode_t* PF_store_cstring>
+=item C<opcode_t* PF_store_cstring(opcode_t *cursor, const char *s)>
Writes a C<NULL>-terminated string to the stream.
@@ -1464,7 +1479,7 @@
/*
-=item C<size_t PF_size_cstring>
+=item C<size_t PF_size_cstring(const char *s)>
Returns store size of a C-string in C<opcode_t> units.
@@ -1486,7 +1501,7 @@
/*
-=item C<void PackFile_assign_transforms>
+=item C<void PackFile_assign_transforms(PackFile *pf)>
Assigns transform functions to the vtable.
Modified: trunk/src/packout.c
==============================================================================
--- trunk/src/packout.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/packout.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -143,7 +143,8 @@
/*
-=item C<size_t PackFile_ConstTable_pack_size(PARROT_INTERP, PackFile_Segment *seg)>
+=item C<size_t PackFile_ConstTable_pack_size(PARROT_INTERP, PackFile_Segment
+*seg)>
Determine the size of the buffer needed in order to pack the PackFile
constant table into a contiguous region of memory.
@@ -168,8 +169,8 @@
/*
-=item C<opcode_t * PackFile_ConstTable_pack(PARROT_INTERP,
-PackFile_Segment *seg, opcode_t *cursor)>
+=item C<opcode_t * PackFile_ConstTable_pack(PARROT_INTERP, PackFile_Segment
+*seg, opcode_t *cursor)>
Pack the PackFile ConstTable into a contiguous region of memory.
@@ -204,8 +205,8 @@
/*
-=item C<int PackFile_find_in_const(PARROT_INTERP,
-const PackFile_ConstTable *ct, PMC *key, int type)>
+=item C<int PackFile_find_in_const(PARROT_INTERP, const PackFile_ConstTable *ct,
+PMC *key, int type)>
This is really ugly, we don't know where our C<PARROT_ARG_SC> key
constant is in constant table, so we have to search for it.
@@ -239,9 +240,9 @@
/*
-=item C<opcode_t * PackFile_Constant_pack(PARROT_INTERP,
-const PackFile_ConstTable *const_table,
-const PackFile_Constant *self, opcode_t *cursor)>
+=item C<opcode_t * PackFile_Constant_pack(PARROT_INTERP, const
+PackFile_ConstTable *const_table, const PackFile_Constant *self, opcode_t
+*cursor)>
Pack a PackFile Constant into a contiguous region of memory.
Modified: trunk/src/pbc_merge.c
==============================================================================
--- trunk/src/pbc_merge.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/pbc_merge.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -706,8 +706,8 @@
/*
-=item C<static void pbc_merge_ctpointers(PARROT_INTERP,
-pbc_merge_input **inputs, int num_inputs, PackFile_ByteCode *bc)>
+=item C<static void pbc_merge_ctpointers(PARROT_INTERP, pbc_merge_input
+**inputs, int num_inputs, PackFile_ByteCode *bc)>
This function corrects the pointers into the constants table found in the
bytecode.
@@ -791,8 +791,8 @@
/*
-=item C<static PackFile* pbc_merge_begin(PARROT_INTERP,
-pbc_merge_input **inputs, int num_inputs)>
+=item C<static PackFile* pbc_merge_begin(PARROT_INTERP, pbc_merge_input
+**inputs, int num_inputs)>
This is the function that drives PBC merging process.
@@ -834,8 +834,8 @@
/*
-=item C<static void pbc_merge_write(PARROT_INTERP, PackFile *pf,
-const char *filename)>
+=item C<static void pbc_merge_write(PARROT_INTERP, PackFile *pf, const char
+*filename)>
This functions writes out the merged packfile.
Modified: trunk/src/pic.c
==============================================================================
--- trunk/src/pic.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/pic.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -439,8 +439,8 @@
/*
-=item C<static int pass_int(PARROT_INTERP, PMC *sig, const char *src_base,
-const void **src, char *dest_base, void * const *dest)>
+=item C<static int pass_int(PARROT_INTERP, PMC *sig, const char *src_base, const
+void **src, char *dest_base, void * const *dest)>
=cut
@@ -463,8 +463,8 @@
/*
-=item C<static int pass_num(PARROT_INTERP, PMC *sig, const char *src_base,
-const void **src, char *dest_base, void * const *dest)>
+=item C<static int pass_num(PARROT_INTERP, PMC *sig, const char *src_base, const
+void **src, char *dest_base, void * const *dest)>
=cut
@@ -487,8 +487,8 @@
/*
-=item C<static int pass_str(PARROT_INTERP, PMC *sig, const char *src_base,
-const void **src, char *dest_base, void * const *dest)>
+=item C<static int pass_str(PARROT_INTERP, PMC *sig, const char *src_base, const
+void **src, char *dest_base, void * const *dest)>
=cut
@@ -512,8 +512,8 @@
/*
-=item C<static int pass_pmc(PARROT_INTERP, PMC *sig, const char *src_base,
-const void **src, char *dest_base, void * const *dest)>
+=item C<static int pass_pmc(PARROT_INTERP, PMC *sig, const char *src_base, const
+void **src, char *dest_base, void * const *dest)>
=cut
@@ -620,8 +620,8 @@
/*
-=item C<int parrot_pic_check_sig(PARROT_INTERP, PMC *sig1, PMC *sig2,
-int *type)>
+=item C<int parrot_pic_check_sig(PARROT_INTERP, PMC *sig1, PMC *sig2, int
+*type)>
return argument count and type of the signature or -1 if not pic-able
the type PARROT_ARG_CONSTANT stands for mixed types or constants
@@ -774,8 +774,8 @@
/*
-=item C<static int is_pic_func(PARROT_INTERP, void **pc, Parrot_MIC *mic,
-int core_type)>
+=item C<static int is_pic_func(PARROT_INTERP, void **pc, Parrot_MIC *mic, int
+core_type)>
=cut
@@ -849,8 +849,8 @@
/*
-=item C<void parrot_PIC_prederef(PARROT_INTERP, opcode_t op, void **pc_pred,
-int core)>
+=item C<void parrot_PIC_prederef(PARROT_INTERP, opcode_t op, void **pc_pred, int
+core)>
Define either the normal prederef function or the PIC stub, if PIC for
this opcode function is available. Called from C<do_prederef>.
Modified: trunk/src/pic_jit.c
==============================================================================
--- trunk/src/pic_jit.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/pic_jit.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -165,8 +165,8 @@
/*
-=item C<static opcode_t * pic_test_func(PARROT_INTERP, INTVAL *sig_bits,
-void **args)>
+=item C<static opcode_t * pic_test_func(PARROT_INTERP, INTVAL *sig_bits, void
+**args)>
Determines whether the given subroutine C<sub> can be JIT'd. Counts the
number of registers used by the sub, and returns C<0> if more registers
@@ -242,8 +242,8 @@
/*
-=item C<static int args_match_params(PARROT_INTERP, PMC *sig_args,
-const PackFile_ByteCode *seg, const opcode_t *start)>
+=item C<static int args_match_params(PARROT_INTERP, PMC *sig_args, const
+PackFile_ByteCode *seg, const opcode_t *start)>
Returns C<1> if the passed arguments match the subroutine's parameter list.
Returns C<0> otherwise.
@@ -293,7 +293,8 @@
/*
-=item C<static int returns_match_results(PARROT_INTERP, PMC *sig_ret, PMC *sig_result)>
+=item C<static int returns_match_results(PARROT_INTERP, PMC *sig_ret, PMC
+*sig_result)>
Returns 1 if the return values match the returned results. Returns C<0>
otherwise.
@@ -332,7 +333,8 @@
/*
-=item C<static int call_is_safe(PARROT_INTERP, PMC *sub_pmc, opcode_t **set_args)>
+=item C<static int call_is_safe(PARROT_INTERP, PMC *sub_pmc, opcode_t
+**set_args)>
Returns C<1> if the passed arguments match the subroutine's parameter list.
Returns C<0> otherwise.
@@ -385,8 +387,8 @@
/*
-=item C<static int ops_jittable(PARROT_INTERP, PMC *sub, PMC *sig_results,
-const PackFile_ByteCode *seg, opcode_t *pc, const opcode_t *end, int *flags)>
+=item C<static int ops_jittable(PARROT_INTERP, PMC *sub, PMC *sig_results, const
+PackFile_ByteCode *seg, opcode_t *pc, const opcode_t *end, int *flags)>
Returns 1 if the return values match the returned results. Returns C<0>
otherwise.
@@ -463,8 +465,8 @@
/*
-=item C<int parrot_pic_is_safe_to_jit(PARROT_INTERP, PMC *sub_pmc,
-PMC *sig_args, PMC *sig_results, int *flags)>
+=item C<int parrot_pic_is_safe_to_jit(PARROT_INTERP, PMC *sub_pmc, PMC
+*sig_args, PMC *sig_results, int *flags)>
=cut
Modified: trunk/src/pmc.c
==============================================================================
--- trunk/src/pmc.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/pmc.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -127,7 +127,8 @@
/*
-=item C<PMC * pmc_reuse(PARROT_INTERP, PMC *pmc, INTVAL new_type, UINTVAL flags)>
+=item C<PMC * pmc_reuse(PARROT_INTERP, PMC *pmc, INTVAL new_type, UINTVAL
+flags)>
Reuse an existing PMC, turning it into an empty PMC of the new type. Any
required internal structure will be put in place (such as the extension area)
@@ -220,7 +221,8 @@
/*
-=item C<static PMC * get_new_pmc_header(PARROT_INTERP, INTVAL base_type, UINTVAL flags)>
+=item C<static PMC * get_new_pmc_header(PARROT_INTERP, INTVAL base_type, UINTVAL
+flags)>
Gets a new PMC header.
@@ -470,8 +472,8 @@
/*
-=item C<static void pmc_free_to_pool(PARROT_INTERP, PMC *pmc,
-Small_Object_Pool *pool)>
+=item C<static void pmc_free_to_pool(PARROT_INTERP, PMC *pmc, Small_Object_Pool
+*pool)>
=cut
Modified: trunk/src/pmc_freeze.c
==============================================================================
--- trunk/src/pmc_freeze.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/pmc_freeze.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -463,8 +463,8 @@
=over 4
-=item C<static void str_append(PARROT_INTERP, STRING *s, const void *b,
-size_t len)>
+=item C<static void str_append(PARROT_INTERP, STRING *s, const void *b, size_t
+len)>
Appends C<len> bytes from buffer C<*b> to string C<*s>.
@@ -542,8 +542,8 @@
/*
-=item C<static void push_ascii_string(PARROT_INTERP, IMAGE_IO *io,
-const STRING *s)>
+=item C<static void push_ascii_string(PARROT_INTERP, IMAGE_IO *io, const STRING
+*s)>
Pushes an ASCII version of the string C<*s> onto the end of the C<*io>
"stream".
@@ -1144,8 +1144,8 @@
/*
-=item C<static void freeze_pmc(PARROT_INTERP, PMC *pmc, visit_info *info,
-int seen, UINTVAL id)>
+=item C<static void freeze_pmc(PARROT_INTERP, PMC *pmc, visit_info *info, int
+seen, UINTVAL id)>
Freeze PMC, setting type, seen, and "same-as-last" indicators as
appropriate.
@@ -1193,8 +1193,8 @@
/*
-=item C<static int thaw_pmc(PARROT_INTERP, visit_info *info, UINTVAL *id,
-INTVAL *type)>
+=item C<static int thaw_pmc(PARROT_INTERP, visit_info *info, UINTVAL *id, INTVAL
+*type)>
Freeze and thaw a PMC (id).
@@ -1255,8 +1255,8 @@
/*
-=item C<static void do_action(PARROT_INTERP, PMC *pmc, visit_info *info,
-int seen, UINTVAL id)>
+=item C<static void do_action(PARROT_INTERP, PMC *pmc, visit_info *info, int
+seen, UINTVAL id)>
Called from C<visit_next_for_GC()> and C<visit_todo_list()> to perform
the action specified in C<< info->what >>.
@@ -1467,7 +1467,8 @@
/*
-=item C<static void add_pmc_next_for_GC(PARROT_INTERP, PMC *pmc, visit_info *info)>
+=item C<static void add_pmc_next_for_GC(PARROT_INTERP, PMC *pmc, visit_info
+*info)>
Remembers the PMC for later processing.
@@ -1487,8 +1488,8 @@
/*
-=item C<static int next_for_GC_seen(PARROT_INTERP, PMC *pmc,
-visit_info *info, UINTVAL *id)>
+=item C<static int next_for_GC_seen(PARROT_INTERP, PMC *pmc, visit_info *info,
+UINTVAL *id)>
Remembers next child to visit via the C<next_for_GC pointer> generate a
unique ID per PMC and freeze the ID (not the PMC address) so thaw the
@@ -1534,7 +1535,8 @@
/*
-=item C<static void add_pmc_todo_list(PARROT_INTERP, PMC *pmc, visit_info *info)>
+=item C<static void add_pmc_todo_list(PARROT_INTERP, PMC *pmc, visit_info
+*info)>
Remembers the PMC to be processed later.
@@ -1589,7 +1591,8 @@
/*
-=item C<static void visit_next_for_GC(PARROT_INTERP, PMC* pmc, visit_info* info)>
+=item C<static void visit_next_for_GC(PARROT_INTERP, PMC* pmc, visit_info*
+info)>
C<visit_child> callbacks:
@@ -1652,7 +1655,8 @@
/*
-=item C<static void visit_todo_list_thaw(PARROT_INTERP, PMC* old, visit_info* info)>
+=item C<static void visit_todo_list_thaw(PARROT_INTERP, PMC* old, visit_info*
+info)>
Callback for thaw - action first.
@@ -1701,8 +1705,8 @@
/*
-=item C<static void visit_loop_todo_list(PARROT_INTERP, PMC *current,
-visit_info *info)>
+=item C<static void visit_loop_todo_list(PARROT_INTERP, PMC *current, visit_info
+*info)>
The thaw loop.
@@ -1809,7 +1813,8 @@
/*
-=item C<static PMC* run_thaw(PARROT_INTERP, STRING* image, visit_enum_type what)>
+=item C<static PMC* run_thaw(PARROT_INTERP, STRING* image, visit_enum_type
+what)>
Performs thawing. C<what> indicates what to be thawed.
Modified: trunk/src/scheduler.c
==============================================================================
--- trunk/src/scheduler.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/scheduler.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -273,8 +273,8 @@
/*
-=item C<void Parrot_cx_schedule_timer(PARROT_INTERP, STRING *type,
-FLOATVAL duration, FLOATVAL interval, INTVAL repeat, PMC *sub)>
+=item C<void Parrot_cx_schedule_timer(PARROT_INTERP, STRING *type, FLOATVAL
+duration, FLOATVAL interval, INTVAL repeat, PMC *sub)>
Create a new timer event due at C<diff> from now, repeated at C<interval>
and running the passed C<sub>.
@@ -341,7 +341,8 @@
/*
-=item C<void Parrot_cx_schedule_callback(PARROT_INTERP, PMC *user_data, char *ext_data)>
+=item C<void Parrot_cx_schedule_callback(PARROT_INTERP, PMC *user_data, char
+*ext_data)>
Create a new callback event, with an argument for the call.
@@ -490,7 +491,8 @@
/*
-=item C<void Parrot_cx_delete_handler_local(PARROT_INTERP, STRING *handler_type)>
+=item C<void Parrot_cx_delete_handler_local(PARROT_INTERP, STRING
+*handler_type)>
Remove the top task handler of a particular type from the context's list of
handlers.
@@ -560,7 +562,8 @@
/*
-=item C<INTVAL Parrot_cx_count_handlers_local(PARROT_INTERP, STRING *handler_type)>
+=item C<INTVAL Parrot_cx_count_handlers_local(PARROT_INTERP, STRING
+*handler_type)>
Count the number of active handlers of a particular type from the
context's list of handlers.
@@ -650,7 +653,8 @@
/*
-=item C<void Parrot_cx_delete_handler_typed(PARROT_INTERP, STRING *handler_type)>
+=item C<void Parrot_cx_delete_handler_typed(PARROT_INTERP, STRING
+*handler_type)>
Remove the top task handler of a particular type from the scheduler's list of
handlers.
@@ -673,7 +677,8 @@
/*
-=item C<INTVAL Parrot_cx_count_handlers_typed(PARROT_INTERP, STRING *handler_type)>
+=item C<INTVAL Parrot_cx_count_handlers_typed(PARROT_INTERP, STRING
+*handler_type)>
Count the number of active handlers of a particular type (event, exception) in
the concurrency scheduler.
@@ -709,7 +714,8 @@
=over 4
-=item C<void Parrot_cx_send_message(PARROT_INTERP, STRING *messagetype, PMC *payload)>
+=item C<void Parrot_cx_send_message(PARROT_INTERP, STRING *messagetype, PMC
+*payload)>
Send a message to a scheduler in a different interpreter/thread.
@@ -749,7 +755,8 @@
/*
-=item C<void Parrot_cx_broadcast_message(PARROT_INTERP, STRING *messagetype, PMC *data)>
+=item C<void Parrot_cx_broadcast_message(PARROT_INTERP, STRING *messagetype, PMC
+*data)>
Send a message to the schedulers in all interpreters/threads linked to this
one.
@@ -981,7 +988,8 @@
=over 4
-=item C<opcode_t * Parrot_cx_schedule_sleep(PARROT_INTERP, FLOATVAL time, opcode_t *next)>
+=item C<opcode_t * Parrot_cx_schedule_sleep(PARROT_INTERP, FLOATVAL time,
+opcode_t *next)>
Add a sleep timer to the scheduler. This function is called by the C<sleep>
opcode.
Modified: trunk/src/spf_render.c
==============================================================================
--- trunk/src/spf_render.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/spf_render.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -115,8 +115,8 @@
/*
-=item C<static STRING * handle_flags(PARROT_INTERP, const SpfInfo *info,
-STRING *str, INTVAL is_int_type, STRING* prefix)>
+=item C<static STRING * handle_flags(PARROT_INTERP, const SpfInfo *info, STRING
+*str, INTVAL is_int_type, STRING* prefix)>
Handles C<+>, C<->, C<0>, C<#>, space, width, and prec.
@@ -220,8 +220,8 @@
/*
-=item C<static STRING* str_append_w_flags(PARROT_INTERP, STRING *dest,
-const SpfInfo *info, STRING *src, STRING *prefix)>
+=item C<static STRING* str_append_w_flags(PARROT_INTERP, STRING *dest, const
+SpfInfo *info, STRING *src, STRING *prefix)>
Used by Parrot_sprintf_format. Prepends supplied prefix for numeric
values. (e.g. 0x for hex.)
@@ -309,8 +309,8 @@
/*
-=item C<STRING * Parrot_sprintf_format(PARROT_INTERP, STRING *pat,
-SPRINTF_OBJ *obj)>
+=item C<STRING * Parrot_sprintf_format(PARROT_INTERP, STRING *pat, SPRINTF_OBJ
+*obj)>
This is the engine that does all the formatting.
Modified: trunk/src/spf_vtable.c
==============================================================================
--- trunk/src/spf_vtable.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/spf_vtable.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -188,7 +188,8 @@
/*
-=item C<static HUGEINTVAL getint_va(PARROT_INTERP, INTVAL size, SPRINTF_OBJ *obj)>
+=item C<static HUGEINTVAL getint_va(PARROT_INTERP, INTVAL size, SPRINTF_OBJ
+*obj)>
Gets an integer out of the C<va_list> in C<obj> and returns it as a
Parrot C<STRING>.
@@ -238,7 +239,8 @@
/*
-=item C<static UHUGEINTVAL getuint_va(PARROT_INTERP, INTVAL size, SPRINTF_OBJ *obj)>
+=item C<static UHUGEINTVAL getuint_va(PARROT_INTERP, INTVAL size, SPRINTF_OBJ
+*obj)>
Gets an unsigned integer out of the C<va_list> in C<obj> and returns it
as a Parrot C<STRING>.
@@ -288,7 +290,8 @@
/*
-=item C<static HUGEFLOATVAL getfloat_va(PARROT_INTERP, INTVAL size, SPRINTF_OBJ *obj)>
+=item C<static HUGEFLOATVAL getfloat_va(PARROT_INTERP, INTVAL size, SPRINTF_OBJ
+*obj)>
Gets an floating-point number out of the C<va_list> in C<obj> and
returns it as a Parrot C<STRING>.
@@ -334,7 +337,8 @@
/*
-=item C<static STRING * getstring_va(PARROT_INTERP, INTVAL size, SPRINTF_OBJ *obj)>
+=item C<static STRING * getstring_va(PARROT_INTERP, INTVAL size, SPRINTF_OBJ
+*obj)>
Gets an string out of the C<va_list> in C<obj> and returns it as a
Parrot C<STRING>.
@@ -419,7 +423,8 @@
=over 4
-=item C<static STRING * getchr_pmc(PARROT_INTERP, INTVAL size, SPRINTF_OBJ *obj)>
+=item C<static STRING * getchr_pmc(PARROT_INTERP, INTVAL size, SPRINTF_OBJ
+*obj)>
Same as C<getchr_va()> except that a vtable is used to get the value
from C<obj>.
@@ -447,7 +452,8 @@
/*
-=item C<static HUGEINTVAL getint_pmc(PARROT_INTERP, INTVAL size, SPRINTF_OBJ *obj)>
+=item C<static HUGEINTVAL getint_pmc(PARROT_INTERP, INTVAL size, SPRINTF_OBJ
+*obj)>
Same as C<getint_va()> except that a vtable is used to get the value
from C<obj>.
@@ -486,7 +492,8 @@
/*
-=item C<static UHUGEINTVAL getuint_pmc(PARROT_INTERP, INTVAL size, SPRINTF_OBJ *obj)>
+=item C<static UHUGEINTVAL getuint_pmc(PARROT_INTERP, INTVAL size, SPRINTF_OBJ
+*obj)>
Same as C<getuint_va()> except that a vtable is used to get the value
from C<obj>.
@@ -525,7 +532,8 @@
/*
-=item C<static HUGEFLOATVAL getfloat_pmc(PARROT_INTERP, INTVAL size, SPRINTF_OBJ *obj)>
+=item C<static HUGEFLOATVAL getfloat_pmc(PARROT_INTERP, INTVAL size, SPRINTF_OBJ
+*obj)>
Same as C<getfloat_va()> except that a vtable is used to get the value
from C<obj>.
@@ -561,7 +569,8 @@
/*
-=item C<static STRING * getstring_pmc(PARROT_INTERP, INTVAL size, SPRINTF_OBJ *obj)>
+=item C<static STRING * getstring_pmc(PARROT_INTERP, INTVAL size, SPRINTF_OBJ
+*obj)>
Same as C<getstring_va()> except that a vtable is used to get the value
from C<obj>.
Modified: trunk/src/stacks.c
==============================================================================
--- trunk/src/stacks.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/stacks.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -58,7 +58,8 @@
/*
-=item C<Stack_Chunk_t * cst_new_stack_chunk(PARROT_INTERP, const Stack_Chunk_t *chunk)>
+=item C<Stack_Chunk_t * cst_new_stack_chunk(PARROT_INTERP, const Stack_Chunk_t
+*chunk)>
Get a new chunk either from the freelist or allocate one.
@@ -192,7 +193,8 @@
/*
-=item C<Stack_Entry_t * stack_entry(PARROT_INTERP, Stack_Chunk_t *stack, INTVAL depth)>
+=item C<Stack_Entry_t * stack_entry(PARROT_INTERP, Stack_Chunk_t *stack, INTVAL
+depth)>
If C<< depth >= 0 >>, return the entry at that depth from the top of the
stack, with 0 being the top entry. If C<depth < 0>, then return the
@@ -234,7 +236,8 @@
/*
-=item C<Stack_Entry_t* stack_prepare_push(PARROT_INTERP, Stack_Chunk_t **stack_p)>
+=item C<Stack_Entry_t* stack_prepare_push(PARROT_INTERP, Stack_Chunk_t
+**stack_p)>
Return a pointer, where new entries go for push.
@@ -260,8 +263,8 @@
/*
-=item C<void stack_push(PARROT_INTERP, Stack_Chunk_t **stack_p,
-void *thing, Stack_entry_type type, Stack_cleanup_method cleanup)>
+=item C<void stack_push(PARROT_INTERP, Stack_Chunk_t **stack_p, void *thing,
+Stack_entry_type type, Stack_cleanup_method cleanup)>
Push something on the generic stack.
@@ -308,7 +311,8 @@
/*
-=item C<Stack_Entry_t* stack_prepare_pop(PARROT_INTERP, Stack_Chunk_t **stack_p)>
+=item C<Stack_Entry_t* stack_prepare_pop(PARROT_INTERP, Stack_Chunk_t
+**stack_p)>
Return a pointer, where new entries are popped off.
@@ -337,8 +341,8 @@
/*
-=item C<void * stack_pop(PARROT_INTERP, Stack_Chunk_t **stack_p,
-void *where, Stack_entry_type type)>
+=item C<void * stack_pop(PARROT_INTERP, Stack_Chunk_t **stack_p, void *where,
+Stack_entry_type type)>
Pop off an entry and return a pointer to the contents.
@@ -473,7 +477,8 @@
/*
-=item C<void Parrot_dump_dynamic_environment(PARROT_INTERP, Stack_Chunk_t *dynamic_env)>
+=item C<void Parrot_dump_dynamic_environment(PARROT_INTERP, Stack_Chunk_t
+*dynamic_env)>
Print a representation of the dynamic stack to the standard error (using
C<Parrot_io_eprintf>). This is used only temporarily for debugging.
Modified: trunk/src/string/api.c
==============================================================================
--- trunk/src/string/api.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/string/api.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -400,8 +400,8 @@
/*
-=item C<const CHARSET * string_rep_compatible(PARROT_INTERP,
-const STRING *a, const STRING *b, const ENCODING **e)>
+=item C<const CHARSET * string_rep_compatible(PARROT_INTERP, const STRING *a,
+const STRING *b, const ENCODING **e)>
Find the "lowest" possible charset and encoding for the given string. E.g.
@@ -468,7 +468,8 @@
/*
-=item C<STRING * Parrot_str_concat(PARROT_INTERP, STRING *a, STRING *b, UINTVAL Uflags)>
+=item C<STRING * Parrot_str_concat(PARROT_INTERP, STRING *a, STRING *b, UINTVAL
+Uflags)>
Concatenates two Parrot strings. If necessary, converts the second
string's encoding and/or type to match those of the first string. If
@@ -597,7 +598,8 @@
/*
-=item C<STRING * Parrot_str_new(PARROT_INTERP, const char * const buffer, const UINTVAL len)>
+=item C<STRING * Parrot_str_new(PARROT_INTERP, const char * const buffer, const
+UINTVAL len)>
Make a Parrot string from a specified C string.
@@ -687,8 +689,8 @@
/*
-=item C<STRING * string_make(PARROT_INTERP, const char *buffer,
-UINTVAL len, const char *charset_name, UINTVAL flags)>
+=item C<STRING * string_make(PARROT_INTERP, const char *buffer, UINTVAL len,
+const char *charset_name, UINTVAL flags)>
Creates and returns a new Parrot string using C<len> bytes of string data read
from C<buffer>.
@@ -740,8 +742,8 @@
/*
-=item C<STRING * Parrot_str_new_init(PARROT_INTERP, const char *buffer,
-UINTVAL len, const ENCODING *encoding, const CHARSET *charset, UINTVAL flags)>
+=item C<STRING * Parrot_str_new_init(PARROT_INTERP, const char *buffer, UINTVAL
+len, const ENCODING *encoding, const CHARSET *charset, UINTVAL flags)>
Given a buffer, its length, an encoding, a character set, and STRING flags,
creates and returns a new string. Don't call this directly.
@@ -882,8 +884,8 @@
/*
-=item C<INTVAL Parrot_str_find_index(PARROT_INTERP, const STRING *s,
-const STRING *s2, INTVAL start)>
+=item C<INTVAL Parrot_str_find_index(PARROT_INTERP, const STRING *s, const
+STRING *s2, INTVAL start)>
Returns the character position of the second Parrot string in the first at or
after C<start>. The return value is a (0 based) offset in characters, not
@@ -1182,8 +1184,8 @@
/*
-=item C<STRING * Parrot_str_replace(PARROT_INTERP, STRING *src,
-INTVAL offset, INTVAL length, STRING *rep, STRING **d)>
+=item C<STRING * Parrot_str_replace(PARROT_INTERP, STRING *src, INTVAL offset,
+INTVAL length, STRING *rep, STRING **d)>
Replaces a sequence of C<length> characters from C<offset> in the first
Parrot string with the second Parrot string, returning what was
@@ -1420,7 +1422,8 @@
/*
-=item C<INTVAL Parrot_str_compare(PARROT_INTERP, const STRING *s1, const STRING *s2)>
+=item C<INTVAL Parrot_str_compare(PARROT_INTERP, const STRING *s1, const STRING
+*s2)>
Compares two strings to each other. If s1 is less than s2, returns -1. If the
strings are equal, returns 0. If s1 is greater than s2, returns 2. This
@@ -1452,7 +1455,8 @@
/*
-=item C<INTVAL Parrot_str_not_equal(PARROT_INTERP, const STRING *s1, const STRING *s2)>
+=item C<INTVAL Parrot_str_not_equal(PARROT_INTERP, const STRING *s1, const
+STRING *s2)>
Compares two Parrot strings, performing type and encoding conversions if
necessary. Returns 1 if the strings are not equal, and 0 otherwise.
@@ -1472,7 +1476,8 @@
/*
-=item C<INTVAL Parrot_str_equal(PARROT_INTERP, const STRING *s1, const STRING *s2)>
+=item C<INTVAL Parrot_str_equal(PARROT_INTERP, const STRING *s1, const STRING
+*s2)>
Compares two Parrot strings, performing type and encoding conversions if
necessary.
@@ -1523,8 +1528,8 @@
/*
-=item C<static void make_writable(PARROT_INTERP, STRING **s,
-const size_t len, parrot_string_representation_t representation)>
+=item C<static void make_writable(PARROT_INTERP, STRING **s, const size_t len,
+parrot_string_representation_t representation)>
Makes the specified Parrot string writable with minimum length C<len>. The
C<representation> argument is required in case a new Parrot string has to be
@@ -1550,8 +1555,8 @@
/*
-=item C<STRING * Parrot_str_bitwise_and(PARROT_INTERP, const STRING *s1,
-const STRING *s2, STRING **dest)>
+=item C<STRING * Parrot_str_bitwise_and(PARROT_INTERP, const STRING *s1, const
+STRING *s2, STRING **dest)>
Performs a bitwise C<AND> on two Parrot string, performing type and encoding
conversions if necessary. If the second string is not C<NULL> then it is
@@ -1702,8 +1707,8 @@
/*
-=item C<STRING * Parrot_str_bitwise_or(PARROT_INTERP, const STRING *s1,
-const STRING *s2, STRING **dest)>
+=item C<STRING * Parrot_str_bitwise_or(PARROT_INTERP, const STRING *s1, const
+STRING *s2, STRING **dest)>
Performs a bitwise C<OR> on two Parrot strings, performing type and encoding
conversions if necessary. If the third string is not C<NULL>, then it is
@@ -1778,8 +1783,8 @@
/*
-=item C<STRING * Parrot_str_bitwise_xor(PARROT_INTERP, const STRING *s1,
-const STRING *s2, STRING **dest)>
+=item C<STRING * Parrot_str_bitwise_xor(PARROT_INTERP, const STRING *s1, const
+STRING *s2, STRING **dest)>
Performs a bitwise C<XOR> on two Parrot strings, performing type and encoding
conversions if necessary. If the second string is not C<NULL>, then it is
@@ -1866,8 +1871,8 @@
/*
-=item C<STRING * Parrot_str_bitwise_not(PARROT_INTERP, const STRING *s,
-STRING **dest)>
+=item C<STRING * Parrot_str_bitwise_not(PARROT_INTERP, const STRING *s, STRING
+**dest)>
Performs a bitwise C<NOT> on a Parrot string. If the second string is
not C<NULL> then it is reused, otherwise a new Parrot string is created.
@@ -2393,8 +2398,8 @@
/*
-=item C<STRING * Parrot_str_escape_truncate(PARROT_INTERP,
-const STRING *src, UINTVAL limit)>
+=item C<STRING * Parrot_str_escape_truncate(PARROT_INTERP, const STRING *src,
+UINTVAL limit)>
Escapes all non-ASCII characters in the given string with backslashed versions,
but limits the length of the output (used for trace output of strings).
@@ -2521,8 +2526,8 @@
/*
-=item C<STRING * Parrot_str_unescape(PARROT_INTERP, const char *cstring,
-char delimiter, const char *enc_char)>
+=item C<STRING * Parrot_str_unescape(PARROT_INTERP, const char *cstring, char
+delimiter, const char *enc_char)>
Unescapes the specified C string. These sequences are covered:
@@ -2845,8 +2850,8 @@
/*
-=item C<INTVAL Parrot_str_is_cclass(PARROT_INTERP, INTVAL flags,
-const STRING *s, UINTVAL offset)>
+=item C<INTVAL Parrot_str_is_cclass(PARROT_INTERP, INTVAL flags, const STRING
+*s, UINTVAL offset)>
Returns 1 if the codepoint of string C<s> at given offset is in the given
character class C<flags>. See also F<include/parrot/cclass.h> for possible
@@ -2897,8 +2902,8 @@
/*
-=item C<INTVAL Parrot_str_find_not_cclass(PARROT_INTERP, INTVAL flags,
-STRING *s, UINTVAL offset, UINTVAL count)>
+=item C<INTVAL Parrot_str_find_not_cclass(PARROT_INTERP, INTVAL flags, STRING
+*s, UINTVAL offset, UINTVAL count)>
Finds the first occurrence of the a character I<not> in the given character
class in C<flags> in the string starting from C<offset> and looking at C<count>
@@ -2925,8 +2930,8 @@
/*
-=item C<STRING* Parrot_str_change_charset(PARROT_INTERP, STRING *src,
-INTVAL charset_nr, STRING *dest)>
+=item C<STRING* Parrot_str_change_charset(PARROT_INTERP, STRING *src, INTVAL
+charset_nr, STRING *dest)>
If C<dest> == NULL, converts C<src> to the given charset or encoding inplace.
Otherwise returns a copy of C<src> with the charset/encoding in C<dest>.
@@ -2984,8 +2989,8 @@
/*
-=item C<STRING* Parrot_str_change_encoding(PARROT_INTERP, STRING *src,
-INTVAL encoding_nr, STRING *dest)>
+=item C<STRING* Parrot_str_change_encoding(PARROT_INTERP, STRING *src, INTVAL
+encoding_nr, STRING *dest)>
If C<dest> == NULL, converts C<src> to the given charset or encoding in place.
Otherwise returns a copy of C<src> with the charset/encoding in C<dest>
@@ -3226,8 +3231,8 @@
/*
-=item C<STRING * Parrot_str_from_int_base(PARROT_INTERP, char *tc,
-HUGEINTVAL num, unsigned int base)>
+=item C<STRING * Parrot_str_from_int_base(PARROT_INTERP, char *tc, HUGEINTVAL
+num, unsigned int base)>
Returns C<num> converted to a Parrot C<STRING>.
Modified: trunk/src/string/charset.c
==============================================================================
--- trunk/src/string/charset.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/string/charset.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -140,7 +140,8 @@
/*
-=item C<const CHARSET * Parrot_find_charset(PARROT_INTERP, const char *charsetname)>
+=item C<const CHARSET * Parrot_find_charset(PARROT_INTERP, const char
+*charsetname)>
Searches through the list of charsets for the charset given by C<charsetname>.
Returns the charset if it is found, NULL otherwise.
@@ -267,7 +268,8 @@
/*
-=item C<const CHARSET * Parrot_get_charset(PARROT_INTERP, INTVAL number_of_charset)>
+=item C<const CHARSET * Parrot_get_charset(PARROT_INTERP, INTVAL
+number_of_charset)>
Returns the charset given by the INTVAL index C<number_of_charset>.
@@ -289,7 +291,8 @@
/*
-=item C<const char * Parrot_charset_c_name(PARROT_INTERP, INTVAL number_of_charset)>
+=item C<const char * Parrot_charset_c_name(PARROT_INTERP, INTVAL
+number_of_charset)>
Returns a NULL-terminated C string with the name of the charset given by
INTVAL index C<number_of_charset>.
@@ -505,8 +508,8 @@
/*
-=item C<INTVAL Parrot_make_default_charset(PARROT_INTERP,
-const char *charsetname, CHARSET *charset)>
+=item C<INTVAL Parrot_make_default_charset(PARROT_INTERP, const char
+*charsetname, CHARSET *charset)>
Sets the current default charset to C<charset> with name C<charsetname>.
@@ -546,8 +549,8 @@
/*
-=item C<charset_converter_t Parrot_find_charset_converter(PARROT_INTERP,
-const CHARSET *lhs, const CHARSET *rhs)>
+=item C<charset_converter_t Parrot_find_charset_converter(PARROT_INTERP, const
+CHARSET *lhs, const CHARSET *rhs)>
Finds a converter from charset C<lhs> to charset C<rhs>.
@@ -583,8 +586,8 @@
/*
-=item C<void Parrot_register_charset_converter(PARROT_INTERP,
-const CHARSET *lhs, CHARSET *rhs, charset_converter_t func)>
+=item C<void Parrot_register_charset_converter(PARROT_INTERP, const CHARSET
+*lhs, CHARSET *rhs, charset_converter_t func)>
Registers a converter C<func> from charset C<lhs> to C<rhs>.
Modified: trunk/src/string/charset/ascii.c
==============================================================================
--- trunk/src/string/charset/ascii.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/string/charset/ascii.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -202,8 +202,8 @@
/*
-=item C<static void set_graphemes(PARROT_INTERP, STRING *source_string,
-UINTVAL offset, UINTVAL replace_count, STRING *insert_string)>
+=item C<static void set_graphemes(PARROT_INTERP, STRING *source_string, UINTVAL
+offset, UINTVAL replace_count, STRING *insert_string)>
Sets the graphemes for C<source_string>, starting at C<offset>. Replace
C<replace_count> graphemes with those from STRING C<insert_string>.
@@ -224,8 +224,8 @@
/*
-=item C<STRING * ascii_get_graphemes_inplace(PARROT_INTERP,
-STRING *source_string, UINTVAL offset, UINTVAL count, STRING *dest_string)>
+=item C<STRING * ascii_get_graphemes_inplace(PARROT_INTERP, STRING
+*source_string, UINTVAL offset, UINTVAL count, STRING *dest_string)>
Retrieves the graphemes in place for ascii STRING C<source_string>,
starting at C<offset>. Retrieves C<count> graphemes and puts them
@@ -530,7 +530,8 @@
/*
-=item C<INTVAL ascii_compare(PARROT_INTERP, const STRING *lhs, const STRING *rhs)>
+=item C<INTVAL ascii_compare(PARROT_INTERP, const STRING *lhs, const STRING
+*rhs)>
Compares two strings as ASCII strings. If STRING C<lhs> > C<rhs>, returns
1. If C<lhs> == C<rhs> returns 0. If STRING C<lhs> < C<rhs>, returns -1.
@@ -625,8 +626,8 @@
/*
-=item C<INTVAL ascii_cs_index(PARROT_INTERP, STRING *source_string,
-STRING *search_string, UINTVAL offset)>
+=item C<INTVAL ascii_cs_index(PARROT_INTERP, STRING *source_string, STRING
+*search_string, UINTVAL offset)>
Searches for the first instance of STRING C<search> in STRING C<src>.
returns the position where the substring is found if it is indeed found.
@@ -655,8 +656,8 @@
/*
-=item C<INTVAL ascii_cs_rindex(PARROT_INTERP, STRING *source_string,
-STRING *search_string, UINTVAL offset)>
+=item C<INTVAL ascii_cs_rindex(PARROT_INTERP, STRING *source_string, STRING
+*search_string, UINTVAL offset)>
Searches for the last instance of STRING C<search_string> in STRING
C<source_string>. Starts searching at C<offset>.
@@ -735,8 +736,8 @@
/*
-=item C<static INTVAL is_cclass(PARROT_INTERP, INTVAL flags,
-const STRING *source_string, UINTVAL offset)>
+=item C<static INTVAL is_cclass(PARROT_INTERP, INTVAL flags, const STRING
+*source_string, UINTVAL offset)>
=cut
@@ -762,8 +763,8 @@
/*
-=item C<static INTVAL find_cclass(PARROT_INTERP, INTVAL flags,
-STRING *source_string, UINTVAL offset, UINTVAL count)>
+=item C<static INTVAL find_cclass(PARROT_INTERP, INTVAL flags, STRING
+*source_string, UINTVAL offset, UINTVAL count)>
=cut
@@ -790,8 +791,8 @@
/*
-=item C<static INTVAL find_not_cclass(PARROT_INTERP, INTVAL flags,
-STRING *source_string, UINTVAL offset, UINTVAL count)>
+=item C<static INTVAL find_not_cclass(PARROT_INTERP, INTVAL flags, STRING
+*source_string, UINTVAL offset, UINTVAL count)>
=cut
@@ -817,7 +818,8 @@
/*
-=item C<size_t ascii_compute_hash(PARROT_INTERP, const STRING *source_string, size_t seed)>
+=item C<size_t ascii_compute_hash(PARROT_INTERP, const STRING *source_string,
+size_t seed)>
Computes the hash of STRING C<source_string> starting with seed value
C<seed>.
@@ -894,7 +896,8 @@
/*
-=item C<STRING * charset_cvt_ascii_to_binary(PARROT_INTERP, STRING *src, STRING *dest)>
+=item C<STRING * charset_cvt_ascii_to_binary(PARROT_INTERP, STRING *src, STRING
+*dest)>
Converts an ASCII STRING C<src> to a binary STRING C<dest>.
Modified: trunk/src/string/charset/binary.c
==============================================================================
--- trunk/src/string/charset/binary.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/string/charset/binary.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -154,8 +154,8 @@
/*
-=item C<static void set_graphemes(PARROT_INTERP, STRING *source_string,
-UINTVAL offset, UINTVAL replace_count, STRING *insert_string)>
+=item C<static void set_graphemes(PARROT_INTERP, STRING *source_string, UINTVAL
+offset, UINTVAL replace_count, STRING *insert_string)>
Sets the graphemes for STRING C<source_string>, starting at offset
C<offset>. Replaces C<replace_count> graphemes from STRING
@@ -348,7 +348,8 @@
/*
-=item C<static INTVAL compare(PARROT_INTERP, const STRING *lhs, const STRING *rhs)>
+=item C<static INTVAL compare(PARROT_INTERP, const STRING *lhs, const STRING
+*rhs)>
Compare the two buffers, first by size, then with memcmp.
@@ -370,8 +371,8 @@
/*
-=item C<static INTVAL cs_index(PARROT_INTERP, STRING *source_string,
-STRING *search_string, UINTVAL offset)>
+=item C<static INTVAL cs_index(PARROT_INTERP, STRING *source_string, STRING
+*search_string, UINTVAL offset)>
Returns -1. It makes no sense to try and search for a substring in
raw binary data.
@@ -390,8 +391,8 @@
/*
-=item C<static INTVAL cs_rindex(PARROT_INTERP, STRING *source_string,
-STRING *search_string, UINTVAL offset)>
+=item C<static INTVAL cs_rindex(PARROT_INTERP, STRING *source_string, STRING
+*search_string, UINTVAL offset)>
Returns -1. It makes no sense to search for the last substring match
in raw binary data.
@@ -428,8 +429,8 @@
/*
-=item C<static INTVAL is_cclass(PARROT_INTERP, INTVAL flags,
-const STRING *source_string, UINTVAL offset)>
+=item C<static INTVAL is_cclass(PARROT_INTERP, INTVAL flags, const STRING
+*source_string, UINTVAL offset)>
=cut
@@ -445,8 +446,8 @@
/*
-=item C<static INTVAL find_cclass(PARROT_INTERP, INTVAL flags,
-STRING *source_string, UINTVAL offset, UINTVAL count)>
+=item C<static INTVAL find_cclass(PARROT_INTERP, INTVAL flags, STRING
+*source_string, UINTVAL offset, UINTVAL count)>
=cut
@@ -462,8 +463,8 @@
/*
-=item C<static INTVAL find_not_cclass(PARROT_INTERP, INTVAL flags,
-STRING *source_string, UINTVAL offset, UINTVAL count)>
+=item C<static INTVAL find_not_cclass(PARROT_INTERP, INTVAL flags, STRING
+*source_string, UINTVAL offset, UINTVAL count)>
=cut
Modified: trunk/src/string/charset/iso-8859-1.c
==============================================================================
--- trunk/src/string/charset/iso-8859-1.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/string/charset/iso-8859-1.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -181,8 +181,8 @@
/*
-=item C<static void set_graphemes(PARROT_INTERP, STRING *source_string,
-UINTVAL offset, UINTVAL replace_count, STRING *insert_string)>
+=item C<static void set_graphemes(PARROT_INTERP, STRING *source_string, UINTVAL
+offset, UINTVAL replace_count, STRING *insert_string)>
Sets C<replace_count> graphemes in STRING C<source_string> starting at offset C<offset>.
Gets the replacement graphemes from STRING C<insert_string>.
@@ -562,8 +562,8 @@
/*
-=item C<static INTVAL is_cclass(PARROT_INTERP, INTVAL flags,
-const STRING *source_string, UINTVAL offset)>
+=item C<static INTVAL is_cclass(PARROT_INTERP, INTVAL flags, const STRING
+*source_string, UINTVAL offset)>
=cut
@@ -588,8 +588,8 @@
/*
-=item C<static INTVAL find_cclass(PARROT_INTERP, INTVAL flags,
-STRING *source_string, UINTVAL offset, UINTVAL count)>
+=item C<static INTVAL find_cclass(PARROT_INTERP, INTVAL flags, STRING
+*source_string, UINTVAL offset, UINTVAL count)>
=cut
@@ -616,8 +616,8 @@
/*
-=item C<static INTVAL find_not_cclass(PARROT_INTERP, INTVAL flags,
-STRING *source_string, UINTVAL offset, UINTVAL count)>
+=item C<static INTVAL find_not_cclass(PARROT_INTERP, INTVAL flags, STRING
+*source_string, UINTVAL offset, UINTVAL count)>
=cut
@@ -713,7 +713,8 @@
/*
-=item C<STRING * charset_cvt_iso_8859_1_to_ascii(PARROT_INTERP, STRING *src, STRING *dest)>
+=item C<STRING * charset_cvt_iso_8859_1_to_ascii(PARROT_INTERP, STRING *src,
+STRING *dest)>
Converts STRING C<src> in ISO-8859-1 to ASCII STRING C<dest>.
Modified: trunk/src/string/charset/unicode.c
==============================================================================
--- trunk/src/string/charset/unicode.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/string/charset/unicode.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -225,8 +225,8 @@
/*
-=item C<static void set_graphemes(PARROT_INTERP, STRING *source_string,
-UINTVAL offset, UINTVAL replace_count, STRING *insert_string)>
+=item C<static void set_graphemes(PARROT_INTERP, STRING *source_string, UINTVAL
+offset, UINTVAL replace_count, STRING *insert_string)>
Sets C<replace_count> graphemes in STRING C<source_string> starting at offset
C<offset>. Gets the graphemes to be replaced from STRING C<insert_string>.
@@ -269,8 +269,8 @@
/*
-=item C<static STRING * get_graphemes_inplace(PARROT_INTERP,
-STRING *source_string, UINTVAL offset, UINTVAL count, STRING *dest_string)>
+=item C<static STRING * get_graphemes_inplace(PARROT_INTERP, STRING
+*source_string, UINTVAL offset, UINTVAL count, STRING *dest_string)>
Gets C<count> graphemes in place from STRING C<source_string> starting at
offset C<offset>. Puts them into STRING C<dest_string>.
@@ -688,7 +688,8 @@
/*
-=item C<static INTVAL compare(PARROT_INTERP, const STRING *lhs, const STRING *rhs)>
+=item C<static INTVAL compare(PARROT_INTERP, const STRING *lhs, const STRING
+*rhs)>
Compares two STRINGs, C<lhs> and C<rhs>. Returns -1 if C<lhs> < C<rhs>. Returns
0 if C<lhs> = C<rhs>. Returns 1 if C<lhs> > C<rhs>.
@@ -733,8 +734,8 @@
/*
-=item C<static INTVAL cs_rindex(PARROT_INTERP, STRING *source_string,
-STRING *search_string, UINTVAL offset)>
+=item C<static INTVAL cs_rindex(PARROT_INTERP, STRING *source_string, STRING
+*search_string, UINTVAL offset)>
Finds the last index of substring C<search_string> in STRING C<source_string>,
starting from C<offset>. Not implemented.
@@ -880,8 +881,8 @@
/*
-=item C<static INTVAL is_cclass(PARROT_INTERP, INTVAL flags,
-const STRING *source_string, UINTVAL offset)>
+=item C<static INTVAL is_cclass(PARROT_INTERP, INTVAL flags, const STRING
+*source_string, UINTVAL offset)>
=cut
@@ -908,8 +909,8 @@
/*
-=item C<static INTVAL find_cclass(PARROT_INTERP, INTVAL flags,
-STRING *source_string, UINTVAL offset, UINTVAL count)>
+=item C<static INTVAL find_cclass(PARROT_INTERP, INTVAL flags, STRING
+*source_string, UINTVAL offset, UINTVAL count)>
=cut
@@ -949,8 +950,8 @@
/*
-=item C<static INTVAL find_not_cclass(PARROT_INTERP, INTVAL flags,
-STRING *source_string, UINTVAL offset, UINTVAL count)>
+=item C<static INTVAL find_not_cclass(PARROT_INTERP, INTVAL flags, STRING
+*source_string, UINTVAL offset, UINTVAL count)>
=cut
@@ -1026,7 +1027,8 @@
/*
-=item C<static size_t compute_hash(PARROT_INTERP, const STRING *src, size_t seed)>
+=item C<static size_t compute_hash(PARROT_INTERP, const STRING *src, size_t
+seed)>
Computes the hash of the given STRING C<src> with starting seed value C<seed>.
Modified: trunk/src/string/encoding.c
==============================================================================
--- trunk/src/string/encoding.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/string/encoding.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -103,7 +103,8 @@
/*
-=item C<const ENCODING * Parrot_find_encoding(PARROT_INTERP, const char *encodingname)>
+=item C<const ENCODING * Parrot_find_encoding(PARROT_INTERP, const char
+*encodingname)>
Finds an encoding with the name C<encodingname>. Returns the encoding
if it is successfully found, returns NULL otherwise.
@@ -130,7 +131,8 @@
/*
-=item C<const ENCODING * Parrot_load_encoding(PARROT_INTERP, const char *encodingname)>
+=item C<const ENCODING * Parrot_load_encoding(PARROT_INTERP, const char
+*encodingname)>
Loads an encoding. Currently throws an exception because we cannot load
encodings. See RT #58186.
@@ -161,7 +163,8 @@
/*
-=item C<INTVAL Parrot_encoding_number(PARROT_INTERP, const STRING *encodingname)>
+=item C<INTVAL Parrot_encoding_number(PARROT_INTERP, const STRING
+*encodingname)>
Return the number of the encoding or -1 if not found.
@@ -237,7 +240,8 @@
/*
-=item C<const ENCODING* Parrot_get_encoding(PARROT_INTERP, INTVAL number_of_encoding)>
+=item C<const ENCODING* Parrot_get_encoding(PARROT_INTERP, INTVAL
+number_of_encoding)>
Returns the encoding given by the INTVAL index C<number_of_encoding>.
@@ -260,7 +264,8 @@
/*
-=item C<const char * Parrot_encoding_c_name(PARROT_INTERP, INTVAL number_of_encoding)>
+=item C<const char * Parrot_encoding_c_name(PARROT_INTERP, INTVAL
+number_of_encoding)>
Returns the NULL-terminated C string representation of the encodings name
given by the C<number_of_encoding>.
@@ -393,8 +398,8 @@
/*
-=item C<INTVAL Parrot_make_default_encoding(PARROT_INTERP,
-const char *encodingname, ENCODING *encoding)>
+=item C<INTVAL Parrot_make_default_encoding(PARROT_INTERP, const char
+*encodingname, ENCODING *encoding)>
Sets the default encoding to C<encoding> with name C<encodingname>.
Modified: trunk/src/string/encoding/fixed_8.c
==============================================================================
--- trunk/src/string/encoding/fixed_8.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/string/encoding/fixed_8.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -261,8 +261,8 @@
/*
-=item C<static void set_codepoint(PARROT_INTERP, STRING *source_string,
-UINTVAL offset, UINTVAL codepoint)>
+=item C<static void set_codepoint(PARROT_INTERP, STRING *source_string, UINTVAL
+offset, UINTVAL codepoint)>
This is the same as set byte
@@ -280,7 +280,8 @@
/*
-=item C<static UINTVAL get_byte(PARROT_INTERP, const STRING *source_string, UINTVAL offset)>
+=item C<static UINTVAL get_byte(PARROT_INTERP, const STRING *source_string,
+UINTVAL offset)>
Returns the byte in string C<src> at position C<offset>.
@@ -307,8 +308,8 @@
/*
-=item C<static void set_byte(PARROT_INTERP, const STRING *source_string,
-UINTVAL offset, UINTVAL byte)>
+=item C<static void set_byte(PARROT_INTERP, const STRING *source_string, UINTVAL
+offset, UINTVAL byte)>
Sets, in string C<src> at position C<offset>, the byte C<byte>.
@@ -358,8 +359,8 @@
/*
-=item C<static STRING * get_bytes(PARROT_INTERP, STRING *source_string,
-UINTVAL offset, UINTVAL count)>
+=item C<static STRING * get_bytes(PARROT_INTERP, STRING *source_string, UINTVAL
+offset, UINTVAL count)>
Returns the bytes in string C<src> at position C<offset> and length C<count>.
@@ -390,8 +391,8 @@
/*
-=item C<static STRING * get_codepoints_inplace(PARROT_INTERP,
-STRING *source_string, UINTVAL offset, UINTVAL count, STRING *dest_string)>
+=item C<static STRING * get_codepoints_inplace(PARROT_INTERP, STRING
+*source_string, UINTVAL offset, UINTVAL count, STRING *dest_string)>
Gets from string C<src> at position C<offset> C<count> codepoints and returns
them in C<return_string>. (Delegates to C<get_bytes>.)
@@ -443,8 +444,8 @@
/*
-=item C<static void set_codepoints(PARROT_INTERP, STRING *source_string,
-UINTVAL offset, UINTVAL count, STRING *new_codepoints)>
+=item C<static void set_codepoints(PARROT_INTERP, STRING *source_string, UINTVAL
+offset, UINTVAL count, STRING *new_codepoints)>
Delegate to set_bytes
@@ -462,8 +463,8 @@
/*
-=item C<static void set_bytes(PARROT_INTERP, STRING *source_string,
-UINTVAL offset, UINTVAL count, STRING *new_bytes)>
+=item C<static void set_bytes(PARROT_INTERP, STRING *source_string, UINTVAL
+offset, UINTVAL count, STRING *new_bytes)>
Replaces in string C<src> at position C<offset> for C<count> bytes with the
contents of string C<new_bytes>.
@@ -557,7 +558,8 @@
/*
-=item C<static void fixed8_set_next(PARROT_INTERP, String_iter *iter, UINTVAL c)>
+=item C<static void fixed8_set_next(PARROT_INTERP, String_iter *iter, UINTVAL
+c)>
With the string iterator C<i>, appends the codepoint C<c> and advances to the
next position in the string.
@@ -576,7 +578,8 @@
/*
-=item C<static void fixed8_set_position(PARROT_INTERP, String_iter *iter, UINTVAL pos)>
+=item C<static void fixed8_set_position(PARROT_INTERP, String_iter *iter,
+UINTVAL pos)>
Moves the string iterator C<i> to the position C<n> in the string.
@@ -595,7 +598,8 @@
/*
-=item C<static void iter_init(PARROT_INTERP, const STRING *src, String_iter *iter)>
+=item C<static void iter_init(PARROT_INTERP, const STRING *src, String_iter
+*iter)>
Initializes for string C<src> the string iterator C<iter>.
Modified: trunk/src/string/encoding/ucs2.c
==============================================================================
--- trunk/src/string/encoding/ucs2.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/string/encoding/ucs2.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -239,7 +239,8 @@
/*
-=item C<static UINTVAL get_codepoint(PARROT_INTERP, const STRING *src, UINTVAL offset)>
+=item C<static UINTVAL get_codepoint(PARROT_INTERP, const STRING *src, UINTVAL
+offset)>
Returns the codepoint in string C<src> at position C<offset>.
@@ -262,7 +263,8 @@
/*
-=item C<static void set_codepoint(PARROT_INTERP, STRING *src, UINTVAL offset, UINTVAL codepoint)>
+=item C<static void set_codepoint(PARROT_INTERP, STRING *src, UINTVAL offset,
+UINTVAL codepoint)>
Sets, in string C<src> at position C<offset>, the codepoint C<codepoint>.
@@ -286,7 +288,8 @@
/*
-=item C<static UINTVAL get_byte(PARROT_INTERP, const STRING *src, UINTVAL offset)>
+=item C<static UINTVAL get_byte(PARROT_INTERP, const STRING *src, UINTVAL
+offset)>
Returns the byte in string C<src> at position C<offset>.
@@ -303,7 +306,8 @@
/*
-=item C<static void set_byte(PARROT_INTERP, const STRING *src, UINTVAL offset, UINTVAL byte)>
+=item C<static void set_byte(PARROT_INTERP, const STRING *src, UINTVAL offset,
+UINTVAL byte)>
Sets, in string C<src> at position C<offset>, the byte C<byte>.
@@ -320,7 +324,8 @@
/*
-=item C<static STRING * get_codepoints(PARROT_INTERP, STRING *src, UINTVAL offset, UINTVAL count)>
+=item C<static STRING * get_codepoints(PARROT_INTERP, STRING *src, UINTVAL
+offset, UINTVAL count)>
Returns the codepoints in string C<src> at position C<offset> and length
C<count>.
@@ -359,7 +364,8 @@
/*
-=item C<static STRING * get_bytes(PARROT_INTERP, STRING *src, UINTVAL offset, UINTVAL count)>
+=item C<static STRING * get_bytes(PARROT_INTERP, STRING *src, UINTVAL offset,
+UINTVAL count)>
Returns the bytes in string C<src> at position C<offset> and length C<count>.
@@ -401,8 +407,8 @@
/*
-=item C<static STRING * get_bytes_inplace(PARROT_INTERP, STRING *src,
-UINTVAL offset, UINTVAL count, STRING *return_string)>
+=item C<static STRING * get_bytes_inplace(PARROT_INTERP, STRING *src, UINTVAL
+offset, UINTVAL count, STRING *return_string)>
Gets from string C<src> at position C<offset> C<count> bytes and returns them
in C<return_string>.
@@ -423,8 +429,8 @@
/*
-=item C<static void set_codepoints(PARROT_INTERP, STRING *src,
-UINTVAL offset, UINTVAL count, STRING *new_codepoints)>
+=item C<static void set_codepoints(PARROT_INTERP, STRING *src, UINTVAL offset,
+UINTVAL count, STRING *new_codepoints)>
Replaces in string C<src> at position C<offset> for C<count> codepoints with
the contents of string C<new_codepoints>.
@@ -443,8 +449,8 @@
/*
-=item C<static void set_bytes(PARROT_INTERP, STRING *src,
-UINTVAL offset, UINTVAL count, STRING *new_bytes)>
+=item C<static void set_bytes(PARROT_INTERP, STRING *src, UINTVAL offset,
+UINTVAL count, STRING *new_bytes)>
Replaces in string C<src> at position C<offset> for C<count> bytes with the
contents of string C<new_bytes>.
@@ -549,7 +555,8 @@
/*
-=item C<static void ucs2_encode_and_advance(PARROT_INTERP, String_iter *i, UINTVAL c)>
+=item C<static void ucs2_encode_and_advance(PARROT_INTERP, String_iter *i,
+UINTVAL c)>
With the string iterator C<i>, appends the codepoint C<c> and advances to the
next position in the string.
@@ -591,7 +598,8 @@
/*
-=item C<static void iter_init(PARROT_INTERP, const STRING *src, String_iter *iter)>
+=item C<static void iter_init(PARROT_INTERP, const STRING *src, String_iter
+*iter)>
Initializes for string C<src> the string iterator C<iter>.
Modified: trunk/src/string/encoding/utf16.c
==============================================================================
--- trunk/src/string/encoding/utf16.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/string/encoding/utf16.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -338,7 +338,8 @@
/*
-=item C<static UINTVAL get_codepoint(PARROT_INTERP, const STRING *src, UINTVAL offset)>
+=item C<static UINTVAL get_codepoint(PARROT_INTERP, const STRING *src, UINTVAL
+offset)>
Returns the codepoint in string C<src> at position C<offset>.
@@ -369,7 +370,8 @@
/*
-=item C<static void set_codepoint(PARROT_INTERP, STRING *src, UINTVAL offset, UINTVAL codepoint)>
+=item C<static void set_codepoint(PARROT_INTERP, STRING *src, UINTVAL offset,
+UINTVAL codepoint)>
Sets, in string C<src> at position C<offset>, the codepoint C<codepoint>.
@@ -390,7 +392,8 @@
/*
-=item C<static UINTVAL get_byte(PARROT_INTERP, const STRING *src, UINTVAL offset)>
+=item C<static UINTVAL get_byte(PARROT_INTERP, const STRING *src, UINTVAL
+offset)>
Returns the byte in string C<src> at position C<offset>.
@@ -414,7 +417,8 @@
/*
-=item C<static void set_byte(PARROT_INTERP, const STRING *src, UINTVAL offset, UINTVAL byte)>
+=item C<static void set_byte(PARROT_INTERP, const STRING *src, UINTVAL offset,
+UINTVAL byte)>
Sets, in string C<src> at position C<offset>, the byte C<byte>.
@@ -438,7 +442,8 @@
/*
-=item C<static STRING * get_codepoints(PARROT_INTERP, STRING *src, UINTVAL offset, UINTVAL count)>
+=item C<static STRING * get_codepoints(PARROT_INTERP, STRING *src, UINTVAL
+offset, UINTVAL count)>
Returns the codepoints in string C<src> at position C<offset> and length
C<count>.
@@ -504,7 +509,8 @@
/*
-=item C<static STRING * get_bytes(PARROT_INTERP, STRING *src, UINTVAL offset, UINTVAL count)>
+=item C<static STRING * get_bytes(PARROT_INTERP, STRING *src, UINTVAL offset,
+UINTVAL count)>
Returns the bytes in string C<src> at position C<offset> and length C<count>.
@@ -527,8 +533,8 @@
/*
-=item C<static STRING * get_bytes_inplace(PARROT_INTERP, STRING *src,
-UINTVAL offset, UINTVAL count, STRING *return_string)>
+=item C<static STRING * get_bytes_inplace(PARROT_INTERP, STRING *src, UINTVAL
+offset, UINTVAL count, STRING *return_string)>
Gets from string C<src> at position C<offset> C<count> bytes and returns them
in C<return_string>.
@@ -554,8 +560,8 @@
/*
-=item C<static void set_codepoints(PARROT_INTERP, STRING *src,
-UINTVAL offset, UINTVAL count, STRING *new_codepoints)>
+=item C<static void set_codepoints(PARROT_INTERP, STRING *src, UINTVAL offset,
+UINTVAL count, STRING *new_codepoints)>
Replaces in string C<src> at position C<offset> for C<count> codepoints with
the contents of string C<new_codepoints>.
@@ -579,8 +585,8 @@
/*
-=item C<static void set_bytes(PARROT_INTERP, STRING *src,
-UINTVAL offset, UINTVAL count, STRING *new_bytes)>
+=item C<static void set_bytes(PARROT_INTERP, STRING *src, UINTVAL offset,
+UINTVAL count, STRING *new_bytes)>
Replaces in string C<src> at position C<offset> for C<count> bytes with the
contents of string C<new_bytes>.
@@ -692,7 +698,8 @@
/*
-=item C<static void utf16_encode_and_advance(PARROT_INTERP, String_iter *i, UINTVAL c)>
+=item C<static void utf16_encode_and_advance(PARROT_INTERP, String_iter *i,
+UINTVAL c)>
With the string iterator C<i>, appends the codepoint C<c> and advances to the
next position in the string.
@@ -715,7 +722,8 @@
/*
-=item C<static void utf16_set_position(PARROT_INTERP, String_iter *i, UINTVAL n)>
+=item C<static void utf16_set_position(PARROT_INTERP, String_iter *i, UINTVAL
+n)>
Moves the string iterator C<i> to the position C<n> in the string.
@@ -739,7 +747,8 @@
/*
-=item C<static void iter_init(PARROT_INTERP, const STRING *src, String_iter *iter)>
+=item C<static void iter_init(PARROT_INTERP, const STRING *src, String_iter
+*iter)>
Initializes for string C<src> the string iterator C<iter>.
Modified: trunk/src/string/encoding/utf8.c
==============================================================================
--- trunk/src/string/encoding/utf8.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/string/encoding/utf8.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -266,8 +266,8 @@
/*
-=item C<static UINTVAL utf8_characters(PARROT_INTERP, const utf8_t *ptr,
-UINTVAL byte_len)>
+=item C<static UINTVAL utf8_characters(PARROT_INTERP, const utf8_t *ptr, UINTVAL
+byte_len)>
Returns the number of characters in the C<byte_len> bytes from C<*ptr>.
@@ -516,7 +516,8 @@
/*
-=item C<static void utf8_set_position(PARROT_INTERP, String_iter *i, UINTVAL pos)>
+=item C<static void utf8_set_position(PARROT_INTERP, String_iter *i, UINTVAL
+pos)>
The UTF-8 implementation of the string iterator's C<set_position>
function.
@@ -639,7 +640,8 @@
/*
-=item C<static UINTVAL get_codepoint(PARROT_INTERP, const STRING *src, UINTVAL offset)>
+=item C<static UINTVAL get_codepoint(PARROT_INTERP, const STRING *src, UINTVAL
+offset)>
Returns the codepoint in string C<src> at position C<offset>.
@@ -657,7 +659,8 @@
/*
-=item C<static void set_codepoint(PARROT_INTERP, STRING *src, UINTVAL offset, UINTVAL codepoint)>
+=item C<static void set_codepoint(PARROT_INTERP, STRING *src, UINTVAL offset,
+UINTVAL codepoint)>
Sets, in string C<src> at position C<offset>, the codepoint C<codepoint>.
@@ -680,7 +683,8 @@
/*
-=item C<static UINTVAL get_byte(PARROT_INTERP, const STRING *src, UINTVAL offset)>
+=item C<static UINTVAL get_byte(PARROT_INTERP, const STRING *src, UINTVAL
+offset)>
Returns the byte in string C<src> at position C<offset>.
@@ -704,8 +708,8 @@
/*
-=item C<static void set_byte(PARROT_INTERP, const STRING *src,
-UINTVAL offset, UINTVAL byte)>
+=item C<static void set_byte(PARROT_INTERP, const STRING *src, UINTVAL offset,
+UINTVAL byte)>
Sets, in string C<src> at position C<offset>, the byte C<byte>.
@@ -730,7 +734,8 @@
/*
-=item C<static STRING * get_codepoints(PARROT_INTERP, STRING *src, UINTVAL offset, UINTVAL count)>
+=item C<static STRING * get_codepoints(PARROT_INTERP, STRING *src, UINTVAL
+offset, UINTVAL count)>
Returns the codepoints in string C<src> at position C<offset> and length
C<count>.
@@ -769,7 +774,8 @@
/*
-=item C<static STRING * get_bytes(PARROT_INTERP, STRING *src, UINTVAL offset, UINTVAL count)>
+=item C<static STRING * get_bytes(PARROT_INTERP, STRING *src, UINTVAL offset,
+UINTVAL count)>
Returns the bytes in string C<src> at position C<offset> and length C<count>.
@@ -835,8 +841,8 @@
/*
-=item C<static STRING * get_bytes_inplace(PARROT_INTERP, STRING *src,
-UINTVAL offset, UINTVAL count, STRING *return_string)>
+=item C<static STRING * get_bytes_inplace(PARROT_INTERP, STRING *src, UINTVAL
+offset, UINTVAL count, STRING *return_string)>
Gets from string C<src> at position C<offset> C<count> bytes and returns them
in C<return_string>.
@@ -856,8 +862,8 @@
/*
-=item C<static void set_codepoints(PARROT_INTERP, STRING *src,
-UINTVAL offset, UINTVAL count, STRING *new_codepoints)>
+=item C<static void set_codepoints(PARROT_INTERP, STRING *src, UINTVAL offset,
+UINTVAL count, STRING *new_codepoints)>
Replaces in string C<src> at position C<offset> for C<count> codepoints with
the contents of string C<new_codepoints>.
@@ -876,8 +882,8 @@
/*
-=item C<static void set_bytes(PARROT_INTERP, STRING *src,
-UINTVAL offset, UINTVAL count, STRING *new_bytes)>
+=item C<static void set_bytes(PARROT_INTERP, STRING *src, UINTVAL offset,
+UINTVAL count, STRING *new_bytes)>
Replaces in string C<src> at position C<offset> for C<count> bytes with the
contents of string C<new_bytes>.
@@ -957,7 +963,8 @@
/*
-=item C<static void iter_init(PARROT_INTERP, const STRING *src, String_iter *iter)>
+=item C<static void iter_init(PARROT_INTERP, const STRING *src, String_iter
+*iter)>
Initializes for string C<src> the string iterator C<iter>.
Modified: trunk/src/string/primitives.c
==============================================================================
--- trunk/src/string/primitives.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/string/primitives.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -70,8 +70,8 @@
/*
-=item C<Parrot_UInt4 string_unescape_one(PARROT_INTERP, UINTVAL *offset,
-STRING *string)>
+=item C<Parrot_UInt4 string_unescape_one(PARROT_INTERP, UINTVAL *offset, STRING
+*string)>
Unescape a single character. We assume that we're at the start of a
sequence, right after the \.
Modified: trunk/src/sub.c
==============================================================================
--- trunk/src/sub.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/sub.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -487,7 +487,8 @@
/*
-=item C<STRING* Parrot_Context_infostr(PARROT_INTERP, const Parrot_Context *ctx)>
+=item C<STRING* Parrot_Context_infostr(PARROT_INTERP, const Parrot_Context
+*ctx)>
Formats context information for display. Takes a context pointer and
returns a pointer to the text. Used in debug.c and warnings.c
@@ -524,7 +525,8 @@
/*
-=item C<PMC* Parrot_find_pad(PARROT_INTERP, STRING *lex_name, const Parrot_Context *ctx)>
+=item C<PMC* Parrot_find_pad(PARROT_INTERP, STRING *lex_name, const
+Parrot_Context *ctx)>
Locate the LexPad containing the given name. Return NULL on failure.
@@ -667,8 +669,8 @@
/*
-=item C<void Parrot_continuation_check(PARROT_INTERP, const PMC *pmc,
-const Parrot_cont *cc)>
+=item C<void Parrot_continuation_check(PARROT_INTERP, const PMC *pmc, const
+Parrot_cont *cc)>
Verifies that the provided continuation is sane.
@@ -732,7 +734,8 @@
/*
-=item C<Parrot_sub * Parrot_get_sub_pmc_from_subclass(PARROT_INTERP, PMC *subclass)>
+=item C<Parrot_sub * Parrot_get_sub_pmc_from_subclass(PARROT_INTERP, PMC
+*subclass)>
Gets a Parrot_sub structure from something that isn't a Sub PMC, but rather a
subclass.
Modified: trunk/src/thread.c
==============================================================================
--- trunk/src/thread.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/thread.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -158,7 +158,8 @@
/*
-=item C<static PMC * make_local_copy>
+=item C<static PMC * make_local_copy(PARROT_INTERP, Parrot_Interp from, PMC
+*arg)>
Creates a local copy of the PMC if necessary. (No copy is made if it is marked
shared.) This includes workarounds for Parrot_clone() not doing the Right Thing
@@ -220,7 +221,7 @@
/*
-=item C<static Shared_gc_info * get_pool>
+=item C<static Shared_gc_info * get_pool(PARROT_INTERP)>
Gets the shared gc information. For now this is global data; ideally it will
become something other than a static variable. If everything uses this
@@ -240,7 +241,7 @@
/*
-=item C<void pt_free_pool>
+=item C<void pt_free_pool(PARROT_INTERP)>
Frees the shared GC information. This clears any global data when joining all
threads at parent interpreter destruction.
@@ -263,7 +264,8 @@
/*
-=item C<static PMC * make_local_args_copy>
+=item C<static PMC * make_local_args_copy(PARROT_INTERP, Parrot_Interp
+old_interp, PMC *args)>
Make a local copy of the corresponding array of arguments.
@@ -301,7 +303,7 @@
/*
-=item C<PMC * pt_shared_fixup>
+=item C<PMC * pt_shared_fixup(PARROT_INTERP, PMC *pmc)>
Modifies a PMC to be sharable. Right now, reassigns the vtable to one
owned by some master interpreter, so the PMC can be safely reused
@@ -363,7 +365,7 @@
/*
-=item C<static void pt_thread_signal>
+=item C<static void pt_thread_signal(Parrot_Interp self, PARROT_INTERP)>
Wakes up an C<interp> which should have called pt_thread_wait().
@@ -380,7 +382,7 @@
/*
-=item C<void pt_thread_wait_with>
+=item C<void pt_thread_wait_with(PARROT_INTERP, Parrot_mutex *mutex)>
Waits for this interpreter to be signalled through its condition variable,
dealing properly with GC issues. C<*mutex> is assumed locked on entry and
@@ -436,7 +438,7 @@
/*
-=item C<static void pt_thread_wait>
+=item C<static void pt_thread_wait(PARROT_INTERP)>
Waits for a signal, handling GC matters correctly. C<interpreter_array_mutex>
is assumed held. Spurious wakeups may occur.
@@ -480,7 +482,7 @@
/*
-=item C<static void* thread_func>
+=item C<static void* thread_func(void *arg)>
The actual thread function.
@@ -571,7 +573,7 @@
=over 4
-=item C<void pt_clone_code>
+=item C<void pt_clone_code(Parrot_Interp d, Parrot_Interp s)>
Copies/clones the packfile/code from interpreter C<s> to C<d>. All
resources are created in C<d>.
@@ -593,7 +595,8 @@
/*
-=item C<static void pt_ns_clone>
+=item C<static void pt_ns_clone(PARROT_INTERP, Parrot_Interp d, PMC *dest_ns,
+Parrot_Interp s, PMC *source_ns)>
Clones all globals from C<s> to C<d>.
@@ -647,7 +650,7 @@
/*
-=item C<void pt_clone_globals>
+=item C<void pt_clone_globals(Parrot_Interp d, Parrot_Interp s)>
Copies the global namespace when cloning a new interpreter.
@@ -666,7 +669,7 @@
/*
-=item C<void pt_thread_prepare_for_run>
+=item C<void pt_thread_prepare_for_run(Parrot_Interp d, Parrot_Interp s)>
Sets up a new thread to run.
@@ -695,7 +698,7 @@
/*
-=item C<PMC * pt_transfer_sub>
+=item C<PMC * pt_transfer_sub(Parrot_Interp d, Parrot_Interp s, PMC *sub)>
Clones the sub so that it's suitable for the other interpreter.
@@ -717,7 +720,7 @@
/*
-=item C<int pt_thread_run>
+=item C<int pt_thread_run(PARROT_INTERP, PMC *dest_interp, PMC *sub, PMC *arg)>
Runs the C<*sub> PMC in a separate thread using the interpreter in
C<*dest_interp>.
@@ -809,7 +812,8 @@
/*
-=item C<int pt_thread_run_1>
+=item C<int pt_thread_run_1(PARROT_INTERP, PMC* dest_interp, PMC* sub, PMC
+*arg)>
Runs a thread that shares nothing and does not communicate with the other
interpreter.
@@ -828,7 +832,8 @@
/*
-=item C<int pt_thread_run_2>
+=item C<int pt_thread_run_2(PARROT_INTERP, PMC* dest_interp, PMC* sub, PMC
+*arg)>
Runs an interpreter in a thread with no shared variables, but which
communicates by sending messages.
@@ -847,7 +852,8 @@
/*
-=item C<int pt_thread_run_3>
+=item C<int pt_thread_run_3(PARROT_INTERP, PMC* dest_interp, PMC* sub, PMC
+*arg)>
Runs an interpreter in a thread, allowing shared variables and using a thread
pool.
@@ -866,7 +872,7 @@
/*
-=item C<void pt_thread_yield>
+=item C<void pt_thread_yield(void)>
Relinquishes hold on the processor.
@@ -883,7 +889,7 @@
/*
-=item C<static Parrot_Interp pt_check_tid>
+=item C<static Parrot_Interp pt_check_tid(UINTVAL tid, const char *from)>
Helper function. Checks if the given thread ID is valid. The caller holds the
mutex. Returns the interpreter for C<tid>.
@@ -913,7 +919,7 @@
/*
-=item C<static void mutex_unlock>
+=item C<static void mutex_unlock(void *arg)>
Unlocks the mutex C<*arg>.
@@ -930,7 +936,7 @@
/*
-=item C<static int is_suspended_for_gc>
+=item C<static int is_suspended_for_gc(PARROT_INTERP)>
Returns true iff C<interp> is suspended for a global GC run. Be sure to hold
C<interpreter_array_mutex>.
@@ -959,7 +965,7 @@
/*
-=item C<static QUEUE_ENTRY * remove_queued_suspend_gc>
+=item C<static QUEUE_ENTRY * remove_queued_suspend_gc(PARROT_INTERP)>
Removes an event requesting that the interpreter suspend itself for a
garbage-collection run from the event queue.
@@ -1015,7 +1021,7 @@
/*
-=item C<static int pt_gc_count_threads>
+=item C<static int pt_gc_count_threads(PARROT_INTERP)>
Returns the number of active threads in the system (running or suspended). Be
sure to hold C<interpreter_array_mutex>.
@@ -1047,7 +1053,8 @@
/*
-=item C<static void pt_gc_wait_for_stage>
+=item C<static void pt_gc_wait_for_stage(PARROT_INTERP, thread_gc_stage_enum
+from_stage, thread_gc_stage_enum to_stage)>
Waits until all threads have reached the desired stage. Takes an interpreter,
starting stage and ending stage as arguments. Updates the thread information.
@@ -1102,7 +1109,7 @@
/*
-=item C<static void pt_gc_wakeup_check>
+=item C<static void pt_gc_wakeup_check(PARROT_INTERP)>
Checks if it's necessary to wake threads to perform garbage collection. This
is called after thread death. Be sure to hold C<interpreter_array_mutex>.
@@ -1134,7 +1141,7 @@
/*
-=item C<static void pt_suspend_one_for_gc>
+=item C<static void pt_suspend_one_for_gc(PARROT_INTERP)>
Suspends a single interpreter for GC. Be sure to hold
C<interpreter_array_mutex>.
@@ -1167,7 +1174,7 @@
/*
-=item C<static void pt_suspend_all_for_gc>
+=item C<static void pt_suspend_all_for_gc(PARROT_INTERP)>
Notifies all threads to perform a GC run.
@@ -1237,7 +1244,7 @@
/*
-=item C<void pt_suspend_self_for_gc>
+=item C<void pt_suspend_self_for_gc(PARROT_INTERP)>
Suspends this thread for a full GC run.
@@ -1288,7 +1295,7 @@
/*
-=item C<PMC* pt_thread_join>
+=item C<PMC* pt_thread_join(Parrot_Interp parent, UINTVAL tid)>
Joins (by waiting for) a joinable thread.
@@ -1399,7 +1406,7 @@
/*
-=item C<void pt_join_threads>
+=item C<void pt_join_threads(PARROT_INTERP)>
Possibly waits for other running threads. This is called when destroying
C<interp>.
@@ -1449,7 +1456,7 @@
/*
-=item C<static Parrot_Interp detach>
+=item C<static Parrot_Interp detach(UINTVAL tid)>
Helper for detach and kill.
@@ -1488,7 +1495,7 @@
/*
-=item C<void pt_thread_detach>
+=item C<void pt_thread_detach(UINTVAL tid)>
Detaches the thread, making it non-joinable.
@@ -1505,7 +1512,7 @@
/*
-=item C<void pt_thread_kill>
+=item C<void pt_thread_kill(UINTVAL tid)>
Kills the thread.
@@ -1532,7 +1539,7 @@
=over 4
-=item C<void pt_add_to_interpreters>
+=item C<void pt_add_to_interpreters(PARROT_INTERP, Parrot_Interp new_interp)>
Stores the given interpreter in the array of all interpreters. Be sure to hold
C<interpreter_array_mutex>.
@@ -1610,7 +1617,7 @@
=over 4
-=item C<void pt_gc_start_mark>
+=item C<void pt_gc_start_mark(PARROT_INTERP)>
Record that the mark phase of GC is about to begin. In the presence of shared
PMCs, we can only run one GC run at a time because C<< PMC->next_for_GC >> may
@@ -1698,7 +1705,7 @@
/*
-=item C<void pt_gc_mark_root_finished>
+=item C<void pt_gc_mark_root_finished(PARROT_INTERP)>
Records that GC has finished for the root set. EXCEPTION_UNIMPLEMENTED
@@ -1723,7 +1730,7 @@
/*
-=item C<void pt_gc_stop_mark>
+=item C<void pt_gc_stop_mark(PARROT_INTERP)>
Records that the mark phase of GC has completed.
@@ -1765,7 +1772,7 @@
/*
-=item C<void Parrot_shared_gc_block>
+=item C<void Parrot_shared_gc_block(PARROT_INTERP)>
Blocks stop-the-world GC runs.
@@ -1789,7 +1796,7 @@
/*
-=item C<void Parrot_shared_gc_unblock>
+=item C<void Parrot_shared_gc_unblock(PARROT_INTERP)>
Unblocks stop-the-world GC runs.
Modified: trunk/src/trace.c
==============================================================================
--- trunk/src/trace.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/trace.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -241,8 +241,8 @@
/*
-=item C<void trace_op_dump(PARROT_INTERP, const opcode_t *code_start,
-const opcode_t *pc)>
+=item C<void trace_op_dump(PARROT_INTERP, const opcode_t *code_start, const
+opcode_t *pc)>
Prints the PC, OP and ARGS. Used by C<trace_op()>.
@@ -477,8 +477,8 @@
/*
-=item C<void trace_op(PARROT_INTERP, const opcode_t *code_start,
-const opcode_t *code_end, const opcode_t *pc)>
+=item C<void trace_op(PARROT_INTERP, const opcode_t *code_start, const opcode_t
+*code_end, const opcode_t *pc)>
Prints the PC, OP and ARGS. Used by C<runops_trace()>. With bounds
checking.
Modified: trunk/src/utils.c
==============================================================================
--- trunk/src/utils.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/utils.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -561,8 +561,8 @@
/*
-=item C<INTVAL Parrot_byte_index(PARROT_INTERP, const STRING *base,
-const STRING *search, UINTVAL start_offset)>
+=item C<INTVAL Parrot_byte_index(PARROT_INTERP, const STRING *base, const STRING
+*search, UINTVAL start_offset)>
Looks for the location of a substring within a longer string. Takes
pointers to the strings and the offset within the string at which
@@ -610,8 +610,8 @@
/*
-=item C<INTVAL Parrot_byte_rindex(PARROT_INTERP, const STRING *base,
-const STRING *search, UINTVAL start_offset)>
+=item C<INTVAL Parrot_byte_rindex(PARROT_INTERP, const STRING *base, const
+STRING *search, UINTVAL start_offset)>
Substring search (like Parrot_byte_index), but works backwards,
from the rightmost end of the string.
@@ -650,7 +650,8 @@
/*
-=item C<static void rec_climb_back_and_mark(int node_index, parrot_prm_context* c)>
+=item C<static void rec_climb_back_and_mark(int node_index, parrot_prm_context*
+c)>
Recursive function, used by Parrot_register_move to
climb back the graph of register moves operations.
@@ -740,9 +741,9 @@
/*
-=item C<void Parrot_register_move(PARROT_INTERP, int n_regs,
-unsigned char *dest_regs, unsigned char *src_regs, unsigned char temp_reg,
-reg_move_func mov, reg_move_func mov_alt, void *info)>
+=item C<void Parrot_register_move(PARROT_INTERP, int n_regs, unsigned char
+*dest_regs, unsigned char *src_regs, unsigned char temp_reg, reg_move_func mov,
+reg_move_func mov_alt, void *info)>
Move C<n_regs> from the given register list C<src_regs> to C<dest_regs>.
Modified: trunk/src/warnings.c
==============================================================================
--- trunk/src/warnings.c Wed Apr 1 19:50:46 2009 (r37853)
+++ trunk/src/warnings.c Wed Apr 1 20:00:45 2009 (r37854)
@@ -90,8 +90,8 @@
=over 4
-=item C<INTVAL Parrot_warn(PARROT_INTERP, INTVAL warnclass,
-const char *message, ...)>
+=item C<INTVAL Parrot_warn(PARROT_INTERP, INTVAL warnclass, const char *message,
+...)>
The Parrot C string warning/error reporter.
More information about the parrot-commits
mailing list