[svn:parrot] r38730 - trunk/src
whiteknight at svn.parrot.org
whiteknight at svn.parrot.org
Wed May 13 00:29:27 UTC 2009
Author: whiteknight
Date: Wed May 13 00:29:26 2009
New Revision: 38730
URL: https://trac.parrot.org/parrot/changeset/38730
Log:
[docs] comment functions in a few files in src/*
Modified:
trunk/src/malloc-trace.c
trunk/src/multidispatch.c
trunk/src/oo.c
trunk/src/packfile.c
trunk/src/parrot_debugger.c
Modified: trunk/src/malloc-trace.c
==============================================================================
--- trunk/src/malloc-trace.c Tue May 12 23:58:43 2009 (r38729)
+++ trunk/src/malloc-trace.c Wed May 13 00:29:26 2009 (r38730)
@@ -52,8 +52,9 @@
/*
-=item C<static void
-open_log_file()>
+=item C<static void open_log_file()>
+
+Open a logfile for storing debugging information.
=cut
@@ -98,8 +99,9 @@
/*
-=item C<static void
-malloc_trace_destructor(void)>
+=item C<static void malloc_trace_destructor(void)>
+
+Print out a final timestamp and message to the log file.
=cut
@@ -131,8 +133,9 @@
/*
-=item C<static void
-malloc_segv_handler(int i, struct sigcontext_struct sc)>
+=item C<static void malloc_segv_handler(int i, struct sigcontext_struct sc)>
+
+Catch a segfault signal, print an error message, and end the logfile.
=cut
@@ -151,8 +154,9 @@
/*
-=item C<static void
-malloc_record(int code, size_t size, void *ptr, void *ptr2)>
+=item C<static void malloc_record(int code, size_t size, void *ptr, void *ptr2)>
+
+Record information about the allocation into the logfile.
=cut
@@ -197,6 +201,9 @@
=item C<void* malloc(size_t bytes)>
+Allocate memory with the specified size in bytes. Record information about it
+in the logfile.
+
=cut
*/
@@ -221,6 +228,8 @@
=item C<void free(void* mem)>
+Record information about the free in the logfile, and free the memory.
+
=cut
*/
@@ -238,6 +247,8 @@
=item C<void* realloc(void* mem, size_t bytes)>
+Resize the allocated memory buffer to the new size.
+
=cut
*/
@@ -258,6 +269,9 @@
=item C<void* memalign(size_t alignment, size_t bytes)>
+Return an allocated memory buffer that's of at least the given size in bytes
+and is aligned along the given boundary.
+
=cut
*/
@@ -282,6 +296,8 @@
=item C<void* calloc(size_t n, size_t elem_size)>
+Allocate memory of the given size, initializing the memory to the given value.
+
=cut
*/
@@ -306,6 +322,8 @@
=item C<void cfree(void *mem)>
+free the given buffer, recording information about it in the log.
+
=cut
*/
Modified: trunk/src/multidispatch.c
==============================================================================
--- trunk/src/multidispatch.c Tue May 12 23:58:43 2009 (r38729)
+++ trunk/src/multidispatch.c Wed May 13 00:29:26 2009 (r38730)
@@ -535,6 +535,9 @@
=item C<static INTVAL distance_cmp(PARROT_INTERP, INTVAL a, INTVAL b)>
+Compare distance values C<a> and C<b>. Return 1 if C<a> is larger, -1 if
+C<b> is.
+
=cut
*/
@@ -794,6 +797,10 @@
=item C<static PMC * Parrot_mmd_get_cached_multi_sig(PARROT_INTERP, PMC
*sub_pmc)>
+Get the cached multisig of the given sub, if one exists. The cached signature
+might be in different formats, so put it into a type tuple like is expected
+by the rest of the MMD system.
+
=cut
*/
Modified: trunk/src/oo.c
==============================================================================
--- trunk/src/oo.c Tue May 12 23:58:43 2009 (r38729)
+++ trunk/src/oo.c Wed May 13 00:29:26 2009 (r38730)
@@ -655,6 +655,9 @@
=item C<void destroy_object_cache(PARROT_INTERP)>
+Destroy the object cache. Loop over all caches and invalidate them. Then
+free the caches back to the OS.
+
=cut
*/
@@ -681,6 +684,9 @@
=item C<static void invalidate_type_caches(PARROT_INTERP, UINTVAL type)>
+Invalidate the cache of the specified type. Free each entry and then free
+the entire cache.
+
=cut
*/
@@ -717,6 +723,9 @@
=item C<static void invalidate_all_caches(PARROT_INTERP)>
+Invalidate all caches by looping over each cache and calling
+C<invalidate_type_caches> on them.
+
=cut
*/
@@ -901,6 +910,8 @@
=item C<static void debug_trace_find_meth(PARROT_INTERP, const PMC *_class,
const STRING *name, const PMC *sub)>
+Print some information about the search for a sub.
+
=cut
*/
@@ -955,6 +966,8 @@
=item C<static PMC * find_method_direct_1(PARROT_INTERP, PMC *_class, STRING
*method_name)>
+Find the method with the given name in the specified class.
+
=cut
*/
@@ -993,6 +1006,8 @@
=item C<static PMC* C3_merge(PARROT_INTERP, PMC *merge_list)>
+Merge together the MRO of the items in the list.
+
=cut
*/
Modified: trunk/src/packfile.c
==============================================================================
--- trunk/src/packfile.c Tue May 12 23:58:43 2009 (r38729)
+++ trunk/src/packfile.c Wed May 13 00:29:26 2009 (r38730)
@@ -485,6 +485,8 @@
=item C<void Parrot_trace_eprintf(const char *s, ...)>
+Print out an error message. Passes arguments directly to C<vfprintf>.
+
=cut
*/
Modified: trunk/src/parrot_debugger.c
==============================================================================
--- trunk/src/parrot_debugger.c Tue May 12 23:58:43 2009 (r38729)
+++ trunk/src/parrot_debugger.c Wed May 13 00:29:26 2009 (r38730)
@@ -242,6 +242,8 @@
=item C<static void PDB_run_code(PARROT_INTERP, int argc, char *argv[])>
+Run the code, catching exceptions if they are left unhandled.
+
=cut
*/
More information about the parrot-commits
mailing list