[svn:parrot] r40997 - in trunk: include/parrot src/call

NotFound at svn.parrot.org NotFound at svn.parrot.org
Sat Sep 5 13:26:19 UTC 2009


Author: NotFound
Date: Sat Sep  5 13:26:19 2009
New Revision: 40997
URL: https://trac.parrot.org/parrot/changeset/40997

Log:
[cage] improve pcc signature checks

Modified:
   trunk/include/parrot/call.h
   trunk/src/call/pcc.c

Modified: trunk/include/parrot/call.h
==============================================================================
--- trunk/include/parrot/call.h	Sat Sep  5 13:24:24 2009	(r40996)
+++ trunk/include/parrot/call.h	Sat Sep  5 13:26:19 2009	(r40997)
@@ -686,9 +686,11 @@
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 /* HEADERIZER END: src/call/ops.c */
 
-#define ASSERT_SIG_PMC(sig) \
+#define ASSERT_SIG_PMC(sig) do {\
+    PARROT_ASSERT(!PMC_IS_NULL(sig)); \
     PARROT_ASSERT(PObj_is_PMC_TEST(sig)); \
-    PARROT_ASSERT((sig)->vtable->base_type == enum_class_FixedIntegerArray)
+    PARROT_ASSERT((sig)->vtable->base_type == enum_class_FixedIntegerArray); \
+} while (0)
 
 /* XXX Remove interp from this */
 #define ADD_OP_VAR_PART(interp, seg, pc, n) do { \

Modified: trunk/src/call/pcc.c
==============================================================================
--- trunk/src/call/pcc.c	Sat Sep  5 13:24:24 2009	(r40996)
+++ trunk/src/call/pcc.c	Sat Sep  5 13:26:19 2009	(r40997)
@@ -552,7 +552,7 @@
         ARGMOD(call_state_item *sti))
 {
     ASSERT_ARGS(Parrot_init_arg_indexes_and_sig_pmc)
-    if (!sig_pmc && indexes) {
+    if (PMC_IS_NULL(sig_pmc) && indexes) {
         ++indexes;
         sig_pmc = Parrot_pcc_get_pmc_constant(interp, ctx, *indexes);
         ASSERT_SIG_PMC(sig_pmc);


More information about the parrot-commits mailing list