Author: leo
Date: Sun Jan 15 11:29:24 2006
New Revision: 11199

Modified:
   trunk/include/parrot/interpreter.h
   trunk/src/debug.c
   trunk/src/register.c
Log:
[PATCH] struct Parrot_Context doesn't need a 'prev' field.

   I had thought this field was being used, but it turns out to be
irrelevant.  I offer this patch so that no one else is fooled (and
because I had to test it anyway to prove that this is the case).

Courteys of Bob Rogers <[EMAIL PROTECTED]>


Modified: trunk/include/parrot/interpreter.h
==============================================================================
--- trunk/include/parrot/interpreter.h  (original)
+++ trunk/include/parrot/interpreter.h  Sun Jan 15 11:29:24 2006
@@ -169,7 +169,7 @@ typedef union {
 
 typedef struct Parrot_Context {
     /* common header with Interp_Context */
-    struct Parrot_Context *prev;
+    struct Parrot_Context *unused1;    /* placeholder */
     Regs_ni                bp;          /* pointers to FLOATVAL & INTVAL */
     Regs_ps                bp_ps;       /* pointers to PMC & STR */
     /* end common header */

Modified: trunk/src/debug.c
==============================================================================
--- trunk/src/debug.c   (original)
+++ trunk/src/debug.c   Sun Jan 15 11:29:24 2006
@@ -2823,7 +2823,7 @@ PDB_backtrace(Interp *interpreter)
         /* get the next Continuation */
         ctx = PMC_cont(sub)->to_ctx;
         old = sub;
-        if (!ctx || !ctx->prev)
+        if (!ctx)
             break;
     }
     if (rec_level != 0) {

Modified: trunk/src/register.c
==============================================================================
--- trunk/src/register.c        (original)
+++ trunk/src/register.c        Sun Jan 15 11:29:24 2006
@@ -416,7 +416,6 @@ Parrot_dup_context(Interp *interpreter, 
     }
     CONTEXT(interpreter->ctx) = ctx = ptr;
     ctx->regs_mem_size = reg_alloc;
-    ctx->prev = old;
     ctx->n_regs_used = old->n_regs_used;
     diff = (long*)ctx - (long*)old;
     interpreter->ctx.bp.regs_i += diff;
@@ -471,7 +470,6 @@ Parrot_alloc_context(Interp *interpreter
     fprintf(stderr, "alloc %p\n", ptr);
 #endif
     CONTEXT(interpreter->ctx) = ctx = ptr;
-    ctx->prev = old;
     ctx->regs_mem_size = reg_alloc;
     ctx->n_regs_used = n_regs_used;
     /* regs start past the context */

Reply via email to