diff options
| author | Kevin B Kenny <kennykb@acm.org> | 2010-10-09 17:53:16 (GMT) |
|---|---|---|
| committer | Kevin B Kenny <kennykb@acm.org> | 2010-10-09 17:53:16 (GMT) |
| commit | ab1be3cbc8f840d7d2eb235f86051e816d188187 (patch) | |
| tree | 91ece78568182cb7e2cec7c6b8891c0c7e71210e /generic/tclExecute.c | |
| parent | b85f99dc098796169f51664e3961f17368a8c9e6 (diff) | |
| download | tcl-ab1be3cbc8f840d7d2eb235f86051e816d188187.zip tcl-ab1be3cbc8f840d7d2eb235f86051e816d188187.tar.gz tcl-ab1be3cbc8f840d7d2eb235f86051e816d188187.tar.bz2 | |
merge
Diffstat (limited to 'generic/tclExecute.c')
| -rw-r--r-- | generic/tclExecute.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 3f7c420..65bd9a2 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,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.494.2.5 2010/10/02 16:04:29 kennykb Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.494.2.6 2010/10/09 17:53:16 kennykb Exp $ */ #include "tclInt.h" @@ -1883,6 +1883,10 @@ TclNRExecuteByteCode( { Interp *iPtr = (Interp *) interp; BottomData *BP; + int size = sizeof(BottomData) + sizeof(CmdFrame) + + + (codePtr->maxStackDepth + codePtr->maxExceptDepth) + *(sizeof(Tcl_Obj *)); + int numWords = (size + sizeof(Tcl_Obj *) - 1)/sizeof(Tcl_Obj *); if (iPtr->execEnvPtr->rewind) { return TCL_ERROR; @@ -1902,9 +1906,7 @@ TclNRExecuteByteCode( * execution stack is large enough to execute this ByteCode. */ - BP = (BottomData *) GrowEvaluationStack(iPtr->execEnvPtr, - sizeof(BottomData) + codePtr->maxExceptDepth + sizeof(CmdFrame) - + codePtr->maxStackDepth, 0); + BP = (BottomData *) GrowEvaluationStack(iPtr->execEnvPtr, numWords, 0); esPtr->tosPtr = initTosPtr; BP->codePtr = codePtr; |
