summaryrefslogtreecommitdiffstats
path: root/generic/tclNamesp.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2010-08-18 22:33:26 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2010-08-18 22:33:26 (GMT)
commit11924d7e8ed9dbbf906cc088f2f21d9609367336 (patch)
treeb1e603315f93e5798e6c556f68414679d05c4495 /generic/tclNamesp.c
parent5e0a6ec0e20184698f7b2b98a7b8a62ef04e2c1a (diff)
downloadtcl-11924d7e8ed9dbbf906cc088f2f21d9609367336.zip
tcl-11924d7e8ed9dbbf906cc088f2f21d9609367336.tar.gz
tcl-11924d7e8ed9dbbf906cc088f2f21d9609367336.tar.bz2
* generic/tclBasic.c: New redesign of [tailcall]: find
* generic/tclExecute.c: errors early on, so that errorInfo * generic/tclInt.h: contains the proper info [Bug 3047235] * generic/tclNamesp.c:
Diffstat (limited to 'generic/tclNamesp.c')
-rw-r--r--generic/tclNamesp.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index 401eea4..5bd3c24 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -22,7 +22,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclNamesp.c,v 1.210 2010/08/18 15:44:13 msofer Exp $
+ * RCS: @(#) $Id: tclNamesp.c,v 1.211 2010/08/18 22:33:27 msofer Exp $
*/
#include "tclInt.h"
@@ -313,15 +313,27 @@ Tcl_PushCallFrame(
framePtr->compiledLocals = NULL;
framePtr->clientData = NULL;
framePtr->localCachePtr = NULL;
- framePtr->tailcallPtr = NULL;
/*
+ * Record the top of the callback stack, so that tailcall can identify
+ * the spot where to splice the new command.
+ */
+
+ if (iPtr->execEnvPtr) {
+ framePtr->wherePtr = TOP_CB(interp);
+ } else {
+ framePtr->wherePtr = NULL;
+ }
+
+
+ /*
* Push the new call frame onto the interpreter's stack of procedure call
* frames making it the current frame.
*/
iPtr->framePtr = framePtr;
iPtr->varFramePtr = framePtr;
+
return TCL_OK;
}
@@ -391,10 +403,6 @@ Tcl_PopCallFrame(
Tcl_DeleteNamespace((Tcl_Namespace *) nsPtr);
}
framePtr->nsPtr = NULL;
-
- if (framePtr->tailcallPtr) {
- TclSpliceTailcall(interp, framePtr->tailcallPtr);
- }
}
/*