[svn:parrot] r40729 - branches/pcc_arg_unify/src/call

allison at svn.parrot.org allison at svn.parrot.org
Sun Aug 23 06:18:08 UTC 2009


Author: allison
Date: Sun Aug 23 06:18:07 2009
New Revision: 40729
URL: https://trac.parrot.org/parrot/changeset/40729

Log:
[pcc] Delay vtable function on PMC until after null check on the PMC.

Modified:
   branches/pcc_arg_unify/src/call/pcc.c

Modified: branches/pcc_arg_unify/src/call/pcc.c
==============================================================================
--- branches/pcc_arg_unify/src/call/pcc.c	Sun Aug 23 06:03:32 2009	(r40728)
+++ branches/pcc_arg_unify/src/call/pcc.c	Sun Aug 23 06:18:07 2009	(r40729)
@@ -1487,16 +1487,18 @@
 
     va_start(args, signature);
     for (return_index = 0; return_index < raw_return_count; return_index++) {
+        STRING *item_sig;
         INTVAL return_flags = VTABLE_get_integer_keyed_int(interp,
                     raw_sig, return_index);
 
         PMC *result_item = VTABLE_get_pmc_keyed_int(interp, return_list, return_list_index);
-        STRING *item_sig = VTABLE_get_string_keyed_str(interp, result_item, CONST_STRING(interp, ''));
 
         /* Gracefully ignore extra returns when error checking is off. */
         if (PMC_IS_NULL(result_item))
             continue; /* Go on to next return arg. */
 
+        item_sig = VTABLE_get_string_keyed_str(interp, result_item, CONST_STRING(interp, ''));
+
         switch (PARROT_ARG_TYPE_MASK_MASK(return_flags)) {
             case PARROT_ARG_INTVAL:
                 if (Parrot_str_equal(interp, item_sig, CONST_STRING(interp, "P"))) {


More information about the parrot-commits mailing list