summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdIL.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2013-08-08 20:19:42 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2013-08-08 20:19:42 (GMT)
commit24197ad684cf243d80448a14b0aead5099299150 (patch)
tree39b9cee670b71ee268525cf87d7147619a10f785 /generic/tclCmdIL.c
parent92323ee89fde3546b7c0895aadd4e8e6563e6322 (diff)
parent987422a01fa6e334f2028ed6859b2de9a20c3423 (diff)
downloadtcl-24197ad684cf243d80448a14b0aead5099299150.zip
tcl-24197ad684cf243d80448a14b0aead5099299150.tar.gz
tcl-24197ad684cf243d80448a14b0aead5099299150.tar.bz2
merge trunk
Diffstat (limited to 'generic/tclCmdIL.c')
-rw-r--r--generic/tclCmdIL.c34
1 files changed, 8 insertions, 26 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index b99b9e2..789f506 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -1305,28 +1305,12 @@ TclInfoFrame(
*/
ADD_PAIR("type", Tcl_NewStringObj(typeString[framePtr->type], -1));
- ADD_PAIR("line", Tcl_NewIntObj(framePtr->line[0]));
- ADD_PAIR("cmd", Tcl_NewStringObj(framePtr->cmd.str.cmd,
- framePtr->cmd.str.len));
- break;
-
- case TCL_LOCATION_EVAL_LIST:
- /*
- * List optimized evaluation. Type, line, cmd, the latter through
- * listPtr, possibly a frame.
- */
-
- ADD_PAIR("type", Tcl_NewStringObj(typeString[framePtr->type], -1));
- ADD_PAIR("line", Tcl_NewIntObj(1));
-
- /*
- * We put a duplicate of the command list obj into the result to
- * ensure that the 'pure List'-property of the command itself is not
- * destroyed. Otherwise the query here would disable the list
- * optimization path in Tcl_EvalObjEx.
- */
-
- ADD_PAIR("cmd", Tcl_DuplicateObj(framePtr->cmd.listPtr));
+ if (framePtr->line) {
+ ADD_PAIR("line", Tcl_NewIntObj(framePtr->line[0]));
+ } else {
+ ADD_PAIR("line", Tcl_NewIntObj(1));
+ }
+ ADD_PAIR("cmd", Tcl_NewStringObj(framePtr->cmd, framePtr->len));
break;
case TCL_LOCATION_PREBC:
@@ -1374,8 +1358,7 @@ TclInfoFrame(
Tcl_DecrRefCount(fPtr->data.eval.path);
}
- ADD_PAIR("cmd",
- Tcl_NewStringObj(fPtr->cmd.str.cmd, fPtr->cmd.str.len));
+ ADD_PAIR("cmd", Tcl_NewStringObj(fPtr->cmd, fPtr->len));
TclStackFree(interp, fPtr);
break;
}
@@ -1394,8 +1377,7 @@ TclInfoFrame(
* the result list object.
*/
- ADD_PAIR("cmd", Tcl_NewStringObj(framePtr->cmd.str.cmd,
- framePtr->cmd.str.len));
+ ADD_PAIR("cmd", Tcl_NewStringObj(framePtr->cmd, framePtr->len));
break;
case TCL_LOCATION_PROC: