Index: generic/nsf.c =================================================================== diff -u -racee8b7e28b039561a19ca8ea07880a83b07d979 -r67efaa622731c55726f20c509a775303bb99f4ff --- generic/nsf.c (.../nsf.c) (revision acee8b7e28b039561a19ca8ea07880a83b07d979) +++ generic/nsf.c (.../nsf.c) (revision 67efaa622731c55726f20c509a775303bb99f4ff) @@ -25655,21 +25655,23 @@ static int NsfMethodPropertyCmd(Tcl_Interp *interp, NsfObject *object, int withPer_object, Tcl_Obj *methodObj, int methodproperty, Tcl_Obj *valueObj) { - const char *methodName = ObjStr(methodObj); - NsfObject *defObject; - Tcl_Command cmd; - NsfClass *cl = withPer_object == 0 && NsfObjectIsClass(object) ? (NsfClass *)object : NULL; - int fromClassNS = cl != NULL; - unsigned int flag; + NsfObject *defObject; + Tcl_Command cmd; + NsfClass *cl; + int fromClassNS; + unsigned int flag; nonnull_assert(interp != NULL); nonnull_assert(object != NULL); nonnull_assert(methodObj != NULL); + cl = withPer_object == 0 && NsfObjectIsClass(object) ? (NsfClass *)object : NULL; + fromClassNS = (cl != NULL); + cmd = ResolveMethodName(interp, (cl != NULL) ? cl->nsPtr : object->nsPtr, methodObj, NULL, NULL, &defObject, NULL, &fromClassNS); /*fprintf(stderr, "methodProperty for method '%s' prop %d value %s => cl %p cmd %p\n", - methodName, methodproperty, (valueObj != NULL) ? ObjStr(valueObj) : "NULL", cl, cmd);*/ + ObjStr(methodObj), methodproperty, (valueObj != NULL) ? ObjStr(valueObj) : "NULL", cl, cmd);*/ if (unlikely(cmd == NULL)) { @@ -25679,7 +25681,7 @@ } else { return NsfPrintError(interp, "cannot lookup %s method '%s' for %s", cl == NULL ? "object " : "", - methodName, ObjectName_(object)); + ObjStr(methodObj), ObjectName_(object)); } } @@ -25784,7 +25786,7 @@ /* acquire new paramDefs */ paramDefs = ParamDefsNew(); ParamDefsStore(interp, cmd, paramDefs, 0); - /*fprintf(stderr, "new param definitions %p for cmd %p %s\n", paramDefs, cmd, methodName);*/ + /*fprintf(stderr, "new param definitions %p for cmd %p %s\n", paramDefs, cmd, ObjStr(methodObj));*/ } objPtr = ¶mDefs->returns; @@ -29033,12 +29035,14 @@ static int NsfCAllocMethod_(Tcl_Interp *interp, NsfClass *cl, Tcl_Obj *nameObj, Tcl_Namespace *parentNsPtr) { - const char *nameString = ObjStr(nameObj); - NsfObject *newObj; + const char *nameString; + NsfObject *newObj; nonnull_assert(interp != NULL); nonnull_assert(cl != NULL); nonnull_assert(nameObj != NULL); + + nameString = ObjStr(nameObj); assert(isAbsolutePath(nameString)); assert(NSValidObjectName(nameString, 0) != 0); Index: generic/nsfDebug.c =================================================================== diff -u -r183cd0a9a3d2a37133ac51bb86952e1b522dbf6f -r67efaa622731c55726f20c509a775303bb99f4ff --- generic/nsfDebug.c (.../nsfDebug.c) (revision 183cd0a9a3d2a37133ac51bb86952e1b522dbf6f) +++ generic/nsfDebug.c (.../nsfDebug.c) (revision 67efaa622731c55726f20c509a775303bb99f4ff) @@ -115,12 +115,13 @@ void NsfStackDump(Tcl_Interp *interp) { - Interp *iPtr = (Interp *)interp; + Interp *iPtr; CallFrame *f, *v; Tcl_Obj *varCmdObj; nonnull_assert(interp != NULL); + iPtr = (Interp *)interp; f = iPtr->framePtr; v = iPtr->varFramePtr; varCmdObj = Tcl_NewObj(); Index: generic/nsfProfile.c =================================================================== diff -u -r6d1f42a22be5e03d1d3932f5404f62e5ad440ee7 -r67efaa622731c55726f20c509a775303bb99f4ff --- generic/nsfProfile.c (.../nsfProfile.c) (revision 6d1f42a22be5e03d1d3932f5404f62e5ad440ee7) +++ generic/nsfProfile.c (.../nsfProfile.c) (revision 67efaa622731c55726f20c509a775303bb99f4ff) @@ -664,22 +664,25 @@ */ void NsfProfileRecordMethodData(Tcl_Interp *interp, NsfCallStackContent *cscPtr) { - NsfRuntimeState *rst = RUNTIME_STATE(interp); - double totalMicroSec; - NsfObject *obj = cscPtr->self; - NsfClass *cl = cscPtr->cl; - Tcl_DString methodKey, objectKey, methodInfo; - NsfProfile *profilePtr = &rst->profile; - struct timeval trt; + NsfRuntimeState *rst; + double totalMicroSec; + NsfObject *obj; + NsfClass *cl; + Tcl_DString methodKey, objectKey, methodInfo; + NsfProfile *profilePtr; + struct timeval trt; nonnull_assert(interp != NULL); nonnull_assert(cscPtr != NULL); gettimeofday(&trt, NULL); + rst = RUNTIME_STATE(interp); + profilePtr = &rst->profile; totalMicroSec = (trt.tv_sec - cscPtr->startSec) * 1000000 + (trt.tv_usec - cscPtr->startUsec); profilePtr->overallTime += totalMicroSec; + obj = cscPtr->self; if (obj->teardown == 0 || !obj->id) { return; } @@ -689,6 +692,7 @@ Tcl_DStringInit(&methodInfo); Tcl_DStringInit(&methodKey); + cl = cscPtr->cl; NsfProfileMethodLabel(&methodInfo, cl, cscPtr->methodName); if (rst->doTrace) {