summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2007-06-19 19:50:10 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2007-06-19 19:50:10 (GMT)
commite9fbd6e496f899cfca24c20ef12b68d0fecdde5e (patch)
treebaf223a56b5785d174e720e186d3d9c4aac66c82
parent1c0ea5db0bb376164d45e20ae70749627607967c (diff)
downloadtcl-e9fbd6e496f899cfca24c20ef12b68d0fecdde5e.zip
tcl-e9fbd6e496f899cfca24c20ef12b68d0fecdde5e.tar.gz
tcl-e9fbd6e496f899cfca24c20ef12b68d0fecdde5e.tar.bz2
adding comments to GrowEvaluationStack
-rw-r--r--generic/tclExecute.c14
1 files changed, 13 insertions, 1 deletions
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];