develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34674 - trunk/src

From:
chromatic
Date:
December 30, 2008 13:22
Subject:
[svn:parrot] r34674 - trunk/src
Message ID:
20081230212216.66FE7CB9FA@x12.develooper.com
Author: chromatic
Date: Tue Dec 30 13:22:15 2008
New Revision: 34674

Modified:
   trunk/src/multidispatch.c

Log:
[MMD] Removed deprecated static functions no longer used within this file and
not visible externally (so that they need no public deprecation cycle).

Modified: trunk/src/multidispatch.c
==============================================================================
--- trunk/src/multidispatch.c	(original)
+++ trunk/src/multidispatch.c	Tue Dec 30 13:22:15 2008
@@ -111,12 +111,6 @@
         __attribute__nonnull__(2)
         __attribute__nonnull__(3);
 
-static void mmd_expand_x(PARROT_INTERP, INTVAL func_nr, INTVAL new_x)
-        __attribute__nonnull__(1);
-
-static void mmd_expand_y(PARROT_INTERP, INTVAL func_nr, INTVAL new_y)
-        __attribute__nonnull__(1);
-
 static void mmd_search_by_sig_obj(PARROT_INTERP,
     ARGIN(STRING *name),
     ARGIN(PMC *sig_obj),
@@ -145,11 +139,6 @@
 static PMC* Parrot_mmd_arg_tuple_func(PARROT_INTERP)
         __attribute__nonnull__(1);
 
-static void Parrot_mmd_ensure_writable(PARROT_INTERP,
-    INTVAL function,
-    ARGIN_NULLOK(const PMC *pmc))
-        __attribute__nonnull__(1);
-
 PARROT_CANNOT_RETURN_NULL
 static PMC * Parrot_mmd_get_cached_multi_sig(PARROT_INTERP, ARGIN(PMC *sub))
         __attribute__nonnull__(1)
@@ -225,27 +214,6 @@
 
 /*
 
-=item C<static void Parrot_mmd_ensure_writable>
-
-Make sure C<pmc> is writable enough for C<function>.
-
-{{**DEPRECATE**}}
-
-=cut
-
-*/
-
-static void
-Parrot_mmd_ensure_writable(PARROT_INTERP, INTVAL function, ARGIN_NULLOK(const PMC *pmc))
-{
-    if (!PMC_IS_NULL(pmc) && (pmc->vtable->flags & VTABLE_IS_READONLY_FLAG))
-        Parrot_ex_throw_from_c_args(interp, 0, 1, "%s applied to read-only argument",
-            Parrot_MMD_method_name(interp, function));
-}
-
-
-/*
-
 =item C<PMC* Parrot_build_sig_object_from_varargs>
 
 Take a varargs list, and convert it into a CallSignature PMC. The CallSignature
@@ -413,101 +381,6 @@
 
 /*
 
-=item C<static void mmd_expand_x>
-
-Expands the function table in the X dimension to include C<new_x>.
-
-{{**DEPRECATE**}}
-
-=cut
-
-*/
-
-static void
-mmd_expand_x(PARROT_INTERP, INTVAL func_nr, INTVAL new_x)
-{
-    funcptr_t *new_table;
-    UINTVAL x;
-    UINTVAL y;
-    UINTVAL i;
-    char *src_ptr, *dest_ptr;
-    size_t old_dp, new_dp;
-    MMD_table * const table = interp->binop_mmd_funcs + func_nr;
-
-    /* Is the Y 0? If so, nothing to expand, so just set the X for later use */
-    if (table->y == 0) {
-        table->x = new_x;
-        return;
-    }
-
-    /* The Y is not zero. Bleah. This means we have to expand the
-       table in an unpleasant way. */
-
-    x = table->x;
-    y = table->y;
-
-    /* First, fill in the whole new table with the default function
-       pointer. We only really need to do the new part, but... */
-    new_table = mem_allocate_n_zeroed_typed(y * new_x, funcptr_t);
-
-    /* Then copy the old table over. We have to do this row by row,
-       because the rows in the old and new tables are different lengths */
-    src_ptr  = (char *)table->mmd_funcs;
-    dest_ptr = (char *)new_table;
-    old_dp   = sizeof (funcptr_t) * x;
-    new_dp   = sizeof (funcptr_t) * new_x;
-
-    for (i = 0; i < y; i++) {
-        STRUCT_COPY_N(dest_ptr, src_ptr, x);
-        src_ptr  += old_dp;
-        dest_ptr += new_dp;
-    }
-
-    if (table->mmd_funcs)
-        mem_sys_free(table->mmd_funcs);
-
-    table->x = new_x;
-
-    /* Set the old table to point to the new table */
-    table->mmd_funcs = new_table;
-}
-
-
-/*
-
-=item C<static void mmd_expand_y>
-
-Expands the function table in the Y direction.
-
-{{**DEPRECATE**}}
-
-=cut
-
-*/
-
-static void
-mmd_expand_y(PARROT_INTERP, INTVAL func_nr, INTVAL new_y)
-{
-    UINTVAL           new_size, old_size;
-    MMD_table * const table = interp->binop_mmd_funcs + func_nr;
-
-    PARROT_ASSERT(table->x);
-
-    old_size = sizeof (funcptr_t) * table->x * table->y;
-    new_size = sizeof (funcptr_t) * table->x * new_y;
-
-    if (table->mmd_funcs)
-        table->mmd_funcs = (funcptr_t *)mem_sys_realloc_zeroed(
-            table->mmd_funcs, new_size, old_size);
-    else
-        table->mmd_funcs = (funcptr_t *)mem_sys_allocate_zeroed(new_size);
-
-    table->y = new_y;
-}
-
-
-/*
-
 =item C<PMC * Parrot_mmd_find_multi_from_long_sig>
 
 Find the best candidate multi for a given sub name and signature. The signature



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About