Index: generic/nsf.c =================================================================== diff -u -r22741a6333a986af0a38983a0d06580f1a0103e5 -r2076cebc74107d25878e6a95688db6b444fd6b0e --- generic/nsf.c (.../nsf.c) (revision 22741a6333a986af0a38983a0d06580f1a0103e5) +++ generic/nsf.c (.../nsf.c) (revision 2076cebc74107d25878e6a95688db6b444fd6b0e) @@ -91,16 +91,16 @@ typedef enum { CALLING_LEVEL, ACTIVE_LEVEL } CallStackLevel; typedef struct callFrameContext { - int frameSaved; Tcl_CallFrame *framePtr; Tcl_CallFrame *varFramePtr; + int frameSaved; } callFrameContext; typedef struct NsfProcContext { - ClientData oldDeleteData; + ClientData oldDeleteData; Tcl_CmdDeleteProc *oldDeleteProc; - NsfParamDefs *paramDefs; - unsigned int checkAlwaysFlag; + NsfParamDefs *paramDefs; + unsigned int checkAlwaysFlag; } NsfProcContext; /* @@ -119,23 +119,23 @@ } SetterCmdClientData; typedef struct ForwardCmdClientData { - NsfObject *object; - Tcl_Obj *cmdName; + NsfObject *object; + Tcl_Obj *cmdName; Tcl_ObjCmdProc *objProc; - ClientData clientData; - int passthrough; - int needobjmap; - int verbose; - int hasNonposArgs; - int nr_args; - Tcl_Obj *args; - int frame; + ClientData clientData; + int passthrough; + int needobjmap; + int verbose; + int hasNonposArgs; + Tcl_Obj *args; + int nr_args; + int frame; #if defined(NSF_FORWARD_WITH_ONERROR) - Tcl_Obj *onerror; + Tcl_Obj *onerror; #endif - Tcl_Obj *prefix; - int nr_subcommands; - Tcl_Obj *subcommands; + Tcl_Obj *prefix; + Tcl_Obj *subcommands; + int nr_subcommands; } ForwardCmdClientData; typedef struct AliasCmdClientData { @@ -156,9 +156,9 @@ */ #ifdef NSF_MEM_COUNT typedef struct NsfNamespaceClientData { - NsfObject *object; + NsfObject *object; Tcl_Namespace *nsPtr; - Tcl_Interp *interp; + Tcl_Interp *interp; } NsfNamespaceClientData; #endif @@ -168,18 +168,18 @@ #define PARSE_CONTEXT_PREALLOC 20 typedef struct { - unsigned int status; ClientData *clientData; /* 4 members pointer to the actual parse context data */ Tcl_Obj **objv; Tcl_Obj **full_objv; /* contains method as well */ unsigned int *flags; ClientData clientData_static[PARSE_CONTEXT_PREALLOC]; /* 3 members preallocated parse context data */ Tcl_Obj *objv_static[PARSE_CONTEXT_PREALLOC+1]; unsigned int flags_static[PARSE_CONTEXT_PREALLOC+1]; + unsigned int status; int lastObjc; /* points to the first "unprocessed" argument */ int objc; - int varArgs; /* does the parameter end with some kind of "args" */ NsfObject *object; + int varArgs; /* does the parameter end with some kind of "args" */ } ParseContext; static Nsf_TypeConverter ConvertToNothing, ConvertViaCmd, ConvertToObjpattern; @@ -2493,7 +2493,7 @@ baseClass->order = pl; if (unlikely(cl == baseClass)) { - const register NsfClasses *pc; + register const NsfClasses *pc; for (pc = cl->order; pc != NULL; pc = pc->nextPtr) { pc->cl->color = WHITE; @@ -22728,12 +22728,12 @@ */ Nsf_methodDefinition *mdPtr = Nsf_CmdDefinitionGet(((Command *)cmd)->objProc); if (mdPtr != NULL) { - NsfParamDefs localParamDefs = {mdPtr->paramDefs, mdPtr->nrParameters, 1, 0, NULL}; - Tcl_Obj *list = ListParamDefs(interp, localParamDefs.paramsPtr, contextObject, pattern, printStyle); + NsfParamDefs localParamDefs = {mdPtr->paramDefs, mdPtr->nrParameters, 1, NULL, 0}; + Tcl_Obj *list = ListParamDefs(interp, localParamDefs.paramsPtr, contextObject, pattern, printStyle); - Tcl_SetObjResult(interp, list); - DECR_REF_COUNT2("paramDefsObj", list); - return TCL_OK; + Tcl_SetObjResult(interp, list); + DECR_REF_COUNT2("paramDefsObj", list); + return TCL_OK; } } @@ -29146,7 +29146,7 @@ static int NsfOInstvarMethod(Tcl_Interp *interp, NsfObject *object, int objc, Tcl_Obj *CONST objv[]) { - callFrameContext ctx = {0, NULL, NULL}; + callFrameContext ctx = {NULL, NULL, 0}; int result; nonnull_assert(interp != NULL); @@ -29436,7 +29436,7 @@ Tcl_Obj *frameInfoObj = NULL; int i, result = TCL_ERROR; const char *frameInfo; - callFrameContext ctx = {0, NULL, NULL}; + callFrameContext ctx = {NULL, NULL, 0}; nonnull_assert(interp != NULL); nonnull_assert(object != NULL); @@ -29479,7 +29479,7 @@ int result = TCL_ERROR; Tcl_Obj *objPtr; const char *fullName, *vn; - callFrameContext ctx = {0, NULL, NULL}; + callFrameContext ctx = {NULL, NULL, 0}; nonnull_assert(interp != NULL); nonnull_assert(object != NULL); Index: generic/nsf.h =================================================================== diff -u -r878a74b68b15d4ee5c33d345e670f50ce7473ebc -r2076cebc74107d25878e6a95688db6b444fd6b0e --- generic/nsf.h (.../nsf.h) (revision 878a74b68b15d4ee5c33d345e670f50ce7473ebc) +++ generic/nsf.h (.../nsf.h) (revision 2076cebc74107d25878e6a95688db6b444fd6b0e) @@ -462,10 +462,10 @@ */ typedef struct Nsf_methodDefinition { - const char *methodName; + const char *methodName; Tcl_ObjCmdProc *proc; - int nrParameters; - Nsf_Param paramDefs[12]; + int nrParameters; + Nsf_Param paramDefs[12]; } Nsf_methodDefinition; /* Index: generic/nsfInt.h =================================================================== diff -u -r84a4722d451c6724abd6e51bfb6d1abdeb61e2ff -r2076cebc74107d25878e6a95688db6b444fd6b0e --- generic/nsfInt.h (.../nsfInt.h) (revision 84a4722d451c6724abd6e51bfb6d1abdeb61e2ff) +++ generic/nsfInt.h (.../nsfInt.h) (revision 2076cebc74107d25878e6a95688db6b444fd6b0e) @@ -541,8 +541,8 @@ Nsf_Param *paramsPtr; int nrParams; int refCount; - int serial; Tcl_Obj *returns; + int serial; } NsfParamDefs; typedef struct NsfParsedParam { @@ -555,11 +555,11 @@ NsfCmdList *objFilters; NsfCmdList *objMixins; ClientData clientData; + const char *volatileVarName; #if defined(PER_OBJECT_PARAMETER_CACHING) NsfParsedParam *parsedParamPtr; int classParamPtrEpoch; #endif - CONST char *volatileVarName; CheckOptions checkoptions; } NsfObjectOpt; @@ -595,21 +595,21 @@ } NsfClassOpt; typedef struct NsfClass { - struct NsfObject object; - struct NsfClasses *super; - struct NsfClasses *sub; + struct NsfObject object; + struct NsfClasses *super; + struct NsfClasses *sub; struct NsfObjectSystem *osPtr; - struct NsfClasses *order; - Tcl_HashTable instances; - Tcl_Namespace *nsPtr; - NsfParsedParam *parsedParamPtr; - NsfClassOpt *opt; - short color; + struct NsfClasses *order; + Tcl_HashTable instances; + Tcl_Namespace *nsPtr; + NsfParsedParam *parsedParamPtr; + NsfClassOpt *opt; + short color; } NsfClass; typedef struct NsfClasses { - struct NsfClass *cl; - ClientData clientData; + struct NsfClass *cl; + ClientData clientData; struct NsfClasses *nextPtr; } NsfClasses; @@ -620,12 +620,12 @@ #define NSF_PROC_FLAG_CHECK_ALWAYS 0x02u typedef struct NsfProcClientData { - Tcl_Obj *procName; - Tcl_Command cmd; - Tcl_Command wrapperCmd; - NsfParamDefs *paramDefs; - unsigned int flags; + Tcl_Obj *procName; + Tcl_Command cmd; + Tcl_Command wrapperCmd; + NsfParamDefs *paramDefs; Tcl_Namespace *origNsPtr; + unsigned int flags; } NsfProcClientData; typedef enum SystemMethodsIdx { @@ -800,12 +800,12 @@ Tcl_Obj *CONST* objv; int objc; unsigned int flags; - unsigned short frameType; #if defined(NSF_PROFILE) || defined(NSF_DTRACE) long int startUsec; long int startSec; CONST char *methodName; #endif + unsigned short frameType; } NsfCallStackContent; #define NSF_CSC_TYPE_PLAIN 0u @@ -884,9 +884,9 @@ Tcl_DString traceDs; int depth; int verbose; - int inmemory; Tcl_Obj *shadowedObjs; NsfShadowTclCommandInfo *shadowedTi; + int inmemory; } NsfProfile; # define NSF_PROFILE_TIME_DATA struct Tcl_Time profile_trt @@ -920,6 +920,7 @@ #if defined(PER_OBJECT_PARAMETER_CACHING) int classParamPtrEpoch; #endif + unsigned int overloadedMethods; /* bitarray for tracking overloaded methods */ Tcl_Obj **methodObjNames; /* global objects of nsf */ struct NsfShadowTclCommandInfo *tclCommands; /* shadowed Tcl commands */ @@ -928,7 +929,6 @@ #endif int errorCount; /* keep track of number of errors to avoid potential error loops */ int unknown; /* keep track whether an unknown method is currently called */ - unsigned int overloadedMethods; /* bitarray for tracking overloaded methods */ /* * Configure options. The following do*-flags could be moved into a * bitarray, but we have only one state per interp, so the win on @@ -945,13 +945,9 @@ unsigned int preventRecursionFlags; int doClassConverterOmitUnkown; int doSoftrecreate; - /* keep track of defined filters */ - Tcl_HashTable activeFilterTablePtr; + int exitHandlerDestroyRound; /* shutdown handling */ - /* - * shutdown handling - */ - int exitHandlerDestroyRound; + Tcl_HashTable activeFilterTablePtr; /* keep track of defined filters */ #if defined(NSF_PROFILE) NsfProfile profile; @@ -960,9 +956,9 @@ void *bottomOfStack; void *maxStack; #endif + ClientData clientData; NsfStringIncrStruct iss; /* used for new to create new symbols */ short guardCount; /* keep track of guard invocations */ - ClientData clientData; } NsfRuntimeState; #define NSF_EXITHANDLER_OFF 0 @@ -1179,10 +1175,10 @@ unsigned int flags); typedef struct { CONST Nsf_Param *signature; - int serial; Nsf_Param CONST *paramPtr; - Tcl_Obj *payload; - unsigned int flags; + Tcl_Obj *payload; + int serial; + unsigned int flags; } NsfFlag; #define NSF_FLAG_DASHDAH 0x01 @@ -1207,10 +1203,10 @@ typedef struct { - void *context; - int methodEpoch; - Tcl_Command cmd; - NsfClass *cl; + void *context; + Tcl_Command cmd; + NsfClass *cl; + int methodEpoch; unsigned int flags; } NsfMethodContext; Index: generic/nsfProfile.c =================================================================== diff -u -r5447fe00e31b5937ec5df0d14bce7f33e0568b3e -r2076cebc74107d25878e6a95688db6b444fd6b0e --- generic/nsfProfile.c (.../nsfProfile.c) (revision 5447fe00e31b5937ec5df0d14bce7f33e0568b3e) +++ generic/nsfProfile.c (.../nsfProfile.c) (revision 2076cebc74107d25878e6a95688db6b444fd6b0e) @@ -451,8 +451,8 @@ if (Tcl_ListObjGetElements(interp, builtinObjs, &oc, &ov) != TCL_OK) { NsfLog(interp, NSF_LOG_WARN, "nsfprofile: argument '%s' is not a list of commands", ObjStr(builtinObjs)); } else { - NsfShadowTclCommandInfo *ti = NEW_ARRAY(NsfShadowTclCommandInfo, oc); int i; + NsfShadowTclCommandInfo *ti = NEW_ARRAY(NsfShadowTclCommandInfo, oc); for (i = 0; i < oc; i++) { int nrArgs = 0;