summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2007-06-18 22:51:10 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2007-06-18 22:51:10 (GMT)
commit92b0317a2aee4e4cddd7870b828083db5e2f9d53 (patch)
tree18f20a232250658278a2d0c01dae4aa41a272dfe /generic/tclCompile.c
parent1226c2ef3595f10f6ae34fc47c9d26706f4a4351 (diff)
downloadtcl-92b0317a2aee4e4cddd7870b828083db5e2f9d53.zip
tcl-92b0317a2aee4e4cddd7870b828083db5e2f9d53.tar.gz
tcl-92b0317a2aee4e4cddd7870b828083db5e2f9d53.tar.bz2
* generic/tclCmdIL.c (InfoFrameCmd):
* generic/tclCmdMZ.c (Tcl_SwitchObjCmd): * generic/tclCompile.c (TclInitCompileEnv): * generic/tclProc.c (Tcl_ProcObjCmd, SetLambdaFromAny): Moved the CmdFrame off the C stack and onto the Tcl stack.
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r--generic/tclCompile.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index f3aa2e4..d00ee09 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCompile.c,v 1.119 2007/06/14 15:56:05 dgp Exp $
+ * RCS: @(#) $Id: tclCompile.c,v 1.120 2007/06/18 22:51:11 msofer Exp $
*/
#include "tclInt.h"
@@ -912,39 +912,43 @@ TclInitCompileEnv(
envPtr->extCmdMapPtr->type =
(envPtr->procPtr ? TCL_LOCATION_PROC : TCL_LOCATION_BC);
} else {
- CmdFrame ctx = *invoker;
+ CmdFrame *ctxPtr;
int pc = 0;
+ ctxPtr = (CmdFrame *) TclStackAlloc(interp, sizeof(CmdFrame));
+ *ctxPtr = *invoker;
+
if (invoker->type == TCL_LOCATION_BC) {
/*
* Note: Type BC => ctx.data.eval.path is not used.
* ctx.data.tebc.codePtr is used instead.
*/
- TclGetSrcInfoForPc(&ctx);
+ TclGetSrcInfoForPc(ctxPtr);
pc = 1;
}
- envPtr->line = ctx.line[word];
- envPtr->extCmdMapPtr->type = ctx.type;
+ envPtr->line = ctxPtr->line[word];
+ envPtr->extCmdMapPtr->type = ctxPtr->type;
- if (ctx.type == TCL_LOCATION_SOURCE) {
+ if (ctxPtr->type == TCL_LOCATION_SOURCE) {
if (pc) {
/*
* The reference 'TclGetSrcInfoForPc' made is transfered.
*/
- envPtr->extCmdMapPtr->path = ctx.data.eval.path;
- ctx.data.eval.path = NULL;
+ envPtr->extCmdMapPtr->path = ctxPtr->data.eval.path;
+ ctxPtr->data.eval.path = NULL;
} else {
/*
* We have a new reference here.
*/
- envPtr->extCmdMapPtr->path = ctx.data.eval.path;
+ envPtr->extCmdMapPtr->path = ctxPtr->data.eval.path;
Tcl_IncrRefCount(envPtr->extCmdMapPtr->path);
}
}
+ TclStackFree(interp);
}
}