summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormig <mig>2011-03-13 06:59:04 (GMT)
committermig <mig>2011-03-13 06:59:04 (GMT)
commitde9eaa2261bbda12a5ba8a76ec1a29d28a8b651b (patch)
treea466692af9accef5fccb64705805fce1e2b87960
parent2ff0db90f57b60e46b714f2b5cdb1d2c5eacce98 (diff)
downloadtcl-de9eaa2261bbda12a5ba8a76ec1a29d28a8b651b.zip
tcl-de9eaa2261bbda12a5ba8a76ec1a29d28a8b651b.tar.gz
tcl-de9eaa2261bbda12a5ba8a76ec1a29d28a8b651b.tar.bz2
* generic/tclExecute.c: remove TEBCreturn()
-rw-r--r--ChangeLog4
-rw-r--r--generic/tclExecute.c37
2 files changed, 14 insertions, 27 deletions
diff --git a/ChangeLog b/ChangeLog
index 37bd48b..10f1f55 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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