Index: TODO =================================================================== diff -u -rb69745e3ecfe9e95e9a48ce240c9837117050e6c -r0f5513cd0b35c79689a0d04b967ea340577889e8 --- TODO (.../TODO) (revision b69745e3ecfe9e95e9a48ce240c9837117050e6c) +++ TODO (.../TODO) (revision 0f5513cd0b35c79689a0d04b967ea340577889e8) @@ -1820,10 +1820,10 @@ - extended regression tests for aliases to procs - renamed nx regression tests .test to follow tcl conventions - added regression tests for destroy-during-init -- remved debugging from NsfCleanupObject when compiled without DEVELOPMENT +- removed debugging from NsfCleanupObject when compiled without DEVELOPMENT +- removed debugging from CscFinish when compiled without DEVELOPMENT TODO: -- handling of msg in CscFinish - "-returns" * leave syntax as is for method? Index: generic/nsf.c =================================================================== diff -u -rb69745e3ecfe9e95e9a48ce240c9837117050e6c -r0f5513cd0b35c79689a0d04b967ea340577889e8 --- generic/nsf.c (.../nsf.c) (revision b69745e3ecfe9e95e9a48ce240c9837117050e6c) +++ generic/nsf.c (.../nsf.c) (revision 0f5513cd0b35c79689a0d04b967ea340577889e8) @@ -241,7 +241,7 @@ /* prototypes for call stack specific calls */ NSF_INLINE static void CscInit(NsfCallStackContent *cscPtr, NsfObject *object, NsfClass *cl, Tcl_Command cmd, int frameType, int flags); -NSF_INLINE static void CscFinish(Tcl_Interp *interp, NsfCallStackContent *cscPtr /*, char *string*/); +NSF_INLINE static void CscFinish_(Tcl_Interp *interp, NsfCallStackContent *cscPtr); NSF_INLINE static void CallStackDoDestroy(Tcl_Interp *interp, NsfObject *object); /* prototypes for parameter and argument management */ @@ -6380,7 +6380,7 @@ result = ObjectDispatchFinalize(interp, cscPtr, result /*, "NRE" , methodName*/); #endif - CscFinish(interp, cscPtr /*, "scripted finalize"*/); + CscFinish(interp, cscPtr, "scripted finalize"); } return result; @@ -6466,7 +6466,7 @@ */ #if defined(NRE) //CscListRemove(interp, cscPtr); - CscFinish(interp, cscPtr /*, "guard failed"*/); + CscFinish(interp, cscPtr, "guard failed"); #endif return result; } @@ -6541,7 +6541,7 @@ #endif } else /* result != OK */ { #if defined(NRE) - CscFinish(interp, cscPtr /*, "nre, prep failed"*/); + CscFinish(interp, cscPtr, "nre, prep failed"); #endif } @@ -6880,11 +6880,11 @@ #if defined(NRE) if ((cscPtr->flags & NSF_CSC_CALL_IS_NRE) == 0) { CscListRemove(interp, cscPtr); - CscFinish(interp, cscPtr /*, "csc cleanup"*/); + CscFinish(interp, cscPtr, "csc cleanup"); } #else CscListRemove(interp, cscPtr); - CscFinish(interp, cscPtr /*, "csc cleanup" */); + CscFinish(interp, cscPtr, "csc cleanup"); #endif return result; @@ -7233,7 +7233,7 @@ if (!(cscPtr->flags & NSF_CSC_CALL_IS_NRE)) { result = ObjectDispatchFinalize(interp, cscPtr, result /*, "immediate" , methodName*/); CscListRemove(interp, cscPtr); - CscFinish(interp, cscPtr /*, "non-scripted finalize"*/); + CscFinish(interp, cscPtr, "non-scripted finalize"); } /*fprintf(stderr, "ObjectDispatch %s.%s returns %d\n", @@ -14772,7 +14772,7 @@ */ Nsf_PopFrameCsc(interp, framePtr2); CscListRemove(interp, cscPtr); - CscFinish(interp, cscPtr /*, "converter object frame"*/); + CscFinish(interp, cscPtr, "converter object frame"); Tcl_Interp_varFramePtr(interp) = varFramePtr; /*fprintf(stderr, "NsfOConfigureMethod_ attribute %s evaluated %s => (%d)\n", Index: generic/nsf.h =================================================================== diff -u -rb69745e3ecfe9e95e9a48ce240c9837117050e6c -r0f5513cd0b35c79689a0d04b967ea340577889e8 --- generic/nsf.h (.../nsf.h) (revision b69745e3ecfe9e95e9a48ce240c9837117050e6c) +++ generic/nsf.h (.../nsf.h) (revision 0f5513cd0b35c79689a0d04b967ea340577889e8) @@ -133,10 +133,15 @@ # define NsfCleanupObject(object,string) \ /*fprintf(stderr, "NsfCleanupObject %p %s\n",object,string);*/ \ NsfCleanupObject_(object); +# define CscFinish(interp,cscPtr,string) \ + /*fprintf(stderr, "CscFinish %p %s\n",cscPtr,string);*/ \ + CscFinish_(interp, cscPtr); #else # define NDEBUG 1 # define NsfCleanupObject(object,string) \ NsfCleanupObject_(object); +# define CscFinish(interp,cscPtr,string) \ + CscFinish_(interp, cscPtr); #endif Index: generic/nsfStack.c =================================================================== diff -u -rb9a25a66a1e81fe208cac08f93c12b23eacc6ecd -r0f5513cd0b35c79689a0d04b967ea340577889e8 --- generic/nsfStack.c (.../nsfStack.c) (revision b9a25a66a1e81fe208cac08f93c12b23eacc6ecd) +++ generic/nsfStack.c (.../nsfStack.c) (revision 0f5513cd0b35c79689a0d04b967ea340577889e8) @@ -748,7 +748,7 @@ /* Mask out IS_NRE, since Tcl_PopCallFrame takes care about TclStackFree */ cscPtr->flags &= ~NSF_CSC_CALL_IS_NRE; #endif - CscFinish(interp, cscPtr /*, "popall"*/); + CscFinish(interp, cscPtr, "popall"); } else if (frameFlags & FRAME_IS_NSF_OBJECT) { Tcl_CallFrame_varTablePtr(framePtr) = NULL; } @@ -766,7 +766,7 @@ unstackedEntries = unstackedEntries->nextPtr, count ++) { NsfCallStackContent *cscPtr = (NsfCallStackContent *)unstackedEntries->cl; CscListRemove(interp, cscPtr); - CscFinish(interp, cscPtr /*, "unwind"*/); + CscFinish(interp, cscPtr, "unwind"); } if (count>0) { @@ -911,7 +911,7 @@ *---------------------------------------------------------------------- */ NSF_INLINE static void -CscFinish(Tcl_Interp *interp, NsfCallStackContent *cscPtr /*, char *msg*/) { +CscFinish_(Tcl_Interp *interp, NsfCallStackContent *cscPtr) { int allowDestroy = RUNTIME_STATE(interp)->exitHandlerDestroyRound != NSF_EXITHANDLER_ON_SOFT_DESTROY; NsfObject *object; @@ -923,7 +923,7 @@ object = cscPtr->self; flags = cscPtr->flags; - /*fprintf(stderr, "CscFinish %p (%s) object %p %s flags %.6x cmdPtr %p\n",cscPtr, msg, + /*fprintf(stderr, "CscFinish %p object %p %s flags %.6x cmdPtr %p\n",cscPtr, object, objectName(object), flags, cscPtr->cmdPtr);*/ /*