Index: TODO =================================================================== diff -u -r7a7a3fd2c6a87751e29436786910fd5b9c550d1c -rb68d232ea609ee60060b451c02350dd210c11441 --- TODO (.../TODO) (revision 7a7a3fd2c6a87751e29436786910fd5b9c550d1c) +++ TODO (.../TODO) (revision b68d232ea609ee60060b451c02350dd210c11441) @@ -2856,6 +2856,15 @@ * added profiling support for nsf::proc when NSF_INVOKE_SHADOWED_TRADITIONAL is turned off. + +- removal of unneeded flags "-incontext" and "-nomixins" from + * /obj/ info methods + * /cls/ info methods + These flags are correct for "info lookup", but unneeded for + "info methods" ++ cleanup of ListDefinedMethods() + + TODO: - add explicit regression tests for disposition + types - check refcounting for dispo+types @@ -2882,8 +2891,6 @@ This is not nice in the mongo case, where one has "mongo_ns", "mongo_db" and "mongo_collection" which are related variables. -- how to delete attributes? - - Higher binary compatibility for future versions: * It is not nice to have the full Nsf_Param structure in nsf.h (required for Nsf_methodDefinition in the c code generator) @@ -2938,7 +2945,6 @@ - are the oneline hook definitions like Class protected class-object method __unknown {name} {} needed? -- ListDefinedMethods noMixins and inContext not defined yet. - nsf::proc * check, if there are parameter types that should not be applicable Index: generic/gentclAPI.decls =================================================================== diff -u -rf4c75b01b24269f7a531ffcffed29d2acfbdbe91 -rb68d232ea609ee60060b451c02350dd210c11441 --- generic/gentclAPI.decls (.../gentclAPI.decls) (revision f4c75b01b24269f7a531ffcffed29d2acfbdbe91) +++ generic/gentclAPI.decls (.../gentclAPI.decls) (revision b68d232ea609ee60060b451c02350dd210c11441) @@ -333,9 +333,7 @@ } objectInfoMethod methods NsfObjInfoMethodsMethod { {-argName "-callprotection" -nrargs 1 -type "all|protected|public" -default public} - {-argName "-incontext"} {-argName "-methodtype" -nrargs 1 -type "all|scripted|builtin|alias|forwarder|object|setter|nsfproc"} - {-argName "-nomixins"} {-argName "-path"} {-argName "pattern" -required 0} } @@ -390,9 +388,7 @@ } classInfoMethod methods NsfClassInfoMethodsMethod { {-argName "-callprotection" -nrargs 1 -type "all|protected|public" -default public} - {-argName "-incontext"} {-argName "-methodtype" -nrargs 1 -type "all|scripted|builtin|alias|forwarder|object|setter|nsfproc"} - {-argName "-nomixins"} {-argName "-path"} {-argName "pattern"} } Index: generic/nsf.c =================================================================== diff -u -r2ce5a2cab4731930a5b26455c56806fc201de23c -rb68d232ea609ee60060b451c02350dd210c11441 --- generic/nsf.c (.../nsf.c) (revision 2ce5a2cab4731930a5b26455c56806fc201de23c) +++ generic/nsf.c (.../nsf.c) (revision b68d232ea609ee60060b451c02350dd210c11441) @@ -275,7 +275,7 @@ static int SetInstVar(Tcl_Interp *interp, NsfObject *object, Tcl_Obj *nameObj, Tcl_Obj *valueObj); static int ListDefinedMethods(Tcl_Interp *interp, NsfObject *object, CONST char *pattern, int withPer_object, int methodType, int withCallproctection, - int withExpand, int noMixins, int inContext); + int withExpand); static int NextSearchAndInvoke(Tcl_Interp *interp, CONST char *methodName, int objc, Tcl_Obj *CONST objv[], NsfCallStackContent *cscPtr, int freeArgumentVector); @@ -14812,7 +14812,7 @@ NsfObject *subObject = NsfGetObjectFromCmdPtr(cmd); if (subObject) { return ListDefinedMethods(interp, subObject, NULL, 1 /* per-object */, - NSF_METHODTYPE_ALL, CallprotectionAllIdx, 0, 1, 0); + NSF_METHODTYPE_ALL, CallprotectionAllIdx, 0); } } /* all other cases return emtpy */ @@ -15405,7 +15405,7 @@ * * List the methods defined by the specified object/class * according to the filtering options (types, pattern, - * pretection, etc.). The result is placed into the interp + * protection, etc.). The result is placed into the interp * result. * * Results: @@ -15419,7 +15419,7 @@ static int ListDefinedMethods(Tcl_Interp *interp, NsfObject *object, CONST char *pattern, int withPer_object, int methodType, int withCallproctection, - int withExpand, int noMixins, int inContext) { + int withExpand) { Tcl_HashTable *cmdTablePtr; Tcl_DString ds, *dsPtr = NULL; @@ -19640,24 +19640,20 @@ /* objectInfoMethod methods NsfObjInfoMethodsMethod { {-argName "-callprotection" -nrargs 1 -type "all|protected|public" -default public} - {-argName "-incontext"} {-argName "-methodtype" -nrargs 1 -type "all|scripted|builtin|alias|forwarder|object|setter"} - {-argName "-nomixins"} {-argName "-path"} {-argName "pattern"} } */ static int NsfObjInfoMethodsMethod(Tcl_Interp *interp, NsfObject *object, int withCallproctection, - int withIncontext, int withMethodtype, - int withNomixins, int withPath, CONST char *pattern) { return ListDefinedMethods(interp, object, pattern, 1 /* per-object */, AggregatedMethodType(withMethodtype), withCallproctection, - withPath, withNomixins, withIncontext); + withPath); } /* @@ -19942,24 +19938,20 @@ /* classInfoMethod methods NsfClassInfoMethodsMethod { {-argName "-callprotection" -nrargs 1 -type "all|protected|public" -default public} - {-argName "-incontext"} {-argName "-methodtype" -nrargs 1 -type "all|scripted|builtin|alias|forwarder|object|setter"} - {-argName "-nomixins"} {-argName "-path"} {-argName "pattern"} } */ static int NsfClassInfoMethodsMethod(Tcl_Interp *interp, NsfClass *class, int withCallproctection, - int withIncontext, int withMethodtype, - int withNomixins, int withPath, CONST char *pattern) { return ListDefinedMethods(interp, &class->object, pattern, 0 /* per-object */, AggregatedMethodType(withMethodtype), withCallproctection, - withPath, withNomixins, withIncontext); + withPath); } /* Index: generic/tclAPI.h =================================================================== diff -u -r3a246dd237252e81aa7f4a37cba2affb0b9ecf00 -rb68d232ea609ee60060b451c02350dd210c11441 --- generic/tclAPI.h (.../tclAPI.h) (revision 3a246dd237252e81aa7f4a37cba2affb0b9ecf00) +++ generic/tclAPI.h (.../tclAPI.h) (revision b68d232ea609ee60060b451c02350dd210c11441) @@ -304,7 +304,7 @@ static int NsfClassInfoHeritageMethod(Tcl_Interp *interp, NsfClass *cl, CONST char *pattern); static int NsfClassInfoInstancesMethod(Tcl_Interp *interp, NsfClass *cl, int withClosure, CONST char *patternString, NsfObject *patternObj); static int NsfClassInfoMethodMethod(Tcl_Interp *interp, NsfClass *cl, int infomethodsubcmd, Tcl_Obj *name); -static int NsfClassInfoMethodsMethod(Tcl_Interp *interp, NsfClass *cl, int withCallprotection, int withIncontext, int withMethodtype, int withNomixins, int withPath, CONST char *pattern); +static int NsfClassInfoMethodsMethod(Tcl_Interp *interp, NsfClass *cl, int withCallprotection, int withMethodtype, int withPath, CONST char *pattern); static int NsfClassInfoMixinOfMethod(Tcl_Interp *interp, NsfClass *cl, int withClosure, int withScope, CONST char *patternString, NsfObject *patternObj); static int NsfClassInfoMixinclassesMethod(Tcl_Interp *interp, NsfClass *cl, int withClosure, int withGuards, int withHeritage, CONST char *patternString, NsfObject *patternObj); static int NsfClassInfoMixinguardMethod(Tcl_Interp *interp, NsfClass *cl, CONST char *mixin); @@ -376,7 +376,7 @@ static int NsfObjInfoLookupMethodsMethod(Tcl_Interp *interp, NsfObject *obj, int withCallprotection, int withIncontext, int withMethodtype, int withNomixins, int withPath, int withSource, CONST char *pattern); static int NsfObjInfoLookupSlotsMethod(Tcl_Interp *interp, NsfObject *obj, int withSource, NsfClass *withType, CONST char *pattern); static int NsfObjInfoMethodMethod(Tcl_Interp *interp, NsfObject *obj, int infomethodsubcmd, Tcl_Obj *name); -static int NsfObjInfoMethodsMethod(Tcl_Interp *interp, NsfObject *obj, int withCallprotection, int withIncontext, int withMethodtype, int withNomixins, int withPath, CONST char *pattern); +static int NsfObjInfoMethodsMethod(Tcl_Interp *interp, NsfObject *obj, int withCallprotection, int withMethodtype, int withPath, CONST char *pattern); static int NsfObjInfoMixinclassesMethod(Tcl_Interp *interp, NsfObject *obj, int withGuards, int withHeritage, CONST char *patternString, NsfObject *patternObj); static int NsfObjInfoMixinguardMethod(Tcl_Interp *interp, NsfObject *obj, CONST char *mixin); static int NsfObjInfoParentMethod(Tcl_Interp *interp, NsfObject *obj); @@ -770,14 +770,12 @@ return TCL_ERROR; } else { int withCallprotection = (int )PTR2INT(pc.clientData[0]); - int withIncontext = (int )PTR2INT(pc.clientData[1]); - int withMethodtype = (int )PTR2INT(pc.clientData[2]); - int withNomixins = (int )PTR2INT(pc.clientData[3]); - int withPath = (int )PTR2INT(pc.clientData[4]); - CONST char *pattern = (CONST char *)pc.clientData[5]; + int withMethodtype = (int )PTR2INT(pc.clientData[1]); + int withPath = (int )PTR2INT(pc.clientData[2]); + CONST char *pattern = (CONST char *)pc.clientData[3]; assert(pc.status == 0); - return NsfClassInfoMethodsMethod(interp, cl, withCallprotection, withIncontext, withMethodtype, withNomixins, withPath, pattern); + return NsfClassInfoMethodsMethod(interp, cl, withCallprotection, withMethodtype, withPath, pattern); } } @@ -2149,14 +2147,12 @@ return TCL_ERROR; } else { int withCallprotection = (int )PTR2INT(pc.clientData[0]); - int withIncontext = (int )PTR2INT(pc.clientData[1]); - int withMethodtype = (int )PTR2INT(pc.clientData[2]); - int withNomixins = (int )PTR2INT(pc.clientData[3]); - int withPath = (int )PTR2INT(pc.clientData[4]); - CONST char *pattern = (CONST char *)pc.clientData[5]; + int withMethodtype = (int )PTR2INT(pc.clientData[1]); + int withPath = (int )PTR2INT(pc.clientData[2]); + CONST char *pattern = (CONST char *)pc.clientData[3]; assert(pc.status == 0); - return NsfObjInfoMethodsMethod(interp, obj, withCallprotection, withIncontext, withMethodtype, withNomixins, withPath, pattern); + return NsfObjInfoMethodsMethod(interp, obj, withCallprotection, withMethodtype, withPath, pattern); } } @@ -2342,11 +2338,9 @@ {"infomethodsubcmd", 0|NSF_ARG_IS_ENUMERATION, 0, ConvertToInfomethodsubcmd, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}, {"name", NSF_ARG_REQUIRED, 0, Nsf_ConvertToTclobj, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}} }, -{"::nsf::methods::class::info::methods", NsfClassInfoMethodsMethodStub, 6, { +{"::nsf::methods::class::info::methods", NsfClassInfoMethodsMethodStub, 4, { {"-callprotection", 0|NSF_ARG_IS_ENUMERATION, 1, ConvertToCallprotection, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}, - {"-incontext", 0, 0, Nsf_ConvertToString, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}, {"-methodtype", 0|NSF_ARG_IS_ENUMERATION, 1, ConvertToMethodtype, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}, - {"-nomixins", 0, 0, Nsf_ConvertToString, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}, {"-path", 0, 0, Nsf_ConvertToString, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}, {"pattern", 0, 0, Nsf_ConvertToString, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}} }, @@ -2646,11 +2640,9 @@ {"infomethodsubcmd", 0|NSF_ARG_IS_ENUMERATION, 0, ConvertToInfomethodsubcmd, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}, {"name", NSF_ARG_REQUIRED, 0, Nsf_ConvertToTclobj, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}} }, -{"::nsf::methods::object::info::methods", NsfObjInfoMethodsMethodStub, 6, { +{"::nsf::methods::object::info::methods", NsfObjInfoMethodsMethodStub, 4, { {"-callprotection", 0|NSF_ARG_IS_ENUMERATION, 1, ConvertToCallprotection, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}, - {"-incontext", 0, 0, Nsf_ConvertToString, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}, {"-methodtype", 0|NSF_ARG_IS_ENUMERATION, 1, ConvertToMethodtype, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}, - {"-nomixins", 0, 0, Nsf_ConvertToString, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}, {"-path", 0, 0, Nsf_ConvertToString, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}, {"pattern", 0, 0, Nsf_ConvertToString, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}} },