From e9fbd6e496f899cfca24c20ef12b68d0fecdde5e Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Tue, 19 Jun 2007 19:50:10 +0000 Subject: adding comments to GrowEvaluationStack --- generic/tclExecute.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 1f2a3df..eb077b6 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.298 2007/06/18 22:51:11 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.299 2007/06/19 19:50:10 msofer Exp $ */ #include "tclInt.h" @@ -669,6 +669,12 @@ GrowEvaluationStack( return markerPtr + 1; } } else if (needed < 0) { + /* + * Put a marker pointing to the previous marker in this stack, and + * store it in esPtr as the current marker. Return a pointer to one + * word past the marker. + */ + esPtr->markerPtr = ++esPtr->tosPtr; *esPtr->markerPtr = (Tcl_Obj *) markerPtr; return esPtr->markerPtr + 1; @@ -730,6 +736,12 @@ GrowEvaluationStack( newStackReady: eePtr->execStackPtr = esPtr; + /* + * Store a NULL marker at the beginning of the stack, to indicate that + * this is the first marker in this stack and that rewinding to here + * should actually be a return to the previous stack. + */ + esPtr->stackWords[0] = NULL; esPtr->markerPtr = esPtr->tosPtr = &esPtr->stackWords[0]; -- cgit v0.12