[svn:mod_parrot] r219 - mod_parrot/trunk/src

[email protected]
Newsgroups perl.cvs.mod_parrot
Message-ID <[email protected]>
Author: jhorwitz
Date: Thu Nov  3 07:54:46 2005
New Revision: 219

Modified:
   mod_parrot/trunk/src/parrot_util.c
Log:
tweaks to support parrot's new variable-sized register frames


Modified: mod_parrot/trunk/src/parrot_util.c
==============================================================================
--- mod_parrot/trunk/src/parrot_util.c	(original)
+++ mod_parrot/trunk/src/parrot_util.c	Thu Nov  3 07:54:46 2005
@@ -111,35 +111,34 @@ char *modparrot_backtrace(Parrot_Interp 
     PMC *sub;
     PMC *old = PMCNULL;
     int rec_level = 0;
-    parrot_context_t ctx;
+    parrot_context_t *ctx;
     char *trace_string;
 
     /* information about the current sub */
     sub = interpinfo_p(interp, CURRENT_SUB);
+    ctx = CONTEXT(interp->ctx);
     if (!PMC_IS_NULL(sub)) {
-        str = Parrot_Context_infostr(interp, &interp->ctx);
+        str = Parrot_Context_infostr(interp, ctx);
         if (str)
             buf = string_concat(interp, buf, str, 0);
     }
 
     /* backtrace: follow the continuation chain */
-    ctx = interp->ctx;
-
     while (1) {
-        sub = CONTEXT(ctx)->current_cont;
+        sub = ctx->current_cont;
         if (!sub)
             break;
         str = Parrot_Context_infostr(interp,
-                    &PMC_cont(sub)->to_ctx);
+                    PMC_cont(sub)->to_ctx);
         if (!str)
             break;
 
         /* recursion detection */
         if (!PMC_IS_NULL(old) && PMC_cont(old) &&
-            CONTEXT(PMC_cont(old)->to_ctx)->current_pc ==
-            CONTEXT(PMC_cont(sub)->to_ctx)->current_pc &&
-            CONTEXT(PMC_cont(old)->to_ctx)->current_sub ==
-            CONTEXT(PMC_cont(sub)->to_ctx)->current_sub) {
+            PMC_cont(old)->to_ctx->current_pc ==
+            PMC_cont(sub)->to_ctx->current_pc &&
+            PMC_cont(old)->to_ctx->current_sub ==
+            PMC_cont(sub)->to_ctx->current_sub) {
             ++rec_level;
         } else if (rec_level != 0) {
             string_nprintf(interp, buf, 0, "... call repeated %d times\n",
@@ -155,7 +154,7 @@ char *modparrot_backtrace(Parrot_Interp 
         /* get the next Continuation */
         ctx = PMC_cont(sub)->to_ctx;
         old = sub;
-        if (!ctx.rctx || !CONTEXT(ctx)->prev)
+        if (!ctx || !ctx->prev)
             break;
     }
     if (rec_level != 0) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.