[svn:parrot] r37848 - in trunk: compilers/imcc src src/call src/gc src/io src/string src/string/charset src/string/encoding
Infinoid at svn.parrot.org
Infinoid at svn.parrot.org
Wed Apr 1 18:29:23 UTC 2009
Author: Infinoid
Date: Wed Apr 1 18:29:18 2009
New Revision: 37848
URL: https://trac.parrot.org/parrot/changeset/37848
Log:
Revert r37846 for now, it undid all of Coke++'s hard work in r37845.
Modified:
trunk/compilers/imcc/cfg.c
trunk/compilers/imcc/debug.c
trunk/compilers/imcc/imc.c
trunk/compilers/imcc/symreg.c
trunk/src/byteorder.c
trunk/src/call/ops.c
trunk/src/datatypes.c
trunk/src/debug.c
trunk/src/embed.c
trunk/src/exit.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_setup.c
trunk/src/hll.c
trunk/src/io/api.c
trunk/src/io/buffer.c
trunk/src/io/core.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/library.c
trunk/src/longopt.c
trunk/src/misc.c
trunk/src/multidispatch.c
trunk/src/oo.c
trunk/src/packdump.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/runops_cores.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/trace.c
trunk/src/tsq.c
trunk/src/utils.c
trunk/src/vtables.c
trunk/src/warnings.c
Modified: trunk/compilers/imcc/cfg.c
==============================================================================
--- trunk/compilers/imcc/cfg.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/compilers/imcc/cfg.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -206,7 +206,8 @@
/*
-=item C<static int check_invoke_type>
+=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.
@@ -246,7 +247,7 @@
/*
-=item C<void find_basic_blocks>
+=item C<void find_basic_blocks(PARROT_INTERP, IMC_Unit *unit, int first)>
Finds all basic blocks in the given IMC_Unit, expanding PCC calls if first is
true.
@@ -358,7 +359,8 @@
/*
-=item C<static void bb_check_set_addr>
+=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.
@@ -394,7 +396,7 @@
/*
-=item C<void build_cfg>
+=item C<void build_cfg(PARROT_INTERP, IMC_Unit *unit)>
Once the basic blocks have been computed, build_cfg computes the dependencies
between them.
@@ -536,7 +538,8 @@
/*
-=item C<static void bb_findadd_edge>
+=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.
@@ -577,7 +580,7 @@
/*
-=item C<int blocks_are_connected>
+=item C<int blocks_are_connected(const Basic_block *from, const Basic_block *to)>
Returns true or false whether the given blocks are linked.
@@ -607,7 +610,7 @@
/*
-=item C<static void bb_add_edge>
+=item C<static void bb_add_edge(IMC_Unit *unit, Basic_block *from, Basic_block *to)>
Adds an edge between the two given blocks.
@@ -650,7 +653,7 @@
/*
-=item C<static void bb_remove_edge>
+=item C<static void bb_remove_edge(IMC_Unit *unit, Edge *edge)>
Removes the given edge from the graph.
@@ -705,7 +708,7 @@
/*
-=item C<static void free_edge>
+=item C<static void free_edge(IMC_Unit *unit)>
Frees the memory of an IMC_Unit's edge list.
@@ -731,7 +734,7 @@
/*
-=item C<int edge_count>
+=item C<int edge_count(const IMC_Unit *unit)>
Counts and returns the number of edges in the specified IMC_Unit.
@@ -757,7 +760,7 @@
/*
-=item C<void life_analysis>
+=item C<void life_analysis(PARROT_INTERP, const IMC_Unit *unit)>
This driver routine calls analyse_life_symbol for each reglist in the specified
IMC_Unit.
@@ -782,7 +785,7 @@
/*
-=item C<static void analyse_life_symbol>
+=item C<static void analyse_life_symbol(const IMC_Unit *unit, SymReg* r)>
Analyzes the lifetime for a given symbol.
@@ -845,7 +848,7 @@
/*
-=item C<void free_life_info>
+=item C<void free_life_info(const IMC_Unit *unit, SymReg *r)>
Frees memory of the life analysis info structures.
@@ -875,7 +878,7 @@
/*
-=item C<static void analyse_life_block>
+=item C<static void analyse_life_block(const Basic_block* bb, SymReg *r)>
Studies the state of the var r in the block bb.
@@ -956,7 +959,7 @@
/*
-=item C<static void propagate_need>
+=item C<static void propagate_need(Basic_block *bb, const SymReg *r, int i)>
Follows the uses of the given symbol through all of the basic blocks of the
unit.
@@ -1023,7 +1026,7 @@
/*
-=item C<void compute_dominators>
+=item C<void compute_dominators(PARROT_INTERP, IMC_Unit *unit)>
Computes the dominators tree of the CFG. Basic block A dominates B if each
path to B passes through A
@@ -1164,7 +1167,7 @@
/*
-=item C<void compute_dominance_frontiers>
+=item C<void compute_dominance_frontiers(PARROT_INTERP, IMC_Unit *unit)>
Algorithm to find dominance frontiers described in paper "A Simple, Fast
Dominance Algorithm", Cooper et al. (2001)
@@ -1227,7 +1230,7 @@
/*
-=item C<static void free_dominators>
+=item C<static void free_dominators(IMC_Unit *unit)>
Frees the memory in the given unit related to all dominators.
@@ -1255,7 +1258,7 @@
/*
-=item C<static void free_dominance_frontiers>
+=item C<static void free_dominance_frontiers(IMC_Unit *unit)>
Frees the memory in the given unit related to all dominance frontiers.
@@ -1282,7 +1285,7 @@
/*
-=item C<static void sort_loops>
+=item C<static void sort_loops(PARROT_INTERP, IMC_Unit *unit)>
Sorts the loops found in the CFG of the current unit.
@@ -1362,7 +1365,7 @@
/*
-=item C<void find_loops>
+=item C<void find_loops(PARROT_INTERP, IMC_Unit *unit)>
Searches for loops in the CFG. We search for edges that go from a node to one
of its dominators.
@@ -1397,7 +1400,7 @@
/*
-=item C<int natural_preheader>
+=item C<int natural_preheader(const IMC_Unit *unit, const Loop_info *loop_info)>
For loop_info, finds the natural preheader of the loop, if any, and returns its
index, otherwise returns -1. A natural preheader exists if there is only one
@@ -1440,7 +1443,7 @@
/*
-=item C<static void mark_loop>
+=item C<static void mark_loop(PARROT_INTERP, IMC_Unit *unit, const Edge *e)>
Increases the loop_depth of all the nodes in a loop.
@@ -1527,7 +1530,7 @@
/*
-=item C<static void free_loops>
+=item C<static void free_loops(IMC_Unit *unit)>
Frees the memory associated with the loops in this unit.
@@ -1556,7 +1559,7 @@
/*
-=item C<void search_predecessors_not_in>
+=item C<void search_predecessors_not_in(const Basic_block *node, Set *s)>
Searches for predecessor edges for this node not in the given set (and adds
them).
@@ -1586,7 +1589,7 @@
/*
-=item C<static void init_basic_blocks>
+=item C<static void init_basic_blocks(IMC_Unit *unit)>
Initializes the basic blocks memory for this unit.
@@ -1612,7 +1615,7 @@
/*
-=item C<void clear_basic_blocks>
+=item C<void clear_basic_blocks(IMC_Unit *unit)>
Frees all of the blocks and CFG memory allocated for this unit.
@@ -1644,7 +1647,8 @@
/*
-=item C<static Basic_block* make_basic_block>
+=item C<static Basic_block* make_basic_block(IMC_Unit *unit,
+Instruction *ins)>
Creates, initializes, and returns a new Basic_block.
@@ -1685,7 +1689,7 @@
/*
-=item C<Life_range * make_life_range>
+=item C<Life_range * make_life_range(SymReg *r, int idx)>
Creates and returns a Life_range for the given register at the specified index.
Modified: trunk/compilers/imcc/debug.c
==============================================================================
--- trunk/compilers/imcc/debug.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/compilers/imcc/debug.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -30,7 +30,7 @@
/*
-=item C<void IMCC_fatal(PARROT_INTERP, int code, const char *fmt, ...)>
+=item C<void IMCC_fatal>
Prints out a fatal error message from IMCC and throws an
IMCC_FATAL_EXCEPTION.
@@ -55,7 +55,7 @@
/*
-=item C<void IMCC_fataly(PARROT_INTERP, int code, const char *fmt, ...)>
+=item C<void IMCC_fataly>
Throws an IMCC_FATALY_EXCEPTION.
@@ -79,7 +79,7 @@
/*
-=item C<void IMCC_fatal_standalone(PARROT_INTERP, int code, const char *fmt, ...)>
+=item C<void IMCC_fatal_standalone>
Prints an error message from IMCC and exits Parrot. This is not a
recoverable exception but a forced exit.
@@ -104,7 +104,7 @@
/*
-=item C<void IMCC_fataly_standalone(PARROT_INTERP, int code, const char *fmt, ...)>
+=item C<void IMCC_fataly_standalone>
Prints an error message and exits Parrot. This is not a recoverable
error.
@@ -132,7 +132,7 @@
/*
-=item C<void IMCC_warning(PARROT_INTERP, const char *fmt, ...)>
+=item C<void IMCC_warning>
Prints a warning message, but does not throw an exception and does not
cause Parrot to exit.
@@ -157,7 +157,7 @@
/*
-=item C<void IMCC_info(PARROT_INTERP, int level, const char *fmt, ...)>
+=item C<void IMCC_info>
Prints some information, if the level of the information is higher
then IMCC's verbose mode.
@@ -183,7 +183,7 @@
/*
-=item C<void IMCC_debug(PARROT_INTERP, int level, const char *fmt, ...)>
+=item C<void IMCC_debug>
Prints a debug message, if IMCC's debug mode is turned on.
@@ -207,7 +207,7 @@
/*
-=item C<void dump_instructions(PARROT_INTERP, const IMC_Unit *unit)>
+=item C<void dump_instructions>
Dumps the current instruction status of IMCC
@@ -252,7 +252,7 @@
/*
-=item C<void dump_cfg(const IMC_Unit *unit)>
+=item C<void dump_cfg>
Dumps the current IMCC config data.
@@ -292,7 +292,7 @@
/*
-=item C<void dump_loops(const IMC_Unit *unit)>
+=item C<void dump_loops>
Dumps the current loops in the IMC_Unit C<unit>.
@@ -339,7 +339,7 @@
/*
-=item C<void dump_labels(const IMC_Unit *unit)>
+=item C<void dump_labels>
Dumps the list of labels in IMC_Unit C<unit>.
@@ -373,7 +373,7 @@
/*
-=item C<void dump_symreg(const IMC_Unit *unit)>
+=item C<void dump_symreg>
Dumps a list of the symbolic registers in IMC_Unit C<unit>
@@ -421,7 +421,7 @@
/*
-=item C<void dump_liveness_status(const IMC_Unit *unit)>
+=item C<void dump_liveness_status>
Dumps the list of registers in the current IMC_Unit that need to be
allocated.
@@ -451,7 +451,7 @@
/*
-=item C<void dump_liveness_status_var(const IMC_Unit *unit, const SymReg* r)>
+=item C<void dump_liveness_status_var>
Dumps the state of SymReg C<r> in IMC_Unit C<unit>.
@@ -500,7 +500,7 @@
/*
-=item C<void dump_interference_graph(const IMC_Unit *unit)>
+=item C<void dump_interference_graph>
Dumps the interference graph for the current IMC_Unit C<unit>
@@ -540,7 +540,7 @@
/*
-=item C<void dump_dominators(const IMC_Unit *unit)>
+=item C<void dump_dominators>
Dumps the current list of dominators for the current IMC_Unit C<unit>.
@@ -574,7 +574,7 @@
/*
-=item C<void dump_dominance_frontiers(const IMC_Unit *unit)>
+=item C<void dump_dominance_frontiers>
Dumps the list of dominance frontiers for the current IMC_Unit C<unit>.
Modified: trunk/compilers/imcc/imc.c
==============================================================================
--- trunk/compilers/imcc/imc.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/compilers/imcc/imc.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -52,7 +52,7 @@
/*
-=item C<void imc_compile_all_units>
+=item C<void imc_compile_all_units(PARROT_INTERP)>
Compiles all imc_units, and free all memory of instructions and structures
afterwards.
@@ -102,7 +102,7 @@
/*
-=item C<void imc_compile_unit>
+=item C<void imc_compile_unit(PARROT_INTERP, IMC_Unit *unit)>
Compiles each unit in IMCC. This is the main loop of the compiler; it operates
on a single compilation unit at a time.
@@ -126,7 +126,7 @@
/*
-=item C<void imc_cleanup>
+=item C<void imc_cleanup(PARROT_INTERP, void *yyscanner)>
Cleans up the compiler state in preparation for another compiler invocation.
@@ -148,7 +148,7 @@
/*
-=item C<static IMC_Unit * imc_new_unit>
+=item C<static IMC_Unit * imc_new_unit(IMC_Unit_Type t)>
Creates a new IMC_Unit of the given IMC_Unit_Type C<t>.
@@ -171,7 +171,7 @@
/*
-=item C<IMC_Unit * imc_open_unit>
+=item C<IMC_Unit * imc_open_unit(PARROT_INTERP, IMC_Unit_Type t)>
Creates a new IMC_Unit and "open" it for construction. This sets the current
state of the parser. You can close the unit later while retaining all the
@@ -212,7 +212,7 @@
/*
-=item C<void imc_close_unit>
+=item C<void imc_close_unit(PARROT_INTERP, IMC_Unit *unit)>
Closes a unit from compilation. This does not destroy the unit, but leaves it
on the list of units.
@@ -236,7 +236,7 @@
/*
-=item C<static void imc_free_unit>
+=item C<static void imc_free_unit(PARROT_INTERP, IMC_Unit *unit)>
Frees an IMC_Unit and all of its associated memory.
Modified: trunk/compilers/imcc/symreg.c
==============================================================================
--- trunk/compilers/imcc/symreg.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/compilers/imcc/symreg.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -119,7 +119,7 @@
/*
-=item C<void push_namespace(PARROT_INTERP, const char *name)>
+=item C<void push_namespace>
Begins a new namespace in PASM/PIR, named after the given C<name>.
@@ -141,7 +141,7 @@
/*
-=item C<void pop_namespace(PARROT_INTERP, const char *name)>
+=item C<void pop_namespace>
Ends the current namespace, popping back to the previous. If the namespace
stack is empty, throws a syntax error.
@@ -176,7 +176,7 @@
/*
-=item C<static SymReg * _get_sym_typed(const SymHash *hsh, const char *name, int t)>
+=item C<static SymReg * _get_sym_typed>
Gets a symbol from the hash, with the given C<name> of the specific type C<t>.
@@ -206,7 +206,7 @@
/*
-=item C<static SymReg * _mk_symreg(SymHash *hsh, const char *name, int t)>
+=item C<static SymReg * _mk_symreg>
Makes a new SymReg in the given SymHash from a varname and type.
@@ -239,7 +239,7 @@
/*
-=item C<SymReg * mk_symreg(PARROT_INTERP, const char *name, int t)>
+=item C<SymReg * mk_symreg>
Makes a new SymReg in the current unit, given a varname and type.
@@ -264,7 +264,7 @@
/*
-=item C<char * symreg_to_str(const SymReg *s)>
+=item C<char * symreg_to_str>
Dumps a SymReg to a printable format.
@@ -307,7 +307,7 @@
/*
-=item C<SymReg * mk_temp_reg(PARROT_INTERP, int t)>
+=item C<SymReg * mk_temp_reg>
Makes a new unique and temporary SymReg of the specified type C<t>.
@@ -331,7 +331,7 @@
/*
-=item C<SymReg * mk_pcc_sub(PARROT_INTERP, const char *name, int proto)>
+=item C<SymReg * mk_pcc_sub>
Makes a SymReg representing a PCC sub of the given C<name> with the specified
type.
@@ -358,7 +358,7 @@
/*
-=item C<void add_namespace(PARROT_INTERP, IMC_Unit *unit)>
+=item C<void add_namespace>
Add the current namespace to a sub declaration.
@@ -396,7 +396,7 @@
/*
-=item C<void add_pcc_arg(SymReg *r, SymReg *arg)>
+=item C<void add_pcc_arg>
Adds a register or constant to the function arg list.
@@ -425,7 +425,7 @@
/*
-=item C<void add_pcc_result(SymReg *r, SymReg *arg)>
+=item C<void add_pcc_result>
Adds a register or constant to the function's return list.
@@ -456,7 +456,7 @@
/*
-=item C<void add_pcc_multi(SymReg *r, SymReg *arg)>
+=item C<void add_pcc_multi>
Adds a :multi signature to the sub.
@@ -479,7 +479,7 @@
/*
-=item C<void add_pcc_sub(SymReg *r, SymReg *arg)>
+=item C<void add_pcc_sub>
Sets the current sub in the given SymReg to the second SymReg.
@@ -497,7 +497,7 @@
/*
-=item C<void add_pcc_cc(SymReg *r, SymReg *arg)>
+=item C<void add_pcc_cc>
Adds a continuation (?) to the current sub.
@@ -515,7 +515,7 @@
/*
-=item C<SymReg * mk_pasm_reg(PARROT_INTERP, const char *name)>
+=item C<SymReg * mk_pasm_reg>
Makes a SymReg representing a PASM register.
@@ -547,7 +547,7 @@
/*
-=item C<static char * _mk_fullname(const Namespace *ns, const char *name)>
+=item C<static char * _mk_fullname>
Combines the namespace and name together, separated by a C<::>. If there's no
namespace, the name is returned on its own.
@@ -578,7 +578,7 @@
/*
-=item C<SymReg * mk_ident(PARROT_INTERP, const char *name, int t)>
+=item C<SymReg * mk_ident>
Makes a new identifier.
@@ -618,7 +618,7 @@
/*
-=item C<SymReg* mk_ident_ur(PARROT_INTERP, const char *name, int t)>
+=item C<SymReg* mk_ident_ur>
Creates and returns a SymReg representing a unique (non-volatile) register.
@@ -641,8 +641,7 @@
/*
-=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>
Makes a constant PMC and inserts instructions to access it.
@@ -699,8 +698,7 @@
/*
-=item C<SymReg * mk_const_ident(PARROT_INTERP, const char *name, int t,
-SymReg *val, int global)>
+=item C<SymReg * mk_const_ident>
Makes a new identifier constant with value val.
@@ -752,7 +750,7 @@
/*
-=item C<SymReg * _mk_const(SymHash *hsh, const char *name, int t)>
+=item C<SymReg * _mk_const>
Makes a new constant (internal use only).
@@ -788,7 +786,7 @@
/*
-=item C<static int int_overflows(const SymReg *r)>
+=item C<static int int_overflows>
=cut
@@ -822,7 +820,7 @@
/*
-=item C<SymReg * mk_const(PARROT_INTERP, const char *name, int t)>
+=item C<SymReg * mk_const>
Makes a new constant (and populates the cache of global symbols).
@@ -847,7 +845,7 @@
/*
-=item C<static char * add_ns(PARROT_INTERP, const char *name)>
+=item C<static char * add_ns>
Adds a namespace to the current sub.
@@ -894,8 +892,7 @@
/*
-=item C<SymReg * _mk_address(PARROT_INTERP, SymHash *hsh, const char *name,
-int uniq)>
+=item C<SymReg * _mk_address>
Makes a new address (internal use only).
@@ -955,7 +952,7 @@
/*
-=item C<SymReg * mk_sub_label(PARROT_INTERP, const char *name)>
+=item C<SymReg * mk_sub_label>
Makes and stores a new address label for a sub. The label gets a fixup entry.
@@ -980,7 +977,7 @@
/*
-=item C<SymReg * mk_sub_address(PARROT_INTERP, const char *name)>
+=item C<SymReg * mk_sub_address>
Makes a symbol for a label. The symbol gets a fixup entry.
@@ -1005,7 +1002,7 @@
/*
-=item C<SymReg * mk_local_label(PARROT_INTERP, const char *name)>
+=item C<SymReg * mk_local_label>
Makes a local symbol, giving it I<no> fixup entry.
@@ -1026,7 +1023,7 @@
/*
-=item C<SymReg * mk_label_address(PARROT_INTERP, const char *name)>
+=item C<SymReg * mk_label_address>
Makes a new label address.
@@ -1047,7 +1044,7 @@
/*
-=item C<SymReg * dup_sym(const SymReg *r)>
+=item C<SymReg * dup_sym>
Links keys to a keys structure = SymReg
@@ -1108,7 +1105,7 @@
/*
-=item C<SymReg * link_keys(PARROT_INTERP, int nargs, SymReg **keys, int force)>
+=item C<SymReg * link_keys>
Links keys together in a keychain.
@@ -1204,7 +1201,7 @@
/*
-=item C<void free_sym(SymReg *r)>
+=item C<void free_sym>
Frees all memory of the specified SymReg. If it has a pcc_sub_t entry, frees
all memory of that structure as well.
@@ -1250,7 +1247,7 @@
/*
-=item C<void create_symhash(SymHash *hash)>
+=item C<void create_symhash>
Creates a symbol hash table with space for 16 entries.
@@ -1270,7 +1267,7 @@
/*
-=item C<static void resize_symhash(SymHash *hsh)>
+=item C<static void resize_symhash>
Resizes a symbol hash table.
@@ -1330,7 +1327,7 @@
/*
-=item C<void _store_symreg(SymHash *hsh, SymReg *r)>
+=item C<void _store_symreg>
Stores a symbol in the hash (internal use only).
@@ -1358,7 +1355,7 @@
/*
-=item C<void store_symreg(PARROT_INTERP, SymReg *r)>
+=item C<void store_symreg>
Stores a symbol in the hash.
@@ -1376,7 +1373,7 @@
/*
-=item C<SymReg * _get_sym(const SymHash *hsh, const char *name)>
+=item C<SymReg * _get_sym>
Fetches a symbol from the hash (internal use only).
@@ -1406,7 +1403,7 @@
/*
-=item C<SymReg * get_sym(PARROT_INTERP, const char *name)>
+=item C<SymReg * get_sym>
Gets a symbol from the current unit's symbol table.
@@ -1426,8 +1423,7 @@
/*
-=item C<SymReg * _find_sym(PARROT_INTERP, const Namespace *nspace,
-const SymHash *hsh, const char *name)>
+=item C<SymReg * _find_sym>
Find a symbol hash or ghash (internal use only);
@@ -1471,7 +1467,7 @@
/*
-=item C<SymReg * find_sym(PARROT_INTERP, const char *name)>
+=item C<SymReg * find_sym>
Finds a symbol hash or ghash in the current unit, if it exists. Otherwise
returns NULL.
@@ -1496,7 +1492,7 @@
/*
-=item C<void clear_sym_hash(SymHash *hsh)>
+=item C<void clear_sym_hash>
Frees all memory of the symbols in the specified hash table.
@@ -1534,7 +1530,7 @@
/*
-=item C<void debug_dump_sym_hash(const SymHash *hsh)>
+=item C<void debug_dump_sym_hash>
Prints all identifiers in the specified hash table to stderr.
@@ -1560,7 +1556,7 @@
/*
-=item C<void clear_locals(IMC_Unit *unit)>
+=item C<void clear_locals>
Deletes all local symbols and clears life info from the given IMC_Unit.
@@ -1597,7 +1593,7 @@
/*
-=item C<void clear_globals(PARROT_INTERP)>
+=item C<void clear_globals>
Clears global symbols.
@@ -1620,7 +1616,7 @@
/*
-=item C<unsigned int hash_str(const char *str)>
+=item C<unsigned int hash_str>
Computes the hash value for the string argument.
Modified: trunk/src/byteorder.c
==============================================================================
--- trunk/src/byteorder.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/byteorder.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -32,7 +32,7 @@
/*
-=item C<INTVAL fetch_iv_le>
+=item C<INTVAL fetch_iv_le(INTVAL w)>
This function converts a 4 or 8 byte C<INTVAL> into little endian
format. If the native format is already little endian, then no
@@ -76,7 +76,7 @@
/*
-=item C<INTVAL fetch_iv_be>
+=item C<INTVAL fetch_iv_be(INTVAL w)>
This function converts a 4 or 8 byte C<INTVAL> into big endian format.
If the native format is already big endian, then no conversion is done.
@@ -118,7 +118,7 @@
/*
-=item C<opcode_t fetch_op_be>
+=item C<opcode_t fetch_op_be(opcode_t w)>
Same as C<fetch_iv_be> for opcode_t
@@ -156,7 +156,7 @@
/*
-=item C<opcode_t fetch_op_le>
+=item C<opcode_t fetch_op_le(opcode_t w)>
Same as C<fetch_iv_le> for opcode_t
@@ -206,7 +206,7 @@
/*
-=item C<void fetch_buf_be_4>
+=item C<void fetch_buf_be_4(unsigned char *rb, const unsigned char *b)>
Converts a 4-byte big-endian buffer C<b> into a little-endian C<rb>.
@@ -230,7 +230,7 @@
/*
-=item C<void fetch_buf_le_4>
+=item C<void fetch_buf_le_4(unsigned char *rb, const unsigned char *b)>
Converts a 4-byte little-endian buffer C<b> into a big-endian buffer C<rb>.
@@ -254,7 +254,7 @@
/*
-=item C<void fetch_buf_be_8>
+=item C<void fetch_buf_be_8(unsigned char *rb, const unsigned char *b)>
Converts an 8-byte big-endian buffer C<b> into a little-endian buffer C<rb>
@@ -282,7 +282,7 @@
/*
-=item C<void fetch_buf_le_8>
+=item C<void fetch_buf_le_8(unsigned char *rb, const unsigned char *b)>
Converts an 8-byte little-endian buffer C<b> into a big-endian buffer C<rb>.
@@ -310,7 +310,7 @@
/*
-=item C<void fetch_buf_le_12>
+=item C<void fetch_buf_le_12(unsigned char *rb, const unsigned char *b)>
Converts a 12-byte little-endian buffer C<b> into a big-endian buffer C<b>.
@@ -342,7 +342,7 @@
/*
-=item C<void fetch_buf_be_12>
+=item C<void fetch_buf_be_12(unsigned char *rb, const unsigned char *b)>
Converts a 12-byte big-endian buffer C<b> into a little-endian buffer C<b>.
@@ -374,7 +374,7 @@
/*
-=item C<void fetch_buf_le_16>
+=item C<void fetch_buf_le_16(unsigned char *rb, const unsigned char *b)>
Converts a 16-byte little-endian buffer C<b> into a big-endian buffer C<b>.
@@ -410,7 +410,7 @@
/*
-=item C<void fetch_buf_be_16>
+=item C<void fetch_buf_be_16(unsigned char *rb, const unsigned char *b)>
Converts a 16-byte big-endian buffer C<b> into a little-endian buffer C<b>.
@@ -446,7 +446,7 @@
/*
-=item C<void fetch_buf_le_32>
+=item C<void fetch_buf_le_32(unsigned char *rb, const unsigned char *b)>
Converts a 32-byte little-endian buffer C<b> into a big-endian buffer C<b>.
@@ -498,7 +498,7 @@
/*
-=item C<void fetch_buf_be_32>
+=item C<void fetch_buf_be_32(unsigned char *rb, const unsigned char *b)>
Converts a 32-byte big-endian buffer C<b> into a little-endian buffer C<b>.
Modified: trunk/src/call/ops.c
==============================================================================
--- trunk/src/call/ops.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/call/ops.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -53,7 +53,7 @@
/*
-=item C<void runops>
+=item C<void runops(PARROT_INTERP, size_t offs)>
Run parrot ops. Set exception handler and/or resume after exception.
@@ -121,7 +121,7 @@
/*
-=item C<Parrot_Context * Parrot_runops_fromc>
+=item C<Parrot_Context * Parrot_runops_fromc(PARROT_INTERP, PMC *sub)>
Runs the Parrot ops, called from C code. The function arguments are
already setup according to Parrot calling conventions, the C<sub> argument
@@ -165,7 +165,8 @@
/*
-=item C<static Parrot_Context * runops_args>
+=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.
@@ -258,7 +259,8 @@
/*
-=item C<void * Parrot_run_meth_fromc>
+=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
@@ -296,7 +298,8 @@
/*
-=item C<PMC * Parrot_runops_fromc_args>
+=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
@@ -327,7 +330,8 @@
/*
-=item C<void * Parrot_runops_fromc_args_event>
+=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
@@ -373,7 +377,8 @@
/*
-=item C<INTVAL Parrot_runops_fromc_args_reti>
+=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
@@ -404,7 +409,8 @@
/*
-=item C<FLOATVAL Parrot_runops_fromc_args_retf>
+=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
@@ -435,7 +441,8 @@
/*
-=item C<void* Parrot_run_meth_fromc_args>
+=item C<void* Parrot_run_meth_fromc_args(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
@@ -467,7 +474,8 @@
/*
-=item C<INTVAL Parrot_run_meth_fromc_args_reti>
+=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
@@ -498,7 +506,8 @@
/*
-=item C<FLOATVAL Parrot_run_meth_fromc_args_retf>
+=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
@@ -529,7 +538,8 @@
/*
-=item C<void * Parrot_runops_fromc_arglist>
+=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>
@@ -557,7 +567,8 @@
/*
-=item C<INTVAL Parrot_runops_fromc_arglist_reti>
+=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>
@@ -584,7 +595,8 @@
/*
-=item C<FLOATVAL Parrot_runops_fromc_arglist_retf>
+=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>
@@ -611,7 +623,8 @@
/*
-=item C<void* Parrot_run_meth_fromc_arglist>
+=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
@@ -640,7 +653,8 @@
/*
-=item C<INTVAL Parrot_run_meth_fromc_arglist_reti>
+=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
@@ -669,7 +683,8 @@
/*
-=item C<FLOATVAL Parrot_run_meth_fromc_arglist_retf>
+=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
@@ -703,7 +718,7 @@
=over 4
-=item C<void new_runloop_jump_point>
+=item C<void new_runloop_jump_point(PARROT_INTERP)>
Create a new runloop jump point, either by allocating it or by
getting one from the free list.
@@ -732,7 +747,7 @@
/*
-=item C<void free_runloop_jump_point>
+=item C<void free_runloop_jump_point(PARROT_INTERP)>
Place runloop jump point back on the free list.
@@ -753,7 +768,7 @@
/*
-=item C<void destroy_runloop_jump_points>
+=item C<void destroy_runloop_jump_points(PARROT_INTERP)>
Destroys (and frees the memory of) the runloop jump point list and the
associated free list for the specified interpreter.
@@ -772,7 +787,7 @@
/*
-=item C<void really_destroy_runloop_jump_points>
+=item C<void really_destroy_runloop_jump_points(Parrot_runloop *jump_point)>
Takes a pointer to a runloop jump point (which had better be the last one in
the list). Walks back through the list, freeing the memory of each one, until
Modified: trunk/src/datatypes.c
==============================================================================
--- trunk/src/datatypes.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/datatypes.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -27,7 +27,7 @@
/*
-=item C<INTVAL Parrot_get_datatype_enum>
+=item C<INTVAL Parrot_get_datatype_enum(PARROT_INTERP, const STRING *type_name)>
Return datatype C<enum> for C<STRING*> type_name.
@@ -58,7 +58,7 @@
/*
-=item C<STRING * Parrot_get_datatype_name>
+=item C<STRING * Parrot_get_datatype_name(PARROT_INTERP, INTVAL type)>
Return datatype name for C<type>.
@@ -83,7 +83,7 @@
/*
-=item C<FLOATVAL floatval_divide_by_zero>
+=item C<FLOATVAL floatval_divide_by_zero(PARROT_INTERP, FLOATVAL num)>
=cut
Modified: trunk/src/debug.c
==============================================================================
--- trunk/src/debug.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/debug.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -575,7 +575,7 @@
/*
-=item C<static const DebuggerCmd * get_cmd>
+=item C<static const DebuggerCmd * get_cmd(const char **cmd)>
=cut
@@ -633,7 +633,7 @@
/*
-=item C<static const char * skip_whitespace>
+=item C<static const char * skip_whitespace(const char *cmd)>
=cut
@@ -652,7 +652,7 @@
/*
-=item C<static unsigned long get_uint>
+=item C<static unsigned long get_uint(const char **cmd, unsigned int def)>
=cut
@@ -675,7 +675,7 @@
/*
-=item C<static unsigned long get_ulong>
+=item C<static unsigned long get_ulong(const char **cmd, unsigned long def)>
=cut
@@ -698,7 +698,7 @@
/*
-=item C<static void chop_newline>
+=item C<static void chop_newline(char * buf)>
If the C string argument end with a newline, delete it.
@@ -718,7 +718,7 @@
/*
-=item C<static const char * nextarg>
+=item C<static const char * nextarg(const char *command)>
Returns the position just past the current argument in the PASM instruction
C<command>. This is not the same as C<skip_command()>, which is intended for
@@ -751,7 +751,7 @@
/*
-=item C<static const char * skip_command>
+=item C<static const char * skip_command(const char *str)>
Returns the pointer past the current debugger command. (This is an
alternative to the C<skip_command()> macro above.)
@@ -777,7 +777,7 @@
/*
-=item C<static const char * parse_int>
+=item C<static const char * parse_int(const char *str, int *intP)>
Parse an C<int> out of a string and return a pointer to just after the C<int>.
The output parameter C<intP> contains the parsed value.
@@ -801,7 +801,7 @@
/*
-=item C<static const char * parse_string>
+=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 +850,7 @@
/*
-=item C<static const char* parse_key>
+=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.
@@ -903,7 +903,7 @@
/*
-=item C<static void debugger_cmdline>
+=item C<static void debugger_cmdline(PARROT_INTERP)>
Debugger command line.
@@ -936,7 +936,7 @@
/*
-=item C<static void close_script_file>
+=item C<static void close_script_file(PARROT_INTERP)>
Close the script file, returning to command prompt mode.
@@ -960,7 +960,7 @@
/*
-=item C<void Parrot_debugger_init>
+=item C<void Parrot_debugger_init(PARROT_INTERP)>
Initializes the Parrot debugger, if it's not already initialized.
@@ -996,7 +996,7 @@
/*
-=item C<void Parrot_debugger_destroy>
+=item C<void Parrot_debugger_destroy(PARROT_INTERP)>
Destroy the current Parrot debugger instance.
@@ -1028,7 +1028,7 @@
/*
-=item C<void Parrot_debugger_load>
+=item C<void Parrot_debugger_load(PARROT_INTERP, STRING *filename)>
Loads a Parrot source file for the current program.
@@ -1055,7 +1055,7 @@
/*
-=item C<void Parrot_debugger_start>
+=item C<void Parrot_debugger_start(PARROT_INTERP, opcode_t * cur_opcode)>
Start debugger.
@@ -1097,7 +1097,7 @@
/*
-=item C<void Parrot_debugger_break>
+=item C<void Parrot_debugger_break(PARROT_INTERP, opcode_t * cur_opcode)>
Breaks execution and drops into the debugger. If we are already into the
debugger and it is the first call, set a breakpoint.
@@ -1153,7 +1153,7 @@
/*
-=item C<void PDB_get_command>
+=item C<void PDB_get_command(PARROT_INTERP)>
Get a command from the user input to execute.
@@ -1278,7 +1278,7 @@
/*
-=item C<void PDB_script_file>
+=item C<void PDB_script_file(PARROT_INTERP, const char *command)>
Interprets the contents of a file as user input commands
@@ -1314,7 +1314,7 @@
/*
-=item C<int PDB_run_command>
+=item C<int PDB_run_command(PARROT_INTERP, const char *command)>
Run a command.
@@ -1365,7 +1365,7 @@
/*
-=item C<void PDB_next>
+=item C<void PDB_next(PARROT_INTERP, const char *command)>
Execute the next N operation(s).
@@ -1430,7 +1430,7 @@
/*
-=item C<void PDB_trace>
+=item C<void PDB_trace(PARROT_INTERP, const char *command)>
Execute the next N operations; if no number is specified, it defaults to 1.
@@ -1488,7 +1488,7 @@
/*
-=item C<static unsigned short condition_regtype>
+=item C<static unsigned short condition_regtype(const char *cmd)>
=cut
@@ -1518,7 +1518,7 @@
/*
-=item C<PDB_condition_t * PDB_cond>
+=item C<PDB_condition_t * PDB_cond(PARROT_INTERP, const char *command)>
Analyzes a condition from the user input.
@@ -1690,7 +1690,7 @@
/*
-=item C<void PDB_watchpoint>
+=item C<void PDB_watchpoint(PARROT_INTERP, const char *command)>
Set a watchpoint.
@@ -1717,7 +1717,7 @@
/*
-=item C<void PDB_set_break>
+=item C<void PDB_set_break(PARROT_INTERP, const char *command)>
Set a break point, the source code file must be loaded.
@@ -1841,7 +1841,7 @@
/*
-=item C<static void list_breakpoints>
+=item C<static void list_breakpoints(PDB_t *pdb)>
=cut
@@ -1865,7 +1865,7 @@
/*
-=item C<void PDB_init>
+=item C<void PDB_init(PARROT_INTERP, const char *command)>
Init the program.
@@ -1889,7 +1889,7 @@
/*
-=item C<void PDB_continue>
+=item C<void PDB_continue(PARROT_INTERP, const char *command)>
Continue running the program. If a number is specified, skip that many
breakpoints.
@@ -1947,7 +1947,7 @@
/*
-=item C<PDB_breakpoint_t * PDB_find_breakpoint>
+=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.
@@ -1990,7 +1990,7 @@
/*
-=item C<void PDB_disable_breakpoint>
+=item C<void PDB_disable_breakpoint(PARROT_INTERP, const char *command)>
Disable a breakpoint; it can be reenabled with the enable command.
@@ -2011,7 +2011,7 @@
/*
-=item C<void PDB_enable_breakpoint>
+=item C<void PDB_enable_breakpoint(PARROT_INTERP, const char *command)>
Reenable a disabled breakpoint; if the breakpoint was not disabled, has
no effect.
@@ -2033,7 +2033,7 @@
/*
-=item C<void PDB_delete_breakpoint>
+=item C<void PDB_delete_breakpoint(PARROT_INTERP, const char *command)>
Delete a breakpoint.
@@ -2082,7 +2082,7 @@
/*
-=item C<void PDB_delete_condition>
+=item C<void PDB_delete_condition(PARROT_INTERP, PDB_breakpoint_t *breakpoint)>
Delete a condition associated with a breakpoint.
@@ -2115,7 +2115,7 @@
/*
-=item C<void PDB_skip_breakpoint>
+=item C<void PDB_skip_breakpoint(PARROT_INTERP, unsigned long i)>
Skip C<i> times all breakpoints.
@@ -2136,7 +2136,7 @@
/*
-=item C<char PDB_program_end>
+=item C<char PDB_program_end(PARROT_INTERP)>
End the program.
@@ -2161,7 +2161,7 @@
/*
-=item C<char PDB_check_condition>
+=item C<char PDB_check_condition(PARROT_INTERP, const PDB_condition_t *condition)>
Returns true if the condition was met.
@@ -2271,7 +2271,7 @@
/*
-=item C<static PDB_breakpoint_t * current_breakpoint>
+=item C<static PDB_breakpoint_t * current_breakpoint(PDB_t * pdb)>
Returns a pointer to the breakpoint at the current position,
or NULL if there is none.
@@ -2296,7 +2296,7 @@
/*
-=item C<char PDB_break>
+=item C<char PDB_break(PARROT_INTERP)>
Returns true if we have to stop running.
@@ -2366,7 +2366,7 @@
/*
-=item C<char * PDB_escape>
+=item C<char * PDB_escape(const char *string, UINTVAL length)>
Escapes C<">, C<\r>, C<\n>, C<\t>, C<\a> and C<\\>.
@@ -2438,7 +2438,7 @@
/*
-=item C<int PDB_unescape>
+=item C<int PDB_unescape(char *string)>
Do inplace unescape of C<\r>, C<\n>, C<\t>, C<\a> and C<\\>.
@@ -2493,7 +2493,9 @@
/*
-=item C<size_t PDB_disassemble_op>
+=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>.
@@ -2805,7 +2807,7 @@
/*
-=item C<void PDB_disassemble>
+=item C<void PDB_disassemble(PARROT_INTERP, const char *command)>
Disassemble the bytecode.
@@ -2907,7 +2909,8 @@
/*
-=item C<long PDB_add_label>
+=item C<long PDB_add_label(PDB_file_t *file, const opcode_t *cur_opcode,
+opcode_t offset)>
Add a label to the label list.
@@ -2953,7 +2956,7 @@
/*
-=item C<void PDB_free_file>
+=item C<void PDB_free_file(PARROT_INTERP, PDB_file_t *file)>
Frees any allocated source files.
@@ -3002,7 +3005,7 @@
/*
-=item C<void PDB_load_source>
+=item C<void PDB_load_source(PARROT_INTERP, const char *command)>
Load a source code file.
@@ -3107,7 +3110,7 @@
/*
-=item C<char PDB_hasinstruction>
+=item C<char PDB_hasinstruction(const char *c)>
Return true if the line has an instruction.
@@ -3154,7 +3157,7 @@
/*
-=item C<void PDB_list>
+=item C<void PDB_list(PARROT_INTERP, const char *command)>
Show lines from the source code file.
@@ -3223,7 +3226,7 @@
/*
-=item C<void PDB_eval>
+=item C<void PDB_eval(PARROT_INTERP, const char *command)>
C<eval>s an instruction.
@@ -3244,7 +3247,7 @@
/*
-=item C<opcode_t * PDB_compile>
+=item C<opcode_t * PDB_compile(PARROT_INTERP, const char *command)>
Compiles instructions with the PASM compiler.
@@ -3281,7 +3284,7 @@
/*
-=item C<static void dump_string>
+=item C<static void dump_string(PARROT_INTERP, const STRING *s)>
Dumps the buflen, flags, bufused, strlen, and offset associated with a string
and the string itself.
@@ -3308,7 +3311,7 @@
/*
-=item C<void PDB_print>
+=item C<void PDB_print(PARROT_INTERP, const char *command)>
Print interp registers.
@@ -3327,7 +3330,7 @@
/*
-=item C<void PDB_info>
+=item C<void PDB_info(PARROT_INTERP)>
Print the interpreter info.
@@ -3372,7 +3375,7 @@
/*
-=item C<void PDB_help>
+=item C<void PDB_help(PARROT_INTERP, const char *command)>
Print the help text. "Help" with no arguments prints a list of commands.
"Help xxx" prints information on command xxx.
@@ -3414,7 +3417,7 @@
/*
-=item C<void PDB_backtrace>
+=item C<void PDB_backtrace(PARROT_INTERP)>
Prints a backtrace of the interp's call chain.
@@ -3531,7 +3534,7 @@
/*
-=item C<static const char* GDB_print_reg>
+=item C<static const char* GDB_print_reg(PARROT_INTERP, int t, int n)>
Used by GDB_P to convert register values for display. Takes register
type and number as arguments.
@@ -3571,7 +3574,7 @@
/*
-=item C<static const char* GDB_P>
+=item C<static const char* GDB_P(PARROT_INTERP, const char *s)>
Used by PDB_print to print register values. Takes a pointer to the
register name(s).
Modified: trunk/src/embed.c
==============================================================================
--- trunk/src/embed.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/embed.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -79,7 +79,7 @@
/*
-=item C<Parrot_Interp Parrot_new>
+=item C<Parrot_Interp Parrot_new(Parrot_Interp parent)>
Returns a new Parrot interpreter.
@@ -111,7 +111,7 @@
/*
-=item C<void Parrot_init_stacktop>
+=item C<void Parrot_init_stacktop(PARROT_INTERP, void *stack_top)>
Initializes the new interpreter when it hasn't been initialized before.
@@ -138,7 +138,7 @@
/*
-=item C<void Parrot_set_flag>
+=item C<void Parrot_set_flag(PARROT_INTERP, INTVAL flag)>
Sets on any of the following flags, specified by C<flag>, in the interpreter:
@@ -173,7 +173,7 @@
/*
-=item C<void Parrot_set_debug>
+=item C<void Parrot_set_debug(PARROT_INTERP, UINTVAL flag)>
Set a debug flag: C<PARROT_DEBUG_FLAG>.
@@ -191,7 +191,7 @@
/*
-=item C<void Parrot_set_executable_name>
+=item C<void Parrot_set_executable_name(PARROT_INTERP, Parrot_String name)>
Sets the name of the executable launching Parrot (see C<pbc_to_exe> and the
C<parrot> binary).
@@ -213,7 +213,7 @@
/*
-=item C<void Parrot_set_trace>
+=item C<void Parrot_set_trace(PARROT_INTERP, UINTVAL flag)>
Set a trace flag: C<PARROT_TRACE_FLAG>
@@ -232,7 +232,7 @@
/*
-=item C<void Parrot_clear_flag>
+=item C<void Parrot_clear_flag(PARROT_INTERP, INTVAL flag)>
Clears a flag in the interpreter.
@@ -250,7 +250,7 @@
/*
-=item C<void Parrot_clear_debug>
+=item C<void Parrot_clear_debug(PARROT_INTERP, UINTVAL flag)>
Clears a flag in the interpreter.
@@ -268,7 +268,7 @@
/*
-=item C<void Parrot_clear_trace>
+=item C<void Parrot_clear_trace(PARROT_INTERP, UINTVAL flag)>
Clears a flag in the interpreter.
@@ -286,7 +286,7 @@
/*
-=item C<Parrot_Int Parrot_test_flag>
+=item C<Parrot_Int Parrot_test_flag(PARROT_INTERP, INTVAL flag)>
Test the interpreter flags specified in C<flag>.
@@ -304,7 +304,7 @@
/*
-=item C<UINTVAL Parrot_test_debug>
+=item C<UINTVAL Parrot_test_debug(PARROT_INTERP, UINTVAL flag)>
Test the interpreter flags specified in C<flag>.
@@ -322,7 +322,7 @@
/*
-=item C<UINTVAL Parrot_test_trace>
+=item C<UINTVAL Parrot_test_trace(PARROT_INTERP, UINTVAL flag)>
Test the interpreter flags specified in C<flag>.
@@ -340,7 +340,7 @@
/*
-=item C<void Parrot_set_run_core>
+=item C<void Parrot_set_run_core(PARROT_INTERP, Parrot_Run_core_t core)>
Sets the specified run core.
@@ -358,7 +358,7 @@
/*
-=item C<void Parrot_setwarnings>
+=item C<void Parrot_setwarnings(PARROT_INTERP, Parrot_warnclass wc)>
Activates the given warnings.
@@ -377,7 +377,8 @@
/*
-=item C<PackFile * Parrot_pbc_read>
+=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.
@@ -563,7 +564,7 @@
/*
-=item C<void Parrot_pbc_load>
+=item C<void Parrot_pbc_load(PARROT_INTERP, PackFile *pf)>
Loads the C<PackFile> returned by C<Parrot_pbc_read()>.
@@ -586,7 +587,7 @@
/*
-=item C<void Parrot_pbc_fixup_loaded>
+=item C<void Parrot_pbc_fixup_loaded(PARROT_INTERP)>
Fixups after pbc loading
@@ -603,7 +604,7 @@
/*
-=item C<static PMC* setup_argv>
+=item C<static PMC* setup_argv(PARROT_INTERP, int argc, char **argv)>
Creates and returns C<ARGS> array PMC.
@@ -652,7 +653,7 @@
/*
-=item C<static int prof_sort_f>
+=item C<static int prof_sort_f(const void *a, const void *b)>
Sort function for profile data, by time.
@@ -679,7 +680,7 @@
/*
-=item C<static const char * op_name>
+=item C<static const char * op_name(PARROT_INTERP, int k)>
Returns the name of the opcode.
@@ -715,7 +716,7 @@
/*
-=item C<static FLOATVAL calibrate>
+=item C<static FLOATVAL calibrate(PARROT_INTERP)>
With this calibration, reported times of C<parrot -p> almost match those
measured with time C<parrot -R bounds>.
@@ -747,7 +748,7 @@
/*
-=item C<static void print_profile>
+=item C<static void print_profile(PARROT_INTERP, int status, void *p)>
Prints out a profile listing.
@@ -831,7 +832,7 @@
/*
-=item C<static void print_debug>
+=item C<static void print_debug(PARROT_INTERP, int status, void *p)>
Prints GC info.
@@ -854,7 +855,7 @@
/*
-=item C<static PMC* set_current_sub>
+=item C<static PMC* set_current_sub(PARROT_INTERP)>
Search the fixup table for a PMC matching the argument. On a match,
set up the appropriate context.
@@ -918,7 +919,7 @@
/*
-=item C<void Parrot_runcode>
+=item C<void Parrot_runcode(PARROT_INTERP, int argc, char **argv)>
Sets up C<ARGV> and runs the ops.
@@ -1014,7 +1015,7 @@
/*
-=item C<opcode_t * Parrot_debug>
+=item C<opcode_t * Parrot_debug(PARROT_INTERP, Parrot_Interp debugger, opcode_t * pc)>
Runs the interpreter's bytecode in debugging mode.
@@ -1143,7 +1144,8 @@
/*
-=item C<void Parrot_disassemble>
+=item C<void Parrot_disassemble(PARROT_INTERP, const char *outfile,
+Parrot_disassemble_options options)>
Disassembles and prints out the interpreter's bytecode.
@@ -1235,7 +1237,7 @@
/*
-=item C<void Parrot_run_native>
+=item C<void Parrot_run_native(PARROT_INTERP, native_func_t func)>
Run the C function C<func> through the program C<[enternative, end]>.
This ensures that the function is run with the same setup as in other
@@ -1275,7 +1277,8 @@
/*
-=item C<Parrot_PMC Parrot_compile_string>
+=item C<Parrot_PMC Parrot_compile_string(PARROT_INTERP, Parrot_String type,
+const char *code, Parrot_String *error)>
Compile code string.
Modified: trunk/src/exit.c
==============================================================================
--- trunk/src/exit.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/exit.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -28,7 +28,8 @@
/*
-=item C<void Parrot_on_exit>
+=item C<void Parrot_on_exit(PARROT_INTERP, exit_handler_f function,
+void *arg)>
Register the specified function to be called on exit.
@@ -54,7 +55,7 @@
/*
-=item C<void Parrot_exit>
+=item C<void Parrot_exit(PARROT_INTERP, int status)>
Exit, calling any registered exit handlers.
Modified: trunk/src/gc/api.c
==============================================================================
--- trunk/src/gc/api.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/gc/api.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -52,7 +52,7 @@
/*
-=item C<PMC * new_pmc_header>
+=item C<PMC * new_pmc_header(PARROT_INTERP, UINTVAL flags)>
Gets a new PMC header from the PMC pool's free list. Guaranteed to return a
valid PMC object or else Parrot will panic. Sets the necessary flags for the
@@ -101,7 +101,7 @@
/*
-=item C<static PMC_EXT * new_pmc_ext>
+=item C<static PMC_EXT * new_pmc_ext(PARROT_INTERP)>
Gets a new free C<PMC_EXT> structure from the PMC_EXT pool. A pointer to the
new PMC_EXT is returned. Does not check to ensure the PMC_EXT is non-null
@@ -126,7 +126,7 @@
/*
-=item C<void add_pmc_ext>
+=item C<void add_pmc_ext(PARROT_INTERP, PMC *pmc)>
Obtains a new C<PMC_EXT> structure, and attaches it to the given C<PMC>.
Sets the necessary flags associated with the PMC_EXT structure. Ensures
@@ -159,7 +159,7 @@
/*
-=item C<void add_pmc_sync>
+=item C<void add_pmc_sync(PARROT_INTERP, PMC *pmc)>
Adds a C<Sync*> structure to the given C<PMC>. Initializes the PMC's owner
field and the synchronization mutext. Does not check to ensure the C<Sync *> is
@@ -187,7 +187,7 @@
/*
-=item C<STRING * new_string_header>
+=item C<STRING * new_string_header(PARROT_INTERP, UINTVAL flags)>
Returns a new C<STRING> header from the string pool or the constant string
pool. Sets default flags on the string object: C<PObj_is_string_FLAG>,
@@ -219,7 +219,7 @@
/*
-=item C<Buffer * new_buffer_header>
+=item C<Buffer * new_buffer_header(PARROT_INTERP)>
Creates and returns a new C<Buffer> from the buffer header pool. Calls
C<get_free_buffer> to do all the work.
@@ -241,7 +241,7 @@
/*
-=item C<void * new_bufferlike_header>
+=item C<void * new_bufferlike_header(PARROT_INTERP, size_t size)>
Returns a new buffer-like header from the appropriate sized pool.
@@ -263,7 +263,7 @@
/*
-=item C<void Parrot_gc_free_pmc>
+=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
@@ -303,7 +303,7 @@
/*
-=item C<void Parrot_gc_free_pmc_ext>
+=item C<void Parrot_gc_free_pmc_ext(PARROT_INTERP, PMC *p)>
Frees the C<PMC_EXT> structure attached to a PMC, if it exists.
@@ -335,7 +335,7 @@
/*
-=item C<void Parrot_gc_free_sysmem>
+=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 +359,7 @@
/*
-=item C<void Parrot_gc_free_buffer_malloc>
+=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 +394,7 @@
/*
-=item C<void Parrot_gc_free_buffer>
+=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.
@@ -423,7 +423,7 @@
/*
-=item C<void Parrot_gc_profile_start>
+=item C<void Parrot_gc_profile_start(PARROT_INTERP)>
Records the start time of a GC mark run when profiling is enabled.
@@ -441,7 +441,7 @@
/*
-=item C<void Parrot_gc_profile_end>
+=item C<void Parrot_gc_profile_end(PARROT_INTERP, int what)>
Records the end time of the GC mark run part C<what> run when profiling is
enabled. Also record start time of next part.
@@ -476,7 +476,7 @@
/*
-=item C<void Parrot_gc_ms_run_init>
+=item C<void Parrot_gc_ms_run_init(PARROT_INTERP)>
Prepares the collector for a mark & sweep GC run. This is the
initializer function for the MS garbage collector.
@@ -500,7 +500,7 @@
/*
-=item C<void Parrot_do_gc_run>
+=item C<void Parrot_do_gc_run(PARROT_INTERP, UINTVAL flags)>
Calls the configured garbage collector to find and reclaim unused
headers.
Modified: trunk/src/gc/generational_ms.c
==============================================================================
--- trunk/src/gc/generational_ms.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/gc/generational_ms.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -498,7 +498,7 @@
=over 4
-=item C<static void parrot_gc_gms_deinit>
+=item C<static void parrot_gc_gms_deinit(PARROT_INTERP)>
Free used resources.
@@ -521,7 +521,7 @@
/*
-=item C<static void gc_gms_pool_init>
+=item C<static void gc_gms_pool_init(PARROT_INTERP, Small_Object_Pool *pool)>
Initialize pool variables. This function must set the pool function pointers
for C<add_free_object>, C<get_free_object>, C<alloc_objects>, and
@@ -549,7 +549,7 @@
/*
-=item C<void Parrot_gc_gms_init>
+=item C<void Parrot_gc_gms_init(PARROT_INTERP)>
Initialize the state structures of the gc system. Called immediately before
creation of memory pools.
@@ -584,7 +584,7 @@
=over 4
-=item C<static void gc_gms_add_free_object>
+=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.
@@ -603,7 +603,8 @@
/*
-=item C<static void gc_gms_chain_objects>
+=item C<static void gc_gms_chain_objects(PARROT_INTERP, Small_Object_Pool *pool,
+Small_Object_Arena *new_arena, size_t real_size)>
TODO: interfere active_destroy and put these items into a
separate white area, so that a sweep has just to run through these
@@ -693,7 +694,7 @@
/*
-=item C<static void gc_gms_alloc_objects>
+=item C<static void gc_gms_alloc_objects(PARROT_INTERP, Small_Object_Pool *pool)>
Allocate new objects for the given pool.
@@ -726,7 +727,7 @@
/*
-=item C<static void gc_gms_more_objects>
+=item C<static void gc_gms_more_objects(PARROT_INTERP, Small_Object_Pool *pool)>
Run a GC cycle or allocate new objects for the given pool.
@@ -753,7 +754,7 @@
/*
-=item C<static PObj * gc_gms_get_free_object>
+=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.
@@ -809,7 +810,8 @@
=over 4
-=item C<static Gc_gms_gen * gc_gms_create_gen>
+=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.
@@ -840,7 +842,7 @@
/*
-=item C<static void gc_gms_init_gen>
+=item C<static void gc_gms_init_gen(PARROT_INTERP, Small_Object_Pool *pool)>
Initalize the generation system by creating the first two generations.
@@ -870,7 +872,7 @@
/*
-=item C<static Gc_gms_gen * gc_gms_find_gen>
+=item C<static Gc_gms_gen * gc_gms_find_gen(PARROT_INTERP, const Gc_gms_hdr *h, UINTVAL gen_no)>
=cut
@@ -906,7 +908,7 @@
/*
-=item C<static void gc_gms_promote>
+=item C<static void gc_gms_promote(PARROT_INTERP, Gc_gms_hdr *h, UINTVAL gen_no)>
=cut
@@ -952,7 +954,7 @@
/*
-=item C<static void gc_gms_store_hdr_list>
+=item C<static void gc_gms_store_hdr_list(PARROT_INTERP, Gc_gms_hdr_list *l, Gc_gms_hdr *h)>
=cut
@@ -984,7 +986,7 @@
/*
-=item C<static void gc_gms_clear_hdr_list>
+=item C<static void gc_gms_clear_hdr_list(PARROT_INTERP, Gc_gms_hdr_list *l)>
=cut
@@ -1005,7 +1007,7 @@
/*
-=item C<static void gc_gms_store_igp>
+=item C<static void gc_gms_store_igp(PARROT_INTERP, Gc_gms_hdr *h)>
=cut
@@ -1023,7 +1025,7 @@
/*
-=item C<static void gc_gms_clear_igp>
+=item C<static void gc_gms_clear_igp(PARROT_INTERP, Gc_gms_gen *gen)>
=cut
@@ -1040,7 +1042,7 @@
/*
-=item C<void parrot_gc_gms_wb>
+=item C<void parrot_gc_gms_wb(PARROT_INTERP, PMC *agg, void *old, void *_new)>
Called by the write barrier. The aggregate belongs to an older generation
then the I<new> value written into it. Put the header of the new value
@@ -1077,7 +1079,8 @@
/*
-=item C<void parrot_gc_gms_wb_key>
+=item C<void parrot_gc_gms_wb_key(PARROT_INTERP, PMC *agg, void *old,
+void *old_key, void *_new, void *new_key)>
=cut
@@ -1111,7 +1114,8 @@
/*
-=item C<static void gc_gms_merge_gen>
+=item C<static void gc_gms_merge_gen(PARROT_INTERP, Small_Object_Pool *pool,
+int flag, Gc_gms_plan *plan)>
=cut
@@ -1144,7 +1148,8 @@
/*
-=item C<static void gc_gms_use_gen>
+=item C<static void gc_gms_use_gen(PARROT_INTERP, Small_Object_Pool *pool,
+int flag, const Gc_gms_plan *plan)>
=cut
@@ -1178,7 +1183,7 @@
/*
-=item C<static int set_gen_cb>
+=item C<static int set_gen_cb(PARROT_INTERP, Small_Object_Pool *pool, int flag, void *arg)>
=cut
@@ -1200,7 +1205,7 @@
/*
-=item C<static void gc_gms_set_gen>
+=item C<static void gc_gms_set_gen(PARROT_INTERP)>
=cut
@@ -1315,7 +1320,7 @@
/*
-=item C<static void gc_gms_setto_gray>
+=item C<static void gc_gms_setto_gray(PARROT_INTERP, Gc_gms_hdr *h, int priority)>
Set the white header C<h> to gray.
@@ -1378,7 +1383,7 @@
/*
-=item C<static void gc_gms_setto_black>
+=item C<static void gc_gms_setto_black(PARROT_INTERP, Gc_gms_hdr *h, int priority)>
Set the white header C<h> to black.
@@ -1438,7 +1443,7 @@
/*
-=item C<void parrot_gc_gms_pobject_lives>
+=item C<void parrot_gc_gms_pobject_lives(PARROT_INTERP, PObj *obj)>
Set the object live - called by the pobject_lives macro
@@ -1468,7 +1473,8 @@
/*
-=item C<static int init_mark_cb>
+=item C<static int init_mark_cb(PARROT_INTERP, Small_Object_Pool *pool,
+int flag, void *arg)>
=cut
@@ -1487,7 +1493,7 @@
/*
-=item C<static void gc_gms_init_mark>
+=item C<static void gc_gms_init_mark(PARROT_INTERP)>
Initialize the mark phase of GC.
@@ -1511,7 +1517,8 @@
/*
-=item C<static int trace_igp_cb>
+=item C<static int trace_igp_cb(PARROT_INTERP, Small_Object_Pool *pool,
+int flag, void *arg)>
=cut
@@ -1537,7 +1544,7 @@
/*
-=item C<static int gc_gms_trace_root>
+=item C<static int gc_gms_trace_root(PARROT_INTERP, int trace_stack)>
Trace the root set. If C<trace_stack> is true, trace system areas.
@@ -1559,7 +1566,8 @@
/*
-=item C<static int trace_children_cb>
+=item C<static int trace_children_cb(PARROT_INTERP, Small_Object_Pool *pool,
+int flag, void *arg)>
=cut
@@ -1604,7 +1612,7 @@
/*
-=item C<static int gc_gms_trace_children>
+=item C<static int gc_gms_trace_children(PARROT_INTERP)>
Traverse gray objects: mark and blacken. Returns 0 if the trace was aborted
lazily.
@@ -1623,7 +1631,7 @@
/*
-=item C<static int sweep_cb_pmc>
+=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
@@ -1663,7 +1671,8 @@
/*
-=item C<static int sweep_cb_buf>
+=item C<static int sweep_cb_buf(PARROT_INTERP, Small_Object_Pool *pool,
+int flag, void *arg)>
=cut
@@ -1729,7 +1738,7 @@
/*
-=item C<static void gc_gms_sweep>
+=item C<static void gc_gms_sweep(PARROT_INTERP)>
Free unused resources, put white objects onto free_list.
@@ -1747,7 +1756,8 @@
/*
-=item C<static int end_cycle_cb>
+=item C<static int end_cycle_cb(PARROT_INTERP, Small_Object_Pool *pool,
+int flag, void *arg)>
=cut
@@ -1772,7 +1782,7 @@
/*
-=item C<static void gc_gms_end_cycle>
+=item C<static void gc_gms_end_cycle(PARROT_INTERP)>
=cut
@@ -1793,7 +1803,7 @@
=over 4
-=item C<static void parrot_gc_gms_run>
+=item C<static void parrot_gc_gms_run(PARROT_INTERP, UINTVAL flags)>
Interface to C<Parrot_do_gc_run>. C<flags> is one of:
@@ -1849,7 +1859,7 @@
/*
-=item C<static void gms_debug_verify>
+=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 18:24:40 2009 (r37847)
+++ trunk/src/gc/incremental_ms.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -504,7 +504,8 @@
/*
-=item C<static void gc_ims_add_free_object>
+=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.
@@ -531,7 +532,7 @@
/*
-=item C<static void * gc_ims_get_free_object>
+=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.
@@ -574,7 +575,7 @@
/*
-=item C<static void gc_ims_alloc_objects>
+=item C<static void gc_ims_alloc_objects(PARROT_INTERP, Small_Object_Pool *pool)>
Allocate new objects for the given pool.
@@ -604,7 +605,7 @@
/*
-=item C<static void gc_ims_pool_init>
+=item C<static void gc_ims_pool_init(PARROT_INTERP, Small_Object_Pool *pool)>
Initializes a pool by setting the appropriate function pointers to add, get,
and allocate objects.
@@ -626,7 +627,7 @@
/*
-=item C<static void parrot_gc_ims_deinit>
+=item C<static void parrot_gc_ims_deinit(PARROT_INTERP)>
Shuts down this GC system.
@@ -647,7 +648,7 @@
/*
-=item C<void Parrot_gc_ims_init>
+=item C<void Parrot_gc_ims_init(PARROT_INTERP)>
Initialize the state structures of the gc system. Called immediately before
creation of memory pools. This function must set the function pointers
@@ -678,7 +679,7 @@
/*
-=item C<static void parrot_gc_ims_reinit>
+=item C<static void parrot_gc_ims_reinit(PARROT_INTERP)>
Reinitialize the collector for the next collection cycle.
@@ -710,7 +711,7 @@
/*
-=item C<static void parrot_gc_ims_mark>
+=item C<static void parrot_gc_ims_mark(PARROT_INTERP)>
Mark a bunch of children.
@@ -753,7 +754,7 @@
/*
-=item C<static int sweep_cb>
+=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).
@@ -780,7 +781,7 @@
/*
-=item C<static void parrot_gc_ims_sweep>
+=item C<static void parrot_gc_ims_sweep(PARROT_INTERP)>
Free unused objects in all header pools.
@@ -831,7 +832,8 @@
/*
-=item C<static int collect_cb>
+=item C<static int collect_cb(PARROT_INTERP, Small_Object_Pool *pool, int flag,
+void *arg)>
Callback to collect a header pool (see Parrot_forall_header_pools).
@@ -881,7 +883,7 @@
/*
-=item C<static int parrot_gc_ims_collect>
+=item C<static int parrot_gc_ims_collect(PARROT_INTERP, int check_only)>
Run the copying collector in memory pools, if it could yield some free memory.
@@ -926,7 +928,7 @@
/*
-=item C<static void parrot_gc_ims_run_increment>
+=item C<static void parrot_gc_ims_run_increment(PARROT_INTERP)>
Run one increment of collection. This function is triggered by object
allocation.
@@ -1004,7 +1006,7 @@
/*
-=item C<static void parrot_gc_ims_run>
+=item C<static void parrot_gc_ims_run(PARROT_INTERP, UINTVAL flags)>
Interface to C<Parrot_do_gc_run>. C<flags> is one of:
@@ -1107,7 +1109,7 @@
/*
-=item C<void Parrot_gc_ims_wb>
+=item C<void Parrot_gc_ims_wb(PARROT_INTERP, PMC *agg, PMC *_new)>
Write barrier called by the GC_WRITE_BARRIER macro. Always when storing
a white object into a black aggregate, either the object must
Modified: trunk/src/gc/mark_sweep.c
==============================================================================
--- trunk/src/gc/mark_sweep.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/gc/mark_sweep.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -140,7 +140,7 @@
/*
-=item C<void Parrot_gc_ms_run>
+=item C<void Parrot_gc_ms_run(PARROT_INTERP, UINTVAL flags)>
Runs the stop-the-world mark & sweep (MS) collector.
@@ -245,7 +245,7 @@
/*
-=item C<int Parrot_gc_trace_root>
+=item C<int Parrot_gc_trace_root(PARROT_INTERP, Parrot_gc_trace_type trace)>
Traces the root set. Returns 0 if it's a lazy GC run and all objects
that need timely destruction were found.
@@ -369,7 +369,7 @@
/*
-=item C<void Parrot_gc_sweep>
+=item C<void Parrot_gc_sweep(PARROT_INTERP, Small_Object_Pool *pool)>
Puts any buffers/PMCs that are now unused onto the pool's free list. If
C<GC_IS_MALLOC>, bufstart gets freed too, if possible. Avoids buffers that
@@ -461,7 +461,7 @@
/*
-=item C<void pobject_lives>
+=item C<void pobject_lives(PARROT_INTERP, PObj *obj)>
Marks the PObj as "alive" for the Garbage Collector. Takes a pointer to a PObj,
and performs necessary marking to ensure the PMC and its direct children nodes
@@ -525,7 +525,7 @@
/*
-=item C<INTVAL contained_in_pool>
+=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>.
@@ -557,7 +557,7 @@
/*
-=item C<int Parrot_is_const_pmc>
+=item C<int Parrot_is_const_pmc(PARROT_INTERP, const PMC *pmc)>
Returns whether C<*pmc> is a constant PMC. The given pointer is a constant
PMC if it points into the constant PMC pool.
@@ -585,7 +585,7 @@
/*
-=item C<static void mark_special>
+=item C<static void mark_special(PARROT_INTERP, PMC *obj)>
Marks the children of a special PMC. Handles the marking necessary
for shared PMCs, and ensures timely marking of high-priority PMCs.
@@ -680,7 +680,7 @@
/*
-=item C<static void more_traceable_objects>
+=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 +714,7 @@
/*
-=item C<static void gc_ms_add_free_pmc_ext>
+=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 +737,7 @@
/*
-=item C<static void gc_ms_add_free_object>
+=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 +761,7 @@
/*
-=item C<static void * gc_ms_get_free_object>
+=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 +800,7 @@
/*
-=item C<static void * gc_ms_get_free_pmc_ext>
+=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 +835,7 @@
/*
-=item C<static int sweep_cb>
+=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
@@ -865,7 +865,7 @@
/*
-=item C<static int trace_active_PMCs>
+=item C<static int trace_active_PMCs(PARROT_INTERP, Parrot_gc_trace_type trace)>
Performs a full trace run and marks all the PMCs as active if they
are. Returns whether the run completed, that is, whether it's safe
@@ -890,7 +890,7 @@
/*
-=item C<static void clear_live_bits>
+=item C<static void clear_live_bits(const Small_Object_Pool *pool)>
Runs through all PMC arenas and clear live bits. This is used to reset
the GC system after a full system sweep.
@@ -921,7 +921,7 @@
/*
-=item C<void Parrot_gc_clear_live_bits>
+=item C<void Parrot_gc_clear_live_bits(PARROT_INTERP)>
Resets the PMC pool, so all objects are marked as "White". This
is done after a GC run to reset the system and prepare for the
@@ -942,7 +942,7 @@
/*
-=item C<int Parrot_gc_trace_children>
+=item C<int Parrot_gc_trace_children(PARROT_INTERP, size_t how_many)>
Returns whether the tracing process has completed.
@@ -1017,7 +1017,8 @@
/*
-=item C<void Parrot_add_to_free_list>
+=item C<void Parrot_add_to_free_list(PARROT_INTERP, Small_Object_Pool *pool,
+Small_Object_Arena *arena)>
Adds the objects in the newly allocated C<arena> to the free list.
@@ -1052,7 +1053,8 @@
/*
-=item C<void Parrot_append_arena_in_pool>
+=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
@@ -1092,7 +1094,7 @@
/*
-=item C<static void gc_ms_alloc_objects>
+=item C<static void gc_ms_alloc_objects(PARROT_INTERP, Small_Object_Pool *pool)>
New arena allocator function for the MS garbage collector system. Allocates
and initializes a new memory arena in the given pool. Adds all the new
@@ -1144,7 +1146,7 @@
/*
-=item C<Small_Object_Pool * new_small_object_pool>
+=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
@@ -1175,7 +1177,7 @@
/*
-=item C<void gc_pmc_ext_pool_init>
+=item C<void gc_pmc_ext_pool_init(Small_Object_Pool *pool)>
Initialize the PMC_EXT pool functions. This is done separately from other
pools.
@@ -1197,7 +1199,7 @@
/*
-=item C<static void gc_ms_pool_init>
+=item C<static void gc_ms_pool_init(PARROT_INTERP, Small_Object_Pool *pool)>
Initialize a memory pool for the MS garbage collector system. Sets the
function pointers necessary to perform basic operations on a pool, such
@@ -1220,7 +1222,7 @@
/*
-=item C<void Parrot_gc_ms_init>
+=item C<void Parrot_gc_ms_init(PARROT_INTERP)>
Initialize the state structures of the gc system. Called immediately before
creation of memory pools. This function must set the function pointers
@@ -1245,7 +1247,8 @@
/*
-=item C<void Parrot_small_object_pool_merge>
+=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 18:24:40 2009 (r37847)
+++ trunk/src/gc/memory.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -28,7 +28,7 @@
/*
-=item C<void * mem_sys_allocate>
+=item C<void * mem_sys_allocate(size_t size)>
Uses C<malloc> to allocate system memory. Panics if the system cannot
return memory.
@@ -55,7 +55,7 @@
/*
-=item C<void * mem__internal_allocate>
+=item C<void * mem__internal_allocate(size_t size, const char *file, int line)>
Calls C<malloc> to allocate memory from the system, Panics if there is no
memory available. If C<DETAIL_MEMORY_DEBUG> macro is defined, prints
@@ -86,7 +86,7 @@
/*
-=item C<void * mem_sys_allocate_zeroed>
+=item C<void * mem_sys_allocate_zeroed(size_t size)>
Uses C<calloc> to allocate system memory. Guaranteed to succeed, Panics
otherwise.
@@ -113,7 +113,7 @@
/*
-=item C<void * mem__internal_allocate_zeroed>
+=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
@@ -144,7 +144,7 @@
/*
-=item C<void * mem_sys_realloc>
+=item C<void * mem_sys_realloc(void *from, size_t size)>
Resizes a chunk of memory. Unlike C<realloc>, it can handle a
NULL pointer, in which case it calls C<calloc> to create the memory
@@ -180,7 +180,7 @@
/*
-=item C<void * mem_sys_realloc_zeroed>
+=item C<void * mem_sys_realloc_zeroed(void *from, size_t size, size_t old_size)>
Resizes a chunk of system memory and fills the newly allocated space
with zeroes. If the pointer is C<NULL> a new memory block is
@@ -216,7 +216,8 @@
/*
-=item C<void * mem__internal_realloc>
+=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
@@ -253,7 +254,8 @@
/*
-=item C<void * mem__internal_realloc_zeroed>
+=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
@@ -293,7 +295,7 @@
/*
-=item C<void mem_sys_free>
+=item C<void mem_sys_free(void *from)>
Frees a chunk of memory back to the system.
@@ -315,7 +317,7 @@
/*
-=item C<void mem__internal_free>
+=item C<void mem__internal_free(void *from, const char *file, int line)>
Frees a chunk of memory back to the system. If
C<DETAIL_MEMORY_DEBUG> macro is defined, prints debug information to
@@ -340,7 +342,7 @@
/*
-=item C<void mem_setup_allocator>
+=item C<void mem_setup_allocator(PARROT_INTERP, void *stacktop)>
Initializes the memory allocator and the garbage collection subsystem.
Calls the initialization function associated with each collector, which
Modified: trunk/src/gc/pools.c
==============================================================================
--- trunk/src/gc/pools.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/gc/pools.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -84,7 +84,7 @@
=over 4
-=item C<void * get_free_buffer>
+=item C<void * get_free_buffer(PARROT_INTERP, Small_Object_Pool *pool)>
Gets a free object or buffer from the given C<pool> and returns it. If the
object is larger then a standard C<PObj> structure, all additional memory is
@@ -122,7 +122,7 @@
=over 4
-=item C<Small_Object_Pool * new_pmc_pool>
+=item C<Small_Object_Pool * new_pmc_pool(PARROT_INTERP)>
Creates and initializes a new pool for PMCs and returns it.
@@ -150,7 +150,7 @@
/*
-=item C<Small_Object_Pool * new_bufferlike_pool>
+=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.
@@ -180,7 +180,7 @@
/*
-=item C<Small_Object_Pool * new_buffer_pool>
+=item C<Small_Object_Pool * new_buffer_pool(PARROT_INTERP)>
Creates a new C<Small_Object_Pool> structure for managing buffer objects.
@@ -210,7 +210,7 @@
/*
-=item C<Small_Object_Pool * new_string_pool>
+=item C<Small_Object_Pool * new_string_pool(PARROT_INTERP, INTVAL constant)>
Creates a new pool for C<STRING>s and returns it. This calls
C<get_bufferlike_pool> internally, which in turn calls C<new_bufferlike_pool>.
@@ -241,7 +241,7 @@
/*
-=item C<Small_Object_Pool * get_bufferlike_pool>
+=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
@@ -286,7 +286,7 @@
/*
-=item C<size_t get_max_buffer_address>
+=item C<size_t get_max_buffer_address(PARROT_INTERP)>
Calculates the maximum buffer address and returns it. This is done by looping
through all the sized pools, and finding the pool whose C<end_arena_memory>
@@ -320,7 +320,7 @@
/*
-=item C<size_t get_min_buffer_address>
+=item C<size_t get_min_buffer_address(PARROT_INTERP)>
Calculates the minimum buffer address and returns it. Loops through all sized
pools, and finds the one with the smallest C<start_arena_memory> field. Notice
@@ -356,7 +356,7 @@
/*
-=item C<size_t get_max_pmc_address>
+=item C<size_t get_max_pmc_address(PARROT_INTERP)>
Returns the maximum memory address used by the C<pmc_pool>.
@@ -375,7 +375,7 @@
/*
-=item C<size_t get_min_pmc_address>
+=item C<size_t get_min_pmc_address(PARROT_INTERP)>
Returns the minimum memory address used by the C<pmc_pool>. Notice that the
memory region between C<get_min_pmc_address> and C<get_max_pmc_address> may be
@@ -396,7 +396,7 @@
/*
-=item C<int is_buffer_ptr>
+=item C<int is_buffer_ptr(PARROT_INTERP, const void *ptr)>
Checks whether the given C<ptr> is located within one of the sized
header pools. Returns C<1> if it is, and C<0> if not.
@@ -425,7 +425,7 @@
/*
-=item C<int is_pmc_ptr>
+=item C<int is_pmc_ptr(PARROT_INTERP, const void *ptr)>
Checks that C<ptr> is actually a PMC pointer. Returns C<1> if it is, C<0>
otherwise.
@@ -445,7 +445,7 @@
/*
-=item C<void Parrot_initialize_header_pools>
+=item C<void Parrot_initialize_header_pools(PARROT_INTERP)>
The initialization routine for the interpreter's header pools. Initializes
pools for string headers, constant string headers, buffers, PMCs, PMC_EXTs, and
@@ -512,7 +512,8 @@
/*
-=item C<int Parrot_forall_header_pools>
+=item C<int Parrot_forall_header_pools(PARROT_INTERP, int flag, void *arg,
+pool_iter_fn func)>
Iterates through header pools, invoking the given callback function on each
pool in the list matching the given criteria. Determines which pools to iterate
@@ -598,7 +599,7 @@
/*
-=item C<static void free_pool>
+=item C<static void free_pool(Small_Object_Pool *pool)>
Frees a pool and all of its arenas. Loops through the list of arenas backwards
and returns each to the memory manager. Then, frees the pool structure itself.
@@ -625,7 +626,8 @@
/*
-=item C<static int sweep_cb_buf>
+=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
@@ -661,7 +663,8 @@
/*
-=item C<static int sweep_cb_pmc>
+=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
@@ -683,7 +686,7 @@
/*
-=item C<void Parrot_destroy_header_pools>
+=item C<void Parrot_destroy_header_pools(PARROT_INTERP)>
Performs a garbage collection sweep on all pools, then frees them. Calls
C<Parrot_forall_header_pools> to loop over all the pools, passing
@@ -730,7 +733,7 @@
/*
-=item C<static void fix_pmc_syncs>
+=item C<static void fix_pmc_syncs(Interp *dest_interp, Small_Object_Pool *pool)>
Walks through the given arena, looking for all live and shared PMCs,
transferring their sync values to the destination interpreter.
@@ -770,7 +773,7 @@
/*
-=item C<void Parrot_merge_header_pools>
+=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 18:24:40 2009 (r37847)
+++ trunk/src/gc/register.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -146,7 +146,7 @@
/*
-=item C<void destroy_context>
+=item C<void destroy_context(PARROT_INTERP)>
Frees allocated context memory.
@@ -182,7 +182,7 @@
/*
-=item C<void create_initial_context>
+=item C<void create_initial_context(PARROT_INTERP)>
Creates the interpreter's initial context.
@@ -212,7 +212,7 @@
/*
-=item C<void parrot_gc_context>
+=item C<void parrot_gc_context(PARROT_INTERP)>
Cleans up dead context memory; called by the garbage collector. This only
applies in the chunked context memory scheme.
@@ -242,7 +242,7 @@
/*
-=item C<static void clear_regs>
+=item C<static void clear_regs(PARROT_INTERP, Parrot_Context *ctx)>
Clears all registers in a context. PMC and STRING registers contain PMCNULL
and NULL, respectively. Integer and float registers contain negative flag
@@ -294,7 +294,8 @@
/*
-=item C<static void init_context>
+=item C<static void init_context(PARROT_INTERP, Parrot_Context *ctx,
+const Parrot_Context *old)>
Initializes a freshly allocated or recycled context.
@@ -338,7 +339,7 @@
/*
-=item C<Parrot_Context * Parrot_push_context>
+=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>.
@@ -369,7 +370,7 @@
/*
-=item C<void Parrot_pop_context>
+=item C<void Parrot_pop_context(PARROT_INTERP)>
Frees the context created with C<Parrot_push_context> and restores the previous
context (the caller context).
@@ -405,7 +406,8 @@
/*
-=item C<Parrot_Context * Parrot_alloc_context>
+=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
@@ -505,7 +507,7 @@
/*
-=item C<Parrot_Context * Parrot_set_new_context>
+=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.
@@ -533,7 +535,7 @@
/*
-=item C<void Parrot_free_context>
+=item C<void Parrot_free_context(PARROT_INTERP, Parrot_Context *ctx, int deref)>
Frees the context if its reference count is zero. If C<deref>
is true, then reduce the reference count prior to determining
@@ -640,7 +642,8 @@
/*
-=item C<Parrot_Context * Parrot_context_ref_trace>
+=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.
@@ -674,7 +677,7 @@
/*
-=item C<void Parrot_set_context_threshold>
+=item C<void Parrot_set_context_threshold(PARROT_INTERP, Parrot_Context *ctx)>
Marks the context as possible threshold.
@@ -700,7 +703,7 @@
=cut
-=item C<void Parrot_clear_i>
+=item C<void Parrot_clear_i(PARROT_INTERP)>
Sets all integer registers in the current context to 0.
@@ -721,7 +724,7 @@
/*
-=item C<void Parrot_clear_s>
+=item C<void Parrot_clear_s(PARROT_INTERP)>
Sets all STRING registers in the current context to NULL.
@@ -742,7 +745,7 @@
/*
-=item C<void Parrot_clear_p>
+=item C<void Parrot_clear_p(PARROT_INTERP)>
Sets all PMC registers in the current context to NULL.
@@ -763,7 +766,7 @@
/*
-=item C<void Parrot_clear_n>
+=item C<void Parrot_clear_n(PARROT_INTERP)>
Sets all number registers in the current context to 0.0.
Modified: trunk/src/gc/resources.c
==============================================================================
--- trunk/src/gc/resources.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/gc/resources.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -131,7 +131,8 @@
/*
-=item C<static void alloc_new_block>
+=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
@@ -190,7 +191,7 @@
/*
-=item C<static void * mem_allocate>
+=item C<static void * mem_allocate(PARROT_INTERP, size_t size, Memory_Pool *pool)>
Allocates memory for headers.
@@ -290,7 +291,7 @@
/*
-=item C<static const char* buffer_location>
+=item C<static const char* buffer_location(PARROT_INTERP, const PObj *b)>
Recturns a constant string representing the location of the given
PObj C<b> in one of the PMC registers. If the PMC is not located
@@ -326,7 +327,7 @@
/*
-=item C<static void debug_print_buf>
+=item C<static void debug_print_buf(PARROT_INTERP, const PObj *b)>
Prints a debug statement with information about the given PObj C<b>.
=cut
@@ -351,7 +352,7 @@
=over 4
-=item C<static void compact_pool>
+=item C<static void compact_pool(PARROT_INTERP, Memory_Pool *pool)>
Compact the string buffer pool. Does not perform a GC scan, or mark items
as being alive in any way.
@@ -588,7 +589,7 @@
/*
-=item C<void Parrot_go_collect>
+=item C<void Parrot_go_collect(PARROT_INTERP)>
Scan the string pools and compact them. This does not perform a GC mark or
sweep run, and does not check whether string buffers are still alive.
@@ -607,7 +608,7 @@
/*
-=item C<static size_t aligned_size>
+=item C<static size_t aligned_size(const Buffer *buffer, size_t len)>
Determines the size of Buffer C<buffer> which has nominal length C<len>.
The actual size in RAM of the Buffer might be different because of
@@ -634,7 +635,7 @@
/*
-=item C<static char * aligned_mem>
+=item C<static char * aligned_mem(const Buffer *buffer, char *mem)>
Returns a pointer to the aligned allocated storage for Buffer C<buffer>,
which might not be the same as the pointer to C<buffeR> because of
@@ -663,7 +664,7 @@
/*
-=item C<static size_t aligned_string_size>
+=item C<static size_t aligned_string_size(size_t len)>
Determines the size of a string of length C<len> in RAM, accounting for
alignment.
@@ -686,7 +687,7 @@
/*
-=item C<int Parrot_in_memory_pool>
+=item C<int Parrot_in_memory_pool(PARROT_INTERP, void *bufstart)>
Determines if the given C<bufstart> pointer points to a location inside the
memory pool. Returns 1 if the pointer is in the memory pool, 0 otherwise.
@@ -722,7 +723,7 @@
=over 4
-=item C<void Parrot_reallocate>
+=item C<void Parrot_reallocate(PARROT_INTERP, Buffer *buffer, size_t newsize)>
Reallocate the Buffer's buffer memory to the given size. The
allocated buffer will not shrink. If the buffer was allocated with
@@ -794,7 +795,7 @@
/*
-=item C<void Parrot_reallocate_string>
+=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
@@ -865,7 +866,7 @@
/*
-=item C<void Parrot_allocate>
+=item C<void Parrot_allocate(PARROT_INTERP, Buffer *buffer, size_t size)>
Allocate buffer memory for the given Buffer pointer. The C<size>
has to be a multiple of the word size.
@@ -890,7 +891,7 @@
/*
-=item C<void Parrot_allocate_aligned>
+=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
@@ -921,7 +922,7 @@
/*
-=item C<void Parrot_allocate_string>
+=item C<void Parrot_allocate_string(PARROT_INTERP, STRING *str, size_t size)>
Allocate the STRING's buffer memory to the given size. The allocated
buffer maybe slightly bigger than the given C<size>. This function
@@ -964,7 +965,7 @@
/*
-=item C<static Memory_Pool * new_memory_pool>
+=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.
@@ -994,7 +995,7 @@
/*
-=item C<void Parrot_initialize_memory_pools>
+=item C<void Parrot_initialize_memory_pools(PARROT_INTERP)>
Initialize the managed memory pools. Parrot maintains two C<Memory_Pool>
structures, the general memory pool and the constant string pool. Create
@@ -1022,7 +1023,7 @@
/*
-=item C<void Parrot_destroy_memory_pools>
+=item C<void Parrot_destroy_memory_pools(PARROT_INTERP)>
Destroys the memory pool and the constant string pool. Loop through both
pools and destroy all memory blocks contained in them. Once all the
@@ -1058,7 +1059,7 @@
/*
-=item C<static void merge_pools>
+=item C<static void merge_pools(Memory_Pool *dest, Memory_Pool *source)>
Merge two memory pools together. Do this by moving all memory blocks
from the C<*source> pool into the C<*dest> pool. The C<source> pool
@@ -1103,7 +1104,7 @@
/*
-=item C<void Parrot_merge_memory_pools>
+=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 18:24:40 2009 (r37847)
+++ trunk/src/gc/system.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -50,7 +50,7 @@
/*
-=item C<void trace_system_areas>
+=item C<void trace_system_areas(PARROT_INTERP)>
Initiates a trace of the system stack, looking for pointers which are being
used by functions in the call chain, but which might not be marked as alive
@@ -140,7 +140,7 @@
/*
-=item C<static void trace_system_stack>
+=item C<static void trace_system_stack(PARROT_INTERP)>
Traces the memory block starting at C<< interp->lo_var_ptr >>. This should be
the address of a local variable which has been created on the stack early in
@@ -169,7 +169,7 @@
/*
-=item C<static size_t find_common_mask>
+=item C<static size_t find_common_mask(PARROT_INTERP, size_t val1, size_t val2)>
Finds a mask covering the longest common bit-prefix of C<val1>
and C<val2>.
@@ -208,7 +208,7 @@
/*
-=item C<void trace_mem_block>
+=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_setup.c
==============================================================================
--- trunk/src/global_setup.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/global_setup.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -50,7 +50,8 @@
/*
-=item C<void Parrot_set_config_hash_internal>
+=item C<void Parrot_set_config_hash_internal(const unsigned char* parrot_config,
+unsigned int parrot_config_size)>
Called by Parrot_set_config_hash with the serialised hash which
will be used in subsequently created Interpreters.
@@ -71,7 +72,7 @@
/*
-=item C<static void parrot_set_config_hash_interpreter>
+=item C<static void parrot_set_config_hash_interpreter(PARROT_INTERP)>
Used internally to associate the config hash with an Interpreter
using the last registered config data.
@@ -107,7 +108,7 @@
/*
-=item C<void init_world_once>
+=item C<void init_world_once(PARROT_INTERP)>
Call init_world() if it hasn't been called before.
@@ -134,7 +135,7 @@
/*
-=item C<void init_world>
+=item C<void init_world(PARROT_INTERP)>
This is the actual initialization code called by C<init_world_once()>.
@@ -189,7 +190,7 @@
/*
-=item C<void parrot_global_setup_2>
+=item C<void parrot_global_setup_2(PARROT_INTERP)>
called from inmidst of PMC bootstrapping between pass 0 and 1
Modified: trunk/src/hll.c
==============================================================================
--- trunk/src/hll.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/hll.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -65,7 +65,7 @@
/*
-=item C<static PMC* new_hll_entry>
+=item C<static PMC* new_hll_entry(PARROT_INTERP, STRING *entry_name)>
Create a new HLL information table entry.
Takes an interpreter name and (optional) entry name.
@@ -119,7 +119,7 @@
/*
-=item C<void Parrot_init_HLL>
+=item C<void Parrot_init_HLL(PARROT_INTERP)>
Initialises the HLL_info and HLL_namespace fields. Takes an interpreter and
calls C<Parrot_register_HLL> to register name within Parrot core.
@@ -142,7 +142,7 @@
/*
-=item C<INTVAL Parrot_register_HLL>
+=item C<INTVAL Parrot_register_HLL(PARROT_INTERP, STRING *hll_name)>
Return the HLL id if C<hll_name> is already registered in the interpreter.
@@ -209,7 +209,7 @@
/*
-=item C<INTVAL Parrot_register_HLL_lib>
+=item C<INTVAL Parrot_register_HLL_lib(PARROT_INTERP, STRING *hll_lib)>
Register an HLL library.
Takes an interpreter name and a pointer to a library name.
@@ -264,7 +264,7 @@
/*
-=item C<INTVAL Parrot_get_HLL_id>
+=item C<INTVAL Parrot_get_HLL_id(PARROT_INTERP, STRING *hll_name)>
Return the ID of the given HLL name or -1 on error. C<parrot> has ID 0.
@@ -298,7 +298,7 @@
/*
-=item C<STRING * Parrot_get_HLL_name>
+=item C<STRING * Parrot_get_HLL_name(PARROT_INTERP, INTVAL id)>
Returns the corresponding PMC's name.
Takes an interpreter name and an id.
@@ -340,7 +340,8 @@
/*
-=item C<void Parrot_register_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.
@@ -384,7 +385,7 @@
/*
-=item C<INTVAL Parrot_get_HLL_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
@@ -432,7 +433,7 @@
/*
-=item C<INTVAL Parrot_get_ctx_HLL_type>
+=item C<INTVAL Parrot_get_ctx_HLL_type(PARROT_INTERP, INTVAL core_type)>
Return an equivalent PMC type number according to the current HLL setings in
the context. If no type is registered, returns C<core_type>.
@@ -453,7 +454,7 @@
/*
-=item C<PMC* Parrot_get_ctx_HLL_namespace>
+=item C<PMC* Parrot_get_ctx_HLL_namespace(PARROT_INTERP)>
Return root namespace of the current HLL.
@@ -473,7 +474,7 @@
/*
-=item C<PMC* Parrot_get_HLL_namespace>
+=item C<PMC* Parrot_get_HLL_namespace(PARROT_INTERP, int hll_id)>
Return root namespace of the HLL with the ID of I<hll_id>. If C<hll_id> is the
special value C<PARROT_HLL_NONE>, return the global root namespace.
@@ -497,7 +498,7 @@
/*
-=item C<void Parrot_regenerate_HLL_namespaces>
+=item C<void Parrot_regenerate_HLL_namespaces(PARROT_INTERP)>
Create all HLL namespaces that don't already exist. This is necessary when
creating a new interpreter which shares an old interpreter's HLL_info.
Modified: trunk/src/io/api.c
==============================================================================
--- trunk/src/io/api.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/io/api.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -37,7 +37,7 @@
=over 4
-=item C<PMC * Parrot_io_stdhandle>
+=item C<PMC * Parrot_io_stdhandle(PARROT_INTERP, INTVAL fileno, PMC *newhandle)>
Get the current standard IO object and optionally set a new one.
@@ -63,7 +63,7 @@
/*
-=item C<PMC * Parrot_io_new_pmc>
+=item C<PMC * Parrot_io_new_pmc(PARROT_INTERP, INTVAL flags)>
Creates a new I/O filehandle object. The value of C<flags> is set
in the returned PMC.
@@ -91,7 +91,7 @@
/*
-=item C<PMC * Parrot_io_open>
+=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 +124,7 @@
/*
-=item C<PMC * Parrot_io_fdopen>
+=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.
@@ -167,7 +167,7 @@
/*
-=item C<INTVAL Parrot_io_close>
+=item C<INTVAL Parrot_io_close(PARROT_INTERP, PMC *pmc)>
Closes the filehandle object.
@@ -192,7 +192,7 @@
/*
-=item C<INTVAL Parrot_io_is_closed>
+=item C<INTVAL Parrot_io_is_closed(PARROT_INTERP, PMC *pmc)>
Test whether a filehandle is closed.
@@ -216,7 +216,7 @@
/*
-=item C<void Parrot_io_flush>
+=item C<void Parrot_io_flush(PARROT_INTERP, PMC *pmc)>
Flushes the C<ParrotIO> PMC C<*pmc>.
@@ -237,7 +237,7 @@
/*
-=item C<STRING * Parrot_io_reads>
+=item C<STRING * Parrot_io_reads(PARROT_INTERP, PMC *pmc, size_t length)>
Return a new C<STRING*> holding up to C<len> bytes.
@@ -261,7 +261,7 @@
/*
-=item C<STRING * Parrot_io_readline>
+=item C<STRING * Parrot_io_readline(PARROT_INTERP, PMC *pmc)>
Return a new C<STRING*> holding the next line read from the file.
@@ -285,7 +285,7 @@
/*
-=item C<INTVAL Parrot_io_write>
+=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 +317,7 @@
/*
-=item C<PIOOFF_T Parrot_io_seek>
+=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
@@ -341,7 +341,7 @@
/*
-=item C<PIOOFF_T Parrot_io_tell>
+=item C<PIOOFF_T Parrot_io_tell(PARROT_INTERP, PMC *pmc)>
Returns the current read/write position of C<*pmc>.
@@ -364,7 +364,7 @@
/*
-=item C<INTVAL Parrot_io_peek>
+=item C<INTVAL Parrot_io_peek(PARROT_INTERP, PMC *pmc, STRING **buffer)>
Retrieve the next character in the stream without modifying the stream. Calls
the platform-specific implementation of 'peek'.
@@ -386,7 +386,7 @@
/*
-=item C<INTVAL Parrot_io_eof>
+=item C<INTVAL Parrot_io_eof(PARROT_INTERP, PMC *pmc)>
Returns a boolean value indication whether C<*pmc>'s current read/write
position is C<EOF>.
@@ -418,7 +418,7 @@
/*
-=item C<INTVAL Parrot_io_puts>
+=item C<INTVAL Parrot_io_puts(PARROT_INTERP, PMC *pmc, const char *s)>
Writes C<*s> tp C<*pmc>. C string version.
@@ -436,7 +436,7 @@
/*
-=item C<INTVAL Parrot_io_putps>
+=item C<INTVAL Parrot_io_putps(PARROT_INTERP, PMC *pmc, STRING *s)>
Writes C<*s> to C<*pmc>. Parrot string version.
@@ -463,7 +463,7 @@
/*
-=item C<INTVAL Parrot_io_fprintf>
+=item C<INTVAL Parrot_io_fprintf(PARROT_INTERP, PMC *pmc, const char *s, ...)>
Writes a C string format with varargs to C<*pmc>.
@@ -490,7 +490,7 @@
/*
-=item C<INTVAL Parrot_io_printf>
+=item C<INTVAL Parrot_io_printf(PARROT_INTERP, const char *s, ...)>
Writes a C string format with varargs to C<stdout>.
@@ -526,7 +526,7 @@
/*
-=item C<INTVAL Parrot_io_eprintf>
+=item C<INTVAL Parrot_io_eprintf(PARROT_INTERP, const char *s, ...)>
Writes a C string format with varargs to C<stderr>.
@@ -564,7 +564,7 @@
/*
-=item C<PIOHANDLE Parrot_io_getfd>
+=item C<PIOHANDLE Parrot_io_getfd(PARROT_INTERP, PMC *pmc)>
Returns C<*pmc>'s file descriptor, or C<0> if it is not defined.
@@ -583,7 +583,7 @@
/*
-=item C<INTVAL Parrot_io_is_tty>
+=item C<INTVAL Parrot_io_is_tty(PARROT_INTERP, PMC *pmc)>
Returns a boolean value indicating whether C<*pmc> is a console/tty.
@@ -611,7 +611,7 @@
=over 4
-=item C<PMC * Parrot_io_STDIN>
+=item C<PMC * Parrot_io_STDIN(PARROT_INTERP)>
Returns the C<FileHandle> PMC for C<stdin>.
@@ -631,7 +631,7 @@
/*
-=item C<PMC * Parrot_io_STDOUT>
+=item C<PMC * Parrot_io_STDOUT(PARROT_INTERP)>
Returns the C<FileHandle> PMC for C<stdout>.
@@ -651,7 +651,7 @@
/*
-=item C<PMC * Parrot_io_STDERR>
+=item C<PMC * Parrot_io_STDERR(PARROT_INTERP)>
Returns the C<FileHandle> PMC for C<stderr>.
@@ -679,7 +679,7 @@
=over 4
-=item C<PIOOFF_T Parrot_io_make_offset>
+=item C<PIOOFF_T Parrot_io_make_offset(INTVAL offset)>
Returns C<offset>.
@@ -697,7 +697,7 @@
/*
-=item C<PIOOFF_T Parrot_io_make_offset32>
+=item C<PIOOFF_T Parrot_io_make_offset32(INTVAL hi, INTVAL lo)>
C<hi> is shifted 32 bytes to the left and C<or>ed together with C<lo>.
This allows 64-bit seeks with only 32-bit C<INTVALS>.
@@ -715,7 +715,7 @@
/*
-=item C<PIOOFF_T Parrot_io_make_offset_pmc>
+=item C<PIOOFF_T Parrot_io_make_offset_pmc(PARROT_INTERP, PMC *pmc)>
Returns the return value of the C<get_integer> vtable method on C<*pmc>.
Modified: trunk/src/io/buffer.c
==============================================================================
--- trunk/src/io/buffer.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/io/buffer.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -36,7 +36,7 @@
/*
-=item C<INTVAL Parrot_io_init_buffer>
+=item C<INTVAL Parrot_io_init_buffer(PARROT_INTERP)>
Initialize buffering on STDOUT and STDIN.
@@ -59,7 +59,7 @@
/*
-=item C<void Parrot_io_setbuf>
+=item C<void Parrot_io_setbuf(PARROT_INTERP, PMC *filehandle, size_t bufsize)>
Set the buffering mode for the filehandle.
@@ -129,7 +129,7 @@
/*
-=item C<INTVAL Parrot_io_setlinebuf>
+=item C<INTVAL Parrot_io_setlinebuf(PARROT_INTERP, PMC *filehandle)>
Set the file handle to line buffering mode.
@@ -161,7 +161,7 @@
/*
-=item C<INTVAL Parrot_io_flush_buffer>
+=item C<INTVAL Parrot_io_flush_buffer(PARROT_INTERP, PMC *filehandle)>
Flush the I/O buffer for a given filehandle object.
@@ -221,7 +221,7 @@
/*
-=item C<size_t Parrot_io_fill_readbuf>
+=item C<size_t Parrot_io_fill_readbuf(PARROT_INTERP, PMC *filehandle)>
The buffer layer's C<Fill> function.
@@ -264,7 +264,7 @@
/*
-=item C<size_t Parrot_io_read_buffer>
+=item C<size_t Parrot_io_read_buffer(PARROT_INTERP, PMC *filehandle, STRING **buf)>
The buffer layer's C<Read> function.
@@ -394,7 +394,7 @@
/*
-=item C<size_t Parrot_io_peek_buffer>
+=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 +452,7 @@
/*
-=item C<size_t Parrot_io_readline_buffer>
+=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 +555,7 @@
/*
-=item C<size_t Parrot_io_write_buffer>
+=item C<size_t Parrot_io_write_buffer(PARROT_INTERP, PMC *filehandle, STRING *s)>
The buffer layer's C<Write> function.
@@ -673,7 +673,8 @@
/*
-=item C<PIOOFF_T Parrot_io_seek_buffer>
+=item C<PIOOFF_T Parrot_io_seek_buffer(PARROT_INTERP, PMC *filehandle,
+PIOOFF_T offset, INTVAL whence)>
The buffer layer's C<Seek> function.
@@ -728,7 +729,7 @@
/*
-=item C<static INTVAL io_is_end_of_line>
+=item C<static INTVAL io_is_end_of_line(const char *c)>
Determine if the current character is the end of the line.
Modified: trunk/src/io/core.c
==============================================================================
--- trunk/src/io/core.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/io/core.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -34,7 +34,7 @@
/*
-=item C<void Parrot_io_init>
+=item C<void Parrot_io_init(PARROT_INTERP)>
Sets up the interpreter's I/O storage and creates the C<STD*> handles.
@@ -78,7 +78,7 @@
/*
-=item C<void Parrot_io_finish>
+=item C<void Parrot_io_finish(PARROT_INTERP)>
Closes the interpreter's IO resourses. Called during its interpreter
destruction.
@@ -105,7 +105,7 @@
/*
-=item C<void Parrot_IOData_mark>
+=item C<void Parrot_IOData_mark(PARROT_INTERP, ParrotIOData *piodata)>
Called from C<trace_active_PMCs()> to mark the IO data live.
Modified: trunk/src/io/filehandle.c
==============================================================================
--- trunk/src/io/filehandle.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/io/filehandle.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -27,7 +27,7 @@
=over 4
-=item C<INTVAL Parrot_io_parse_open_flags>
+=item C<INTVAL Parrot_io_parse_open_flags(PARROT_INTERP, STRING *mode_str)>
Parses a Parrot string for file open mode flags (C<r> for read, C<w> for write,
C<a> for append, and C<p> for pipe) and returns the combined generic bit flags.
@@ -80,7 +80,7 @@
/*
-=item C<STRING * Parrot_io_make_string>
+=item C<STRING * Parrot_io_make_string(PARROT_INTERP, STRING **buf, size_t len)>
Creates a STRING* suitable for returning results from IO read functions.
The passed in C<buf> parameter can:
@@ -134,7 +134,8 @@
/*
-=item C<void Parrot_io_set_os_handle>
+=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.
@@ -161,7 +162,7 @@
/*
-=item C<PIOHANDLE Parrot_io_get_os_handle>
+=item C<PIOHANDLE Parrot_io_get_os_handle(PARROT_INTERP, PMC *filehandle)>
Retrieve the C<os_handle> attribute of the FileHandle object, which stores the
low-level filehandle for the OS.
@@ -185,7 +186,7 @@
/*
-=item C<void Parrot_io_set_flags>
+=item C<void Parrot_io_set_flags(PARROT_INTERP, PMC *filehandle, INTVAL flags)>
Set the C<flags> attribute of the FileHandle object, which stores bitwise flags
marking filehandle characteristics.
@@ -210,7 +211,7 @@
/*
-=item C<INTVAL Parrot_io_get_flags>
+=item C<INTVAL Parrot_io_get_flags(PARROT_INTERP, PMC *filehandle)>
Set the C<flags> attribute of the FileHandle object, which stores bitwise flags
marking filehandle characteristics.
@@ -236,7 +237,7 @@
/*
-=item C<void Parrot_io_set_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.
@@ -261,7 +262,7 @@
/*
-=item C<PIOOFF_T Parrot_io_get_file_size>
+=item C<PIOOFF_T Parrot_io_get_file_size(PARROT_INTERP, PMC *filehandle)>
Get the C<file_size> attribute of the FileHandle object, which stores the
current file size.
@@ -286,7 +287,8 @@
/*
-=item C<void Parrot_io_set_buffer_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.
@@ -310,7 +312,7 @@
/*
-=item C<unsigned char * Parrot_io_get_buffer_start>
+=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.
@@ -335,7 +337,7 @@
/*
-=item C<unsigned char * Parrot_io_get_buffer_next>
+=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.
@@ -360,7 +362,8 @@
/*
-=item C<void Parrot_io_set_buffer_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.
@@ -384,7 +387,7 @@
/*
-=item C<unsigned char * Parrot_io_get_buffer_end>
+=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.
@@ -409,7 +412,8 @@
/*
-=item C<void Parrot_io_set_buffer_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.
@@ -433,7 +437,7 @@
/*
-=item C<INTVAL Parrot_io_get_buffer_flags>
+=item C<INTVAL Parrot_io_get_buffer_flags(PARROT_INTERP, PMC *filehandle)>
Get the C<buffer_flags> attribute of the FileHandle object, which stores
a collection of flags specific to the buffer.
@@ -457,7 +461,7 @@
/*
-=item C<void Parrot_io_set_buffer_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.
@@ -480,7 +484,7 @@
/*
-=item C<size_t Parrot_io_get_buffer_size>
+=item C<size_t Parrot_io_get_buffer_size(PARROT_INTERP, PMC *filehandle)>
Get the C<buffer_size> attribute of the FileHandle object, which stores
the size of the buffer (in bytes).
@@ -504,7 +508,7 @@
/*
-=item C<void Parrot_io_set_buffer_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).
@@ -527,7 +531,7 @@
/*
-=item C<void Parrot_io_clear_buffer>
+=item C<void Parrot_io_clear_buffer(PARROT_INTERP, PMC *filehandle)>
Clear the filehandle buffer and free the associated memory.
@@ -554,7 +558,7 @@
/*
-=item C<PIOOFF_T Parrot_io_get_file_position>
+=item C<PIOOFF_T Parrot_io_get_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.
@@ -578,7 +582,7 @@
/*
-=item C<PIOOFF_T Parrot_io_get_last_file_position>
+=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.
@@ -602,7 +606,7 @@
/*
-=item C<void Parrot_io_set_file_position>
+=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
@@ -629,7 +633,7 @@
/*
-=item C<INTVAL Parrot_io_is_encoding>
+=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.
@@ -661,7 +665,7 @@
/*
-=item C<INTVAL Parrot_io_close_filehandle>
+=item C<INTVAL Parrot_io_close_filehandle(PARROT_INTERP, PMC *pmc)>
Flushes and closes the C<FileHandle> PMC C<*pmc>, but leaves the object intact
to be reused or collected.
@@ -691,7 +695,7 @@
/*
-=item C<INTVAL Parrot_io_is_closed_filehandle>
+=item C<INTVAL Parrot_io_is_closed_filehandle(PARROT_INTERP, PMC *pmc)>
Test whether a filehandle is closed.
@@ -709,7 +713,7 @@
/*
-=item C<void Parrot_io_flush_filehandle>
+=item C<void Parrot_io_flush_filehandle(PARROT_INTERP, PMC *pmc)>
Flushes the C<FileHandle> PMC C<*pmc>.
Modified: trunk/src/io/portable.c
==============================================================================
--- trunk/src/io/portable.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/io/portable.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -44,7 +44,7 @@
/*
-=item C<static const char * convert_flags_to_stdio>
+=item C<static const char * convert_flags_to_stdio(INTVAL flags)>
Returns a C string representation of C<flags> suitable for passing to
C<fopen()> in C<Parrot_io_open_portable()>.
@@ -86,7 +86,7 @@
/*
-=item C<INTVAL Parrot_io_init_portable>
+=item C<INTVAL Parrot_io_init_portable(PARROT_INTERP)>
Sets up standard streams, etc.
@@ -117,7 +117,8 @@
/*
-=item C<PMC * Parrot_io_open_portable>
+=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.
@@ -176,7 +177,8 @@
/*
-=item C<PMC * Parrot_io_fdopen_portable>
+=item C<PMC * Parrot_io_fdopen_portable(PARROT_INTERP, PMC *filehandle,
+PIOHANDLE fptr, INTVAL flags)>
Associates an IO PMC with a file descriptor.
@@ -212,7 +214,7 @@
/*
-=item C<INTVAL Parrot_io_close_portable>
+=item C<INTVAL Parrot_io_close_portable(PARROT_INTERP, PMC *filehandle)>
Closes the underlying filehandle of a given IO PMC.
@@ -240,7 +242,7 @@
/*
-=item C<INTVAL Parrot_io_is_closed_portable>
+=item C<INTVAL Parrot_io_is_closed_portable(PARROT_INTERP, PMC *filehandle)>
Tests whether the filehandle has been closed.
@@ -261,7 +263,7 @@
/*
-=item C<static INTVAL io_is_tty_portable>
+=item C<static INTVAL io_is_tty_portable(PIOHANDLE fptr)>
Tests whether the given file descriptor is attached to a tty.
@@ -282,7 +284,7 @@
/*
-=item C<size_t Parrot_io_peek_portable>
+=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.
@@ -316,7 +318,7 @@
/*
-=item C<INTVAL Parrot_io_getblksize_portable>
+=item C<INTVAL Parrot_io_getblksize_portable(PIOHANDLE fptr)>
Returns the block size of the given file descriptor.
@@ -337,7 +339,7 @@
/*
-=item C<INTVAL Parrot_io_flush_portable>
+=item C<INTVAL Parrot_io_flush_portable(PARROT_INTERP, PMC *filehandle)>
Flushes the underlying file descriptor of the given IO PMC.
@@ -355,7 +357,8 @@
/*
-=item C<size_t Parrot_io_read_portable>
+=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.
@@ -389,7 +392,7 @@
/*
-=item C<size_t Parrot_io_write_portable>
+=item C<size_t Parrot_io_write_portable(PARROT_INTERP, PMC *filehandle, STRING *s)>
Writes the given STRING to the provided IO PMC.
@@ -409,7 +412,8 @@
/*
-=item C<PIOOFF_T Parrot_io_seek_portable>
+=item C<PIOOFF_T Parrot_io_seek_portable(PARROT_INTERP, PMC *filehandle,
+PIOOFF_T offset, INTVAL whence)>
Seeks to the given offset and position within the provided IO PMC.
@@ -439,7 +443,7 @@
/*
-=item C<PIOOFF_T Parrot_io_tell_portable>
+=item C<PIOOFF_T Parrot_io_tell_portable(PARROT_INTERP, PMC *filehandle)>
Returns the current position of the given IO PMC.
@@ -457,7 +461,8 @@
/*
-=item C<PMC * Parrot_io_open_pipe_portable>
+=item C<PMC * Parrot_io_open_pipe_portable(PARROT_INTERP, PMC *filehandle,
+STRING *command, int flags)>
Opens a pipe. Not implemented for this platform.
Modified: trunk/src/io/socket_api.c
==============================================================================
--- trunk/src/io/socket_api.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/io/socket_api.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -28,7 +28,7 @@
/*
-=item C<INTVAL Parrot_io_socket_is_closed>
+=item C<INTVAL Parrot_io_socket_is_closed(PMC *socket)>
=cut
@@ -115,7 +115,8 @@
/*
-=item C<INTVAL Parrot_io_poll>
+=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.
@@ -138,7 +139,8 @@
/*
-=item C<INTVAL Parrot_io_socket>
+=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
@@ -183,7 +185,7 @@
/*
-=item C<INTVAL Parrot_io_recv>
+=item C<INTVAL Parrot_io_recv(PARROT_INTERP, PMC *pmc, STRING **buf)>
Receives a message from the connected socket C<*pmc> in C<*buf>. Returns C<-1>
if it fails.
@@ -205,7 +207,7 @@
/*
-=item C<INTVAL Parrot_io_send>
+=item C<INTVAL Parrot_io_send(PARROT_INTERP, PMC *pmc, STRING *buf)>
Sends the message C<*buf> to the connected socket C<*pmc>. Returns
C<-1> if it cannot send the message.
@@ -228,7 +230,7 @@
/*
-=item C<INTVAL Parrot_io_connect>
+=item C<INTVAL Parrot_io_connect(PARROT_INTERP, PMC *pmc, PMC *address)>
Connects C<*pmc> to C<*address>. Returns C<-1> on failure.
@@ -249,7 +251,7 @@
/*
-=item C<INTVAL Parrot_io_bind>
+=item C<INTVAL Parrot_io_bind(PARROT_INTERP, PMC *pmc, PMC *address)>
Binds C<*pmc>'s socket to the local address and port specified by
C<*address>. Returns C<-1> on failure.
@@ -271,7 +273,7 @@
/*
-=item C<INTVAL Parrot_io_listen>
+=item C<INTVAL Parrot_io_listen(PARROT_INTERP, PMC *pmc, INTVAL backlog)>
Listens for new connections on socket C<*pmc>. Returns C<-1> on failure.
@@ -293,7 +295,7 @@
/*
-=item C<PMC * Parrot_io_accept>
+=item C<PMC * Parrot_io_accept(PARROT_INTERP, PMC *pmc)>
Accepts a new connection and returns a newly created C<ParrotIO> socket.
Returns C<NULL> on failure.
@@ -317,7 +319,7 @@
/*
-=item C<PMC * Parrot_io_new_socket_pmc>
+=item C<PMC * Parrot_io_new_socket_pmc(PARROT_INTERP, INTVAL flags)>
Creates a new I/O socket object. The value of C<flags> is set
in the returned PMC.
Modified: trunk/src/io/socket_unix.c
==============================================================================
--- trunk/src/io/socket_unix.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/io/socket_unix.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -76,7 +76,7 @@
=over 4
-=item C<PMC * Parrot_io_sockaddr_in>
+=item C<PMC * Parrot_io_sockaddr_in(PARROT_INTERP, STRING *addr, INTVAL port)>
C<Parrot_io_sockaddr_in()> is not part of the layer and so must be C<extern>.
@@ -115,7 +115,8 @@
/*
-=item C<INTVAL Parrot_io_socket_unix>
+=item C<INTVAL Parrot_io_socket_unix(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.
@@ -143,7 +144,7 @@
/*
-=item C<INTVAL Parrot_io_connect_unix>
+=item C<INTVAL Parrot_io_connect_unix(PARROT_INTERP, PMC *socket, PMC *r)>
Connects C<*io>'s socket to address C<*r>.
@@ -182,7 +183,7 @@
/*
-=item C<INTVAL Parrot_io_bind_unix>
+=item C<INTVAL Parrot_io_bind_unix(PARROT_INTERP, PMC *socket, PMC *sockaddr)>
Binds C<*io>'s socket to the local address and port specified by C<*l>.
@@ -214,7 +215,7 @@
/*
-=item C<INTVAL Parrot_io_listen_unix>
+=item C<INTVAL Parrot_io_listen_unix(PARROT_INTERP, PMC *socket, INTVAL sec)>
Listen for new connections. This is only applicable to C<STREAM> or
C<SEQ> sockets.
@@ -236,7 +237,7 @@
/*
-=item C<PMC * Parrot_io_accept_unix>
+=item C<PMC * Parrot_io_accept_unix(PARROT_INTERP, PMC *socket)>
Accept a new connection and return a newly created C<ParrotIO> socket.
@@ -280,7 +281,7 @@
/*
-=item C<INTVAL Parrot_io_send_unix>
+=item C<INTVAL Parrot_io_send_unix(PARROT_INTERP, PMC *socket, STRING *s)>
Send the message C<*s> to C<*io>'s connected socket.
@@ -333,7 +334,7 @@
/*
-=item C<INTVAL Parrot_io_recv_unix>
+=item C<INTVAL Parrot_io_recv_unix(PARROT_INTERP, PMC *socket, STRING **s)>
Receives a message in C<**s> from C<*io>'s connected socket.
@@ -385,7 +386,8 @@
/*
-=item C<INTVAL Parrot_io_poll_unix>
+=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.
@@ -437,7 +439,8 @@
/*
-=item C<static void get_sockaddr_in>
+=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 18:24:40 2009 (r37847)
+++ trunk/src/io/socket_win32.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -61,7 +61,8 @@
/*
-=item C<INTVAL Parrot_io_socket_win32>
+=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.
@@ -89,7 +90,7 @@
/*
-=item C<INTVAL Parrot_io_connect_win32>
+=item C<INTVAL Parrot_io_connect_win32(PARROT_INTERP, PMC *socket, PMC *r)>
Connects C<*io>'s socket to address C<*r>.
@@ -128,7 +129,7 @@
/*
-=item C<INTVAL Parrot_io_bind_win32>
+=item C<INTVAL Parrot_io_bind_win32(PARROT_INTERP, PMC *socket, PMC *sockaddr)>
Binds C<*io>'s socket to the local address and port specified by C<*l>.
@@ -160,7 +161,7 @@
/*
-=item C<INTVAL Parrot_io_listen_win32>
+=item C<INTVAL Parrot_io_listen_win32(PARROT_INTERP, PMC *socket, INTVAL sec)>
Listen for new connections. This is only applicable to C<STREAM> or
C<SEQ> sockets.
@@ -182,7 +183,7 @@
/*
-=item C<PMC * Parrot_io_accept_win32>
+=item C<PMC * Parrot_io_accept_win32(PARROT_INTERP, PMC *socket)>
Accept a new connection and return a newly created C<ParrotIO> socket.
@@ -226,7 +227,7 @@
/*
-=item C<INTVAL Parrot_io_send_win32>
+=item C<INTVAL Parrot_io_send_win32(PARROT_INTERP, PMC *socket, STRING *s)>
Send the message C<*s> to C<*io>'s connected socket.
@@ -279,7 +280,7 @@
/*
-=item C<INTVAL Parrot_io_recv_win32>
+=item C<INTVAL Parrot_io_recv_win32(PARROT_INTERP, PMC *socket, STRING **s)>
Receives a message in C<**s> from C<*io>'s connected socket.
@@ -331,7 +332,8 @@
/*
-=item C<INTVAL Parrot_io_poll_win32>
+=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.
@@ -383,7 +385,8 @@
/*
-=item C<static void get_sockaddr_in>
+=item C<static void get_sockaddr_in(PARROT_INTERP, PMC * sockaddr,
+const char* host, int port)>
=cut
@@ -423,7 +426,7 @@
/*
-=item C<PMC * Parrot_io_sockaddr_in>
+=item C<PMC * Parrot_io_sockaddr_in(PARROT_INTERP, STRING *addr, INTVAL port)>
=cut
Modified: trunk/src/io/unix.c
==============================================================================
--- trunk/src/io/unix.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/io/unix.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -50,7 +50,7 @@
/*
-=item C<static INTVAL convert_flags_to_unix>
+=item C<static INTVAL convert_flags_to_unix(INTVAL flags)>
Returns a UNIX-specific interpretation of C<flags> suitable for passing
to C<open()> and C<fopen()> in C<Parrot_io_open_unix()> and
@@ -88,7 +88,7 @@
/*
-=item C<INTVAL Parrot_io_init_unix>
+=item C<INTVAL Parrot_io_init_unix(PARROT_INTERP)>
Sets up the interpreter's standard C<std*> IO handles. Returns C<0> on
success and C<-1> on error.
@@ -128,7 +128,8 @@
/*
-=item C<PMC * Parrot_io_open_unix>
+=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.
@@ -245,7 +246,7 @@
/*
-=item C<INTVAL Parrot_io_async_unix>
+=item C<INTVAL Parrot_io_async_unix(PARROT_INTERP, PMC *filehandle, INTVAL b)>
Experimental asynchronous IO.
@@ -285,7 +286,8 @@
/*
-=item C<PMC * Parrot_io_fdopen_unix>
+=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.
@@ -319,7 +321,7 @@
/*
-=item C<INTVAL Parrot_io_close_unix>
+=item C<INTVAL Parrot_io_close_unix(PARROT_INTERP, PMC *filehandle)>
Closes C<*io>'s file descriptor.
@@ -345,7 +347,7 @@
/*
-=item C<INTVAL Parrot_io_is_closed_unix>
+=item C<INTVAL Parrot_io_is_closed_unix(PARROT_INTERP, PMC *filehandle)>
Test whether the filehandle has been closed.
@@ -365,7 +367,7 @@
/*
-=item C<static INTVAL io_is_tty_unix>
+=item C<static INTVAL io_is_tty_unix(PIOHANDLE fd)>
Returns a boolean value indicating whether C<fd> is a console/tty.
@@ -382,7 +384,7 @@
/*
-=item C<INTVAL Parrot_io_getblksize_unix>
+=item C<INTVAL Parrot_io_getblksize_unix(PIOHANDLE fd)>
Various ways of determining block size.
@@ -428,7 +430,7 @@
/*
-=item C<INTVAL Parrot_io_flush_unix>
+=item C<INTVAL Parrot_io_flush_unix(PARROT_INTERP, PMC *filehandle)>
At lowest layer all we can do for C<flush> is to ask the kernel to
C<sync()>.
@@ -449,7 +451,7 @@
/*
-=item C<size_t Parrot_io_read_unix>
+=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>.
@@ -497,7 +499,7 @@
/*
-=item C<size_t Parrot_io_write_unix>
+=item C<size_t Parrot_io_write_unix(PARROT_INTERP, PMC *filehandle, STRING *s)>
Calls C<write()> to write C<len> bytes from the memory starting at
C<buffer> to the file descriptor in C<*io>.
@@ -543,7 +545,8 @@
/*
-=item C<PIOOFF_T Parrot_io_seek_unix>
+=item C<PIOOFF_T Parrot_io_seek_unix(PARROT_INTERP, PMC *filehandle,
+PIOOFF_T offset, INTVAL whence)>
Hard seek.
@@ -594,7 +597,7 @@
/*
-=item C<PIOOFF_T Parrot_io_tell_unix>
+=item C<PIOOFF_T Parrot_io_tell_unix(PARROT_INTERP, PMC *filehandle)>
Returns the current read/write position on C<*io>'s file discriptor.
@@ -614,7 +617,8 @@
/*
-=item C<PMC * Parrot_io_open_pipe_unix>
+=item C<PMC * Parrot_io_open_pipe_unix(PARROT_INTERP, PMC *filehandle,
+STRING *command, int flags)>
Very limited C<exec> for now.
@@ -725,7 +729,7 @@
/*
-=item C<size_t Parrot_io_peek_unix>
+=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 18:24:40 2009 (r37847)
+++ trunk/src/io/utf8.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -33,7 +33,7 @@
/*
-=item C<size_t Parrot_io_read_utf8>
+=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.
@@ -99,7 +99,7 @@
/*
-=item C<size_t Parrot_io_write_utf8>
+=item C<size_t Parrot_io_write_utf8(PARROT_INTERP, PMC *filehandle, STRING *s)>
Write a Parrot string to a filehandle in UTF-8 format.
Modified: trunk/src/io/win32.c
==============================================================================
--- trunk/src/io/win32.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/io/win32.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -64,7 +64,8 @@
/*
-=item C<static INTVAL convert_flags_to_win32>
+=item C<static INTVAL convert_flags_to_win32(INTVAL flags, DWORD * fdwAccess,
+DWORD * fdwShareMode, DWORD * fdwCreate)>
Convert to platform-specific bit open flags.
@@ -119,7 +120,7 @@
/*
-=item C<INTVAL Parrot_io_init_win32>
+=item C<INTVAL Parrot_io_init_win32(PARROT_INTERP)>
Sets up the standard C<std*> IO handles.
@@ -171,7 +172,7 @@
/*
-=item C<INTVAL Parrot_io_getblksize_win32>
+=item C<INTVAL Parrot_io_getblksize_win32(PIOHANDLE fd)>
Returns C<PIO_BLKSIZE>.
@@ -189,7 +190,8 @@
/*
-=item C<PMC * Parrot_io_open_win32>
+=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>.
@@ -253,7 +255,8 @@
/*
-=item C<PMC * Parrot_io_fdopen_win32>
+=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.
@@ -289,7 +292,7 @@
/*
-=item C<INTVAL Parrot_io_close_win32>
+=item C<INTVAL Parrot_io_close_win32(PARROT_INTERP, PMC *filehandle)>
Calls C<CloseHandle()> to close C<*io>'s file descriptor.
@@ -313,7 +316,7 @@
/*
-=item C<INTVAL Parrot_io_is_closed_win32>
+=item C<INTVAL Parrot_io_is_closed_win32(PARROT_INTERP, PMC *filehandle)>
Test whether the filehandle has been closed.
@@ -333,7 +336,7 @@
/*
-=item C<static INTVAL io_is_tty_win32>
+=item C<static INTVAL io_is_tty_win32(PIOHANDLE fd)>
Returns whether C<fd> is a console/tty.
@@ -352,7 +355,7 @@
/*
-=item C<INTVAL Parrot_io_flush_win32>
+=item C<INTVAL Parrot_io_flush_win32(PARROT_INTERP, PMC *filehandle)>
Calls C<FlushFileBuffers()> to flush C<*io>'s file descriptor.
@@ -381,7 +384,7 @@
/*
-=item C<size_t Parrot_io_read_win32>
+=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>.
@@ -426,7 +429,7 @@
/*
-=item C<size_t Parrot_io_write_win32>
+=item C<size_t Parrot_io_write_win32(PARROT_INTERP, PMC *filehandle, STRING *s)>
Calls C<WriteFile()> to write C<len> bytes from the memory starting at
C<buffer> to C<*io>'s file descriptor. Returns C<(size_t)-1> on
@@ -469,7 +472,8 @@
/*
-=item C<PIOOFF_T Parrot_io_seek_win32>
+=item C<PIOOFF_T Parrot_io_seek_win32(PARROT_INTERP, PMC *filehandle,
+PIOOFF_T off, INTVAL whence)>
Hard seek.
@@ -502,7 +506,7 @@
/*
-=item C<PIOOFF_T Parrot_io_tell_win32>
+=item C<PIOOFF_T Parrot_io_tell_win32(PARROT_INTERP, PMC *filehandle)>
Returns the current read/write position of C<*io>'s file descriptor.
@@ -527,7 +531,7 @@
/*
-=item C<size_t Parrot_io_peek_win32>
+=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.
@@ -548,7 +552,8 @@
/*
-=item C<PMC * Parrot_io_open_pipe_win32>
+=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/library.c
==============================================================================
--- trunk/src/library.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/library.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -126,7 +126,7 @@
/*
-=item C<void parrot_init_library_paths>
+=item C<void parrot_init_library_paths(PARROT_INTERP)>
Create an array of StringArrays with library searchpaths and shared
extension used for loading various files at runtime. The created
@@ -256,7 +256,7 @@
/*
-=item C<static PMC* get_search_paths>
+=item C<static PMC* get_search_paths(PARROT_INTERP, enum_lib_paths which)>
Return lib_paths as array of StringArrays with library searchpaths and shared
extension used for loading various files at runtime.
@@ -296,7 +296,7 @@
/*
-=item C<static int is_abs_path>
+=item C<static int is_abs_path(const STRING *file)>
Determines whether a file name given by a fixed-8 or utf8 C<STRING> is an
absolute file name. Returns C<1> if the filename is absolute, returns C<0>
@@ -337,7 +337,7 @@
/*
-=item C<static void cnv_to_win32_filesep>
+=item C<static void cnv_to_win32_filesep(STRING *path)>
Converts a path with forward slashes to one with backward slashes.
@@ -363,7 +363,7 @@
/*
-=item C<static STRING* path_finalize>
+=item C<static STRING* path_finalize(PARROT_INTERP, STRING *path)>
Ensures the given STRING C<path> has a C-style NULL character at the end. The
length of the string is not increased to account for this NULL, however. In
@@ -401,7 +401,7 @@
/*
-=item C<static STRING* path_guarantee_trailing_separator>
+=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 +429,7 @@
/*
-=item C<static STRING* path_append>
+=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 +453,7 @@
/*
-=item C<static STRING* path_concat>
+=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
@@ -480,7 +480,7 @@
/*
-=item C<static STRING* try_load_path>
+=item C<static STRING* try_load_path(PARROT_INTERP, STRING* path)>
Attempts to load a file with name C<path>. If the file is successfully located,
the finalized name of the file is returned as a STRING. Otherwise, returns
@@ -511,7 +511,7 @@
/*
-=item C<static STRING* try_bytecode_extensions>
+=item C<static STRING* try_bytecode_extensions(PARROT_INTERP, STRING* path)>
Guess extensions, so that the user can drop the extensions
leaving it up to the build process/install whether or not
@@ -591,7 +591,8 @@
/*
-=item C<void Parrot_add_library_path>
+=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.
@@ -615,7 +616,8 @@
/*
-=item C<void Parrot_add_library_path_from_cstring>
+=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).
@@ -639,7 +641,8 @@
/*
-=item C<STRING* Parrot_locate_runtime_file_str>
+=item C<STRING* Parrot_locate_runtime_file_str(PARROT_INTERP, STRING *file,
+enum_runtime_ft type)>
Locate the full path for C<file_name> and the given file type(s). If
successful, returns a C-string allocated with C<Parrot_str_to_cstring> or
@@ -719,7 +722,8 @@
/*
-=item C<char* Parrot_locate_runtime_file>
+=item C<char* Parrot_locate_runtime_file(PARROT_INTERP, const char *file_name,
+enum_runtime_ft type)>
Locate the full path for C<file_name> and the given file type(s). If
successful, returns a C-string allocated with C<Parrot_str_to_cstring> or
@@ -761,7 +765,7 @@
/*
-=item C<char* Parrot_get_runtime_prefix>
+=item C<char* Parrot_get_runtime_prefix(PARROT_INTERP)>
Return a malloced C-string for the runtime prefix. The calling function
must free it.
@@ -801,7 +805,7 @@
/*
-=item C<STRING * Parrot_get_runtime_path>
+=item C<STRING * Parrot_get_runtime_path(PARROT_INTERP)>
Return a string for the runtime prefix.
@@ -841,7 +845,8 @@
/*
-=item C<STRING * parrot_split_path_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/longopt.c
==============================================================================
--- trunk/src/longopt.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/longopt.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -65,7 +65,8 @@
/*
-=item C<int longopt_get>
+=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>).
@@ -119,7 +120,9 @@
/*
-=item C<static int longopt_get_longopt>
+=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.
@@ -213,7 +216,9 @@
/*
-=item C<static int longopt_get_shortopt>
+=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 18:24:40 2009 (r37847)
+++ trunk/src/misc.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -46,7 +46,7 @@
/*
-=item C<STRING * Parrot_vsprintf_s>
+=item C<STRING * Parrot_vsprintf_s(PARROT_INTERP, STRING *pat, va_list args)>
Almost all the other sprintf variants in this file are implemented in
terms of this function (see C<Parrot_psprintf()> for the exception). It
@@ -71,7 +71,7 @@
/*
-=item C<STRING * Parrot_vsprintf_c>
+=item C<STRING * Parrot_vsprintf_c(PARROT_INTERP, const char *pat, va_list args)>
C string version of C<Parrot_vsprintf_s()>.
@@ -95,7 +95,8 @@
/*
-=item C<void Parrot_vsnprintf>
+=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.
@@ -129,7 +130,7 @@
/*
-=item C<STRING * Parrot_sprintf_s>
+=item C<STRING * Parrot_sprintf_s(PARROT_INTERP, STRING *pat, ...)>
Calls C<Parrot_vsprintf_s()> with the C<va_list> obtained from C<...>.
@@ -158,7 +159,7 @@
/*
-=item C<STRING * Parrot_sprintf_c>
+=item C<STRING * Parrot_sprintf_c(PARROT_INTERP, const char *pat, ...)>
C string version of C<Parrot_sprintf_s()>.
@@ -187,7 +188,8 @@
/*
-=item C<void Parrot_snprintf>
+=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.
@@ -213,7 +215,7 @@
/*
-=item C<STRING * Parrot_psprintf>
+=item C<STRING * Parrot_psprintf(PARROT_INTERP, STRING *pat, PMC *ary)>
Calls C<Parrot_sprintf_format()> with the insertion arguments in an
C<Array> PMC.
@@ -237,7 +239,8 @@
/*
-=item C<int Parrot_secret_snprintf>
+=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 18:24:40 2009 (r37847)
+++ trunk/src/multidispatch.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -255,7 +255,8 @@
/*
-=item C<PMC* Parrot_mmd_find_multi_from_sig_obj>
+=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
@@ -285,7 +286,8 @@
/*
-=item C<void Parrot_mmd_multi_dispatch_from_c_args>
+=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
@@ -343,7 +345,8 @@
/*
-=item C<PMC * Parrot_mmd_find_multi_from_long_sig>
+=item C<PMC * Parrot_mmd_find_multi_from_long_sig(PARROT_INTERP, STRING *name,
+STRING *long_sig)>
Find the best candidate multi for a given sub name and signature. The signature
is a string containing a comma-delimited list of type names.
@@ -378,7 +381,8 @@
/*
-=item C<PMC * Parrot_mmd_sort_manhattan_by_sig_pmc>
+=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
@@ -408,7 +412,7 @@
/*
-=item C<PMC * Parrot_mmd_sort_manhattan>
+=item C<PMC * Parrot_mmd_sort_manhattan(PARROT_INTERP, PMC *candidates)>
Given an array PMC (usually a MultiSub) sorts the mmd candidates by their
manhattan distance to the current args and returns the best one.
@@ -436,7 +440,7 @@
/*
-=item C<static PMC* Parrot_mmd_arg_tuple_func>
+=item C<static PMC* Parrot_mmd_arg_tuple_func(PARROT_INTERP)>
Return a list of argument types. PMC arguments are taken from registers
according to calling conventions.
@@ -544,7 +548,8 @@
/*
-=item C<static void Parrot_mmd_search_classes>
+=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
@@ -602,7 +607,7 @@
/*
-=item C<static INTVAL distance_cmp>
+=item C<static INTVAL distance_cmp(PARROT_INTERP, INTVAL a, INTVAL b)>
=cut
@@ -632,7 +637,7 @@
/*
-=item C<static PMC* mmd_build_type_tuple_from_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.
@@ -677,7 +682,7 @@
/*
-=item C<static PMC* mmd_build_type_tuple_from_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.
@@ -700,7 +705,7 @@
/*
-=item C<PMC* Parrot_mmd_build_type_tuple_from_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.
@@ -793,7 +798,7 @@
/*
-=item C<static PMC* mmd_cvt_to_types>
+=item C<static PMC* mmd_cvt_to_types(PARROT_INTERP, PMC *multi_sig)>
Given a ResizablePMCArray PMC containing some form of type identifier (either
the string name of a class or a PMC representing the type), resolves all type
@@ -857,7 +862,7 @@
/*
-=item C<static PMC * Parrot_mmd_get_cached_multi_sig>
+=item C<static PMC * Parrot_mmd_get_cached_multi_sig(PARROT_INTERP, PMC *sub_pmc)>
=cut
@@ -895,7 +900,7 @@
/*
-=item C<static UINTVAL mmd_distance>
+=item C<static UINTVAL mmd_distance(PARROT_INTERP, PMC *pmc, PMC *arg_tuple)>
Create Manhattan Distance of sub C<pmc> against given argument types.
0xffff is the maximum distance
@@ -1034,7 +1039,7 @@
/*
-=item C<static PMC * Parrot_mmd_sort_candidates>
+=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.
@@ -1068,7 +1073,7 @@
/*
-=item C<static PMC* Parrot_mmd_search_scopes>
+=item C<static PMC* Parrot_mmd_search_scopes(PARROT_INTERP, STRING *meth)>
Search all scopes for MMD candidates matching the arguments given in
C<arg_tuple>.
@@ -1095,7 +1100,7 @@
/*
-=item C<static int Parrot_mmd_maybe_candidate>
+=item C<static int Parrot_mmd_maybe_candidate(PARROT_INTERP, PMC *pmc, PMC *cl)>
If the candidate C<pmc> is a Sub PMC, push it on the candidate list and
return TRUE to stop further search.
@@ -1142,7 +1147,7 @@
/*
-=item C<static int mmd_search_local>
+=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.
@@ -1163,7 +1168,8 @@
/*
-=item C<static void mmd_search_by_sig_obj>
+=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.
@@ -1199,7 +1205,7 @@
/*
-=item C<static void mmd_search_global>
+=item C<static void mmd_search_global(PARROT_INTERP, STRING *name, PMC *cl)>
Search the builtin namespace for matching candidates.
@@ -1225,7 +1231,7 @@
/*
-=item C<static void mmd_add_multi_global>
+=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.
@@ -1255,7 +1261,8 @@
/*
-=item C<static void mmd_add_multi_to_namespace>
+=item C<static void mmd_add_multi_to_namespace(PARROT_INTERP, STRING *ns_name,
+STRING *sub_name, PMC *sub_obj)>
Create a MultiSub, or add a variant to an existing MultiSub. The MultiSub is
added as a method to a class.
@@ -1286,7 +1293,8 @@
/*
-=item C<void Parrot_mmd_add_multi_from_long_sig>
+=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.
@@ -1326,7 +1334,9 @@
/*
-=item C<void Parrot_mmd_add_multi_from_c_args>
+=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.
@@ -1366,7 +1376,8 @@
/*
-=item C<void Parrot_mmd_add_multi_list_from_c_args>
+=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
@@ -1402,7 +1413,7 @@
/*
-=item C<MMD_Cache * Parrot_mmd_cache_create>
+=item C<MMD_Cache * Parrot_mmd_cache_create(PARROT_INTERP)>
Creates and returns a new MMD cache.
@@ -1424,7 +1435,8 @@
/*
-=item C<static STRING * mmd_cache_key_from_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.
@@ -1469,7 +1481,8 @@
/*
-=item C<PMC * Parrot_mmd_cache_lookup_by_values>
+=item C<PMC * Parrot_mmd_cache_lookup_by_values(PARROT_INTERP, MMD_Cache *cache,
+const char *name, PMC *values)>
Takes an array of values for the call and does a lookup in the MMD cache.
@@ -1495,7 +1508,8 @@
/*
-=item C<void Parrot_mmd_cache_store_by_values>
+=item C<void Parrot_mmd_cache_store_by_values(PARROT_INTERP, MMD_Cache *cache,
+const char *name, PMC *values, PMC *chosen)>
Takes an array of values for the call along with a chosen candidate and puts
it into the cache.
@@ -1519,7 +1533,8 @@
/*
-=item C<static STRING * mmd_cache_key_from_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.
@@ -1566,7 +1581,8 @@
/*
-=item C<PMC * Parrot_mmd_cache_lookup_by_types>
+=item C<PMC * Parrot_mmd_cache_lookup_by_types(PARROT_INTERP, MMD_Cache *cache,
+const char *name, PMC *types)>
Takes an array of types for the call and does a lookup in the MMD cache.
@@ -1592,7 +1608,8 @@
/*
-=item C<void Parrot_mmd_cache_store_by_types>
+=item C<void Parrot_mmd_cache_store_by_types(PARROT_INTERP, MMD_Cache *cache,
+const char *name, PMC *types, PMC *chosen)>
Takes an array of types for the call along with a chosen candidate and puts
it into the cache. The name parameter is optional, and if the cache is already
@@ -1617,7 +1634,7 @@
/*
-=item C<void Parrot_mmd_cache_mark>
+=item C<void Parrot_mmd_cache_mark(PARROT_INTERP, MMD_Cache *cache)>
GC-marks an MMD cache.
@@ -1639,7 +1656,7 @@
/*
-=item C<void Parrot_mmd_cache_destroy>
+=item C<void Parrot_mmd_cache_destroy(PARROT_INTERP, MMD_Cache *cache)>
Destroys an MMD cache.
Modified: trunk/src/oo.c
==============================================================================
--- trunk/src/oo.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/oo.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -87,7 +87,8 @@
/*
-=item C<void Parrot_oo_extract_methods_from_namespace>
+=item C<void Parrot_oo_extract_methods_from_namespace(PARROT_INTERP, PMC *self,
+PMC *ns)>
Extract methods and vtable overrides from the given namespace and insert them
into the class.
@@ -149,7 +150,7 @@
/*
-=item C<PMC * Parrot_oo_get_namespace>
+=item C<PMC * Parrot_oo_get_namespace(PARROT_INTERP, const PMC *classobj)>
Lookup a namespace object from a class PMC.
@@ -175,7 +176,7 @@
/*
-=item C<PMC * Parrot_oo_get_class>
+=item C<PMC * Parrot_oo_get_class(PARROT_INTERP, PMC *key)>
Lookup a class object from a namespace, string, or key PMC.
@@ -250,7 +251,7 @@
/*
-=item C<PMC * Parrot_oo_get_class_str>
+=item C<PMC * Parrot_oo_get_class_str(PARROT_INTERP, STRING *name)>
Lookup a class object from a builtin string.
@@ -291,7 +292,7 @@
/*
-=item C<PMC * Parrot_oo_newclass_from_str>
+=item C<PMC * Parrot_oo_newclass_from_str(PARROT_INTERP, STRING *name)>
Create a new class object from a string name.
@@ -321,7 +322,8 @@
/*
-=item C<PMC * Parrot_oo_find_vtable_override_for_class>
+=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.
@@ -346,7 +348,8 @@
/*
-=item C<PMC * Parrot_oo_find_vtable_override>
+=item C<PMC * Parrot_oo_find_vtable_override(PARROT_INTERP, PMC *classobj,
+STRING *name)>
Lookup a vtable override in a class, including any vtable overrides inherited
from parents.
@@ -393,7 +396,7 @@
/*
-=item C<INTVAL Parrot_get_vtable_index>
+=item C<INTVAL Parrot_get_vtable_index(PARROT_INTERP, const STRING *name)>
Return index if C<name> is a valid vtable slot name.
@@ -436,7 +439,7 @@
/*
-=item C<const char * Parrot_get_vtable_name>
+=item C<const char * Parrot_get_vtable_name(PARROT_INTERP, INTVAL idx)>
Return the method name at the specified index in the vtable slot array.
Use this function when you cannot access Parrot_vtable_slot_names directly.
@@ -468,7 +471,7 @@
/*
-=item C<const char* Parrot_MMD_method_name>
+=item C<const char* Parrot_MMD_method_name(PARROT_INTERP, INTVAL idx)>
Return the method name for the given MMD enum.
@@ -495,7 +498,7 @@
/*
-=item C<static INTVAL fail_if_type_exists>
+=item C<static INTVAL fail_if_type_exists(PARROT_INTERP, PMC *name)>
This function throws an exception if a PMC or class with the same name *
already exists in the global type registry. The global type registry
@@ -541,7 +544,7 @@
/*
-=item C<INTVAL Parrot_oo_register_type>
+=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
@@ -590,7 +593,7 @@
/*
-=item C<void mark_object_cache>
+=item C<void mark_object_cache(PARROT_INTERP)>
Marks all PMCs in the object method cache as live. This shouldn't strictly be
necessary, as they're likely all reachable from namespaces and classes, but
@@ -630,7 +633,7 @@
/*
-=item C<void init_object_cache>
+=item C<void init_object_cache(PARROT_INTERP)>
Allocate memory for object cache.
@@ -649,7 +652,7 @@
/*
-=item C<void destroy_object_cache>
+=item C<void destroy_object_cache(PARROT_INTERP)>
=cut
@@ -675,7 +678,7 @@
/*
-=item C<static void invalidate_type_caches>
+=item C<static void invalidate_type_caches(PARROT_INTERP, UINTVAL type)>
=cut
@@ -711,7 +714,7 @@
/*
-=item C<static void invalidate_all_caches>
+=item C<static void invalidate_all_caches(PARROT_INTERP)>
=cut
@@ -729,7 +732,7 @@
/*
-=item C<void Parrot_invalidate_method_cache>
+=item C<void Parrot_invalidate_method_cache(PARROT_INTERP, STRING *_class)>
Clear method cache for the given class. If class is NULL, caches for
all classes are invalidated.
@@ -776,7 +779,8 @@
/*
-=item C<PMC * Parrot_find_method_direct>
+=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.
@@ -807,7 +811,8 @@
/*
-=item C<PMC * Parrot_find_method_with_cache>
+=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.
@@ -892,7 +897,8 @@
/*
-=item C<static void debug_trace_find_meth>
+=item C<static void debug_trace_find_meth(PARROT_INTERP, const PMC *_class,
+const STRING *name, const PMC *sub)>
=cut
@@ -945,7 +951,8 @@
/*
-=item C<static PMC * find_method_direct_1>
+=item C<static PMC * find_method_direct_1(PARROT_INTERP, PMC *_class,
+STRING *method_name)>
=cut
@@ -983,7 +990,7 @@
/*
-=item C<static PMC* C3_merge>
+=item C<static PMC* C3_merge(PARROT_INTERP, PMC *merge_list)>
=cut
@@ -1078,7 +1085,7 @@
/*
-=item C<PMC* Parrot_ComputeMRO_C3>
+=item C<PMC* Parrot_ComputeMRO_C3(PARROT_INTERP, PMC *_class)>
Computes the C3 linearization for the given class.
@@ -1144,7 +1151,8 @@
/*
-=item C<void Parrot_ComposeRole>
+=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 18:24:40 2009 (r37847)
+++ trunk/src/packdump.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -52,7 +52,7 @@
/*
-=item C<void PackFile_ConstTable_dump(PARROT_INTERP, const PackFile_ConstTable *self)>
+=item C<void PackFile_ConstTable_dump>
Dumps the constant table C<self>.
@@ -75,8 +75,7 @@
/*
-=item C<static void PackFile_Constant_dump(PARROT_INTERP,
-const PackFile_ConstTable *ct, const PackFile_Constant *self)>
+=item C<static void PackFile_Constant_dump>
Dumps the constant C<self>.
@@ -124,7 +123,7 @@
/*
-=item C<static void pobj_flag_dump(PARROT_INTERP, long flags)>
+=item C<static void pobj_flag_dump>
Given a word of flags, generate a dump line of the whole word in hex,
followed by individual bits.
@@ -374,7 +373,7 @@
/*
-=item C<void PackFile_Fixup_dump(PARROT_INTERP, const PackFile_FixupTable *ft)>
+=item C<void PackFile_Fixup_dump>
Dumps the fix-up table C<ft>.
Modified: trunk/src/packout.c
==============================================================================
--- trunk/src/packout.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/packout.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -28,7 +28,7 @@
/*
-=item C<opcode_t PackFile_pack_size(PARROT_INTERP, PackFile *self)>
+=item C<opcode_t PackFile_pack_size>
Determine the size of the buffer needed in order to pack the PackFile
into a contiguous region of memory.
@@ -68,7 +68,7 @@
/*
-=item C<void PackFile_pack(PARROT_INTERP, PackFile *self, opcode_t *cursor)>
+=item C<void PackFile_pack>
Pack the PackFile into a contiguous region of memory.
@@ -143,7 +143,7 @@
/*
-=item C<size_t PackFile_ConstTable_pack_size(PARROT_INTERP, PackFile_Segment *seg)>
+=item C<size_t PackFile_ConstTable_pack_size>
Determine the size of the buffer needed in order to pack the PackFile
constant table into a contiguous region of memory.
@@ -168,8 +168,7 @@
/*
-=item C<opcode_t * PackFile_ConstTable_pack(PARROT_INTERP,
-PackFile_Segment *seg, opcode_t *cursor)>
+=item C<opcode_t * PackFile_ConstTable_pack>
Pack the PackFile ConstTable into a contiguous region of memory.
@@ -204,8 +203,7 @@
/*
-=item C<int PackFile_find_in_const(PARROT_INTERP,
-const PackFile_ConstTable *ct, PMC *key, int type)>
+=item C<int PackFile_find_in_const>
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 +237,7 @@
/*
-=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>
Pack a PackFile Constant into a contiguous region of memory.
Modified: trunk/src/pbc_merge.c
==============================================================================
--- trunk/src/pbc_merge.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/pbc_merge.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -206,7 +206,7 @@
/*
-=item C<static void help(PARROT_INTERP)>
+=item C<static void help>
Print out the user help info.
@@ -226,7 +226,7 @@
/*
-=item C<static PackFile* pbc_merge_loadpbc(PARROT_INTERP, const char *fullname)>
+=item C<static PackFile* pbc_merge_loadpbc>
This function loads a PBC file and unpacks it. We can't
use Parrot_pbc_read because that is specified to also
@@ -318,8 +318,7 @@
/*
-=item C<static PackFile_ByteCode* pbc_merge_bytecode(PARROT_INTERP,
-pbc_merge_input **inputs, int num_inputs, PackFile *pf)>
+=item C<static PackFile_ByteCode* pbc_merge_bytecode>
This function merges the bytecode from the input packfiles, storing the
offsets that each bit of bytecode now exists at.
@@ -385,8 +384,7 @@
/*
-=item C<static PackFile_ConstTable* pbc_merge_constants(PARROT_INTERP,
-pbc_merge_input **inputs, int num_inputs, PackFile *pf, PackFile_ByteCode *bc)>
+=item C<static PackFile_ConstTable* pbc_merge_constants>
This function merges the constants tables from the input PBC files.
@@ -485,8 +483,7 @@
/*
-=item C<static void pbc_merge_fixups(PARROT_INTERP, pbc_merge_input **inputs,
-int num_inputs, PackFile *pf, PackFile_ByteCode *bc)>
+=item C<static void pbc_merge_fixups>
This function merges the fixups tables from the input PBC files.
@@ -582,8 +579,7 @@
/*
-=item C<static void pbc_merge_debugs(PARROT_INTERP, pbc_merge_input **inputs,
-int num_inputs, PackFile *pf, PackFile_ByteCode *bc)>
+=item C<static void pbc_merge_debugs>
This function merges the debug segments from the input PBC files.
@@ -653,8 +649,7 @@
/*
-=item C<static void pbc_merge_pic_index(PARROT_INTERP, pbc_merge_input **inputs,
-int num_inputs, PackFile *pf, PackFile_ByteCode *bc)>
+=item C<static void pbc_merge_pic_index>
This function merges the pic_index segments from the input PBC files.
@@ -706,8 +701,7 @@
/*
-=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>
This function corrects the pointers into the constants table found in the
bytecode.
@@ -791,8 +785,7 @@
/*
-=item C<static PackFile* pbc_merge_begin(PARROT_INTERP,
-pbc_merge_input **inputs, int num_inputs)>
+=item C<static PackFile* pbc_merge_begin>
This is the function that drives PBC merging process.
@@ -834,8 +827,7 @@
/*
-=item C<static void pbc_merge_write(PARROT_INTERP, PackFile *pf,
-const char *filename)>
+=item C<static void pbc_merge_write>
This functions writes out the merged packfile.
@@ -876,7 +868,7 @@
/*
-=item C<int main(int argc, const char **argv)>
+=item C<int main>
The main function that grabs console input, reads in the packfiles
provided they exist, hands them to another function that runs the
Modified: trunk/src/pic.c
==============================================================================
--- trunk/src/pic.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/pic.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -251,7 +251,7 @@
/*
-=item C<void parrot_PIC_alloc_store(PackFile_ByteCode *cs, size_t n)>
+=item C<void parrot_PIC_alloc_store>
Initialize the PIC storage for the given code segment with the capacitiy of
holding at least C<n> MIC entries. The PIC_store itself, room for C<n> MICs and
@@ -292,7 +292,7 @@
/*
-=item C<void parrot_PIC_destroy(PackFile_ByteCode *cs)>
+=item C<void parrot_PIC_destroy>
Free memory for the PIC storage.
@@ -317,7 +317,7 @@
/*
-=item C<int parrot_PIC_op_is_cached(int op_code)>
+=item C<int parrot_PIC_op_is_cached>
Return true, if the opcode needs a PIC slot.
@@ -342,7 +342,7 @@
/*
-=item C<Parrot_MIC* parrot_PIC_alloc_mic(const PARROT_INTERP, size_t n)>
+=item C<Parrot_MIC* parrot_PIC_alloc_mic>
Allocate a new MIC structure for the C<n>th cached opcode in this
bytecode segement.
@@ -364,7 +364,7 @@
/*
-=item C<Parrot_PIC* parrot_PIC_alloc_pic(PARROT_INTERP)>
+=item C<Parrot_PIC* parrot_PIC_alloc_pic>
Allocate a new PIC structure for the C<n>th cached opcode in this
bytecode segement.
@@ -410,7 +410,7 @@
/*
-=item C<void * parrot_pic_opcode(PARROT_INTERP, INTVAL op)>
+=item C<void * parrot_pic_opcode>
=cut
@@ -439,8 +439,7 @@
/*
-=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>
=cut
@@ -463,8 +462,7 @@
/*
-=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>
=cut
@@ -487,8 +485,7 @@
/*
-=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>
=cut
@@ -512,8 +509,7 @@
/*
-=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>
=cut
@@ -536,8 +532,7 @@
/*
-=item C<static int pass_mixed(PARROT_INTERP, PMC *sig, const char *src_base,
-void * const *src, char *dest_base, void * const *dest)>
+=item C<static int pass_mixed>
=cut
@@ -620,8 +615,7 @@
/*
-=item C<int parrot_pic_check_sig(PARROT_INTERP, PMC *sig1, PMC *sig2,
-int *type)>
+=item C<int parrot_pic_check_sig>
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
@@ -691,8 +685,7 @@
/*
-=item C<static int is_pic_param(PARROT_INTERP, void **pc, Parrot_MIC *mic,
-opcode_t op)>
+=item C<static int is_pic_param>
=cut
@@ -774,8 +767,7 @@
/*
-=item C<static int is_pic_func(PARROT_INTERP, void **pc, Parrot_MIC *mic,
-int core_type)>
+=item C<static int is_pic_func>
=cut
@@ -849,8 +841,7 @@
/*
-=item C<void parrot_PIC_prederef(PARROT_INTERP, opcode_t op, void **pc_pred,
-int core)>
+=item C<void parrot_PIC_prederef>
Define either the normal prederef function or the PIC stub, if PIC for
this opcode function is available. Called from C<do_prederef>.
@@ -913,7 +904,7 @@
/*
-=item C<static void parrot_pic_move(PARROT_INTERP, Parrot_MIC *mic)>
+=item C<static void parrot_pic_move>
=cut
@@ -947,8 +938,7 @@
/*
-=item C<void parrot_pic_find_infix_v_pp(PARROT_INTERP, PMC *left, PMC *right,
-Parrot_MIC *mic, opcode_t *cur_opcode)>
+=item C<void parrot_pic_find_infix_v_pp>
=cut
Modified: trunk/src/pic_jit.c
==============================================================================
--- trunk/src/pic_jit.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/pic_jit.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -165,8 +165,7 @@
/*
-=item C<static opcode_t * pic_test_func(PARROT_INTERP, INTVAL *sig_bits,
-void **args)>
+=item C<static opcode_t * pic_test_func>
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
@@ -194,7 +193,7 @@
/*
-=item C<static int jit_can_compile_sub(PARROT_INTERP, PMC *sub_pmc)>
+=item C<static int jit_can_compile_sub>
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 +241,7 @@
/*
-=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>
Returns C<1> if the passed arguments match the subroutine's parameter list.
Returns C<0> otherwise.
@@ -293,7 +291,7 @@
/*
-=item C<static int returns_match_results(PARROT_INTERP, PMC *sig_ret, PMC *sig_result)>
+=item C<static int returns_match_results>
Returns 1 if the return values match the returned results. Returns C<0>
otherwise.
@@ -332,7 +330,7 @@
/*
-=item C<static int call_is_safe(PARROT_INTERP, PMC *sub_pmc, opcode_t **set_args)>
+=item C<static int call_is_safe>
Returns C<1> if the passed arguments match the subroutine's parameter list.
Returns C<0> otherwise.
@@ -385,8 +383,7 @@
/*
-=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>
Returns 1 if the return values match the returned results. Returns C<0>
otherwise.
@@ -463,8 +460,7 @@
/*
-=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>
=cut
@@ -528,7 +524,7 @@
/*
-=item C<funcptr_t parrot_pic_JIT_sub(PARROT_INTERP, PMC *sub_pmc, int flags)>
+=item C<funcptr_t parrot_pic_JIT_sub>
=cut
Modified: trunk/src/pmc.c
==============================================================================
--- trunk/src/pmc.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/pmc.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -71,7 +71,7 @@
/*
-=item C<INTVAL PMC_is_null>
+=item C<INTVAL PMC_is_null(PARROT_INTERP, const PMC *pmc)>
Tests if the given pmc is null.
@@ -93,7 +93,7 @@
/*
-=item C<PMC * pmc_new>
+=item C<PMC * pmc_new(PARROT_INTERP, INTVAL base_type)>
Creates a new PMC of type C<base_type> (which is an index into the list of PMC
types declared in C<vtables> in F<include/parrot/pmc.h>). Once the PMC has been
@@ -127,7 +127,7 @@
/*
-=item C<PMC * pmc_reuse>
+=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 +220,7 @@
/*
-=item C<static PMC * get_new_pmc_header>
+=item C<static PMC * get_new_pmc_header(PARROT_INTERP, INTVAL base_type, UINTVAL flags)>
Gets a new PMC header.
@@ -315,7 +315,7 @@
/*
-=item C<PMC * pmc_new_noinit>
+=item C<PMC * pmc_new_noinit(PARROT_INTERP, INTVAL base_type)>
Creates a new PMC of type C<base_type> (which is an index into the list of PMC
types declared in C<vtables> in F<include/parrot/pmc.h>). Unlike C<pmc_new()>,
@@ -343,7 +343,7 @@
/*
-=item C<PMC * constant_pmc_new_noinit>
+=item C<PMC * constant_pmc_new_noinit(PARROT_INTERP, INTVAL base_type)>
Creates a new constant PMC of type C<base_type>.
@@ -363,7 +363,7 @@
/*
-=item C<PMC * constant_pmc_new>
+=item C<PMC * constant_pmc_new(PARROT_INTERP, INTVAL base_type)>
Creates a new constant PMC of type C<base_type>, then calls its C<init>.
@@ -385,7 +385,7 @@
/*
-=item C<PMC * pmc_new_init>
+=item C<PMC * pmc_new_init(PARROT_INTERP, INTVAL base_type, PMC *init)>
As C<pmc_new()>, but passes C<init> to the PMC's C<init_pmc()> vtable entry.
@@ -413,7 +413,7 @@
/*
-=item C<PMC * constant_pmc_new_init>
+=item C<PMC * constant_pmc_new_init(PARROT_INTERP, INTVAL base_type, PMC *init)>
As C<constant_pmc_new>, but passes C<init> to the PMC's C<init_pmc> vtable
entry.
@@ -436,7 +436,7 @@
/*
-=item C<PMC * temporary_pmc_new>
+=item C<PMC * temporary_pmc_new(PARROT_INTERP, INTVAL base_type)>
Creates a new temporary PMC of type C<base_type>, the call C<init>. B<You> are
responsible for freeing this PMC when it goes out of scope with
@@ -470,7 +470,8 @@
/*
-=item C<static void pmc_free_to_pool>
+=item C<static void pmc_free_to_pool(PARROT_INTERP, PMC *pmc,
+Small_Object_Pool *pool)>
=cut
@@ -494,7 +495,7 @@
/*
-=item C<void temporary_pmc_free>
+=item C<void temporary_pmc_free(PARROT_INTERP, PMC *pmc)>
Frees a new temporary PMC created by C<temporary_pmc_new()>. Do not call this
with any other type of PMC. Do not forget to call this (or you'll leak PMCs).
@@ -515,7 +516,7 @@
/*
-=item C<static void pmc_free>
+=item C<static void pmc_free(PARROT_INTERP, PMC *pmc)>
=cut
@@ -532,7 +533,7 @@
/*
-=item C<INTVAL get_new_vtable_index>
+=item C<INTVAL get_new_vtable_index(PARROT_INTERP)>
=cut
@@ -553,7 +554,7 @@
/*
-=item C<INTVAL pmc_register>
+=item C<INTVAL pmc_register(PARROT_INTERP, STRING *name)>
Registers the name of a new PMC type with Parrot, returning the INTVAL
representing that type.
@@ -589,7 +590,7 @@
/*
-=item C<INTVAL pmc_type>
+=item C<INTVAL pmc_type(PARROT_INTERP, STRING *name)>
Returns the PMC type for C<name>.
@@ -625,7 +626,7 @@
/*
-=item C<INTVAL pmc_type_p>
+=item C<INTVAL pmc_type_p(PARROT_INTERP, PMC *name)>
Returns the PMC type for C<name>.
@@ -652,7 +653,7 @@
/*
-=item C<static PMC * create_class_pmc>
+=item C<static PMC * create_class_pmc(PARROT_INTERP, INTVAL type)>
Create a class object for this interpreter. Takes an interpreter name and type
as arguments. Returns a pointer to the class object.
@@ -703,7 +704,7 @@
/*
-=item C<void Parrot_create_mro>
+=item C<void Parrot_create_mro(PARROT_INTERP, INTVAL type)>
Create the MRO (method resolution order) array for this type.
@@ -774,7 +775,7 @@
=over 4
-=item C<void gc_register_pmc>
+=item C<void gc_register_pmc(PARROT_INTERP, PMC *pmc)>
Registers the PMC with the interpreter's GC registry.
@@ -799,7 +800,7 @@
/*
-=item C<void gc_unregister_pmc>
+=item C<void gc_unregister_pmc(PARROT_INTERP, PMC *pmc)>
Unregisters the PMC from the interpreter's GC registry.
Modified: trunk/src/pmc_freeze.c
==============================================================================
--- trunk/src/pmc_freeze.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/pmc_freeze.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -463,8 +463,7 @@
=over 4
-=item C<static void str_append(PARROT_INTERP, STRING *s, const void *b,
-size_t len)>
+=item C<static void str_append>
Appends C<len> bytes from buffer C<*b> to string C<*s>.
@@ -501,7 +500,7 @@
/*
-=item C<static void push_ascii_integer(PARROT_INTERP, IMAGE_IO *io, INTVAL v)>
+=item C<static void push_ascii_integer>
Pushes an ASCII version of the integer C<v> onto the end of the C<*io>
"stream".
@@ -521,8 +520,7 @@
/*
-=item C<static void push_ascii_number(PARROT_INTERP, const IMAGE_IO *io,
-FLOATVAL v)>
+=item C<static void push_ascii_number>
Pushes an ASCII version of the number C<v> onto the end of the C<*io>
"stream".
@@ -542,8 +540,7 @@
/*
-=item C<static void push_ascii_string(PARROT_INTERP, IMAGE_IO *io,
-const STRING *s)>
+=item C<static void push_ascii_string>
Pushes an ASCII version of the string C<*s> onto the end of the C<*io>
"stream".
@@ -578,7 +575,7 @@
/*
-=item C<static void push_ascii_pmc(PARROT_INTERP, IMAGE_IO *io, const PMC* v)>
+=item C<static void push_ascii_pmc>
Pushes an ASCII version of the PMC C<*v> onto the end of the C<*io>
"stream".
@@ -598,7 +595,7 @@
/*
-=item C<static INTVAL shift_ascii_integer(PARROT_INTERP, IMAGE_IO *io)>
+=item C<static INTVAL shift_ascii_integer>
Removes and returns an integer from the start of the C<*io> "stream".
@@ -624,7 +621,7 @@
/*
-=item C<static FLOATVAL shift_ascii_number(PARROT_INTERP, IMAGE_IO *io)>
+=item C<static FLOATVAL shift_ascii_number>
Removes and returns an number from the start of the C<*io> "stream".
@@ -650,7 +647,7 @@
/*
-=item C<static STRING* shift_ascii_string(PARROT_INTERP, IMAGE_IO *io)>
+=item C<static STRING* shift_ascii_string>
Removes and returns an string from the start of the C<*io> "stream".
@@ -683,7 +680,7 @@
/*
-=item C<static PMC* shift_ascii_pmc(PARROT_INTERP, IMAGE_IO *io)>
+=item C<static PMC* shift_ascii_pmc>
Removes and returns a PMC from the start of the C<*io> "stream".
@@ -716,7 +713,7 @@
=over 4
-=item C<static void op_check_size(PARROT_INTERP, STRING *s, size_t len)>
+=item C<static void op_check_size>
Checks the size of the "stream" buffer to see if it can accommodate
C<len> more bytes. If not then the buffer is expanded.
@@ -749,7 +746,7 @@
/*
-=item C<static void op_append(PARROT_INTERP, STRING *s, opcode_t b, size_t len)>
+=item C<static void op_append>
Appends the opcode C<b> to the string C<*s>.
@@ -769,7 +766,7 @@
/*
-=item C<static void push_opcode_integer(PARROT_INTERP, IMAGE_IO *io, INTVAL v)>
+=item C<static void push_opcode_integer>
Pushes the integer C<v> onto the end of the C<*io> "stream".
@@ -789,7 +786,7 @@
/*
-=item C<static void push_opcode_number(PARROT_INTERP, IMAGE_IO *io, FLOATVAL v)>
+=item C<static void push_opcode_number>
Pushes the number C<v> onto the end of the C<*io> "stream".
@@ -816,7 +813,7 @@
/*
-=item C<static void push_opcode_string(PARROT_INTERP, IMAGE_IO *io, STRING *v)>
+=item C<static void push_opcode_string>
Pushes the string C<*v> onto the end of the C<*io> "stream".
@@ -843,7 +840,7 @@
/*
-=item C<static void push_opcode_pmc(PARROT_INTERP, IMAGE_IO *io, PMC* v)>
+=item C<static void push_opcode_pmc>
Pushes the PMC C<*v> onto the end of the C<*io> "stream".
@@ -860,7 +857,7 @@
/*
-=item C<static INTVAL shift_opcode_integer(PARROT_INTERP, IMAGE_IO *io)>
+=item C<static INTVAL shift_opcode_integer>
Removes and returns an integer from the start of the C<*io> "stream".
@@ -885,7 +882,7 @@
/*
-=item C<static PMC* shift_opcode_pmc(PARROT_INTERP, IMAGE_IO *io)>
+=item C<static PMC* shift_opcode_pmc>
Removes and returns an PMC from the start of the C<*io> "stream".
@@ -907,7 +904,7 @@
/*
-=item C<static FLOATVAL shift_opcode_number(PARROT_INTERP, IMAGE_IO *io)>
+=item C<static FLOATVAL shift_opcode_number>
Removes and returns an number from the start of the C<*io> "stream".
@@ -932,7 +929,7 @@
/*
-=item C<static STRING* shift_opcode_string(PARROT_INTERP, IMAGE_IO *io)>
+=item C<static STRING* shift_opcode_string>
Removes and returns a string from the start of the C<*io> "stream".
@@ -965,7 +962,7 @@
=over 4
-=item C<static void pmc_add_ext(PARROT_INTERP, PMC *pmc)>
+=item C<static void pmc_add_ext>
Adds a C<PMC_EXT> to C<*pmc>.
@@ -983,7 +980,7 @@
/*
-=item C<static void cleanup_next_for_GC_pool(Small_Object_Pool *pool)>
+=item C<static void cleanup_next_for_GC_pool>
Sets all the C<next_for_GC> pointers to C<NULL>.
@@ -1013,7 +1010,7 @@
/*
-=item C<static void cleanup_next_for_GC(PARROT_INTERP)>
+=item C<static void cleanup_next_for_GC>
Cleans up the C<next_for_GC> pointers.
@@ -1061,7 +1058,7 @@
/*
-=item C<static void ft_init(PARROT_INTERP, visit_info *info)>
+=item C<static void ft_init>
Initializes the freeze/thaw subsystem.
@@ -1119,7 +1116,7 @@
/*
-=item C<static void todo_list_init(PARROT_INTERP, visit_info *info)>
+=item C<static void todo_list_init>
Initializes the C<*info> lists.
@@ -1144,8 +1141,7 @@
/*
-=item C<static void freeze_pmc(PARROT_INTERP, PMC *pmc, visit_info *info,
-int seen, UINTVAL id)>
+=item C<static void freeze_pmc>
Freeze PMC, setting type, seen, and "same-as-last" indicators as
appropriate.
@@ -1193,8 +1189,7 @@
/*
-=item C<static int thaw_pmc(PARROT_INTERP, visit_info *info, UINTVAL *id,
-INTVAL *type)>
+=item C<static int thaw_pmc>
Freeze and thaw a PMC (id).
@@ -1255,8 +1250,7 @@
/*
-=item C<static void do_action(PARROT_INTERP, PMC *pmc, visit_info *info,
-int seen, UINTVAL id)>
+=item C<static void do_action>
Called from C<visit_next_for_GC()> and C<visit_todo_list()> to perform
the action specified in C<< info->what >>.
@@ -1288,8 +1282,7 @@
/*
-=item C<static PMC* thaw_create_pmc(PARROT_INTERP, const visit_info *info,
-INTVAL type)>
+=item C<static PMC* thaw_create_pmc>
Called from C<do_thaw()> to attach the vtable etc. to C<*pmc>.
@@ -1320,7 +1313,7 @@
/*
-=item C<static void do_thaw(PARROT_INTERP, PMC* pmc, visit_info *info)>
+=item C<static void do_thaw>
Called by C<visit_todo_list_thaw()> to thaw and return a PMC.
@@ -1418,7 +1411,7 @@
/*
-=item C<static UINTVAL id_from_pmc(PARROT_INTERP, PMC* pmc)>
+=item C<static UINTVAL id_from_pmc>
Find a PMC in an arena, and return an id (left-shifted 2 bits),
based on its position.
@@ -1467,7 +1460,7 @@
/*
-=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>
Remembers the PMC for later processing.
@@ -1487,8 +1480,7 @@
/*
-=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>
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 +1526,7 @@
/*
-=item C<static void add_pmc_todo_list(PARROT_INTERP, PMC *pmc, visit_info *info)>
+=item C<static void add_pmc_todo_list>
Remembers the PMC to be processed later.
@@ -1551,8 +1543,7 @@
/*
-=item C<static int todo_list_seen(PARROT_INTERP, PMC *pmc, visit_info *info,
-UINTVAL *id)>
+=item C<static int todo_list_seen>
Returns true if the PMC was seen, otherwise it put it on the todo list,
generates an ID (tag) for PMC, offset by 4 as are addresses, low bits
@@ -1589,7 +1580,7 @@
/*
-=item C<static void visit_next_for_GC(PARROT_INTERP, PMC* pmc, visit_info* info)>
+=item C<static void visit_next_for_GC>
C<visit_child> callbacks:
@@ -1624,7 +1615,7 @@
/*
-=item C<static void visit_todo_list(PARROT_INTERP, PMC* pmc, visit_info* info)>
+=item C<static void visit_todo_list>
Checks the seen PMC via the todo list.
@@ -1652,7 +1643,7 @@
/*
-=item C<static void visit_todo_list_thaw(PARROT_INTERP, PMC* old, visit_info* info)>
+=item C<static void visit_todo_list_thaw>
Callback for thaw - action first.
@@ -1671,8 +1662,7 @@
/*
-=item C<static void visit_loop_next_for_GC(PARROT_INTERP, PMC *current,
-visit_info *info)>
+=item C<static void visit_loop_next_for_GC>
Put first item on todo list, then run as long as there are items to be
done.
@@ -1701,8 +1691,7 @@
/*
-=item C<static void visit_loop_todo_list(PARROT_INTERP, PMC *current,
-visit_info *info)>
+=item C<static void visit_loop_todo_list>
The thaw loop.
@@ -1779,7 +1768,7 @@
/*
-=item C<static void create_image(PARROT_INTERP, PMC *pmc, visit_info *info)>
+=item C<static void create_image>
Allocate image to some estimated size.
@@ -1809,7 +1798,7 @@
/*
-=item C<static PMC* run_thaw(PARROT_INTERP, STRING* image, visit_enum_type what)>
+=item C<static PMC* run_thaw>
Performs thawing. C<what> indicates what to be thawed.
@@ -1892,7 +1881,7 @@
=over 4
-=item C<STRING* Parrot_freeze_at_destruct(PARROT_INTERP, PMC* pmc)>
+=item C<STRING* Parrot_freeze_at_destruct>
This function must not consume any resources (except the image itself).
It uses the C<next_for_GC> pointer, so its not reentrant and must not be
@@ -1931,7 +1920,7 @@
/*
-=item C<STRING* Parrot_freeze(PARROT_INTERP, PMC* pmc)>
+=item C<STRING* Parrot_freeze>
Freeze using either method.
@@ -1974,7 +1963,7 @@
/*
-=item C<PMC* Parrot_thaw(PARROT_INTERP, STRING* image)>
+=item C<PMC* Parrot_thaw>
Thaw a PMC, called from the C<thaw> opcode.
@@ -1994,7 +1983,7 @@
/*
-=item C<PMC* Parrot_thaw_constants(PARROT_INTERP, STRING* image)>
+=item C<PMC* Parrot_thaw_constants>
Thaw the constants. This is used by PackFile for unpacking PMC
constants.
@@ -2015,7 +2004,7 @@
/*
-=item C<PMC* Parrot_clone(PARROT_INTERP, PMC* pmc)>
+=item C<PMC* Parrot_clone>
There are for sure shortcuts to clone faster, e.g. always thaw the image
immediately or use a special callback. But for now we just thaw a frozen
Modified: trunk/src/runops_cores.c
==============================================================================
--- trunk/src/runops_cores.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/runops_cores.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -266,7 +266,7 @@
/*
-=item C<opcode_t * runops_fast_core>
+=item C<opcode_t * runops_fast_core(PARROT_INTERP, opcode_t *pc)>
Runs the Parrot operations starting at C<pc> until there are no more
operations. This performs no bounds checking, profiling, or tracing.
@@ -295,7 +295,7 @@
/*
-=item C<opcode_t * runops_cgoto_core>
+=item C<opcode_t * runops_cgoto_core(PARROT_INTERP, opcode_t *pc)>
Runs the Parrot operations starting at C<pc> until there are no more
operations, using the computed C<goto> core, performing no bounds checking,
@@ -341,7 +341,7 @@
/*
-=item C<static opcode_t * runops_trace_core>
+=item C<static opcode_t * runops_trace_core(PARROT_INTERP, opcode_t *pc)>
Runs the Parrot operations starting at C<pc> until there are no more
operations, using the tracing interpreter.
@@ -428,7 +428,7 @@
/*
-=item C<opcode_t * runops_slow_core>
+=item C<opcode_t * runops_slow_core(PARROT_INTERP, opcode_t *pc)>
Runs the Parrot operations starting at C<pc> until there are no more
operations, with tracing and bounds checking enabled.
@@ -467,7 +467,7 @@
/*
-=item C<opcode_t * runops_gc_debug_core>
+=item C<opcode_t * runops_gc_debug_core(PARROT_INTERP, opcode_t *pc)>
Runs the Parrot operations starting at C<pc> until there are no more
operations, performing a full GC run before each op. This is very slow, but
@@ -503,7 +503,7 @@
/*
-=item C<opcode_t * runops_profile_core>
+=item C<opcode_t * runops_profile_core(PARROT_INTERP, opcode_t *pc)>
Runs the Parrot operations starting at C<pc> until there are no more
operations, with tracing, bounds checking, and profiling enabled.
@@ -552,7 +552,7 @@
/*
-=item C<opcode_t * runops_debugger_core>
+=item C<opcode_t * runops_debugger_core(PARROT_INTERP, opcode_t *pc)>
Used by the debugger, under construction
Modified: trunk/src/scheduler.c
==============================================================================
--- trunk/src/scheduler.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/scheduler.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -61,7 +61,7 @@
=over 4
-=item C<void Parrot_cx_init_scheduler>
+=item C<void Parrot_cx_init_scheduler(PARROT_INTERP)>
Initalize the concurrency scheduler for the interpreter.
@@ -88,7 +88,7 @@
/*
-=item C<void Parrot_cx_check_tasks>
+=item C<void Parrot_cx_check_tasks(PARROT_INTERP, PMC *scheduler)>
If a wake request has been received, handle tasks.
@@ -106,7 +106,7 @@
/*
-=item C<void Parrot_cx_handle_tasks>
+=item C<void Parrot_cx_handle_tasks(PARROT_INTERP, PMC *scheduler)>
Handle the pending tasks in the scheduler's task list. Returns when there are
no more pending tasks. Returns 0 to terminate the scheduler runloop, or 1 to
@@ -162,7 +162,7 @@
/*
-=item C<void Parrot_cx_refresh_task_list>
+=item C<void Parrot_cx_refresh_task_list(PARROT_INTERP, PMC *scheduler)>
Tell the scheduler to perform maintenance on its list of active tasks, checking
for completed timers or sleep events, sorting for priority, checking for
@@ -187,7 +187,7 @@
/*
-=item C<void Parrot_cx_runloop_wake>
+=item C<void Parrot_cx_runloop_wake(PARROT_INTERP, PMC *scheduler)>
Wake a sleeping scheduler runloop (generally called when new tasks are added to
the scheduler's task list).
@@ -207,7 +207,7 @@
/*
-=item C<void Parrot_cx_runloop_end>
+=item C<void Parrot_cx_runloop_end(PARROT_INTERP)>
Schedule an event to terminate the scheduler runloop.
@@ -226,7 +226,7 @@
/*
-=item C<void Parrot_cx_schedule_task>
+=item C<void Parrot_cx_schedule_task(PARROT_INTERP, PMC *task)>
Add a task to scheduler's task list. Cannot be called across
interpreters/threads, must be called from within the interpreter's runloop.
@@ -249,7 +249,7 @@
/*
-=item C<PMC * Parrot_cx_peek_task>
+=item C<PMC * Parrot_cx_peek_task(PARROT_INTERP)>
Retrieve the the top task on the scheduler's task list, but don't remove it
from the list.
@@ -273,7 +273,8 @@
/*
-=item C<void Parrot_cx_schedule_timer>
+=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>.
@@ -309,7 +310,7 @@
/*
-=item C<void Parrot_cx_schedule_repeat>
+=item C<void Parrot_cx_schedule_repeat(PARROT_INTERP, PMC *task)>
Add a repeat task to scheduler's task list.
@@ -340,7 +341,7 @@
/*
-=item C<void Parrot_cx_schedule_callback>
+=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.
@@ -366,7 +367,7 @@
/*
-=item C<void Parrot_cx_request_suspend_for_gc>
+=item C<void Parrot_cx_request_suspend_for_gc(PARROT_INTERP)>
Tell the scheduler to suspend for GC at the next safe pause.
@@ -387,7 +388,7 @@
/*
-=item C<void Parrot_cx_delete_task>
+=item C<void Parrot_cx_delete_task(PARROT_INTERP, PMC *task)>
Remove a task from the scheduler's task list.
@@ -412,7 +413,7 @@
/*
-=item C<PMC * Parrot_cx_delete_suspend_for_gc>
+=item C<PMC * Parrot_cx_delete_suspend_for_gc(PARROT_INTERP)>
Remove a message that would suspend GC from the message queue. (Provided for
backward compatibility in the threads implementation.)
@@ -467,7 +468,7 @@
/*
-=item C<void Parrot_cx_add_handler_local>
+=item C<void Parrot_cx_add_handler_local(PARROT_INTERP, PMC *handler)>
Add a handler to the current context's list of handlers.
@@ -489,7 +490,7 @@
/*
-=item C<void Parrot_cx_delete_handler_local>
+=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.
@@ -559,7 +560,7 @@
/*
-=item C<INTVAL Parrot_cx_count_handlers_local>
+=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.
@@ -626,7 +627,7 @@
/*
-=item C<void Parrot_cx_add_handler>
+=item C<void Parrot_cx_add_handler(PARROT_INTERP, PMC *handler)>
Add a task handler to scheduler's list of handlers.
@@ -649,7 +650,7 @@
/*
-=item C<void Parrot_cx_delete_handler_typed>
+=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.
@@ -672,7 +673,7 @@
/*
-=item C<INTVAL Parrot_cx_count_handlers_typed>
+=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.
@@ -708,7 +709,7 @@
=over 4
-=item C<void Parrot_cx_send_message>
+=item C<void Parrot_cx_send_message(PARROT_INTERP, STRING *messagetype, PMC *payload)>
Send a message to a scheduler in a different interpreter/thread.
@@ -748,7 +749,7 @@
/*
-=item C<void Parrot_cx_broadcast_message>
+=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.
@@ -784,7 +785,7 @@
=over 4
-=item C<PMC * Parrot_cx_find_handler_for_task>
+=item C<PMC * Parrot_cx_find_handler_for_task(PARROT_INTERP, PMC *task)>
Retrieve a handler appropriate to a given task. If the scheduler has no
appropriate handler, returns PMCNULL.
@@ -819,7 +820,7 @@
/*
-=item C<PMC * Parrot_cx_find_handler_local>
+=item C<PMC * Parrot_cx_find_handler_local(PARROT_INTERP, PMC *task)>
Retrieve a handler appropriate to a given task from the local context. If the
context has no appropriate handler, returns PMCNULL.
@@ -923,7 +924,7 @@
/*
-=item C<void Parrot_cx_timer_invoke>
+=item C<void Parrot_cx_timer_invoke(PARROT_INTERP, PMC *timer)>
Run the associated code block for a timer event, when the timer fires.
@@ -949,7 +950,7 @@
/*
-=item C<void Parrot_cx_invoke_callback>
+=item C<void Parrot_cx_invoke_callback(PARROT_INTERP, PMC *callback)>
Run the associated code block for a callback event.
@@ -980,7 +981,7 @@
=over 4
-=item C<opcode_t * Parrot_cx_schedule_sleep>
+=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.
@@ -1040,7 +1041,7 @@
=over 4
-=item C<static void scheduler_process_wait_list>
+=item C<static void scheduler_process_wait_list(PARROT_INTERP, PMC *scheduler)>
Scheduler maintenance, scan the list of waiting tasks to see if any are ready
to become active tasks.
@@ -1086,7 +1087,7 @@
=over 4
-=item C<static void scheduler_process_messages>
+=item C<static void scheduler_process_messages(PARROT_INTERP, PMC *scheduler)>
Scheduler maintenance, scan the list of messages sent from other schedulers and
take appropriate action on any received.
Modified: trunk/src/spf_render.c
==============================================================================
--- trunk/src/spf_render.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/spf_render.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -115,8 +115,7 @@
/*
-=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>
Handles C<+>, C<->, C<0>, C<#>, space, width, and prec.
@@ -220,8 +219,7 @@
/*
-=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>
Used by Parrot_sprintf_format. Prepends supplied prefix for numeric
values. (e.g. 0x for hex.)
@@ -245,7 +243,7 @@
/*
-=item C<static void gen_sprintf_call(char *out, SpfInfo *info, int thingy)>
+=item C<static void gen_sprintf_call>
Turn the info structure back into an sprintf format. Far from being
pointless, this is used to call C<snprintf()> when we're confronted with
@@ -309,8 +307,7 @@
/*
-=item C<STRING * Parrot_sprintf_format(PARROT_INTERP, STRING *pat,
-SPRINTF_OBJ *obj)>
+=item C<STRING * Parrot_sprintf_format>
This is the engine that does all the formatting.
Modified: trunk/src/spf_vtable.c
==============================================================================
--- trunk/src/spf_vtable.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/spf_vtable.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -161,7 +161,7 @@
/*
-=item C<static STRING * getchr_va(PARROT_INTERP, INTVAL size, SPRINTF_OBJ *obj)>
+=item C<static STRING * getchr_va>
Gets a C<char> out of the C<va_list> in C<obj> and returns it as a
Parrot C<STRING>.
@@ -188,7 +188,7 @@
/*
-=item C<static HUGEINTVAL getint_va(PARROT_INTERP, INTVAL size, SPRINTF_OBJ *obj)>
+=item C<static HUGEINTVAL getint_va>
Gets an integer out of the C<va_list> in C<obj> and returns it as a
Parrot C<STRING>.
@@ -238,7 +238,7 @@
/*
-=item C<static UHUGEINTVAL getuint_va(PARROT_INTERP, INTVAL size, SPRINTF_OBJ *obj)>
+=item C<static UHUGEINTVAL getuint_va>
Gets an unsigned integer out of the C<va_list> in C<obj> and returns it
as a Parrot C<STRING>.
@@ -288,7 +288,7 @@
/*
-=item C<static HUGEFLOATVAL getfloat_va(PARROT_INTERP, INTVAL size, SPRINTF_OBJ *obj)>
+=item C<static HUGEFLOATVAL getfloat_va>
Gets an floating-point number out of the C<va_list> in C<obj> and
returns it as a Parrot C<STRING>.
@@ -334,7 +334,7 @@
/*
-=item C<static STRING * getstring_va(PARROT_INTERP, INTVAL size, SPRINTF_OBJ *obj)>
+=item C<static STRING * getstring_va>
Gets an string out of the C<va_list> in C<obj> and returns it as a
Parrot C<STRING>.
@@ -385,7 +385,7 @@
/*
-=item C<static void * getptr_va(PARROT_INTERP, INTVAL size, SPRINTF_OBJ *obj)>
+=item C<static void * getptr_va>
Gets a C<void *> out of the C<va_list> in C<obj> and returns it.
@@ -419,7 +419,7 @@
=over 4
-=item C<static STRING * getchr_pmc(PARROT_INTERP, INTVAL size, SPRINTF_OBJ *obj)>
+=item C<static STRING * getchr_pmc>
Same as C<getchr_va()> except that a vtable is used to get the value
from C<obj>.
@@ -447,7 +447,7 @@
/*
-=item C<static HUGEINTVAL getint_pmc(PARROT_INTERP, INTVAL size, SPRINTF_OBJ *obj)>
+=item C<static HUGEINTVAL getint_pmc>
Same as C<getint_va()> except that a vtable is used to get the value
from C<obj>.
@@ -486,7 +486,7 @@
/*
-=item C<static UHUGEINTVAL getuint_pmc(PARROT_INTERP, INTVAL size, SPRINTF_OBJ *obj)>
+=item C<static UHUGEINTVAL getuint_pmc>
Same as C<getuint_va()> except that a vtable is used to get the value
from C<obj>.
@@ -525,7 +525,7 @@
/*
-=item C<static HUGEFLOATVAL getfloat_pmc(PARROT_INTERP, INTVAL size, SPRINTF_OBJ *obj)>
+=item C<static HUGEFLOATVAL getfloat_pmc>
Same as C<getfloat_va()> except that a vtable is used to get the value
from C<obj>.
@@ -561,7 +561,7 @@
/*
-=item C<static STRING * getstring_pmc(PARROT_INTERP, INTVAL size, SPRINTF_OBJ *obj)>
+=item C<static STRING * getstring_pmc>
Same as C<getstring_va()> except that a vtable is used to get the value
from C<obj>.
@@ -588,7 +588,7 @@
/*
-=item C<static void * getptr_pmc(PARROT_INTERP, INTVAL size, SPRINTF_OBJ *obj)>
+=item C<static void * getptr_pmc>
Same as C<getptr_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 18:24:40 2009 (r37847)
+++ trunk/src/stacks.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -40,7 +40,7 @@
/*
-=item C<void stack_system_init>
+=item C<void stack_system_init(PARROT_INTERP)>
Called from C<make_interpreter()> to initialize the interpreter's
register stacks.
@@ -58,7 +58,7 @@
/*
-=item C<Stack_Chunk_t * cst_new_stack_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.
@@ -87,7 +87,7 @@
/*
-=item C<Stack_Chunk_t * new_stack>
+=item C<Stack_Chunk_t * new_stack(PARROT_INTERP, const char *name)>
Create a new stack and name it. C<< stack->name >> is used for
debugging/error reporting.
@@ -116,7 +116,7 @@
/*
-=item C<void mark_stack>
+=item C<void mark_stack(PARROT_INTERP, Stack_Chunk_t *chunk)>
Mark entries in a stack structure during GC.
@@ -146,7 +146,7 @@
/*
-=item C<void stack_destroy>
+=item C<void stack_destroy(Stack_Chunk_t *top)>
stack_destroy() doesn't need to do anything, since GC does it all.
@@ -164,7 +164,7 @@
/*
-=item C<size_t stack_height>
+=item C<size_t stack_height(PARROT_INTERP, const Stack_Chunk_t *chunk)>
Returns the height of the stack. The maximum "depth" is height - 1.
@@ -192,7 +192,7 @@
/*
-=item C<Stack_Entry_t * stack_entry>
+=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 +234,7 @@
/*
-=item C<Stack_Entry_t* stack_prepare_push>
+=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,7 +260,8 @@
/*
-=item C<void stack_push>
+=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.
@@ -307,7 +308,7 @@
/*
-=item C<Stack_Entry_t* stack_prepare_pop>
+=item C<Stack_Entry_t* stack_prepare_pop(PARROT_INTERP, Stack_Chunk_t **stack_p)>
Return a pointer, where new entries are popped off.
@@ -336,7 +337,8 @@
/*
-=item C<void * stack_pop>
+=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.
@@ -395,7 +397,7 @@
/*
-=item C<void * pop_dest>
+=item C<void * pop_dest(PARROT_INTERP)>
Pop off a destination entry and return a pointer to the contents.
@@ -420,7 +422,8 @@
/*
-=item C<void * stack_peek>
+=item C<void * stack_peek(PARROT_INTERP, Stack_Chunk_t *stack_base,
+Stack_entry_type *type)>
Peek at stack and return pointer to entry and the type of the entry.
@@ -451,7 +454,7 @@
/*
-=item C<Stack_entry_type get_entry_type>
+=item C<Stack_entry_type get_entry_type(const Stack_Entry_t *entry)>
Returns the stack entry type of C<entry>.
@@ -470,7 +473,7 @@
/*
-=item C<void Parrot_dump_dynamic_environment>
+=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.
@@ -518,7 +521,7 @@
/*
-=item C<static void run_cleanup_action>
+=item C<static void run_cleanup_action(PARROT_INTERP, Stack_Entry_t *e)>
Runs the sub PMC from the Stack_Entry_t pointer with an INTVAL arg of 0. Used
in C<Parrot_push_action>.
@@ -541,7 +544,7 @@
/*
-=item C<void Parrot_push_action>
+=item C<void Parrot_push_action(PARROT_INTERP, PMC *sub)>
Pushes an action handler onto the dynamic environment.
@@ -564,7 +567,7 @@
/*
-=item C<void Parrot_push_mark>
+=item C<void Parrot_push_mark(PARROT_INTERP, INTVAL mark)>
Push a cleanup mark onto the dynamic environment.
@@ -583,7 +586,7 @@
/*
-=item C<void Parrot_pop_mark>
+=item C<void Parrot_pop_mark(PARROT_INTERP, INTVAL mark)>
Pop items off the dynamic environment up to the mark.
Modified: trunk/src/string/api.c
==============================================================================
--- trunk/src/string/api.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/string/api.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -57,7 +57,7 @@
/*
-=item C<void Parrot_str_write_COW>
+=item C<void Parrot_str_write_COW(PARROT_INTERP, STRING *s)>
If the specified Parrot string is copy-on-write then the memory is
copied over and the copy-on-write flag is cleared.
@@ -109,7 +109,7 @@
/*
-=item C<STRING * Parrot_str_new_COW>
+=item C<STRING * Parrot_str_new_COW(PARROT_INTERP, STRING *s)>
Creates a copy-on-write string, cloning a string header without
allocating a new buffer.
@@ -161,7 +161,7 @@
/*
-=item C<STRING * Parrot_str_reuse_COW>
+=item C<STRING * Parrot_str_reuse_COW(PARROT_INTERP, STRING *s, STRING *d)>
Creates a copy-on-write string by cloning a string header without
allocating a new buffer. Doesn't allocate a new string header, instead
@@ -194,7 +194,7 @@
/*
-=item C<STRING * Parrot_str_set>
+=item C<STRING * Parrot_str_set(PARROT_INTERP, STRING *dest, STRING *src)>
Makes the contents of first Parrot string a copy of the contents of
second.
@@ -228,7 +228,7 @@
/*
-=item C<void Parrot_str_free>
+=item C<void Parrot_str_free(PARROT_INTERP, STRING *s)>
Frees the given STRING's header, accounting for reference counts for the
STRING's buffer &c. Use this only if you I<know> that nothing else has stored
@@ -258,7 +258,7 @@
=over 4
-=item C<void Parrot_str_init>
+=item C<void Parrot_str_init(PARROT_INTERP)>
Initializes the Parrot string subsystem.
@@ -319,7 +319,7 @@
/*
-=item C<void Parrot_str_finish>
+=item C<void Parrot_str_finish(PARROT_INTERP)>
De-Initializes the Parrot string subsystem.
@@ -343,7 +343,7 @@
/*
-=item C<UINTVAL string_capacity>
+=item C<UINTVAL string_capacity(PARROT_INTERP, const STRING *s)>
Returns the capacity of the specified Parrot string in bytes, that
is how many bytes can be appended onto strstart.
@@ -366,7 +366,8 @@
/*
-=item C<STRING * Parrot_str_new_noinit>
+=item C<STRING * Parrot_str_new_noinit(PARROT_INTERP,
+parrot_string_representation_t representation, UINTVAL capacity)>
Creates and returns an empty Parrot string.
@@ -399,7 +400,8 @@
/*
-=item C<const CHARSET * string_rep_compatible>
+=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.
@@ -466,7 +468,7 @@
/*
-=item C<STRING * Parrot_str_concat>
+=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
@@ -515,7 +517,7 @@
/*
-=item C<STRING * Parrot_str_append>
+=item C<STRING * Parrot_str_append(PARROT_INTERP, STRING *a, STRING *b)>
Take in two Parrot strings and append the second to the first. NOTE THAT
RETURN VALUE MAY NOT BE THE FIRST STRING, if the first string is COW'd or
@@ -595,7 +597,7 @@
/*
-=item C<STRING * Parrot_str_new>
+=item C<STRING * Parrot_str_new(PARROT_INTERP, const char * const buffer, const UINTVAL len)>
Make a Parrot string from a specified C string.
@@ -620,7 +622,8 @@
/*
-=item C<const char* string_primary_encoding_for_representation>
+=item C<const char* string_primary_encoding_for_representation(PARROT_INTERP,
+parrot_string_representation_t representation)>
Returns the primary encoding for the specified representation.
@@ -648,7 +651,7 @@
/*
-=item C<STRING * Parrot_str_new_constant>
+=item C<STRING * Parrot_str_new_constant(PARROT_INTERP, const char *buffer)>
Creates and returns a constant Parrot string.
@@ -684,7 +687,8 @@
/*
-=item C<STRING * string_make>
+=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>.
@@ -736,7 +740,8 @@
/*
-=item C<STRING * Parrot_str_new_init>
+=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.
@@ -799,7 +804,7 @@
/*
-=item C<STRING * Parrot_str_resize>
+=item C<STRING * Parrot_str_resize(PARROT_INTERP, STRING *s, UINTVAL addlen)>
Grows the Parrot string's buffer by the specified number of characters.
@@ -830,7 +835,7 @@
=over 4
-=item C<UINTVAL Parrot_str_byte_length>
+=item C<UINTVAL Parrot_str_byte_length(PARROT_INTERP, const STRING *s)>
Returns the number of characters in the specified Parrot string.
@@ -851,7 +856,7 @@
/*
-=item C<INTVAL Parrot_str_indexed>
+=item C<INTVAL Parrot_str_indexed(PARROT_INTERP, const STRING *s, UINTVAL idx)>
Returns the character (or glyph, depending upon the string's encoding). This
abstracts the process of finding the Nth character in a (possibly Unicode or
@@ -877,7 +882,8 @@
/*
-=item C<INTVAL Parrot_str_find_index>
+=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
@@ -921,7 +927,7 @@
/*
-=item C<INTVAL string_ord>
+=item C<INTVAL string_ord(PARROT_INTERP, const STRING *s, INTVAL idx)>
Returns the codepoint at a given index into a string. Negative indexes are
treated as counting from the end of the string.
@@ -962,7 +968,7 @@
/*
-=item C<STRING * string_chr>
+=item C<STRING * string_chr(PARROT_INTERP, UINTVAL character)>
Returns a single-character Parrot string.
@@ -995,7 +1001,7 @@
/*
-=item C<STRING * Parrot_str_copy>
+=item C<STRING * Parrot_str_copy(PARROT_INTERP, STRING *s)>
Creates and returns a copy of the specified Parrot string.
@@ -1022,7 +1028,7 @@
=over 4
-=item C<INTVAL Parrot_str_length>
+=item C<INTVAL Parrot_str_length(PARROT_INTERP, STRING *s)>
Calculates and returns the number of characters in the specified Parrot string.
@@ -1044,7 +1050,7 @@
/*
-=item C<INTVAL string_max_bytes>
+=item C<INTVAL string_max_bytes(PARROT_INTERP, const STRING *s, UINTVAL nchars)>
Returns the number of bytes required to safely contain the specified number
of characters in the specified Parrot string's representation.
@@ -1065,7 +1071,7 @@
/*
-=item C<STRING * Parrot_str_repeat>
+=item C<STRING * Parrot_str_repeat(PARROT_INTERP, const STRING *s, UINTVAL num)>
Repeats the specified Parrot string I<num> times and returns the result.
@@ -1102,7 +1108,8 @@
/*
-=item C<STRING * Parrot_str_substr>
+=item C<STRING * Parrot_str_substr(PARROT_INTERP, STRING *src, INTVAL offset,
+INTVAL length, STRING **d, int replace_dest)>
Copies the substring of length C<length> from C<offset> from the specified
Parrot string and stores it in C<**d>, allocating memory if necessary. The
@@ -1175,7 +1182,8 @@
/*
-=item C<STRING * Parrot_str_replace>
+=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
@@ -1329,7 +1337,7 @@
/*
-=item C<STRING * Parrot_str_chopn>
+=item C<STRING * Parrot_str_chopn(PARROT_INTERP, STRING *s, INTVAL n)>
Removes the last C<n> characters of the specified Parrot string. If C<n> is
negative, cuts the string after C<+n> characters. The returned string is a copy
@@ -1353,7 +1361,7 @@
/*
-=item C<void Parrot_str_chopn_inplace>
+=item C<void Parrot_str_chopn_inplace(PARROT_INTERP, STRING *s, INTVAL n)>
Removes the last C<n> characters of the specified Parrot string. If C<n> is
negative, cuts the string after C<+n> characters. The string passed in is
@@ -1412,7 +1420,7 @@
/*
-=item C<INTVAL Parrot_str_compare>
+=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
@@ -1444,7 +1452,7 @@
/*
-=item C<INTVAL Parrot_str_not_equal>
+=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.
@@ -1464,7 +1472,7 @@
/*
-=item C<INTVAL Parrot_str_equal>
+=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.
@@ -1515,7 +1523,8 @@
/*
-=item C<static void make_writable>
+=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
@@ -1541,7 +1550,8 @@
/*
-=item C<STRING * Parrot_str_bitwise_and>
+=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
@@ -1692,7 +1702,8 @@
/*
-=item C<STRING * Parrot_str_bitwise_or>
+=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
@@ -1767,7 +1778,8 @@
/*
-=item C<STRING * Parrot_str_bitwise_xor>
+=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
@@ -1854,7 +1866,8 @@
/*
-=item C<STRING * Parrot_str_bitwise_not>
+=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.
@@ -1919,7 +1932,7 @@
/*
-=item C<INTVAL Parrot_str_boolean>
+=item C<INTVAL Parrot_str_boolean(PARROT_INTERP, const STRING *s)>
Returns whether the specified Parrot string is true. A string is true if it is
equal to anything other than C<0>, C<""> or C<"0">.
@@ -1956,7 +1969,7 @@
/*
-=item C<STRING * Parrot_str_format_data>
+=item C<STRING * Parrot_str_format_data(PARROT_INTERP, const char *format, ...)>
Writes and returns a Parrot string.
@@ -1983,7 +1996,7 @@
/*
-=item C<INTVAL Parrot_str_to_int>
+=item C<INTVAL Parrot_str_to_int(PARROT_INTERP, const STRING *s)>
Converts a numeric Parrot string to an integer value.
@@ -2056,7 +2069,7 @@
/*
-=item C<FLOATVAL Parrot_str_to_num>
+=item C<FLOATVAL Parrot_str_to_num(PARROT_INTERP, const STRING *s)>
Converts a numeric Parrot STRING to a floating point number.
@@ -2112,7 +2125,7 @@
/*
-=item C<STRING * Parrot_str_from_int>
+=item C<STRING * Parrot_str_from_int(PARROT_INTERP, INTVAL i)>
Returns a Parrot string representation of the specified integer value.
@@ -2134,7 +2147,7 @@
/*
-=item C<STRING * Parrot_str_from_num>
+=item C<STRING * Parrot_str_from_num(PARROT_INTERP, FLOATVAL f)>
Returns a Parrot string representation of the specified floating-point value.
@@ -2158,7 +2171,7 @@
/*
-=item C<char * Parrot_str_to_cstring>
+=item C<char * Parrot_str_to_cstring(PARROT_INTERP, const STRING *s)>
Returns a C string for the specified Parrot string. Use
C<Parrot_str_free_cstring()> to free the string. Failure to do this will result in
@@ -2186,7 +2199,7 @@
/*
-=item C<char * string_to_cstring_nullable>
+=item C<char * string_to_cstring_nullable(PARROT_INTERP, const STRING *s)>
Returns a C string for the specified Parrot string. Use
C<Parrot_str_free_cstring()> to free the string. Failure to do this will result in
@@ -2216,7 +2229,7 @@
/*
-=item C<void Parrot_str_free_cstring>
+=item C<void Parrot_str_free_cstring(char *p)>
Free a string created by C<Parrot_str_to_cstring()>.
@@ -2238,7 +2251,7 @@
/*
-=item C<void Parrot_str_pin>
+=item C<void Parrot_str_pin(PARROT_INTERP, STRING *s)>
Replaces the specified Parrot string's managed buffer memory by system memory.
@@ -2274,7 +2287,7 @@
/*
-=item C<void Parrot_str_unpin>
+=item C<void Parrot_str_unpin(PARROT_INTERP, STRING *s)>
Undoes a C<Parrot_str_pin()> so that the string once again uses managed memory.
@@ -2323,7 +2336,7 @@
/*
-=item C<size_t Parrot_str_to_hashval>
+=item C<size_t Parrot_str_to_hashval(PARROT_INTERP, STRING *s)>
Returns the hash value for the specified Parrot string, caching it in
C<< s->hashval >>.
@@ -2356,7 +2369,7 @@
/*
-=item C<STRING * Parrot_str_escape>
+=item C<STRING * Parrot_str_escape(PARROT_INTERP, const STRING *src)>
Escapes all non-ASCII chars to backslash sequences. Control chars that
C<Parrot_str_unescape> can handle are escaped as I<\x>, as well as a double
@@ -2380,7 +2393,8 @@
/*
-=item C<STRING * Parrot_str_escape_truncate>
+=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).
@@ -2507,7 +2521,8 @@
/*
-=item C<STRING * Parrot_str_unescape>
+=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:
@@ -2617,7 +2632,7 @@
/*
-=item C<STRING * Parrot_str_upcase>
+=item C<STRING * Parrot_str_upcase(PARROT_INTERP, const STRING *s)>
Returns a copy of the specified Parrot string converted to upper case.
Non-caseable characters are left unchanged.
@@ -2648,7 +2663,7 @@
/*
-=item C<void Parrot_str_upcase_inplace>
+=item C<void Parrot_str_upcase_inplace(PARROT_INTERP, STRING *s)>
Converts the specified Parrot string to upper case.
@@ -2674,7 +2689,7 @@
/*
-=item C<STRING * Parrot_str_downcase>
+=item C<STRING * Parrot_str_downcase(PARROT_INTERP, const STRING *s)>
Returns a copy of the specified Parrot string converted to lower case.
Non-caseable characters are left unchanged.
@@ -2699,7 +2714,7 @@
/*
-=item C<void Parrot_str_downcase_inplace>
+=item C<void Parrot_str_downcase_inplace(PARROT_INTERP, STRING *s)>
Converts the specified Parrot string to lower case.
@@ -2725,7 +2740,7 @@
/*
-=item C<STRING * Parrot_str_titlecase>
+=item C<STRING * Parrot_str_titlecase(PARROT_INTERP, const STRING *s)>
Returns a copy of the specified Parrot string converted to title case.
Non-caseable characters are left unchanged.
@@ -2750,7 +2765,7 @@
/*
-=item C<void Parrot_str_titlecase_inplace>
+=item C<void Parrot_str_titlecase_inplace(PARROT_INTERP, STRING *s)>
Converts the specified Parrot string to title case.
@@ -2770,7 +2785,7 @@
/*
-=item C<STRING * string_increment>
+=item C<STRING * string_increment(PARROT_INTERP, const STRING *s)>
Increments the string in the Perl 5 fashion, where incrementing aa gives you bb
and so on. Currently single char only.
@@ -2807,7 +2822,7 @@
/*
-=item C<const char * Parrot_string_cstring>
+=item C<const char * Parrot_string_cstring(PARROT_INTERP, const STRING *str)>
Returns a C string from a Parrot string. Both sides are treated
as constants -- i.e. do not resize the result.
@@ -2830,7 +2845,8 @@
/*
-=item C<INTVAL Parrot_str_is_cclass>
+=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
@@ -2856,7 +2872,8 @@
/*
-=item C<INTVAL Parrot_str_find_cclass>
+=item C<INTVAL Parrot_str_find_cclass(PARROT_INTERP, INTVAL flags, STRING *s,
+UINTVAL offset, UINTVAL count)>
Finds the first occurrence of the given character class in C<flags> in the
string, and returns its glyph-wise index.
@@ -2880,7 +2897,8 @@
/*
-=item C<INTVAL Parrot_str_find_not_cclass>
+=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>
@@ -2907,7 +2925,8 @@
/*
-=item C<STRING* Parrot_str_change_charset>
+=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>.
@@ -2965,7 +2984,8 @@
/*
-=item C<STRING* Parrot_str_change_encoding>
+=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>
@@ -3017,7 +3037,7 @@
/*
-=item C<STRING * Parrot_str_compose>
+=item C<STRING * Parrot_str_compose(PARROT_INTERP, STRING *src)>
Normalizes the string.
@@ -3044,7 +3064,7 @@
/*
-=item C<STRING* Parrot_str_join>
+=item C<STRING* Parrot_str_join(PARROT_INTERP, STRING *j, PMC *ar)>
Joins the elements of the array C<ar> as strings with the string C<j> between
them, returning the result.
@@ -3084,7 +3104,7 @@
/*
-=item C<PMC* Parrot_str_split>
+=item C<PMC* Parrot_str_split(PARROT_INTERP, STRING *delim, STRING *str)>
Splits the string C<str> at the delimiter C<delim>, returning a
C<ResizableStringArray> of results. Returns PMCNULL if the string or the
@@ -3159,7 +3179,8 @@
/*
-=item C<STRING* Parrot_str_from_uint>
+=item C<STRING* Parrot_str_from_uint(PARROT_INTERP, char *tc, UHUGEINTVAL num,
+unsigned int base, int minus)>
Returns C<num> converted to a Parrot C<STRING>.
@@ -3205,7 +3226,8 @@
/*
-=item C<STRING * Parrot_str_from_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 18:24:40 2009 (r37847)
+++ trunk/src/string/charset.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -90,7 +90,7 @@
/*
-=item C<CHARSET * Parrot_new_charset>
+=item C<CHARSET * Parrot_new_charset(PARROT_INTERP)>
Allocates a new C<CHARSET> structure from the system.
@@ -110,7 +110,7 @@
/*
-=item C<void Parrot_charsets_encodings_deinit>
+=item C<void Parrot_charsets_encodings_deinit(PARROT_INTERP)>
Deinitializes (unloads) the charset system. Frees all charsets and the array
that holds the charsets back to the system.
@@ -140,7 +140,7 @@
/*
-=item C<const CHARSET * Parrot_find_charset>
+=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.
@@ -169,7 +169,7 @@
/*
-=item C<CHARSET * Parrot_load_charset>
+=item C<CHARSET * Parrot_load_charset(PARROT_INTERP, const char *charsetname)>
Throws an exception (Can't load charsets dynamically yet. RT#58184).
@@ -192,7 +192,7 @@
/*
-=item C<INTVAL Parrot_charset_number>
+=item C<INTVAL Parrot_charset_number(PARROT_INTERP, const STRING *charsetname)>
Return the number of the charset or -1 if not found.
@@ -218,7 +218,7 @@
/*
-=item C<INTVAL Parrot_charset_number_of_str>
+=item C<INTVAL Parrot_charset_number_of_str(PARROT_INTERP, const STRING *src)>
Return the number of the charset of the given string or -1 if not found.
@@ -244,7 +244,7 @@
/*
-=item C<STRING* Parrot_charset_name>
+=item C<STRING* Parrot_charset_name(PARROT_INTERP, INTVAL number_of_charset)>
Returns the name of the charset given by the INTVAL index
C<number_of_charset>.
@@ -267,7 +267,7 @@
/*
-=item C<const CHARSET * Parrot_get_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 +289,7 @@
/*
-=item C<const char * Parrot_charset_c_name>
+=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>.
@@ -312,7 +312,8 @@
/*
-=item C<static INTVAL register_charset>
+=item C<static INTVAL register_charset(PARROT_INTERP, const char *charsetname,
+CHARSET *charset)>
Adds a new charset C<charset> with name <charsetname> to the list of
all charsets. Returns 0 and does nothing if a charset with that name
@@ -353,7 +354,7 @@
/*
-=item C<static void Parrot_str_internal_register_charset_names>
+=item C<static void Parrot_str_internal_register_charset_names(PARROT_INTERP)>
Helper function for initializing characterset names. We can't create the
STRING names until the default encodings and charsets are already initted,
@@ -375,7 +376,7 @@
/*
-=item C<static void register_static_converters>
+=item C<static void register_static_converters(PARROT_INTERP)>
Registers several standard converters between common charsets, including:
@@ -409,7 +410,8 @@
/*
-=item C<INTVAL Parrot_register_charset>
+=item C<INTVAL Parrot_register_charset(PARROT_INTERP, const char *charsetname,
+CHARSET *charset)>
Register a new charset C<charset> with name C<charsetname>. Charset may only
be one of the 4 following names:
@@ -461,7 +463,7 @@
/*
-=item C<void Parrot_charsets_encodings_init>
+=item C<void Parrot_charsets_encodings_init(PARROT_INTERP)>
Creates the initial charsets and encodings, and registers the initial
charset converters.
@@ -503,7 +505,8 @@
/*
-=item C<INTVAL Parrot_make_default_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>.
@@ -523,7 +526,7 @@
/*
-=item C<const CHARSET * Parrot_default_charset>
+=item C<const CHARSET * Parrot_default_charset(PARROT_INTERP)>
Returns the default charset.
@@ -543,7 +546,8 @@
/*
-=item C<charset_converter_t Parrot_find_charset_converter>
+=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>.
@@ -579,7 +583,8 @@
/*
-=item C<void Parrot_register_charset_converter>
+=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 18:24:40 2009 (r37847)
+++ trunk/src/string/charset/ascii.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -180,7 +180,8 @@
/*
-=item C<STRING * ascii_get_graphemes>
+=item C<STRING * ascii_get_graphemes(PARROT_INTERP, STRING *source_string,
+UINTVAL offset, UINTVAL count)>
Retrieves the graphemes for the STRING C<source_string>, starting at
C<offset> and ending at C<offset + count>.
@@ -201,7 +202,8 @@
/*
-=item C<static void set_graphemes>
+=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>.
@@ -222,7 +224,8 @@
/*
-=item C<STRING * ascii_get_graphemes_inplace>
+=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
@@ -245,7 +248,7 @@
/*
-=item C<static STRING * to_ascii>
+=item C<static STRING * to_ascii(PARROT_INTERP, STRING *src, STRING *dest)>
Attempts to convert STRING C<src> to ASCII in STRING C<dest>. Throws
an exception if unconvertable UNICODE characters are involved.
@@ -289,7 +292,7 @@
/*
-=item C<static STRING * to_unicode>
+=item C<static STRING * to_unicode(PARROT_INTERP, STRING *src, STRING *dest)>
Converts the ASCII STRING C<src> to UNICODE STRING C<dest>.
@@ -317,7 +320,7 @@
/*
-=item C<static STRING * to_charset>
+=item C<static STRING * to_charset(PARROT_INTERP, STRING *src, STRING *dest)>
Converts STRING C<src> to ASCII charset STRING C<dest>.
@@ -344,7 +347,7 @@
/* A noop. can't compose ascii */
/*
-=item C<static STRING* compose>
+=item C<static STRING* compose(PARROT_INTERP, STRING *src)>
Can't compose ASCII strings, so performs a string copy on it and
returns the new string.
@@ -364,7 +367,7 @@
/* A noop. can't decompose ascii */
/*
-=item C<static STRING* decompose>
+=item C<static STRING* decompose(PARROT_INTERP, STRING *src)>
Can't decompose ASCII, so we perform a string copy instead and return
a pointer to the new string.
@@ -383,7 +386,7 @@
/*
-=item C<static void upcase>
+=item C<static void upcase(PARROT_INTERP, STRING *source_string)>
Converts the STRING C<source_string> to all uppercase.
@@ -409,7 +412,7 @@
/*
-=item C<static void downcase>
+=item C<static void downcase(PARROT_INTERP, STRING *source_string)>
Converts the STRING C<source_string> to all lower-case.
@@ -435,7 +438,7 @@
/*
-=item C<static void titlecase>
+=item C<static void titlecase(PARROT_INTERP, STRING *source_string)>
Converts the STRING given by C<source_string> to title case, where
the first character is upper case and all the rest of the characters
@@ -464,7 +467,7 @@
/*
-=item C<static void upcase_first>
+=item C<static void upcase_first(PARROT_INTERP, STRING *source_string)>
Sets the first character in the STRING C<source_string> to upper case,
but doesn't modify the rest of the string.
@@ -485,7 +488,7 @@
/*
-=item C<static void downcase_first>
+=item C<static void downcase_first(PARROT_INTERP, STRING *source_string)>
Sets the first character of the STRING C<source_string> to lowercase,
but doesn't modify the rest of the characters.
@@ -506,7 +509,7 @@
/*
-=item C<static void titlecase_first>
+=item C<static void titlecase_first(PARROT_INTERP, STRING *source_string)>
Converts the first letter of STRING C<source_string> to upper case,
but doesn't modify the rest of the string.
@@ -527,7 +530,7 @@
/*
-=item C<INTVAL ascii_compare>
+=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.
@@ -573,7 +576,8 @@
/*
-=item C<INTVAL mixed_cs_index>
+=item C<INTVAL mixed_cs_index(PARROT_INTERP, STRING *src, STRING *search,
+UINTVAL offs)>
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.
@@ -621,7 +625,8 @@
/*
-=item C<INTVAL ascii_cs_index>
+=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.
@@ -650,7 +655,8 @@
/*
-=item C<INTVAL ascii_cs_rindex>
+=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>.
@@ -679,7 +685,7 @@
/*
-=item C<static UINTVAL validate>
+=item C<static UINTVAL validate(PARROT_INTERP, STRING *src)>
Verifies that the given string is valid ASCII. Returns 1 if it is ASCII,
returns 0 otherwise.
@@ -707,7 +713,7 @@
/*
-=item C<static STRING * string_from_codepoint>
+=item C<static STRING * string_from_codepoint(PARROT_INTERP, UINTVAL codepoint)>
Creates a new STRING object from a single codepoint C<codepoint>. Returns
the new STRING.
@@ -729,7 +735,8 @@
/*
-=item C<static INTVAL is_cclass>
+=item C<static INTVAL is_cclass(PARROT_INTERP, INTVAL flags,
+const STRING *source_string, UINTVAL offset)>
=cut
@@ -755,7 +762,8 @@
/*
-=item C<static INTVAL find_cclass>
+=item C<static INTVAL find_cclass(PARROT_INTERP, INTVAL flags,
+STRING *source_string, UINTVAL offset, UINTVAL count)>
=cut
@@ -782,7 +790,8 @@
/*
-=item C<static INTVAL find_not_cclass>
+=item C<static INTVAL find_not_cclass(PARROT_INTERP, INTVAL flags,
+STRING *source_string, UINTVAL offset, UINTVAL count)>
=cut
@@ -808,7 +817,7 @@
/*
-=item C<size_t ascii_compute_hash>
+=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>.
@@ -836,7 +845,7 @@
/*
-=item C<const CHARSET * Parrot_charset_ascii_init>
+=item C<const CHARSET * Parrot_charset_ascii_init(PARROT_INTERP)>
Initialize the ASCII charset but registering all the necessary
function pointers and settings.
@@ -885,7 +894,7 @@
/*
-=item C<STRING * charset_cvt_ascii_to_binary>
+=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>.
@@ -916,7 +925,8 @@
/*
-=item C<STRING * charset_cvt_ascii_to_iso_8859_1>
+=item C<STRING * charset_cvt_ascii_to_iso_8859_1(PARROT_INTERP, STRING *src,
+STRING *dest)>
Converts ASCII STRING C<src> to ISO8859-1 STRING C<dest>.
Modified: trunk/src/string/charset/binary.c
==============================================================================
--- trunk/src/string/charset/binary.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/string/charset/binary.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -154,7 +154,8 @@
/*
-=item C<static void set_graphemes>
+=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
@@ -175,7 +176,7 @@
/*
-=item C<static STRING* to_charset>
+=item C<static STRING* to_charset(PARROT_INTERP, STRING *src, STRING *dest)>
Converts the STRING C<src> to STRING C<dest> in binary mode. Throws
an exception if a suitable conversion function is not found.
@@ -201,7 +202,7 @@
/*
-=item C<static STRING* compose>
+=item C<static STRING* compose(PARROT_INTERP, STRING *source_string)>
Throws an exception because we cannot compose a binary string.
@@ -220,7 +221,7 @@
/*
-=item C<static STRING* decompose>
+=item C<static STRING* decompose(PARROT_INTERP, STRING *source_string)>
Throws an exception because we cannot decompose a binary string.
@@ -239,7 +240,7 @@
/*
-=item C<static void upcase>
+=item C<static void upcase(PARROT_INTERP, STRING *source_string)>
Throws an exception because we cannot convert a binary string to
upper case.
@@ -257,7 +258,7 @@
/*
-=item C<static void downcase>
+=item C<static void downcase(PARROT_INTERP, STRING *source_string)>
Throws an exception because we cannot convert a binary string to
lower-case.
@@ -275,7 +276,7 @@
/*
-=item C<static void titlecase>
+=item C<static void titlecase(PARROT_INTERP, STRING *source_string)>
Throws an exception because we cannot convert a binary string to
title case.
@@ -293,7 +294,7 @@
/*
-=item C<static void upcase_first>
+=item C<static void upcase_first(PARROT_INTERP, STRING *source_string)>
Throws an exception because we cannot set the first "character" of the
binary string to uppercase.
@@ -311,7 +312,7 @@
/*
-=item C<static void downcase_first>
+=item C<static void downcase_first(PARROT_INTERP, STRING *source_string)>
Throws an exception because we cannot set the first "character"
of the binary string to lowercase.
@@ -329,7 +330,7 @@
/*
-=item C<static void titlecase_first>
+=item C<static void titlecase_first(PARROT_INTERP, STRING *source_string)>
Throws an exception because we can't convert the first "character"
of binary data to title case.
@@ -347,7 +348,7 @@
/*
-=item C<static INTVAL compare>
+=item C<static INTVAL compare(PARROT_INTERP, const STRING *lhs, const STRING *rhs)>
Compare the two buffers, first by size, then with memcmp.
@@ -369,7 +370,8 @@
/*
-=item C<static INTVAL cs_index>
+=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.
@@ -388,7 +390,8 @@
/*
-=item C<static INTVAL cs_rindex>
+=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.
@@ -407,7 +410,7 @@
/*
-=item C<static UINTVAL validate>
+=item C<static UINTVAL validate(PARROT_INTERP, STRING *source_string)>
Returns 1. All sequential data is valid binary data.
@@ -425,7 +428,8 @@
/*
-=item C<static INTVAL is_cclass>
+=item C<static INTVAL is_cclass(PARROT_INTERP, INTVAL flags,
+const STRING *source_string, UINTVAL offset)>
=cut
@@ -441,7 +445,8 @@
/*
-=item C<static INTVAL find_cclass>
+=item C<static INTVAL find_cclass(PARROT_INTERP, INTVAL flags,
+STRING *source_string, UINTVAL offset, UINTVAL count)>
=cut
@@ -457,7 +462,8 @@
/*
-=item C<static INTVAL find_not_cclass>
+=item C<static INTVAL find_not_cclass(PARROT_INTERP, INTVAL flags,
+STRING *source_string, UINTVAL offset, UINTVAL count)>
=cut
@@ -473,7 +479,7 @@
/*
-=item C<static STRING * string_from_codepoint>
+=item C<static STRING * string_from_codepoint(PARROT_INTERP, UINTVAL codepoint)>
=cut
@@ -493,7 +499,7 @@
/*
-=item C<const CHARSET * Parrot_charset_binary_init>
+=item C<const CHARSET * Parrot_charset_binary_init(PARROT_INTERP)>
Initialize the binary charset, including function pointers and
settings.
Modified: trunk/src/string/charset/iso-8859-1.c
==============================================================================
--- trunk/src/string/charset/iso-8859-1.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/string/charset/iso-8859-1.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -181,7 +181,8 @@
/*
-=item C<static void set_graphemes>
+=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>.
@@ -201,7 +202,7 @@
/*
-=item C<static STRING * to_iso_8859_1>
+=item C<static STRING * to_iso_8859_1(PARROT_INTERP, STRING *src, STRING *dest)>
Converts STRING C<src> to iso-8859-1 in STRING C<dest>.
@@ -243,7 +244,7 @@
/*
-=item C<static STRING * to_unicode>
+=item C<static STRING * to_unicode(PARROT_INTERP, STRING *src, STRING *dest)>
Converts STRING C<src> to unicode STRING C<dest>.
@@ -286,7 +287,7 @@
/*
-=item C<static STRING * to_charset>
+=item C<static STRING * to_charset(PARROT_INTERP, STRING *src, STRING *dest)>
Converts the STRING C<src> to an ISO-8859-1 STRING C<dest>.
@@ -312,7 +313,7 @@
/*
-=item C<static STRING* compose>
+=item C<static STRING* compose(PARROT_INTERP, STRING *src)>
ISO-8859-1 does not support composing, so we just copy the STRING C<src> and return the
copy.
@@ -333,7 +334,7 @@
/*
-=item C<static STRING* decompose>
+=item C<static STRING* decompose(PARROT_INTERP, STRING *src)>
SO-8859-1 does not support decomposing, so we throw an exception.
@@ -352,7 +353,7 @@
/*
-=item C<static void upcase>
+=item C<static void upcase(PARROT_INTERP, STRING *source_string)>
Convert all graphemes in the STRING C<source_string> to upper case, for those
graphemes that support cases.
@@ -385,7 +386,7 @@
/*
-=item C<static void downcase>
+=item C<static void downcase(PARROT_INTERP, STRING *source_string)>
Converts all graphemes in STRING C<source_string> to lower-case, for those graphemes
that support cases.
@@ -417,7 +418,7 @@
/*
-=item C<static void titlecase>
+=item C<static void titlecase(PARROT_INTERP, STRING *source_string)>
Converts the graphemes in STRING C<source_string> to title case, for those graphemes
that support cases.
@@ -458,7 +459,7 @@
/*
-=item C<static void upcase_first>
+=item C<static void upcase_first(PARROT_INTERP, STRING *source_string)>
Converts the first grapheme in STRING C<source_string> to upper case, if it
supports cases.
@@ -488,7 +489,7 @@
/*
-=item C<static void downcase_first>
+=item C<static void downcase_first(PARROT_INTERP, STRING *source_string)>
Converts the first character of the STRING C<source_string> to lower case, if the
grapheme supports lower case.
@@ -518,7 +519,7 @@
/*
-=item C<static void titlecase_first>
+=item C<static void titlecase_first(PARROT_INTERP, STRING *source_string)>
Converts the first grapheme in STRING C<source_string> to title case, if the grapheme
supports case.
@@ -537,7 +538,7 @@
/*
-=item C<static UINTVAL validate>
+=item C<static UINTVAL validate(PARROT_INTERP, STRING *src)>
Returns 1 if the STRING C<src> is a valid ISO-8859-1 STRING. Returns 0 otherwise.
@@ -561,7 +562,8 @@
/*
-=item C<static INTVAL is_cclass>
+=item C<static INTVAL is_cclass(PARROT_INTERP, INTVAL flags,
+const STRING *source_string, UINTVAL offset)>
=cut
@@ -586,7 +588,8 @@
/*
-=item C<static INTVAL find_cclass>
+=item C<static INTVAL find_cclass(PARROT_INTERP, INTVAL flags,
+STRING *source_string, UINTVAL offset, UINTVAL count)>
=cut
@@ -613,7 +616,8 @@
/*
-=item C<static INTVAL find_not_cclass>
+=item C<static INTVAL find_not_cclass(PARROT_INTERP, INTVAL flags,
+STRING *source_string, UINTVAL offset, UINTVAL count)>
=cut
@@ -640,7 +644,7 @@
/*
-=item C<static STRING * string_from_codepoint>
+=item C<static STRING * string_from_codepoint(PARROT_INTERP, UINTVAL codepoint)>
Creates a new STRING from the single codepoint C<codepoint>.
@@ -661,7 +665,7 @@
/*
-=item C<const CHARSET * Parrot_charset_iso_8859_1_init>
+=item C<const CHARSET * Parrot_charset_iso_8859_1_init(PARROT_INTERP)>
Initializes the ISO-8859-1 charset by installing all the necessary function pointers.
@@ -709,7 +713,7 @@
/*
-=item C<STRING * charset_cvt_iso_8859_1_to_ascii>
+=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 18:24:40 2009 (r37847)
+++ trunk/src/string/charset/unicode.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -225,7 +225,8 @@
/*
-=item C<static void set_graphemes>
+=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>.
@@ -246,7 +247,8 @@
/*
-=item C<static STRING * get_graphemes>
+=item C<static STRING * get_graphemes(PARROT_INTERP, STRING *source_string,
+UINTVAL offset, UINTVAL count)>
Gets the graphemes from STRING C<source_string> starting at C<offset>. Gets
C<count> graphemes total.
@@ -267,7 +269,8 @@
/*
-=item C<static STRING * get_graphemes_inplace>
+=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>.
@@ -289,7 +292,7 @@
/*
-=item C<static STRING* to_charset>
+=item C<static STRING* to_charset(PARROT_INTERP, STRING *src, STRING *dest)>
Converts input STRING C<src> to unicode STRING C<dest>.
@@ -315,7 +318,7 @@
/*
-=item C<static STRING* compose>
+=item C<static STRING* compose(PARROT_INTERP, STRING *src)>
If Parrot is built with ICU, composes the STRING C<src>. Attempts to
denormalize the STRING into the ICU default, NFC.
@@ -378,7 +381,7 @@
/*
-=item C<static STRING* decompose>
+=item C<static STRING* decompose(PARROT_INTERP, STRING *src)>
Decompose function for unicode charset. This function is not yet implemented.
@@ -398,7 +401,7 @@
/*
-=item C<static void upcase>
+=item C<static void upcase(PARROT_INTERP, STRING *src)>
Converts the STRING C<src> to all upper-case graphemes, for those characters
which support upper-case versions.
@@ -493,7 +496,7 @@
/*
-=item C<static void downcase>
+=item C<static void downcase(PARROT_INTERP, STRING *src)>
Converts all graphemes to lower-case, for those graphemes which have cases.
@@ -557,7 +560,7 @@
/*
-=item C<static void titlecase>
+=item C<static void titlecase(PARROT_INTERP, STRING *src)>
Converts the string to title case, for those characters which support cases.
@@ -625,7 +628,7 @@
/*
-=item C<static void upcase_first>
+=item C<static void upcase_first(PARROT_INTERP, STRING *source_string)>
Converts the first grapheme in the STRING C<source_string> to uppercase, if the
grapheme supports it. Not implemented.
@@ -645,7 +648,7 @@
/*
-=item C<static void downcase_first>
+=item C<static void downcase_first(PARROT_INTERP, STRING *source_string)>
Converts the first grapheme in the STRING C<source_string> to lower-case, if
the grapheme supports it. Not implemented
@@ -665,7 +668,7 @@
/*
-=item C<static void titlecase_first>
+=item C<static void titlecase_first(PARROT_INTERP, STRING *source_string)>
Converts the first grapheme in STRING C<source_string> to title case, if the
string supports it. Not implemented.
@@ -685,7 +688,7 @@
/*
-=item C<static INTVAL compare>
+=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>.
@@ -730,7 +733,8 @@
/*
-=item C<static INTVAL cs_rindex>
+=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.
@@ -751,7 +755,7 @@
/*
-=item C<static UINTVAL validate>
+=item C<static UINTVAL validate(PARROT_INTERP, STRING *src)>
Returns 1 if the STRING C<src> is a valid unicode string, returns 0 otherwise.
@@ -782,7 +786,7 @@
/*
-=item C<static int u_iscclass>
+=item C<static int u_iscclass(PARROT_INTERP, UINTVAL codepoint, INTVAL flags)>
=cut
@@ -876,7 +880,8 @@
/*
-=item C<static INTVAL is_cclass>
+=item C<static INTVAL is_cclass(PARROT_INTERP, INTVAL flags,
+const STRING *source_string, UINTVAL offset)>
=cut
@@ -903,7 +908,8 @@
/*
-=item C<static INTVAL find_cclass>
+=item C<static INTVAL find_cclass(PARROT_INTERP, INTVAL flags,
+STRING *source_string, UINTVAL offset, UINTVAL count)>
=cut
@@ -943,7 +949,8 @@
/*
-=item C<static INTVAL find_not_cclass>
+=item C<static INTVAL find_not_cclass(PARROT_INTERP, INTVAL flags,
+STRING *source_string, UINTVAL offset, UINTVAL count)>
=cut
@@ -991,7 +998,7 @@
/*
-=item C<static STRING * string_from_codepoint>
+=item C<static STRING * string_from_codepoint(PARROT_INTERP, UINTVAL codepoint)>
Returns a one-codepoint string for the given codepoint.
@@ -1019,7 +1026,7 @@
/*
-=item C<static size_t compute_hash>
+=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>.
@@ -1049,7 +1056,7 @@
/*
-=item C<const CHARSET * Parrot_charset_unicode_init>
+=item C<const CHARSET * Parrot_charset_unicode_init(PARROT_INTERP)>
Initializes the Unicode charset by installing all the necessary function
pointers.
Modified: trunk/src/string/encoding.c
==============================================================================
--- trunk/src/string/encoding.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/string/encoding.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -58,7 +58,7 @@
/*
-=item C<void parrot_deinit_encodings>
+=item C<void parrot_deinit_encodings(void)>
Deinitialize encodings and free all memory used by them.
@@ -83,7 +83,7 @@
/*
-=item C<ENCODING * Parrot_new_encoding>
+=item C<ENCODING * Parrot_new_encoding(PARROT_INTERP)>
Allocates the memory for a new C<ENCODING> from the system.
@@ -103,7 +103,7 @@
/*
-=item C<const ENCODING * Parrot_find_encoding>
+=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 +130,7 @@
/*
-=item C<const ENCODING * Parrot_load_encoding>
+=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 +161,7 @@
/*
-=item C<INTVAL Parrot_encoding_number>
+=item C<INTVAL Parrot_encoding_number(PARROT_INTERP, const STRING *encodingname)>
Return the number of the encoding or -1 if not found.
@@ -187,7 +187,7 @@
/*
-=item C<INTVAL Parrot_encoding_number_of_str>
+=item C<INTVAL Parrot_encoding_number_of_str(PARROT_INTERP, const STRING *src)>
Return the number of the encoding of the given string or -1 if not found.
@@ -213,7 +213,7 @@
/*
-=item C<STRING* Parrot_encoding_name>
+=item C<STRING* Parrot_encoding_name(PARROT_INTERP, INTVAL number_of_encoding)>
Returns the name of a character encoding based on the INTVAL index
C<number_of_encoding> to the All_encodings array.
@@ -237,7 +237,7 @@
/*
-=item C<const ENCODING* Parrot_get_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 +260,7 @@
/*
-=item C<const char * Parrot_encoding_c_name>
+=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>.
@@ -284,7 +284,8 @@
/*
-=item C<static INTVAL register_encoding>
+=item C<static INTVAL register_encoding(PARROT_INTERP, const char *encodingname,
+ENCODING *encoding)>
Registers a new character encoding C<encoding> with the given name
C<encodingname>. Returns 1 if successful, returns 0 otherwise.
@@ -323,7 +324,7 @@
/*
-=item C<void Parrot_str_internal_register_encoding_names>
+=item C<void Parrot_str_internal_register_encoding_names(PARROT_INTERP)>
Helper function for initializing characterset encoding names. We can't create
the STRING names until the default encodings and charsets are already initted,
@@ -346,7 +347,8 @@
/*
-=item C<INTVAL Parrot_register_encoding>
+=item C<INTVAL Parrot_register_encoding(PARROT_INTERP, const char *encodingname,
+ENCODING *encoding)>
Registers a character encoding C<encoding> with name C<encodingname>.
Only allows one of 4 possibilities: fixed_8, utf8, utf16, and ucs2.
@@ -391,7 +393,8 @@
/*
-=item C<INTVAL Parrot_make_default_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>.
@@ -411,7 +414,7 @@
/*
-=item C<const ENCODING * Parrot_default_encoding>
+=item C<const ENCODING * Parrot_default_encoding(PARROT_INTERP)>
Gets the default encoding.
@@ -431,7 +434,8 @@
/*
-=item C<encoding_converter_t Parrot_find_encoding_converter>
+=item C<encoding_converter_t Parrot_find_encoding_converter(PARROT_INTERP,
+ENCODING *lhs, ENCODING *rhs)>
Finds a converter from encoding C<rhs> to C<lhs>. Not yet implemented, so
throws an exception.
Modified: trunk/src/string/encoding/fixed_8.c
==============================================================================
--- trunk/src/string/encoding/fixed_8.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/string/encoding/fixed_8.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -218,7 +218,7 @@
/*
-=item C<static STRING * to_encoding>
+=item C<static STRING * to_encoding(PARROT_INTERP, STRING *src, STRING *dest)>
Converts the string C<src> to this particular encoding. If C<dest> is
provided, it will contain the result. Otherwise this function operates in
@@ -241,7 +241,8 @@
/*
-=item C<static UINTVAL get_codepoint>
+=item C<static UINTVAL get_codepoint(PARROT_INTERP, const STRING *source_string,
+UINTVAL offset)>
codepoints are bytes, so delegate
@@ -260,7 +261,8 @@
/*
-=item C<static void set_codepoint>
+=item C<static void set_codepoint(PARROT_INTERP, STRING *source_string,
+UINTVAL offset, UINTVAL codepoint)>
This is the same as set byte
@@ -278,7 +280,7 @@
/*
-=item C<static UINTVAL get_byte>
+=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>.
@@ -305,7 +307,8 @@
/*
-=item C<static void set_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>.
@@ -330,7 +333,8 @@
/*
-=item C<static STRING * get_codepoints>
+=item C<static STRING * get_codepoints(PARROT_INTERP, STRING *source_string,
+UINTVAL offset, UINTVAL count)>
Returns the codepoints in string C<src> at position C<offset> and length
C<count>. (Delegates to C<get_bytes>.)
@@ -354,7 +358,8 @@
/*
-=item C<static STRING * get_bytes>
+=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>.
@@ -385,7 +390,8 @@
/*
-=item C<static STRING * get_codepoints_inplace>
+=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>.)
@@ -407,7 +413,8 @@
/*
-=item C<static STRING * get_bytes_inplace>
+=item C<static STRING * get_bytes_inplace(PARROT_INTERP, STRING *source_string,
+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>.
@@ -436,7 +443,8 @@
/*
-=item C<static void set_codepoints>
+=item C<static void set_codepoints(PARROT_INTERP, STRING *source_string,
+UINTVAL offset, UINTVAL count, STRING *new_codepoints)>
Delegate to set_bytes
@@ -454,7 +462,8 @@
/*
-=item C<static void set_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>.
@@ -473,7 +482,7 @@
/*
-=item C<static void become_encoding>
+=item C<static void become_encoding(PARROT_INTERP, STRING *source_string)>
Unconditionally makes the string be in this encoding, if that's valid
@@ -491,7 +500,7 @@
/*
-=item C<static UINTVAL codepoints>
+=item C<static UINTVAL codepoints(PARROT_INTERP, STRING *source_string)>
Returns the number of codepoints in string C<src>.
@@ -508,7 +517,7 @@
/*
-=item C<static UINTVAL bytes>
+=item C<static UINTVAL bytes(PARROT_INTERP, STRING *source_string)>
Returns the number of bytes in string C<src>.
@@ -529,7 +538,7 @@
/*
-=item C<static UINTVAL fixed8_get_next>
+=item C<static UINTVAL fixed8_get_next(PARROT_INTERP, String_iter *iter)>
Moves the string iterator C<i> to the next codepoint.
@@ -548,7 +557,7 @@
/*
-=item C<static void fixed8_set_next>
+=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.
@@ -567,7 +576,7 @@
/*
-=item C<static void fixed8_set_position>
+=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.
@@ -586,7 +595,7 @@
/*
-=item C<static void iter_init>
+=item C<static void iter_init(PARROT_INTERP, const STRING *src, String_iter *iter)>
Initializes for string C<src> the string iterator C<iter>.
@@ -607,7 +616,7 @@
/*
-=item C<ENCODING * Parrot_encoding_fixed_8_init>
+=item C<ENCODING * Parrot_encoding_fixed_8_init(PARROT_INTERP)>
Initializes the fixed-8 encoding.
Modified: trunk/src/string/encoding/ucs2.c
==============================================================================
--- trunk/src/string/encoding/ucs2.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/string/encoding/ucs2.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -210,7 +210,7 @@
/*
-=item C<static STRING * to_encoding>
+=item C<static STRING * to_encoding(PARROT_INTERP, STRING *src, STRING *dest)>
Converts the string C<src> to this particular encoding. If C<dest> is
provided, it will contain the result. Otherwise this function operates in
@@ -239,7 +239,7 @@
/*
-=item C<static UINTVAL get_codepoint>
+=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 +262,7 @@
/*
-=item C<static void set_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 +286,7 @@
/*
-=item C<static UINTVAL get_byte>
+=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 +303,7 @@
/*
-=item C<static void set_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 +320,7 @@
/*
-=item C<static STRING * get_codepoints>
+=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 +359,7 @@
/*
-=item C<static STRING * get_bytes>
+=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>.
@@ -379,7 +379,8 @@
/*
-=item C<static STRING * get_codepoints_inplace>
+=item C<static STRING * get_codepoints_inplace(PARROT_INTERP, STRING *src,
+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>.
@@ -400,7 +401,8 @@
/*
-=item C<static STRING * get_bytes_inplace>
+=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>.
@@ -421,7 +423,8 @@
/*
-=item C<static void set_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>.
@@ -440,7 +443,8 @@
/*
-=item C<static void set_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>.
@@ -459,7 +463,7 @@
/*
-=item C<static void become_encoding>
+=item C<static void become_encoding(PARROT_INTERP, STRING *src)>
Unconditionally makes the string be in this encoding, if that's valid
@@ -477,7 +481,7 @@
/*
-=item C<static UINTVAL codepoints>
+=item C<static UINTVAL codepoints(PARROT_INTERP, STRING *src)>
Returns the number of codepoints in string C<src>.
@@ -500,7 +504,7 @@
/*
-=item C<static UINTVAL bytes>
+=item C<static UINTVAL bytes(PARROT_INTERP, STRING *src)>
Returns the number of bytes in string C<src>.
@@ -518,7 +522,7 @@
/*
-=item C<static UINTVAL ucs2_decode_and_advance>
+=item C<static UINTVAL ucs2_decode_and_advance(PARROT_INTERP, String_iter *i)>
Moves the string iterator C<i> to the next UCS-2 codepoint.
@@ -545,7 +549,7 @@
/*
-=item C<static void ucs2_encode_and_advance>
+=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.
@@ -567,7 +571,7 @@
/*
-=item C<static void ucs2_set_position>
+=item C<static void ucs2_set_position(PARROT_INTERP, String_iter *i, UINTVAL n)>
Moves the string iterator C<i> to the position C<n> in the string.
@@ -587,7 +591,7 @@
/*
-=item C<static void iter_init>
+=item C<static void iter_init(PARROT_INTERP, const STRING *src, String_iter *iter)>
Initializes for string C<src> the string iterator C<iter>.
@@ -614,7 +618,7 @@
/*
-=item C<ENCODING * Parrot_encoding_ucs2_init>
+=item C<ENCODING * Parrot_encoding_ucs2_init(PARROT_INTERP)>
Initializes the UCS-2 encoding.
Modified: trunk/src/string/encoding/utf16.c
==============================================================================
--- trunk/src/string/encoding/utf16.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/string/encoding/utf16.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -227,7 +227,7 @@
/*
-=item C<static STRING * to_encoding>
+=item C<static STRING * to_encoding(PARROT_INTERP, STRING *src, STRING *dest)>
Converts the string C<src> to this particular encoding. If C<dest> is
provided, it will contain the result. Otherwise this function operates in
@@ -338,7 +338,7 @@
/*
-=item C<static UINTVAL get_codepoint>
+=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 +369,7 @@
/*
-=item C<static void set_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 +390,7 @@
/*
-=item C<static UINTVAL get_byte>
+=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 +414,7 @@
/*
-=item C<static void set_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 +438,7 @@
/*
-=item C<static STRING * get_codepoints>
+=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>.
@@ -471,7 +471,8 @@
/*
-=item C<static STRING * get_codepoints_inplace>
+=item C<static STRING * get_codepoints_inplace(PARROT_INTERP, STRING *src,
+UINTVAL offset, UINTVAL count, STRING *return_string)>
Gets from string C<src> at position C<offset> C<count> codepoints and returns
them in C<return_string>.
@@ -503,7 +504,7 @@
/*
-=item C<static STRING * get_bytes>
+=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>.
@@ -526,7 +527,8 @@
/*
-=item C<static STRING * get_bytes_inplace>
+=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>.
@@ -552,7 +554,8 @@
/*
-=item C<static void set_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>.
@@ -576,7 +579,8 @@
/*
-=item C<static void set_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>.
@@ -598,7 +602,7 @@
/*
-=item C<static void become_encoding>
+=item C<static void become_encoding(PARROT_INTERP, STRING *src)>
Unconditionally makes the string be in this encoding, if that's valid
@@ -616,7 +620,7 @@
/*
-=item C<static UINTVAL codepoints>
+=item C<static UINTVAL codepoints(PARROT_INTERP, STRING *src)>
Returns the number of codepoints in string C<src>.
@@ -642,7 +646,7 @@
/*
-=item C<static UINTVAL bytes>
+=item C<static UINTVAL bytes(PARROT_INTERP, STRING *src)>
Returns the number of bytes in string C<src>.
@@ -661,7 +665,7 @@
#if PARROT_HAS_ICU
/*
-=item C<static UINTVAL utf16_decode_and_advance>
+=item C<static UINTVAL utf16_decode_and_advance(PARROT_INTERP, String_iter *i)>
Moves the string iterator C<i> to the next UTF-16 codepoint.
@@ -688,7 +692,7 @@
/*
-=item C<static void utf16_encode_and_advance>
+=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.
@@ -711,7 +715,7 @@
/*
-=item C<static void utf16_set_position>
+=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.
@@ -735,7 +739,7 @@
/*
-=item C<static void iter_init>
+=item C<static void iter_init(PARROT_INTERP, const STRING *src, String_iter *iter)>
Initializes for string C<src> the string iterator C<iter>.
@@ -761,7 +765,7 @@
/*
-=item C<ENCODING * Parrot_encoding_utf16_init>
+=item C<ENCODING * Parrot_encoding_utf16_init(PARROT_INTERP)>
Initializes the UTF-16 encoding.
Modified: trunk/src/string/encoding/utf8.c
==============================================================================
--- trunk/src/string/encoding/utf8.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/string/encoding/utf8.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -266,7 +266,8 @@
/*
-=item C<static UINTVAL utf8_characters>
+=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>.
@@ -296,7 +297,7 @@
/*
-=item C<static UINTVAL utf8_decode>
+=item C<static UINTVAL utf8_decode(PARROT_INTERP, const utf8_t *ptr)>
Returns the integer for the UTF-8 character found at C<*ptr>.
@@ -340,7 +341,7 @@
/*
-=item C<static void * utf8_encode>
+=item C<static void * utf8_encode(PARROT_INTERP, void *ptr, UINTVAL c)>
Returns the UTF-8 encoding of integer C<c>.
@@ -377,7 +378,7 @@
/*
-=item C<static const void * utf8_skip_forward>
+=item C<static const void * utf8_skip_forward(const void *ptr, UINTVAL n)>
Moves C<ptr> C<n> characters forward.
@@ -401,7 +402,7 @@
/*
-=item C<static const void * utf8_skip_backward>
+=item C<static const void * utf8_skip_backward(const void *ptr, UINTVAL n)>
Moves C<ptr> C<n> characters back.
@@ -440,7 +441,7 @@
/*
-=item C<static UINTVAL utf8_decode_and_advance>
+=item C<static UINTVAL utf8_decode_and_advance(PARROT_INTERP, String_iter *i)>
The UTF-8 implementation of the string iterator's C<get_and_advance>
function.
@@ -489,7 +490,8 @@
/*
-=item C<static void utf8_encode_and_advance>
+=item C<static void utf8_encode_and_advance(PARROT_INTERP, String_iter *i,
+UINTVAL c)>
The UTF-8 implementation of the string iterator's C<set_and_advance>
function.
@@ -514,7 +516,7 @@
/*
-=item C<static void utf8_set_position>
+=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.
@@ -548,7 +550,7 @@
/*
-=item C<static STRING * to_encoding>
+=item C<static STRING * to_encoding(PARROT_INTERP, STRING *src, STRING *dest)>
Converts the string C<src> to this particular encoding. If C<dest> is
provided, it will contain the result. Otherwise this function operates in
@@ -637,7 +639,7 @@
/*
-=item C<static UINTVAL get_codepoint>
+=item C<static UINTVAL get_codepoint(PARROT_INTERP, const STRING *src, UINTVAL offset)>
Returns the codepoint in string C<src> at position C<offset>.
@@ -655,7 +657,7 @@
/*
-=item C<static void set_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>.
@@ -678,7 +680,7 @@
/*
-=item C<static UINTVAL get_byte>
+=item C<static UINTVAL get_byte(PARROT_INTERP, const STRING *src, UINTVAL offset)>
Returns the byte in string C<src> at position C<offset>.
@@ -702,7 +704,8 @@
/*
-=item C<static void set_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>.
@@ -727,7 +730,7 @@
/*
-=item C<static STRING * get_codepoints>
+=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>.
@@ -766,7 +769,7 @@
/*
-=item C<static STRING * get_bytes>
+=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>.
@@ -795,7 +798,8 @@
/*
-=item C<static STRING * get_codepoints_inplace>
+=item C<static STRING * get_codepoints_inplace(PARROT_INTERP, STRING *src,
+UINTVAL offset, UINTVAL count, STRING *return_string)>
Gets from string C<src> at position C<offset> C<count> codepoints and returns
them in C<return_string>.
@@ -831,7 +835,8 @@
/*
-=item C<static STRING * get_bytes_inplace>
+=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>.
@@ -851,7 +856,8 @@
/*
-=item C<static void set_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>.
@@ -870,7 +876,8 @@
/*
-=item C<static void set_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>.
@@ -889,7 +896,7 @@
/*
-=item C<static void become_encoding>
+=item C<static void become_encoding(PARROT_INTERP, STRING *src)>
Unconditionally makes the string be in this encoding, if that's valid
@@ -907,7 +914,7 @@
/*
-=item C<static UINTVAL codepoints>
+=item C<static UINTVAL codepoints(PARROT_INTERP, STRING *src)>
Returns the number of codepoints in string C<src>.
@@ -932,7 +939,7 @@
/*
-=item C<static UINTVAL bytes>
+=item C<static UINTVAL bytes(PARROT_INTERP, STRING *src)>
Returns the number of bytes in string C<src>.
@@ -950,7 +957,7 @@
/*
-=item C<static void iter_init>
+=item C<static void iter_init(PARROT_INTERP, const STRING *src, String_iter *iter)>
Initializes for string C<src> the string iterator C<iter>.
@@ -972,7 +979,7 @@
/*
-=item C<ENCODING * Parrot_encoding_utf8_init>
+=item C<ENCODING * Parrot_encoding_utf8_init(PARROT_INTERP)>
Initializes the UTF-8 encoding.
Modified: trunk/src/string/primitives.c
==============================================================================
--- trunk/src/string/primitives.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/string/primitives.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -33,7 +33,7 @@
/*
-=item C<void string_set_data_directory>
+=item C<void string_set_data_directory(PARROT_INTERP, const char *dir)>
Set the directory where ICU finds its data files (encodings, locales,
etc.).
@@ -70,7 +70,8 @@
/*
-=item C<Parrot_UInt4 string_unescape_one>
+=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 \.
@@ -306,7 +307,7 @@
=over 4
-=item C<INTVAL Parrot_char_digit_value>
+=item C<INTVAL Parrot_char_digit_value(PARROT_INTERP, UINTVAL character)>
Returns the decimal digit value of the specified character if it is a decimal
digit character. If not, then -1 is returned.
@@ -336,7 +337,7 @@
/*
-=item C<char * str_dup>
+=item C<char * str_dup(const char *old)>
Duplicate a C string. Just like strdup(), except it dies if it runs
out of memory.
@@ -363,7 +364,7 @@
/*
-=item C<char * str_dup_remove_quotes>
+=item C<char * str_dup_remove_quotes(const char *old)>
Duplicates a C string (minus the wrapping quotes). Similar to strdup(),
except it dies if it runs out of memory.
Modified: trunk/src/sub.c
==============================================================================
--- trunk/src/sub.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/sub.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -29,7 +29,7 @@
/*
-=item C<void mark_context_start>
+=item C<void mark_context_start(void)>
Indicate that a new round of context marking is about to take place.
@@ -49,7 +49,7 @@
/*
-=item C<void mark_context>
+=item C<void mark_context(PARROT_INTERP, Parrot_Context* ctx)>
Marks the context C<*ctx>.
@@ -132,7 +132,7 @@
/*
-=item C<Parrot_sub * new_sub>
+=item C<Parrot_sub * new_sub(PARROT_INTERP)>
Returns a new C<Parrot_sub>.
@@ -154,7 +154,7 @@
/*
-=item C<Parrot_sub * new_closure>
+=item C<Parrot_sub * new_closure(PARROT_INTERP)>
Returns a new C<Parrot_sub> with its own scratchpad.
@@ -176,7 +176,7 @@
/*
-=item C<Parrot_cont * new_continuation>
+=item C<Parrot_cont * new_continuation(PARROT_INTERP, const Parrot_cont *to)>
Returns a new C<Parrot_cont> to the context of C<to> with its own copy of the
current interpreter context. If C<to> is C<NULL>, then the C<to_ctx> is set
@@ -214,7 +214,7 @@
/*
-=item C<Parrot_cont * new_ret_continuation>
+=item C<Parrot_cont * new_ret_continuation(PARROT_INTERP)>
Returns a new C<Parrot_cont> pointing to the current context.
@@ -242,7 +242,7 @@
/*
-=item C<Parrot_coro * new_coroutine>
+=item C<Parrot_coro * new_coroutine(PARROT_INTERP)>
Returns a new C<Parrot_coro>.
@@ -269,7 +269,7 @@
/*
-=item C<PMC * new_ret_continuation_pmc>
+=item C<PMC * new_ret_continuation_pmc(PARROT_INTERP, opcode_t *address)>
Returns a new C<RetContinuation> PMC. Uses one from the cache,
if possible; otherwise, creates a new one.
@@ -292,7 +292,7 @@
/*
-=item C<void invalidate_retc_context>
+=item C<void invalidate_retc_context(PARROT_INTERP, PMC *cont)>
Make true Continuations from all RetContinuations up the call chain.
@@ -326,7 +326,7 @@
/*
-=item C<STRING* Parrot_full_sub_name>
+=item C<STRING* Parrot_full_sub_name(PARROT_INTERP, PMC* sub_pmc)>
Return namespace, name, and location of subroutine.
@@ -394,7 +394,8 @@
/*
-=item C<int Parrot_Context_get_info>
+=item C<int Parrot_Context_get_info(PARROT_INTERP, const Parrot_Context *ctx,
+Parrot_Context_info *info)>
Takes pointers to a context and its information table.
Populates the table and returns 0 or 1. XXX needs explanation
@@ -486,7 +487,7 @@
/*
-=item C<STRING* Parrot_Context_infostr>
+=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
@@ -523,7 +524,7 @@
/*
-=item C<PMC* Parrot_find_pad>
+=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.
@@ -566,7 +567,7 @@
/*
-=item C<void Parrot_capture_lex>
+=item C<void Parrot_capture_lex(PARROT_INTERP, PMC *sub_pmc)>
Capture the current lexical environment of a sub.
@@ -638,7 +639,7 @@
/*
-=item C<PMC* parrot_new_closure>
+=item C<PMC* parrot_new_closure(PARROT_INTERP, PMC *sub_pmc)>
Used where? XXX
@@ -666,7 +667,8 @@
/*
-=item C<void Parrot_continuation_check>
+=item C<void Parrot_continuation_check(PARROT_INTERP, const PMC *pmc,
+const Parrot_cont *cc)>
Verifies that the provided continuation is sane.
@@ -696,7 +698,8 @@
/*
-=item C<void Parrot_continuation_rewind_environment>
+=item C<void Parrot_continuation_rewind_environment(PARROT_INTERP, PMC *pmc,
+Parrot_cont *cc)>
Restores the appropriate context for the continuation.
@@ -729,7 +732,7 @@
/*
-=item C<Parrot_sub * Parrot_get_sub_pmc_from_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/trace.c
==============================================================================
--- trunk/src/trace.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/trace.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -46,7 +46,7 @@
/*
-=item C<static STRING* trace_class_name>
+=item C<static STRING* trace_class_name(PARROT_INTERP, const PMC* pmc)>
Obtains the class name of the PMC.
@@ -74,7 +74,7 @@
/*
-=item C<void trace_pmc_dump>
+=item C<void trace_pmc_dump(PARROT_INTERP, PMC *pmc)>
Prints a PMC to C<stderr>.
@@ -162,7 +162,7 @@
/*
-=item C<int trace_key_dump>
+=item C<int trace_key_dump(PARROT_INTERP, PMC *key)>
Prints a key to C<stderr>, returns the length of the output.
@@ -241,7 +241,8 @@
/*
-=item C<void trace_op_dump>
+=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()>.
@@ -476,7 +477,8 @@
/*
-=item C<void trace_op>
+=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/tsq.c
==============================================================================
--- trunk/src/tsq.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/tsq.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -24,7 +24,7 @@
/*
-=item C<QUEUE_ENTRY * pop_entry>
+=item C<QUEUE_ENTRY * pop_entry(QUEUE *queue)>
Does a synchronized removal of the head entry off the queue and returns it.
@@ -46,7 +46,7 @@
/*
-=item C<QUEUE_ENTRY * peek_entry>
+=item C<QUEUE_ENTRY * peek_entry(const QUEUE *queue)>
This does no locking, so the result might have changed by the time you
get the entry, but a synchronized C<pop_entry()> will check again and
@@ -67,7 +67,7 @@
/*
-=item C<QUEUE_ENTRY * nosync_pop_entry>
+=item C<QUEUE_ENTRY * nosync_pop_entry(QUEUE *queue)>
Grab an entry off the queue with no synchronization. Internal only,
because it's darned evil and shouldn't be used outside the module. It's
@@ -100,7 +100,7 @@
/*
-=item C<QUEUE_ENTRY * wait_for_entry>
+=item C<QUEUE_ENTRY * wait_for_entry(QUEUE *queue)>
Does a synchronized removal of the head entry off the queue, waiting if
necessary until there is an entry, and then returns it.
@@ -128,7 +128,7 @@
/*
-=item C<void push_entry>
+=item C<void push_entry(QUEUE *queue, QUEUE_ENTRY *entry)>
Does a synchronized insertion of C<entry> onto the tail of the queue.
@@ -156,7 +156,7 @@
/*
-=item C<void unshift_entry>
+=item C<void unshift_entry(QUEUE *queue, QUEUE_ENTRY *entry)>
Does a synchronized insertion of C<entry> into the head of the queue.
@@ -187,7 +187,7 @@
/*
-=item C<void nosync_insert_entry>
+=item C<void nosync_insert_entry(QUEUE *queue, QUEUE_ENTRY *entry)>
Inserts a timed event according to C<abstime>. The caller has to hold the
queue mutex.
@@ -240,7 +240,7 @@
/*
-=item C<void insert_entry>
+=item C<void insert_entry(QUEUE *queue, QUEUE_ENTRY *entry)>
Does a synchronized insert of C<entry>.
@@ -260,7 +260,7 @@
/*
-=item C<void queue_lock>
+=item C<void queue_lock(QUEUE *queue)>
Locks the queue's mutex.
@@ -277,7 +277,7 @@
/*
-=item C<void queue_unlock>
+=item C<void queue_unlock(QUEUE *queue)>
Unlocks the queue's mutex.
@@ -294,7 +294,7 @@
/*
-=item C<void queue_broadcast>
+=item C<void queue_broadcast(QUEUE *queue)>
This function wakes up I<every> thread waiting on the queue.
@@ -311,7 +311,7 @@
/*
-=item C<void queue_signal>
+=item C<void queue_signal(QUEUE *queue)>
=cut
@@ -326,7 +326,7 @@
/*
-=item C<void queue_wait>
+=item C<void queue_wait(QUEUE *queue)>
Instructs the queue to wait.
@@ -343,7 +343,7 @@
/*
-=item C<void queue_timedwait>
+=item C<void queue_timedwait(QUEUE *queue, const struct timespec *abs_time)>
Instructs the queue to wait for C<abs_time> seconds (?).
@@ -360,7 +360,7 @@
/*
-=item C<QUEUE* queue_init>
+=item C<QUEUE* queue_init(UINTVAL prio)>
Initializes the queue, setting C<prio> as the queue's priority.
@@ -385,7 +385,7 @@
/*
-=item C<void queue_destroy>
+=item C<void queue_destroy(QUEUE *queue)>
Destroys the queue, raising an exception if it is not empty.
Modified: trunk/src/utils.c
==============================================================================
--- trunk/src/utils.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/utils.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -94,7 +94,7 @@
/*
-=item C<INTVAL intval_mod(INTVAL i2, INTVAL i3)>
+=item C<INTVAL intval_mod>
NOTE: This "corrected mod" algorithm is based on the C code on page 70
of [1]. Assuming correct behavior of the built-in mod operator (%) with
@@ -155,7 +155,7 @@
/*
-=item C<FLOATVAL floatval_mod(FLOATVAL n2, FLOATVAL n3)>
+=item C<FLOATVAL floatval_mod>
Returns C<n2 mod n3>.
@@ -225,7 +225,7 @@
/*
-=item C<static void next_rand(_rand_buf X)>
+=item C<static void next_rand>
Returns the next random number in C<X>.
@@ -258,7 +258,7 @@
/*
-=item C<static FLOATVAL _erand48(_rand_buf buf)>
+=item C<static FLOATVAL _erand48>
Returns a C<double> in the interval C<[0.0, 1.0)>.
@@ -278,7 +278,7 @@
/*
-=item C<static FLOATVAL _drand48(void)>
+=item C<static FLOATVAL _drand48>
Returns a C<double> in the interval C<[0.0, 1.0)>.
@@ -295,7 +295,7 @@
/*
-=item C<static long _jrand48(_rand_buf buf)>
+=item C<static long _jrand48>
Returns a C<long> in the interval C<[-2^31, 2^31)>.
@@ -315,7 +315,7 @@
/*
-=item C<static long _nrand48(_rand_buf buf)>
+=item C<static long _nrand48>
Returns a C<long> in the interval C<[0, 2^31)>.
@@ -332,7 +332,7 @@
/*
-=item C<static long _lrand48(void)>
+=item C<static long _lrand48>
Returns a C<long> in the interval C<[0, 2^31)>.
@@ -349,7 +349,7 @@
/*
-=item C<static long _mrand48(void)>
+=item C<static long _mrand48>
Returns a C<long> in the interval C<[-2^31, 2^31)>.
@@ -366,7 +366,7 @@
/*
-=item C<static void _srand48(long seed)>
+=item C<static void _srand48>
Sets the high order 32 bits to the argument C<seed>. The low order 16
bits are set to the arbitrary value 0x330e.
@@ -409,7 +409,7 @@
/*
-=item C<FLOATVAL Parrot_float_rand(INTVAL how_random)>
+=item C<FLOATVAL Parrot_float_rand>
Returns a C<FLOATVAL> in the interval C<[0.0, 1.0)>.
@@ -431,7 +431,7 @@
/*
-=item C<INTVAL Parrot_uint_rand(INTVAL how_random)>
+=item C<INTVAL Parrot_uint_rand>
Returns an C<INTVAL> in the interval C<[0, 2^31)>.
@@ -453,7 +453,7 @@
/*
-=item C<INTVAL Parrot_int_rand(INTVAL how_random)>
+=item C<INTVAL Parrot_int_rand>
Returns an C<INTVAL> in the interval C<[-2^31, 2^31)>.
@@ -475,7 +475,7 @@
/*
-=item C<INTVAL Parrot_range_rand(INTVAL from, INTVAL to, INTVAL how_random)>
+=item C<INTVAL Parrot_range_rand>
Returns an C<INTVAL> in the range C<[from, to]>.
@@ -496,7 +496,7 @@
/*
-=item C<void Parrot_srand(INTVAL seed)>
+=item C<void Parrot_srand>
Seeds the random number generator with C<seed>.
@@ -529,7 +529,7 @@
/*
-=item C<PMC* tm_to_array(PARROT_INTERP, const struct tm *tm)>
+=item C<PMC* tm_to_array>
Helper to convert a B<struct tm *> to an Array
@@ -561,8 +561,7 @@
/*
-=item C<INTVAL Parrot_byte_index(PARROT_INTERP, const STRING *base,
-const STRING *search, UINTVAL start_offset)>
+=item C<INTVAL Parrot_byte_index>
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 +609,7 @@
/*
-=item C<INTVAL Parrot_byte_rindex(PARROT_INTERP, const STRING *base,
-const STRING *search, UINTVAL start_offset)>
+=item C<INTVAL Parrot_byte_rindex>
Substring search (like Parrot_byte_index), but works backwards,
from the rightmost end of the string.
@@ -650,7 +648,7 @@
/*
-=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>
Recursive function, used by Parrot_register_move to
climb back the graph of register moves operations.
@@ -700,8 +698,7 @@
/*
-=item C<static void process_cycle_without_exit(int node_index,
-parrot_prm_context* c)>
+=item C<static void process_cycle_without_exit>
Recursive function, used by Parrot_register_move to handle the case
of cycles without exits, that are cycles of move ops between registers
@@ -740,9 +737,7 @@
/*
-=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>
Move C<n_regs> from the given register list C<src_regs> to C<dest_regs>.
@@ -888,7 +883,7 @@
/*
-=item C<static INTVAL COMPARE(PARROT_INTERP, void *a, void *b, PMC *cmp)>
+=item C<static INTVAL COMPARE>
=cut
@@ -914,7 +909,7 @@
/*
-=item C<void Parrot_quicksort(PARROT_INTERP, void **data, UINTVAL n, PMC *cmp)>
+=item C<void Parrot_quicksort>
=cut
Modified: trunk/src/vtables.c
==============================================================================
--- trunk/src/vtables.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/vtables.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -23,7 +23,7 @@
/*
-=item C<VTABLE * Parrot_new_vtable>
+=item C<VTABLE * Parrot_new_vtable(PARROT_INTERP)>
Creates and returns a pointer to the new C<VTABLE>.
@@ -43,7 +43,7 @@
/*
-=item C<VTABLE * Parrot_clone_vtable>
+=item C<VTABLE * Parrot_clone_vtable(PARROT_INTERP, const VTABLE *base_vtable)>
Clones C<*base_vtable> and returns a pointer to the new C<VTABLE>.
@@ -76,7 +76,7 @@
/*
-=item C<void Parrot_destroy_vtable>
+=item C<void Parrot_destroy_vtable(PARROT_INTERP, VTABLE *vtable)>
Destroys C<*vtable>.
@@ -117,7 +117,7 @@
/*
-=item C<void parrot_alloc_vtables>
+=item C<void parrot_alloc_vtables(PARROT_INTERP)>
Allocate memory for the vtables for all known classes (PMC types).
@@ -136,7 +136,7 @@
/*
-=item C<void parrot_realloc_vtables>
+=item C<void parrot_realloc_vtables(PARROT_INTERP)>
Reallocate memory for vtables, increasing the number of vtables by 16.
@@ -163,7 +163,7 @@
/*
-=item C<void parrot_free_vtables>
+=item C<void parrot_free_vtables(PARROT_INTERP)>
Free memory allocated for the vtables. Each vtable is destroyed
through its destructor Parrot_destroy_vtable, after which the list
@@ -187,7 +187,7 @@
/*
-=item C<void mark_vtables>
+=item C<void mark_vtables(PARROT_INTERP)>
Mark all vtables as being alive for the garbage collector.
Modified: trunk/src/warnings.c
==============================================================================
--- trunk/src/warnings.c Wed Apr 1 18:24:40 2009 (r37847)
+++ trunk/src/warnings.c Wed Apr 1 18:29:18 2009 (r37848)
@@ -36,7 +36,7 @@
/*
-=item C<void print_pbc_location>
+=item C<void print_pbc_location(PARROT_INTERP)>
Prints the bytecode location of the warning or error to C<Parrot_io_STDERR>.
@@ -59,7 +59,7 @@
/*
-=item C<static INTVAL print_warning>
+=item C<static INTVAL print_warning(PARROT_INTERP, STRING *msg)>
Prints the warning message and the bytecode location.
@@ -90,7 +90,8 @@
=over 4
-=item C<INTVAL Parrot_warn>
+=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