summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdIL.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/tclCmdIL.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/tclCmdIL.c')
-rw-r--r--generic/tclCmdIL.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index b7a26bf..49ca22c 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -16,7 +16,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdIL.c,v 1.116 2007/06/12 12:34:00 dkf Exp $
+ * RCS: @(#) $Id: tclCmdIL.c,v 1.117 2007/06/18 22:51:11 msofer Exp $
*/
#include "tclInt.h"
@@ -1188,36 +1188,40 @@ InfoFrameCmd(
* Execution of bytecode. Talk to the BC engine to fill out the frame.
*/
- CmdFrame f = *framePtr;
- Proc *procPtr = f.framePtr ? f.framePtr->procPtr : NULL;
+ Proc *procPtr = framePtr->framePtr ? framePtr->framePtr->procPtr : NULL;
+ CmdFrame *fPtr;
+
+ fPtr = (CmdFrame *) TclStackAlloc(interp, sizeof(CmdFrame));
+ *fPtr = *framePtr;
/*
* Note:
* Type BC => f.data.eval.path is not used.
+
* f.data.tebc.codePtr is used instead.
*/
- TclGetSrcInfoForPc(&f);
+ TclGetSrcInfoForPc(fPtr);
/*
* Now filled: cmd.str.(cmd,len), line
* Possibly modified: type, path!
*/
- ADD_PAIR("type", Tcl_NewStringObj(typeString[f.type], -1));
- ADD_PAIR("line", Tcl_NewIntObj(f.line[0]));
+ ADD_PAIR("type", Tcl_NewStringObj(typeString[fPtr->type], -1));
+ ADD_PAIR("line", Tcl_NewIntObj(fPtr->line[0]));
- if (f.type == TCL_LOCATION_SOURCE) {
- ADD_PAIR("file", f.data.eval.path);
+ if (fPtr->type == TCL_LOCATION_SOURCE) {
+ ADD_PAIR("file", fPtr->data.eval.path);
/*
* Death of reference by TclGetSrcInfoForPc.
*/
- Tcl_DecrRefCount(f.data.eval.path);
+ Tcl_DecrRefCount(fPtr->data.eval.path);
}
- ADD_PAIR("cmd", Tcl_NewStringObj(f.cmd.str.cmd, f.cmd.str.len));
+ ADD_PAIR("cmd", Tcl_NewStringObj(fPtr->cmd.str.cmd, fPtr->cmd.str.len));
if (procPtr != NULL) {
Tcl_HashEntry *namePtr = procPtr->cmdPtr->hPtr;
@@ -1256,6 +1260,7 @@ InfoFrameCmd(
}
}
}
+ TclStackFree(interp); /* fPtr */
break;
}