summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-10-26 07:32:47 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-10-26 07:32:47 (GMT)
commitecb8fcec67eaa9ecc3902b669ad242dd76038562 (patch)
treeadc7c064741a37afc892c059151bdb56e457191a /generic/tclExecute.c
parent8c9ab6bacf51046f3bb722ac655d9a3ddfd237d2 (diff)
downloadtcl-ecb8fcec67eaa9ecc3902b669ad242dd76038562.zip
tcl-ecb8fcec67eaa9ecc3902b669ad242dd76038562.tar.gz
tcl-ecb8fcec67eaa9ecc3902b669ad242dd76038562.tar.bz2
Compile [namespace which -command]; big performance saving in some contexts.
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 0ec16e9..a24c806 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -4107,6 +4107,16 @@ TEBCresume(
TRACE_APPEND(("%.30s\n", O2S(objResultPtr)));
NEXT_INST_F(1, 1, 1);
}
+ case INST_RESOLVE_COMMAND: {
+ Tcl_Command cmd = Tcl_GetCommandFromObj(interp, OBJ_AT_TOS);
+
+ TclNewObj(objResultPtr);
+ if (cmd != NULL) {
+ Tcl_GetCommandFullName(interp, cmd, objResultPtr);
+ }
+ TRACE_WITH_OBJ(("\"%.20s\" => ", O2S(OBJ_AT_TOS)), objResultPtr);
+ NEXT_INST_F(1, 1, 1);
+ }
case INST_TCLOO_SELF: {
CallFrame *framePtr = iPtr->varFramePtr;
CallContext *contextPtr;