diff options
author | dgp <dgp@users.sourceforge.net> | 2013-05-30 18:51:44 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2013-05-30 18:51:44 (GMT) |
commit | d1ba3dff8f0b5e1ca46bd9588f225c4dd882f87c (patch) | |
tree | c1dd88ef21e7d20f0a1ed9a146ccb3d08823a173 | |
parent | db5a66dd2c12c66e83843f772ef35bba03514696 (diff) | |
download | tcl-d1ba3dff8f0b5e1ca46bd9588f225c4dd882f87c.zip tcl-d1ba3dff8f0b5e1ca46bd9588f225c4dd882f87c.tar.gz tcl-d1ba3dff8f0b5e1ca46bd9588f225c4dd882f87c.tar.bz2 |
More robust expansion calculation. Look Ma! No operand!
-rw-r--r-- | generic/tclExecute.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 7c645e7..426364d 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -2715,6 +2715,7 @@ TEBCresume( TclNewObj(objPtr); objPtr->internalRep.ptrAndLongRep.value = CURR_DEPTH; + objPtr->length = 0; PUSH_TAUX_OBJ(objPtr); NEXT_INST_F(1, 0, 0); @@ -2743,7 +2744,14 @@ TEBCresume( * stack depth, as seen by the compiler. */ + auxObjList->length += objc; + +/* length = objc + (codePtr->maxStackDepth - TclGetInt4AtPtr(pc+1)); +*/ + length = auxObjList->length /* Total expansion room we need */ + + codePtr->maxStackDepth /* Beyond the original max */ + - CURR_DEPTH; /* Relative to where we are */ DECACHE_STACK_INFO(); moved = GrowEvaluationStack(iPtr->execEnvPtr, length, 1) - (Tcl_Obj **) TD; |