diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | generic/tclBasic.c | 12 | ||||
-rw-r--r-- | generic/tclExecute.c | 5 |
3 files changed, 11 insertions, 12 deletions
@@ -1,3 +1,9 @@ +2009-12-13 Miguel Sofer <msofer@users.sf.net> + + * generic/tclBasic.c: Moving TclBCArgumentRelease call + * generic/tclExecute.c: from TclNRTailcallObjCmd to TEBC, so that + the pairing of the Enter and Release calls is clearer. + 2009-12-12 Donal K. Fellows <dkf@users.sf.net> * generic/tclTest.c (TestconcatobjCmd): [Bug 2895367]: Stop memory diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 9469792..43bd2d5 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.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: tclBasic.c,v 1.431 2009/12/11 14:01:29 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.432 2009/12/13 16:41:37 msofer Exp $ */ #include "tclInt.h" @@ -8293,16 +8293,6 @@ TclNRTailcallObjCmd( * TclNRAddCallBack macro to build the callback) */ - /* - * In a bytecode execution context the engine has called - * TclArgumentBCEnter() which, due to the tailcall, is not paired with a - * regular TclArgumentBCRelease. Get rid of it on our own. - */ - - if (iPtr->cmdFramePtr->type == TCL_LOCATION_BC) { - TclArgumentBCRelease(interp, iPtr->cmdFramePtr); - } - TclNRAddCallback(interp, NRTailcallEval, listPtr, nsObjPtr, NULL, NULL); iPtr->varFramePtr->tailcallPtr = TOP_CB(interp); TOP_CB(interp) = TOP_CB(interp)->nextPtr; diff --git a/generic/tclExecute.c b/generic/tclExecute.c index ec102b8..a8a979d 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.466 2009/12/11 05:49:41 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.467 2009/12/13 16:41:37 msofer Exp $ */ #include "tclInt.h" @@ -2852,6 +2852,9 @@ TclExecuteByteCode( fprintf(stdout, " Tailcall request received\n"); } #endif /* TCL_COMPILE_DEBUG */ + iPtr->cmdFramePtr = bcFramePtr->nextPtr; + TclArgumentBCRelease((Tcl_Interp *) iPtr, bcFramePtr); + if (catchTop != initCatchTop) { TEOV_callback *tailcallPtr = iPtr->varFramePtr->tailcallPtr; |