Index: TODO =================================================================== diff -u -rcf6d3e49135f07d35079b7ee25a02d394031a746 -re548a952433b4d26794f535995c9ed1ababe8807 --- TODO (.../TODO) (revision cf6d3e49135f07d35079b7ee25a02d394031a746) +++ TODO (.../TODO) (revision e548a952433b4d26794f535995c9ed1ababe8807) @@ -1048,9 +1048,18 @@ - removed method "filtersearch" from nx.tcl - added "obj info method filter methodName" to nx -- updated xotcl.2 to use new filtersearch imprementation +- updated xotcl2 to use new filtersearch imprementation - updated migration guide + +- renamed "info method name ..." into "info method handle ...", + since it returned already the handle +- renamed ListMethodName() to ListMethodHandle() +- changed output of "info callable -which ..." from definition to method handle +- renamed "info callable -which ..." into "info callable method ..." +- updated regression test to reflect the changes + + TODO: - nameing * self/current: Index: generic/gentclAPI.decls =================================================================== diff -u -rcf6d3e49135f07d35079b7ee25a02d394031a746 -re548a952433b4d26794f535995c9ed1ababe8807 --- generic/gentclAPI.decls (.../gentclAPI.decls) (revision cf6d3e49135f07d35079b7ee25a02d394031a746) +++ generic/gentclAPI.decls (.../gentclAPI.decls) (revision e548a952433b4d26794f535995c9ed1ababe8807) @@ -745,7 +745,7 @@ # infoObjectMethod callable XOTclObjInfoCallableMethod { {-argName "object" -type object} - {-argName "-which"} + {-argName "infocallablesubcmd" -nrargs 1 -type "filter|method|methods" -required 1} {-argName "-methodtype" -nrargs 1 -type "all|scripted|builtin|alias|forwarder|object|setter"} {-argName "-callprotection" -nrargs 1 -type "all|protected|public" -default all} {-argName "-application"} @@ -780,7 +780,7 @@ } infoObjectMethod method XOTclObjInfoMethodMethod { {-argName "object" -type object} - {-argName "infomethodsubcmd" -type "args|definition|filter|name|parameter|parametersyntax|type|precondition|postcondition"} + {-argName "infomethodsubcmd" -type "args|definition|filter|handle|parameter|parametersyntax|type|precondition|postcondition"} {-argName "name"} } infoObjectMethod methods XOTclObjInfoMethodsMethod { @@ -847,7 +847,7 @@ } infoClassMethod method XOTclClassInfoMethodMethod { {-argName "class" -type class} - {-argName "infomethodsubcmd" -type "args|body|definition|filter|name|parameter|parametersyntax|type|precondition|postcondition"} + {-argName "infomethodsubcmd" -type "args|body|definition|filter|handle|parameter|parametersyntax|type|precondition|postcondition"} {-argName "name"} } infoClassMethod methods XOTclClassInfoMethodsMethod { Index: generic/tclAPI.h =================================================================== diff -u -rcf6d3e49135f07d35079b7ee25a02d394031a746 -re548a952433b4d26794f535995c9ed1ababe8807 --- generic/tclAPI.h (.../tclAPI.h) (revision cf6d3e49135f07d35079b7ee25a02d394031a746) +++ generic/tclAPI.h (.../tclAPI.h) (revision e548a952433b4d26794f535995c9ed1ababe8807) @@ -2,13 +2,13 @@ static int convertToInfomethodsubcmd(Tcl_Interp *interp, Tcl_Obj *objPtr, XOTclParam CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { int index, result; - static CONST char *opts[] = {"args", "body", "definition", "filter", "name", "parameter", "parametersyntax", "type", "precondition", "postcondition", NULL}; + static CONST char *opts[] = {"args", "body", "definition", "filter", "handle", "parameter", "parametersyntax", "type", "precondition", "postcondition", NULL}; result = Tcl_GetIndexFromObj(interp, objPtr, opts, "infomethodsubcmd", 0, &index); *clientData = (ClientData) INT2PTR(index + 1); *outObjPtr = objPtr; return result; } -enum InfomethodsubcmdIdx {InfomethodsubcmdNULL, InfomethodsubcmdArgsIdx, InfomethodsubcmdBodyIdx, InfomethodsubcmdDefinitionIdx, InfomethodsubcmdFilterIdx, InfomethodsubcmdNameIdx, InfomethodsubcmdParameterIdx, InfomethodsubcmdParametersyntaxIdx, InfomethodsubcmdTypeIdx, InfomethodsubcmdPreconditionIdx, InfomethodsubcmdPostconditionIdx}; +enum InfomethodsubcmdIdx {InfomethodsubcmdNULL, InfomethodsubcmdArgsIdx, InfomethodsubcmdBodyIdx, InfomethodsubcmdDefinitionIdx, InfomethodsubcmdFilterIdx, InfomethodsubcmdHandleIdx, InfomethodsubcmdParameterIdx, InfomethodsubcmdParametersyntaxIdx, InfomethodsubcmdTypeIdx, InfomethodsubcmdPreconditionIdx, InfomethodsubcmdPostconditionIdx}; static int convertToMethodtype(Tcl_Interp *interp, Tcl_Obj *objPtr, XOTclParam CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { @@ -43,6 +43,17 @@ } enum ScopeIdx {ScopeNULL, ScopeAllIdx, ScopeClassIdx, ScopeObjectIdx}; +static int convertToInfocallablesubcmd(Tcl_Interp *interp, Tcl_Obj *objPtr, XOTclParam CONST *pPtr, + ClientData *clientData, Tcl_Obj **outObjPtr) { + int index, result; + static CONST char *opts[] = {"filter", "method", "methods", NULL}; + result = Tcl_GetIndexFromObj(interp, objPtr, opts, "infocallablesubcmd", 0, &index); + *clientData = (ClientData) INT2PTR(index + 1); + *outObjPtr = objPtr; + return result; +} +enum InfocallablesubcmdIdx {InfocallablesubcmdNULL, InfocallablesubcmdFilterIdx, InfocallablesubcmdMethodIdx, InfocallablesubcmdMethodsIdx}; + static int convertToAssertionsubcmd(Tcl_Interp *interp, Tcl_Obj *objPtr, XOTclParam CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { int index, result; @@ -232,7 +243,7 @@ static int XOTclClassInfoSlotsMethod(Tcl_Interp *interp, XOTclClass *class); static int XOTclClassInfoSubclassMethod(Tcl_Interp *interp, XOTclClass *class, int withClosure, CONST char *patternString, XOTclObject *patternObj); static int XOTclClassInfoSuperclassMethod(Tcl_Interp *interp, XOTclClass *class, int withClosure, Tcl_Obj *pattern); -static int XOTclObjInfoCallableMethod(Tcl_Interp *interp, XOTclObject *object, int withWhich, int withMethodtype, int withCallprotection, int withApplication, int withNomixins, int withIncontext, CONST char *pattern); +static int XOTclObjInfoCallableMethod(Tcl_Interp *interp, XOTclObject *object, int infocallablesubcmd, int withMethodtype, int withCallprotection, int withApplication, int withNomixins, int withIncontext, CONST char *pattern); static int XOTclObjInfoChildrenMethod(Tcl_Interp *interp, XOTclObject *object, CONST char *pattern); static int XOTclObjInfoClassMethod(Tcl_Interp *interp, XOTclObject *object); static int XOTclObjInfoFilterMethod(Tcl_Interp *interp, XOTclObject *object, int withOrder, int withGuards, CONST char *pattern); @@ -849,7 +860,7 @@ return TCL_ERROR; } else { XOTclObject *object = (XOTclObject *)pc.clientData[0]; - int withWhich = (int )PTR2INT(pc.clientData[1]); + int infocallablesubcmd = (int )PTR2INT(pc.clientData[1]); int withMethodtype = (int )PTR2INT(pc.clientData[2]); int withCallprotection = (int )PTR2INT(pc.clientData[3]); int withApplication = (int )PTR2INT(pc.clientData[4]); @@ -858,7 +869,7 @@ CONST char *pattern = (CONST char *)pc.clientData[7]; parseContextRelease(&pc); - return XOTclObjInfoCallableMethod(interp, object, withWhich, withMethodtype, withCallprotection, withApplication, withNomixins, withIncontext, pattern); + return XOTclObjInfoCallableMethod(interp, object, infocallablesubcmd, withMethodtype, withCallprotection, withApplication, withNomixins, withIncontext, pattern); } } @@ -1986,7 +1997,7 @@ }, {"::nsf::cmd::ObjectInfo::callable", XOTclObjInfoCallableMethodStub, 8, { {"object", 0, 0, convertToObject}, - {"-which", 0, 0, convertToString}, + {"infocallablesubcmd", 1, 1, convertToInfocallablesubcmd}, {"-methodtype", 0, 1, convertToMethodtype}, {"-callprotection", 0, 1, convertToCallprotection}, {"-application", 0, 0, convertToString}, Index: generic/xotcl.c =================================================================== diff -u -rcf6d3e49135f07d35079b7ee25a02d394031a746 -re548a952433b4d26794f535995c9ed1ababe8807 --- generic/xotcl.c (.../xotcl.c) (revision cf6d3e49135f07d35079b7ee25a02d394031a746) +++ generic/xotcl.c (.../xotcl.c) (revision e548a952433b4d26794f535995c9ed1ababe8807) @@ -223,7 +223,7 @@ static int AliasAdd(Tcl_Interp *interp, Tcl_Obj *cmdName, CONST char *methodName, int withPer_object, CONST char *cmd); static int AliasDelete(Tcl_Interp *interp, Tcl_Obj *cmdName, CONST char *methodName, int withPer_object); static Tcl_Obj *AliasGet(Tcl_Interp *interp, Tcl_Obj *cmdName, CONST char *methodName, int withPer_object); -static int ListMethodName(Tcl_Interp *interp, XOTclObject *object, int withPer_object, +static int ListMethodHandle(Tcl_Interp *interp, XOTclObject *object, int withPer_object, CONST char *methodName); static void @@ -6891,7 +6891,7 @@ Tcl_Command_flags((Tcl_Command)procPtr->cmdPtr) |= XOTCL_CMD_PROTECTED_METHOD; } #endif - result = ListMethodName(interp, object, withPer_object, methodName); + result = ListMethodHandle(interp, object, withPer_object, methodName); } } Tcl_PopCallFrame(interp); @@ -10071,7 +10071,7 @@ } static int -ListMethodName(Tcl_Interp *interp, XOTclObject *object, int withPer_object, CONST char *methodName) { +ListMethodHandle(Tcl_Interp *interp, XOTclObject *object, int withPer_object, CONST char *methodName) { Tcl_SetObjResult(interp, MethodHandleObj(object, withPer_object, methodName)); return TCL_OK; } @@ -10110,13 +10110,11 @@ * The command was from an object, return therefore this * object as reference. */ - /*fprintf(stderr, "We are flipping the object to %s, method %s to %s\n", - objectName(object1), methodName, procName);*/ + /*fprintf(stderr, "We are flipping the object to %s, method %s to %s !fromClassNS %d\n", + objectName(object1), methodName, procName, !fromClassNS);*/ object = object1; methodName = procName; - if (!fromClassNS) { - withPer_object = 1; - } + withPer_object = fromClassNS ? 0 : 1; } Tcl_DStringFree(dsPtr); } @@ -10131,9 +10129,9 @@ } switch (subcmd) { - case InfomethodsubcmdNameIdx: + case InfomethodsubcmdHandleIdx: { - return ListMethodName(interp, object, withPer_object, methodName); + return ListMethodHandle(interp, object, withPer_object, methodName); } case InfomethodsubcmdArgsIdx: { @@ -10279,7 +10277,8 @@ case InfomethodsubcmdDefinitionIdx: { Tcl_Obj *entryObj = AliasGet(interp, object->cmdName, methodName, withPer_object); - + /*fprintf(stderr, "aliasGet %s -> %s (%d) returned %p\n", + objectName(object), methodName, withPer_object, entryObj);*/ if (entryObj) { int nrElements; Tcl_Obj **listElements; @@ -10496,9 +10495,10 @@ static int ListCallableMethods(Tcl_Interp *interp, XOTclObject *object, CONST char *pattern, - int withPer_object, int methodType, int withCallprotection, + int methodType, int withCallprotection, int withApplication, int noMixins, int inContext) { XOTclClasses *pl; + int withPer_object = 1; Tcl_HashTable *cmdTable, dupsTable, *dups = &dupsTable; /* @@ -10795,7 +10795,7 @@ newCmd,methodName,Tcl_Command_flags(newCmd), tcd);*/ } - result = ListMethodName(interp, object, cl == NULL, methodName); + result = ListMethodHandle(interp, object, cl == NULL, methodName); } return result; @@ -11238,7 +11238,7 @@ (ClientData)tcd, forwardCmdDeleteProc, 0); } if (result == TCL_OK) { - result = ListMethodName(interp, object, cl == NULL, methodName); + result = ListMethodHandle(interp, object, cl == NULL, methodName); } } @@ -12404,7 +12404,7 @@ (ClientData)setterClientData, setterCmdDeleteProc, 0); } if (result == TCL_OK) { - result = ListMethodName(interp, object, cl == NULL, methodName); + result = ListMethodHandle(interp, object, cl == NULL, methodName); } else { setterCmdDeleteProc((ClientData)setterClientData); } @@ -12986,7 +12986,7 @@ return TCL_OK; fcl = cmdList->clorobj; - return ListMethodName(interp, (XOTclObject*)fcl, !XOTclObjectIsClass(&fcl->object), filterName); + return ListMethodHandle(interp, (XOTclObject*)fcl, !XOTclObjectIsClass(&fcl->object), filterName); } static int XOTclOInstVarMethod(Tcl_Interp *interp, XOTclObject *object, int objc, Tcl_Obj *CONST objv[]) { @@ -13768,7 +13768,7 @@ /* infoObjectMethod callable XOTclObjInfoCallableMethod { {-argName "object" -type object} - {-argName "-which"} + {-argName "infocallablesubcmd" -nrargs 1 -type "filter|method|methods" -required 1} {-argName "-methodtype" -nrargs 1 -type "all|scripted|builtin|alias|forwarder|object|setter"} {-argName "-callprotection" -nrargs 1 -type "all|protected|public" -default all} {-argName "-application"} @@ -13777,24 +13777,50 @@ {-argName "pattern" -required 0} */ static int XOTclObjInfoCallableMethod(Tcl_Interp *interp, XOTclObject *object, - int withWhich, int withMethodtype, int withCallprotection, + int subcmd, + int withMethodtype, int withCallprotection, int withApplication, int withNomixins, int withIncontext, CONST char *pattern) { - if (withWhich) { - XOTclClass *pcl = NULL; - Tcl_Command cmd = ObjectFindMethod(interp, object, pattern, &pcl); - if (cmd) { - XOTclObject *pobj = pcl ? &pcl->object : object; - int perObject = (pcl == NULL); - ListMethod(interp, pobj, pattern, cmd, InfomethodsubcmdDefinitionIdx, perObject); + if (subcmd != InfocallablesubcmdMethodsIdx) { + if (withMethodtype || withCallprotection || withApplication || withNomixins || withIncontext) { + return XOTclVarErrMsg(interp, "options -methodtype, -callprotection, -application, ", + "-nomixins, -incontext are only valued for subcommand 'methods'", + (char *) NULL); } - return TCL_OK; + if (pattern == NULL) { + return XOTclVarErrMsg(interp, "methodname must be provided as last argument", + (char *) NULL); + } } + switch (subcmd) { + case InfocallablesubcmdMethodIdx: + { + XOTclClass *pcl = NULL; + Tcl_Command cmd = ObjectFindMethod(interp, object, pattern, &pcl); - return ListCallableMethods(interp, object, pattern, 1 /* per-object */, - AggregatedMethodType(withMethodtype), withCallprotection, - withApplication, withNomixins, withIncontext); + if (cmd) { + XOTclObject *pobj = pcl ? &pcl->object : object; + int perObject = (pcl == NULL); + ListMethod(interp, pobj, pattern, cmd, InfomethodsubcmdHandleIdx, perObject); + } + return TCL_OK; + } + case InfocallablesubcmdMethodsIdx: + { + return ListCallableMethods(interp, object, pattern, + AggregatedMethodType(withMethodtype), withCallprotection, + withApplication, withNomixins, withIncontext); + } + case InfocallablesubcmdFilterIdx: + { + return FilterSearchMethod(interp, object, pattern); + } + default: + fprintf(stderr, "should never happen, subcmd %d pattern '%s'\n", subcmd, pattern); + + assert(0); /* should never happen */ + } } /* @@ -13870,7 +13896,7 @@ /* infoObjectMethod method XOTclObjInfoMethodMethod { {-argName "object" -type object} - {-argName "infomethodsubcmd" -type "args|definition|filter|name|parameter|parametersyntax|type|precondition|postcondition"} + {-argName "infomethodsubcmd" -type "args|definition|filter|handle|parameter|parametersyntax|type|precondition|postcondition"} {-argName "name"} } */ Index: library/lib/doc-tools.tcl =================================================================== diff -u -rf3cb5afe6aa1b6761b4a9909058f64ff7d64ab92 -re548a952433b4d26794f535995c9ed1ababe8807 --- library/lib/doc-tools.tcl (.../doc-tools.tcl) (revision f3cb5afe6aa1b6761b4a9909058f64ff7d64ab92) +++ library/lib/doc-tools.tcl (.../doc-tools.tcl) (revision e548a952433b4d26794f535995c9ed1ababe8807) @@ -1474,7 +1474,7 @@ lassign [:resolve_partof_entity $tag $name] nq_name partof_entity; if {$partof_entity ne ""} { - if {[$partof_entity info callable -application $tag] eq ""} { + if {[$partof_entity info callable methods $tag] eq ""} { [InvalidTag new -message [subst { The tag '$tag' is not supported for the entity type '[namespace tail [$partof_entity info class]]' @@ -1504,7 +1504,7 @@ } else { # 2) current (or context) entity has been resolved # TODO: Should we explicitly disallow qualified names in parts? - if {[${:current_entity} info callable -application $tag] eq ""} { + if {[${:current_entity} info callable methods $tag] eq ""} { [InvalidTag new -message [subst { The tag '$tag' is not supported for the entity type '[namespace tail [${:current_entity} info class]]' Index: library/nx/nx.tcl =================================================================== diff -u -r6a0e62b53f8b405d11f009e3c0acb2098702d921 -re548a952433b4d26794f535995c9ed1ababe8807 --- library/nx/nx.tcl (.../nx.tcl) (revision 6a0e62b53f8b405d11f009e3c0acb2098702d921) +++ library/nx/nx.tcl (.../nx.tcl) (revision e548a952433b4d26794f535995c9ed1ababe8807) @@ -298,7 +298,7 @@ Class protected object method __unknown {name} {} # Add alias methods. cmdName for XOTcl method can be added via - # [... info method name ] + # [... info method handle ] # # -nonleaf and -objscope make only sense for c-defined cmds, # -objscope implies -nonleaf @@ -376,8 +376,8 @@ :alias is ::nsf::objectproperty :alias classparent ::nsf::cmd::ObjectInfo::parent :alias classchildren ::nsf::cmd::ObjectInfo::children - :alias info [::nsf::cmd::ObjectInfo::method objectInfo name info] - :alias unknown [::nsf::cmd::ObjectInfo::method objectInfo name info] + :alias info [::nsf::cmd::ObjectInfo::method objectInfo handle info] + :alias unknown [::nsf::cmd::ObjectInfo::method objectInfo handle info] } foreach cmd [info command ::nsf::cmd::ObjectInfo::*] { @@ -480,7 +480,7 @@ } :create [:slotName $name $target] {*}$opts $initblock - return [::nsf::cmd::${info}::method $target name $name] + return [::nsf::cmd::${info}::method $target handle $name] } } @@ -655,8 +655,8 @@ ObjectParameterSlot method unknown {method args} { set methods [list] - foreach m [:info callable] { - if {[Object info callable $m] ne ""} continue + foreach m [:info callable methods] { + if {[Object info callable methods $m] ne ""} continue if {[string match __* $m]} continue lappend methods $m } @@ -1080,7 +1080,7 @@ set perObject "" set infokind Class } - if {[::nsf::cmd::${infokind}Info::method ${:domain} name ${:name}] ne ""} { + if {[::nsf::cmd::${infokind}Info::method ${:domain} handle ${:name}] ne ""} { #puts stderr "OPTIMIZER RESETTING ${:domain} slot ${:name}" ::nsf::forward ${:domain} {*}$perObject ${:name} \ ${:manager} \ @@ -1090,13 +1090,16 @@ #puts stderr "OPTIMIZER incremental [info exists :incremental] def '[set :defaultmethods]'" if {[info exists :incremental] && ${:incremental}} return if {[set :defaultmethods] ne {get assign}} return - set assignInfo [:info callable -which assign] - #puts stderr "OPTIMIZER assign=$assignInfo//[lindex $assignInfo {end 0}]//[:info precedence]" + #puts stderr "OPTIMIZER handle [:info callable method assign]" + set assignInfo [:info method definition [:info callable method assign]] + #puts stderr "OPTIMIZER assign=$assignInfo//[lindex $assignInfo {end 0}]//[:info precedence]" if {$assignInfo ne "::nx::ObjectParameterSlot alias assign ::nsf::setvar" && [lindex $assignInfo {end 0}] ne "::nsf::setvar" } return - if {[:info callable -which get] ne "::nx::ObjectParameterSlot alias get ::nsf::setvar"} return + set getInfo [:info method definition [:info callable method get]] + if {$getInfo ne "::nx::ObjectParameterSlot alias get ::nsf::setvar"} return + array set "" [:toParameterSyntax ${:name}] if {$(mparam) ne ""} { set setterParam [lindex $(oparam) 0] Index: library/xotcl/library/xotcl2.tcl =================================================================== diff -u -rcf6d3e49135f07d35079b7ee25a02d394031a746 -re548a952433b4d26794f535995c9ed1ababe8807 --- library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision cf6d3e49135f07d35079b7ee25a02d394031a746) +++ library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision e548a952433b4d26794f535995c9ed1ababe8807) @@ -363,7 +363,7 @@ set methodtype all if {$nocmds} {set methodtype scripted} if {$noprocs} {if {$nocmds} {return ""}; set methodtype builtin} - set cmd [list ::nsf::cmd::ObjectInfo::callable $o -methodtype $methodtype] + set cmd [list ::nsf::cmd::ObjectInfo::callable $o methods -methodtype $methodtype] if {$incontext} {lappend cmd -incontext} if {[info exists pattern]} {lappend cmd $pattern} eval $cmd @@ -513,7 +513,7 @@ } set definition [list [lindex $definition 0] ${prefix}$kind $name] } - #puts "method_handle_to_xotcl gets definition '$methodHandle' // $definition" + #puts "method_handle_to_xotcl gets handle '$methodHandle' // $definition" return $definition } @@ -542,11 +542,13 @@ ::nsf::is [self] type $cl } Object instproc filtersearch {filter} { - set definition [::nsf::cmd::ObjectInfo::method [self] filter $filter] - return [method_handle_to_xotcl $definition] + set handle [::nsf::cmd::ObjectInfo::method [self] filter $filter] + return [method_handle_to_xotcl $handle] } Object instproc procsearch {name} { - set definition [::nsf::cmd::ObjectInfo::callable [self] -which $name] + set handle [::nsf::cmd::ObjectInfo::callable [self] method $name] + return [method_handle_to_xotcl $handle] + if {$definition ne ""} { foreach {obj modifier kind} $definition break if {$modifier ne "object"} { Index: library/xotcl/tests/slottest.xotcl =================================================================== diff -u -r033c63d771af5253b0e94c2a9c1c6a94df40242e -re548a952433b4d26794f535995c9ed1ababe8807 --- library/xotcl/tests/slottest.xotcl (.../slottest.xotcl) (revision 033c63d771af5253b0e94c2a9c1c6a94df40242e) +++ library/xotcl/tests/slottest.xotcl (.../slottest.xotcl) (revision e548a952433b4d26794f535995c9ed1ababe8807) @@ -322,7 +322,7 @@ ? {a0 procsearch f3} "::a0 proc f3" ? {a0 procsearch f4} "::a0 forward f4" ? {a0 procsearch set} "::xotcl::Object instcmd set" -? {A slot foo info callable -which assign} "::nx::ObjectParameterSlot alias assign ::nsf::setvar" +? {A slot foo info callable method assign} "::nsf::classes::nx::ObjectParameterSlot::assign" # redefine setter for foo of class A A slot foo method assign {domain var val} { Index: tests/aliastest.tcl =================================================================== diff -u -r15d57478e3976d747741fd3df9bcb6ecccc7076d -re548a952433b4d26794f535995c9ed1ababe8807 --- tests/aliastest.tcl (.../aliastest.tcl) (revision 15d57478e3976d747741fd3df9bcb6ecccc7076d) +++ tests/aliastest.tcl (.../aliastest.tcl) (revision e548a952433b4d26794f535995c9ed1ababe8807) @@ -230,8 +230,8 @@ namespace delete ::U ? {namespace exists ::U} 0 ? {lsort [U object info methods]} {} - ? {U info callable BAR} "" - ? {U info callable ZAP} "" + ? {U info callable methods BAR} "" + ? {U info callable methods ZAP} "" ::U destroy } Index: tests/info-method.tcl =================================================================== diff -u -rf3cb5afe6aa1b6761b4a9909058f64ff7d64ab92 -re548a952433b4d26794f535995c9ed1ababe8807 --- tests/info-method.tcl (.../info-method.tcl) (revision f3cb5afe6aa1b6761b4a9909058f64ff7d64ab92) +++ tests/info-method.tcl (.../info-method.tcl) (revision e548a952433b4d26794f535995c9ed1ababe8807) @@ -25,19 +25,19 @@ ? {lsort [C info methods -callprotection all]} "a addOne m m-with-assertions s" #? {lsort [C info methods]} "a addOne s" foreach m [lsort [C info methods -callprotection all]] { - ? [subst -nocommands {lsort [c1 info callable $m]}] $m + ? [subst -nocommands {lsort [c1 info callable methods $m]}] $m } ? {C info method definition a} "::C alias a ::set" -? {c1 info callable -which a} "::C alias a ::set" -? {c1 info callable -which addOne} "::C forward addOne expr 1 +" -? {c1 info callable -which m} {::C method m x {return proc-[self proc]}} -? {c1 info callable -which s} "::C setter s" +? {c1 info callable method a} "::nsf::classes::C::a" +? {c1 info callable method addOne} "::nsf::classes::C::addOne" +? {c1 info callable method m} "::nsf::classes::C::m" +? {c1 info callable method s} "::nsf::classes::C::s" c1 method foo {} {puts foo} ? {c1 info method definition foo} "::c1 method foo {} {puts foo}" -? {c1 info callable -which foo} "::c1 method foo {} {puts foo}" +? {c1 info callable method foo} "::c1::foo" -? {C info method name m} "::nsf::classes::C::m" -? {C object info method name mpo} "::C::mpo" +? {C info method handle m} "::nsf::classes::C::m" +? {C object info method handle mpo} "::C::mpo" ? {C info method definition m} {::C method m x {return proc-[self proc]}} ? {C info method def m} {::C method m x {return proc-[self proc]}} @@ -63,7 +63,7 @@ ? {C object info method definition apo} "::C object alias apo ::puts" -? {::nx::Object info callable -application} "" -? {::nx::Class info callable -application} "" -? {lsort [C info callable -application]} "add1 apo fpo mpo spo" -? {lsort [c1 info callable -application]} "a addOne foo m m-with-assertions s" +? {::nx::Object info callable methods -application} "" +? {::nx::Class info callable methods -application} "" +? {lsort [C info callable methods -application]} "add1 apo fpo mpo spo" +? {lsort [c1 info callable methods -application]} "a addOne foo m m-with-assertions s" Index: tests/interceptor-slot.tcl =================================================================== diff -u -rf3cb5afe6aa1b6761b4a9909058f64ff7d64ab92 -re548a952433b4d26794f535995c9ed1ababe8807 --- tests/interceptor-slot.tcl (.../interceptor-slot.tcl) (revision f3cb5afe6aa1b6761b4a9909058f64ff7d64ab92) +++ tests/interceptor-slot.tcl (.../interceptor-slot.tcl) (revision e548a952433b4d26794f535995c9ed1ababe8807) @@ -9,7 +9,7 @@ Class create M2 Class create C -? {C info callable -which mixin} "::nx::Class forward mixin ::nx::Class::slot::mixin {%1 {get assign}} %self class-mixin" +? {C info callable method mixin} "::nsf::classes::nx::Class::mixin" C mixin M ? {C info precedence} "::nx::Class ::nx::Object" ? {C mixin} "::M" Index: tests/method-modifiers.tcl =================================================================== diff -u -rf3cb5afe6aa1b6761b4a9909058f64ff7d64ab92 -re548a952433b4d26794f535995c9ed1ababe8807 --- tests/method-modifiers.tcl (.../method-modifiers.tcl) (revision f3cb5afe6aa1b6761b4a9909058f64ff7d64ab92) +++ tests/method-modifiers.tcl (.../method-modifiers.tcl) (revision e548a952433b4d26794f535995c9ed1ababe8807) @@ -20,9 +20,9 @@ :protected setter protected_setter # alias - :alias plain_alias [C info method name plain_method] - :public alias public_alias [C info method name public_method] - :protected alias protected_alias [C info method name protected_method] + :alias plain_alias [C info method handle plain_method] + :public alias public_alias [C info method handle public_method] + :protected alias protected_alias [C info method handle protected_method] # object :object method plain_object_method {} {return [current method]} @@ -34,9 +34,9 @@ :object setter plain_object_setter :public object setter public_object_setter :protected object setter protected_object_setter - :object alias plain_object_alias [:object info method name plain_object_method] - :public object alias public_object_alias [:object info method name public_object_method] - :protected object alias protected_object_alias [:object info method name protected_object_method] + :object alias plain_object_alias [:object info method handle plain_object_method] + :public object alias public_object_alias [:object info method handle public_object_method] + :protected object alias protected_object_alias [:object info method handle protected_object_method] } C create c1 { # methods @@ -55,9 +55,9 @@ :protected setter protected_object_setter # alias - :alias plain_object_alias [:info method name plain_object_method] - :public alias public_object_alias [:info method name public_object_method] - :protected alias protected_object_alias [:info method name protected_object_method] + :alias plain_object_alias [:info method handle plain_object_method] + :public alias public_object_alias [:info method handle public_object_method] + :protected alias protected_object_alias [:info method handle protected_object_method] } C public setter s0 C protected setter s1 Index: tests/mixinoftest.tcl =================================================================== diff -u -rf3cb5afe6aa1b6761b4a9909058f64ff7d64ab92 -re548a952433b4d26794f535995c9ed1ababe8807 --- tests/mixinoftest.tcl (.../mixinoftest.tcl) (revision f3cb5afe6aa1b6761b4a9909058f64ff7d64ab92) +++ tests/mixinoftest.tcl (.../mixinoftest.tcl) (revision e548a952433b4d26794f535995c9ed1ababe8807) @@ -51,17 +51,17 @@ ? {o info mixin} ::M ? {o info precedence} "::M ::nx::Object" -? {o info callable -which foo} "::M method foo args {puts x;next}" +? {o info callable method foo} "::nsf::classes::M::foo" Class create M {:method foo args next} ? {o info mixin} ::M ? {o info precedence} "::M ::nx::Object" -? {o info callable -which foo} "::M method foo args next" +? {o info callable method foo} "::nsf::classes::M::foo" M destroy ? {o info mixin} "" ? {o info precedence} "::nx::Object" -? {o info callable -which foo} "" +? {o info callable method foo} "" o destroy Index: tests/parameters.tcl =================================================================== diff -u -r6a0e62b53f8b405d11f009e3c0acb2098702d921 -re548a952433b4d26794f535995c9ed1ababe8807 --- tests/parameters.tcl (.../parameters.tcl) (revision 6a0e62b53f8b405d11f009e3c0acb2098702d921) +++ tests/parameters.tcl (.../parameters.tcl) (revision e548a952433b4d26794f535995c9ed1ababe8807) @@ -975,12 +975,12 @@ ? {::nsf::setter o ints:integer,multivalued} "::o::ints" ? {::nsf::setter o o:object} "::o::o" - ? {o info method name ints} "::o::ints" + ? {o info method handle ints} "::o::ints" ? {o info method definition ints} "::o setter ints:integer,multivalued" ? {o info method parameter ints} "ints:integer,multivalued" ? {o info method args ints} "ints" - ? {o info method name o} "::o::o" + ? {o info method handle o} "::o::o" ? {o info method definition o} "::o setter o:object" ? {o info method parameter o} "o:object" ? {o info method args o} "o"