diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2008-07-31 03:42:15 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2008-07-31 03:42:15 (GMT) |
commit | 8b4bd2bb9a913d76dbb65ca98921a537bce251fd (patch) | |
tree | fe3e1dc019de2b19bc6f516f0efa54335ced46e3 /generic/tclExecute.c | |
parent | 49b3a0638d14782cab0d6f55302277572a7b9d89 (diff) | |
download | tcl-8b4bd2bb9a913d76dbb65ca98921a537bce251fd.zip tcl-8b4bd2bb9a913d76dbb65ca98921a537bce251fd.tar.gz tcl-8b4bd2bb9a913d76dbb65ca98921a537bce251fd.tar.bz2 |
restricting usage and avoiding panics in [tailcall]
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r-- | generic/tclExecute.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 2a1d232..9ee7ec0 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.391 2008/07/31 00:43:09 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.392 2008/07/31 03:42:15 msofer Exp $ */ #include "tclInt.h" @@ -7686,7 +7686,7 @@ TclExecuteByteCode( */ bottomPtr = oldBottomPtr; /* back to old bc */ - result = TclNRRunCallbacks(interp, result, bottomPtr->rootPtr, 1); + result = TclNRRunCallbacks(interp, result, bottomPtr->rootPtr, 2); NR_DATA_DIG(); DECACHE_STACK_INFO(); @@ -7701,23 +7701,15 @@ TclExecuteByteCode( Tcl_DecrRefCount(objPtr); } goto nonRecursiveCallReturn; - } else { + } else if (TOP_CB(interp)->procPtr == NRRunBytecode) { /* - * One of the callbacks requested a new execution: a tailcall! - * Start the new bytecode. - */ - - if (TOP_CB(interp)->procPtr == NRDoTailcall) { -#if 1 - Tcl_Panic("'tailcall tailcall' not yet implemented");// -#endif - Tcl_SetResult(interp,"'tailcall tailcall' not yet implemented", - TCL_STATIC); - result = TCL_ERROR; - goto checkForCatch; - } - goto nonRecursiveCallStart; + * One of the callbacks requested a new execution: a tailcall! + * Start the new bytecode. + */ + + goto nonRecursiveCallStart; } + Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle! (2)"); } return result; } |