Index: generic/nsf.c =================================================================== diff -u -r8ac4f64a1364f7a40221a96378f7167322909abc -r165e176da4993b45346e7a38d9405a5b0d80d4ec --- generic/nsf.c (.../nsf.c) (revision 8ac4f64a1364f7a40221a96378f7167322909abc) +++ generic/nsf.c (.../nsf.c) (revision 165e176da4993b45346e7a38d9405a5b0d80d4ec) @@ -18850,79 +18850,6 @@ /* *---------------------------------------------------------------------- - * FindSelfNext -- - * - * This function is called via [current nextmethod] to set the result of the - * interp to the method which would be called by [next]. If there are more - * shadowed methods along the precedence path, it sets the result of the - * next method in form of a method handle. If there are no more shadowed - * procs, the result is set to empty. - * - * Results: - * Tcl return code - * - * Side effects: - * Set Tcl result. - * - *---------------------------------------------------------------------- - */ - -static int FindSelfNext(Tcl_Interp *interp) nonnull(1); - -static int -FindSelfNext(Tcl_Interp *interp) { - NsfCallStackContent *cscPtr; - int result; - Tcl_CallFrame *framePtr; - - nonnull_assert(interp != NULL); - - cscPtr = CallStackGetTopFrame(interp, &framePtr); - - if (unlikely(cscPtr == NULL)) { - result = NsfPrintError(interp, "called outside NSF scope"); - - } else { - Tcl_Command cmd = NULL, currentCmd = NULL; - const char *lookupMethodName, *methodName; - int isEnsemble = (cscPtr->frameType & NSF_CSC_TYPE_ENSEMBLE) != 0u; - - Tcl_ResetResult(interp); - - methodName = Tcl_GetCommandName(interp, cscPtr->cmdPtr); - if (isEnsemble) { - NsfCallStackContent *cscPtr1 = CallStackFindEnsembleCsc(framePtr, &framePtr); - - lookupMethodName = MethodName(cscPtr1->objv[0]); - } else { - lookupMethodName = methodName; - } - - if (lookupMethodName == NULL) { - /* - * In case, we do not find the command, we return OK. Why? - */ - result = TCL_OK; - } else { - int isMixinEntry = 0, isFilterEntry = 0, endOfFilterChain = 0; - NsfClass *cl = cscPtr->cl; - NsfObject *object = cscPtr->self; - - result = NextSearchMethod(object, interp, cscPtr, &cl, &lookupMethodName, &cmd, - &isMixinEntry, &isFilterEntry, &endOfFilterChain, ¤tCmd); - if (cmd != NULL) { - methodName = isEnsemble ? ObjStr(NsfMethodNamePath(interp, framePtr, methodName)) : lookupMethodName; - Tcl_SetObjResult(interp, MethodHandleObj((cl != NULL) ? (NsfObject *)cl : object, - cl == NULL, methodName)); - } - } - } - return result; -} - - -/* - *---------------------------------------------------------------------- * FindNextMethod -- * * This function is called via [current nextmethod] to resolve the method