[svn:parrot] r43126 - branches/context_unify3/src/call

chromatic at svn.parrot.org chromatic at svn.parrot.org
Thu Dec 17 08:31:29 UTC 2009


Author: chromatic
Date: Thu Dec 17 08:31:28 2009
New Revision: 43126
URL: https://trac.parrot.org/parrot/changeset/43126

Log:
[PCC] Ensured that the current context of a tailcall has a CallContext PMC;
makes t/op/calling.t #23 pass.

Modified:
   branches/context_unify3/src/call/args.c

Modified: branches/context_unify3/src/call/args.c
==============================================================================
--- branches/context_unify3/src/call/args.c	Thu Dec 17 07:48:03 2009	(r43125)
+++ branches/context_unify3/src/call/args.c	Thu Dec 17 08:31:28 2009	(r43126)
@@ -2414,10 +2414,20 @@
 
 void
 Parrot_pcc_merge_signature_for_tailcall(PARROT_INTERP,
-        ARGMOD_NULLOK(PMC * parent), ARGMOD_NULLOK(PMC * tailcall))
+        ARGMOD_NULLOK(PMC *parent), ARGMOD_NULLOK(PMC *tailcall))
 {
     ASSERT_ARGS(Parrot_pcc_merge_signature_for_tailcall)
-    if (PMC_IS_NULL(parent) || PMC_IS_NULL(tailcall) || (parent == tailcall))
+
+    if (PMC_IS_NULL(parent))
+        return;
+
+    if (PMC_IS_NULL(tailcall)) {
+        Parrot_pcc_set_signature(interp, CURRENT_CONTEXT(interp),
+            Parrot_pcc_get_signature(interp, parent));
+        return;
+    }
+
+    if (parent == tailcall)
         return;
     else {
         /* Broke encapuslation. Direct poking into CallContext is much faster */
@@ -2438,7 +2448,6 @@
         /* Store raw signature */
         GETATTR_CallContext_return_flags(interp, parent, return_flags);
         SETATTR_CallContext_return_flags(interp, tailcall, return_flags);
-
     }
 }
 


More information about the parrot-commits mailing list