diff options
author | mig <mig> | 2011-03-13 06:59:04 (GMT) |
---|---|---|
committer | mig <mig> | 2011-03-13 06:59:04 (GMT) |
commit | e22b7695ec3687a108a653a7022ca26b569637cb (patch) | |
tree | a466692af9accef5fccb64705805fce1e2b87960 | |
parent | db7478a260a5382471109a887418c0a9def3992e (diff) | |
download | tcl-e22b7695ec3687a108a653a7022ca26b569637cb.zip tcl-e22b7695ec3687a108a653a7022ca26b569637cb.tar.gz tcl-e22b7695ec3687a108a653a7022ca26b569637cb.tar.bz2 |
* generic/tclExecute.c: remove TEBCreturn()
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | generic/tclExecute.c | 37 |
2 files changed, 14 insertions, 27 deletions
@@ -1,3 +1,7 @@ +2011-03-13 Miguel Sofer <msofer@users.sf.net> + + * generic/tclExecute.c: remove TEBCreturn() + 2011-03-12 Donal K. Fellows <dkf@users.sf.net> * generic/tcl.h (ckalloc,ckfree,ckrealloc): Moved casts into these diff --git a/generic/tclExecute.c b/generic/tclExecute.c index a1f4479..a93de79 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -715,7 +715,6 @@ static Tcl_NRPostProc CopyCallback; static Tcl_NRPostProc ExprObjCallback; static Tcl_NRPostProc TEBCresume; -static Tcl_NRPostProc TEBCreturn; /* * The structure below defines a bytecode Tcl object type to hold the @@ -1993,13 +1992,9 @@ TclNRExecuteByteCode( #endif /* - * Push the callbacks for - * - exception handling and cleanup - * - bytecode execution + * Push the callback for bytecode execution */ - TclNRAddCallback(interp, TEBCreturn, TD, NULL, - NULL, NULL); TclNRAddCallback(interp, TEBCresume, TD, /*resume*/ INT2PTR(0), NULL, NULL); @@ -2007,26 +2002,6 @@ TclNRExecuteByteCode( } static int -TEBCreturn( - ClientData data[], - Tcl_Interp *interp, - int result) -{ - TEBCdata *TD = data[0]; - ByteCode *codePtr = TD->codePtr; - - if (--codePtr->refCount <= 0) { - TclCleanupByteCode(codePtr); - } - while (TD->expanded) { - TD = TD->expanded; - } - TclStackFree(interp, TD); /* free my stack */ - - return result; -} - -static int TEBCresume( ClientData data[], Tcl_Interp *interp, @@ -2132,7 +2107,6 @@ TEBCresume( result = TCL_ERROR; } NRE_ASSERT(iPtr->cmdFramePtr == bcFramePtr); - NRE_ASSERT(TOP_CB(interp)->procPtr == TEBCreturn); iPtr->cmdFramePtr = bcFramePtr->nextPtr; if (iPtr->flags & INTERP_DEBUG_FRAME) { TclArgumentBCRelease((Tcl_Interp *) iPtr, bcFramePtr); @@ -6431,8 +6405,17 @@ TEBCresume( } iPtr->cmdFramePtr = bcFramePtr->nextPtr; + if (--codePtr->refCount <= 0) { + TclCleanupByteCode(codePtr); + } + while (TD->expanded) { + TD = TD->expanded; + } + TclStackFree(interp, TD); /* free my stack */ + return result; } + #undef codePtr #undef iPtr #undef bcFramePtr |