[svn:parrot] r43087 - in branches/context_unify3/src: ops pmc

bacek at svn.parrot.org bacek at svn.parrot.org
Wed Dec 16 08:06:03 UTC 2009


Author: bacek
Date: Wed Dec 16 08:06:01 2009
New Revision: 43087
URL: https://trac.parrot.org/parrot/changeset/43087

Log:
Remove setting of caller_ctx from Sub.invoke and op get_params.

Modified:
   branches/context_unify3/src/ops/core.ops
   branches/context_unify3/src/pmc/sub.pmc

Modified: branches/context_unify3/src/ops/core.ops
==============================================================================
--- branches/context_unify3/src/ops/core.ops	Wed Dec 16 05:38:42 2009	(r43086)
+++ branches/context_unify3/src/ops/core.ops	Wed Dec 16 08:06:01 2009	(r43087)
@@ -557,10 +557,8 @@
 
     /* TODO Factor out with Sub.invoke */
     if (PObj_get_FLAGS(ccont) & SUB_FLAG_TAILCALL) {
-        PObj_get_FLAGS(ccont) &= ~SUB_FLAG_TAILCALL;
         Parrot_pcc_dec_recursion_depth(interp, ctx);
-        Parrot_pcc_set_caller_ctx(interp, ctx,
-            Parrot_pcc_get_caller_ctx(interp, caller_ctx));
+        PObj_get_FLAGS(ccont) &= ~SUB_FLAG_TAILCALL;
     }
 
     goto OFFSET(argc + 2);

Modified: branches/context_unify3/src/pmc/sub.pmc
==============================================================================
--- branches/context_unify3/src/pmc/sub.pmc	Wed Dec 16 05:38:42 2009	(r43086)
+++ branches/context_unify3/src/pmc/sub.pmc	Wed Dec 16 08:06:01 2009	(r43087)
@@ -470,19 +470,8 @@
             Parrot_switch_to_cs(INTERP, sub->seg, 1);
 
         if (PObj_get_FLAGS(ccont) & SUB_FLAG_TAILCALL) {
-            if (!(*pc == PARROT_OP_get_params_pc
-            ||    (*pc    == PARROT_OP_push_eh_ic
-            &&     pc[2] == PARROT_OP_get_params_pc))) {
-
-                /* TODO keep it or resize it */
-                Parrot_pcc_dec_recursion_depth(INTERP, context);
-
-                PObj_get_FLAGS(ccont) &= ~SUB_FLAG_TAILCALL;
-                /* Weird code to set parent to grand-parent */
-                Parrot_pcc_set_caller_ctx(interp, context,
-                        Parrot_pcc_get_caller_ctx(interp,
-                                Parrot_pcc_get_caller_ctx(interp, context)));
-            }
+            Parrot_pcc_dec_recursion_depth(INTERP, context);
+            PObj_get_FLAGS(ccont) &= ~SUB_FLAG_TAILCALL;
         }
 
         return pc;


More information about the parrot-commits mailing list