Index: TODO =================================================================== diff -u -N -r96fd7ec7c3e09038f2ac706a0ded966c2125be74 -rc4997e0189bb712287aa53d12bb3e332acfb781d --- TODO (.../TODO) (revision 96fd7ec7c3e09038f2ac706a0ded966c2125be74) +++ TODO (.../TODO) (revision c4997e0189bb712287aa53d12bb3e332acfb781d) @@ -3706,6 +3706,11 @@ invocations. - bup version numbers for nx, xotcl2 and nsf to 2.0b2 +- rename "info method handle /methodName/" into + "info method registrationhandle /methodName/" +- rename "info method origin /methodName/" into + "info method definitionhandle /methodName/" +- added "info method origin" to return the target of an alias (or empty) TODO: Index: doc/next-migration.txt =================================================================== diff -u -N -rf41ae7e802868efee95b5d5682edfdbbe9ba2f64 -rc4997e0189bb712287aa53d12bb3e332acfb781d --- doc/next-migration.txt (.../next-migration.txt) (revision f41ae7e802868efee95b5d5682edfdbbe9ba2f64) +++ doc/next-migration.txt (.../next-migration.txt) (revision c4997e0189bb712287aa53d12bb3e332acfb781d) @@ -2461,8 +2461,8 @@ ---------------- |[source,tcl] ---------------- -/obj/ info method handle /methodName/ -/cls/ ?class? info method handle /methodName/ +/obj/ info method registrationhandle /methodName/ +/cls/ ?class? info method registrationhandle /methodName/ ---------------- |====================== Index: doc/next-tutorial.txt =================================================================== diff -u -N -r772e13e42b629f1a3225cf81b60c083b15f775a9 -rc4997e0189bb712287aa53d12bb3e332acfb781d --- doc/next-tutorial.txt (.../next-tutorial.txt) (revision 772e13e42b629f1a3225cf81b60c083b15f775a9) +++ doc/next-tutorial.txt (.../next-tutorial.txt) (revision c4997e0189bb712287aa53d12bb3e332acfb781d) @@ -999,7 +999,7 @@ :public method bark {} { puts "[self] Bark, bark, bark." } # Define a public alias for the method "bark" - :public alias warn [:info method handle bark] + :public alias warn [:info method registrationhandle bark] # ... } Index: generic/nsf.c =================================================================== diff -u -N -r265965e7feb81522a3fdf5d29e4883846abe77cb -rc4997e0189bb712287aa53d12bb3e332acfb781d --- generic/nsf.c (.../nsf.c) (revision 265965e7feb81522a3fdf5d29e4883846abe77cb) +++ generic/nsf.c (.../nsf.c) (revision c4997e0189bb712287aa53d12bb3e332acfb781d) @@ -16595,12 +16595,12 @@ } switch (subcmd) { - case InfomethodsubcmdHandleIdx: + case InfomethodsubcmdRegistrationhandleIdx: { Tcl_SetObjResult(interp, MethodHandleObj(regObject, withPer_object, methodName)); return TCL_OK; } - case InfomethodsubcmdOriginIdx: + case InfomethodsubcmdDefinitionhandleIdx: { Tcl_SetObjResult(interp, MethodHandleObj(defObject, NsfObjectIsClass(defObject) ? withPer_object : 1, @@ -16850,6 +16850,14 @@ Tcl_SetObjResult(interp, resultObj); break; } + case InfomethodsubcmdOriginIdx: + { + int nrElements; + Tcl_Obj **listElements; + Tcl_ListObjGetElements(interp, entryObj, &nrElements, &listElements); + Tcl_SetObjResult(interp, listElements[nrElements-1]); + break; + } } } else { /* check, to be on the safe side */ @@ -21837,7 +21845,7 @@ NsfObject *pobj = pcl ? &pcl->object : object; int perObject = (pcl == NULL); - ListMethod(interp, pobj, pobj, ObjStr(methodObj), cmd, InfomethodsubcmdHandleIdx, perObject); + ListMethod(interp, pobj, pobj, ObjStr(methodObj), cmd, InfomethodsubcmdRegistrationhandleIdx, perObject); } return TCL_OK; } @@ -21996,7 +22004,7 @@ /* objectInfoMethod method NsfObjInfoMethodMethod { - {-argName "infomethodsubcmd" -type "args|body|exists|definition|handle|origin|parameter|parametersyntax|type|precondition|postcondition|subcommands"} + {-argName "infomethodsubcmd" -type "args|body|definition|exists|registrationhandle|definitionhandle|origin|parameter|parametersyntax|type|precondition|postcondition|submethods"} {-argName "name" -required 1 -type tclobj} } */ @@ -22292,7 +22300,7 @@ /* classInfoMethod method NsfClassInfoMethodMethod { - {-argName "infomethodsubcmd" -type "args|body|exists|definition|handle|origin|parameter|parametersyntax|type|precondition|postcondition|subcommands"} + {-argName "infomethodsubcmd" -type "args|body|definition|exists|registrationhandle|definitionhandle|origin|parameter|parametersyntax|type|precondition|postcondition|submethods"} {-argName "name" -required 1 -type tclobj} } */ Index: generic/nsfAPI.decls =================================================================== diff -u -N -r265965e7feb81522a3fdf5d29e4883846abe77cb -rc4997e0189bb712287aa53d12bb3e332acfb781d --- generic/nsfAPI.decls (.../nsfAPI.decls) (revision 265965e7feb81522a3fdf5d29e4883846abe77cb) +++ generic/nsfAPI.decls (.../nsfAPI.decls) (revision c4997e0189bb712287aa53d12bb3e332acfb781d) @@ -362,7 +362,7 @@ {-argName "pattern" -required 0} } objectInfoMethod method NsfObjInfoMethodMethod { - {-argName "infomethodsubcmd" -type "args|body|definition|exists|handle|origin|parameter|parametersyntax|type|precondition|postcondition|submethods"} + {-argName "infomethodsubcmd" -type "args|body|definition|exists|registrationhandle|definitionhandle|origin|parameter|parametersyntax|type|precondition|postcondition|submethods"} {-argName "name" -required 1 -type tclobj} } objectInfoMethod methods NsfObjInfoMethodsMethod { @@ -417,7 +417,7 @@ } classInfoMethod method NsfClassInfoMethodMethod { - {-argName "infomethodsubcmd" -type "args|body|definition|exists|handle|origin|parameter|parametersyntax|type|precondition|postcondition|submethods"} + {-argName "infomethodsubcmd" -type "args|body|definition|exists|registrationhandle|definitionhandle|origin|parameter|parametersyntax|type|precondition|postcondition|submethods"} {-argName "name" -required 1 -type tclobj} } classInfoMethod methods NsfClassInfoMethodsMethod { Index: generic/nsfAPI.h =================================================================== diff -u -N -r265965e7feb81522a3fdf5d29e4883846abe77cb -rc4997e0189bb712287aa53d12bb3e332acfb781d --- generic/nsfAPI.h (.../nsfAPI.h) (revision 265965e7feb81522a3fdf5d29e4883846abe77cb) +++ generic/nsfAPI.h (.../nsfAPI.h) (revision c4997e0189bb712287aa53d12bb3e332acfb781d) @@ -1,10 +1,10 @@ -enum InfomethodsubcmdIdx {InfomethodsubcmdNULL, InfomethodsubcmdArgsIdx, InfomethodsubcmdBodyIdx, InfomethodsubcmdDefinitionIdx, InfomethodsubcmdExistsIdx, InfomethodsubcmdHandleIdx, InfomethodsubcmdOriginIdx, InfomethodsubcmdParameterIdx, InfomethodsubcmdParametersyntaxIdx, InfomethodsubcmdTypeIdx, InfomethodsubcmdPreconditionIdx, InfomethodsubcmdPostconditionIdx, InfomethodsubcmdSubmethodsIdx}; +enum InfomethodsubcmdIdx {InfomethodsubcmdNULL, InfomethodsubcmdArgsIdx, InfomethodsubcmdBodyIdx, InfomethodsubcmdDefinitionIdx, InfomethodsubcmdExistsIdx, InfomethodsubcmdRegistrationhandleIdx, InfomethodsubcmdDefinitionhandleIdx, InfomethodsubcmdOriginIdx, InfomethodsubcmdParameterIdx, InfomethodsubcmdParametersyntaxIdx, InfomethodsubcmdTypeIdx, InfomethodsubcmdPreconditionIdx, InfomethodsubcmdPostconditionIdx, InfomethodsubcmdSubmethodsIdx}; static int ConvertToInfomethodsubcmd(Tcl_Interp *interp, Tcl_Obj *objPtr, Nsf_Param CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { int index, result; - static CONST char *opts[] = {"args", "body", "definition", "exists", "handle", "origin", "parameter", "parametersyntax", "type", "precondition", "postcondition", "submethods", NULL}; + static CONST char *opts[] = {"args", "body", "definition", "exists", "registrationhandle", "definitionhandle", "origin", "parameter", "parametersyntax", "type", "precondition", "postcondition", "submethods", NULL}; (void)pPtr; result = Tcl_GetIndexFromObj(interp, objPtr, opts, "infomethodsubcmd", 0, &index); *clientData = (ClientData) INT2PTR(index + 1); @@ -185,7 +185,7 @@ static enumeratorConverterEntry enumeratorConverterEntries[] = { {ConvertToScope, "all|class|object"}, {ConvertToInfoobjectparametersubcmd, "list|name|parameter|parametersyntax"}, - {ConvertToInfomethodsubcmd, "args|body|definition|exists|handle|origin|parameter|parametersyntax|type|precondition|postcondition|submethods"}, + {ConvertToInfomethodsubcmd, "args|body|definition|exists|registrationhandle|definitionhandle|origin|parameter|parametersyntax|type|precondition|postcondition|submethods"}, {ConvertToCallprotection, "all|public|protected|private"}, {ConvertToMethodtype, "all|scripted|builtin|alias|forwarder|object|setter|nsfproc"}, {ConvertToFrame, "method|object|default"}, Index: library/lib/nx-traits.tcl =================================================================== diff -u -N -rd31c271afb2488abafa0642b07538a3e62106130 -rc4997e0189bb712287aa53d12bb3e332acfb781d --- library/lib/nx-traits.tcl (.../nx-traits.tcl) (revision d31c271afb2488abafa0642b07538a3e62106130) +++ library/lib/nx-traits.tcl (.../nx-traits.tcl) (revision c4997e0189bb712287aa53d12bb3e332acfb781d) @@ -71,7 +71,7 @@ if {[info exists map($m)]} {set newName $map($m)} else {set newName $m} # do not add entries with $newName empty if {$newName eq ""} continue - set traitMethodHandle [$traitName info method origin $m] + set traitMethodHandle [$traitName info method definitionhandle $m] if {${per-object}} { $obj ::nsf::classes::nx::Object::alias $newName $traitMethodHandle } else { Index: library/lib/nxdoc-core.tcl =================================================================== diff -u -N -r30410351eef652c4e89ab87475b28cead6add6ac -rc4997e0189bb712287aa53d12bb3e332acfb781d --- library/lib/nxdoc-core.tcl (.../nxdoc-core.tcl) (revision 30410351eef652c4e89ab87475b28cead6add6ac) +++ library/lib/nxdoc-core.tcl (.../nxdoc-core.tcl) (revision c4997e0189bb712287aa53d12bb3e332acfb781d) @@ -2969,7 +2969,7 @@ set prj [:current_project] if {$prj ne ""} { set box [$prj sandbox] - set script "if {\[::nsf::object::exists $obj\]} {array set \"\" \[$obj eval {:__resolve_method_path \"$method_name\"}\]; ::nsf::dispatch \$(object) ::nsf::methods::${scope}::info::method handle \$(methodName)}" + set script "if {\[::nsf::object::exists $obj\]} {array set \"\" \[$obj eval {:__resolve_method_path \"$method_name\"}\]; ::nsf::dispatch \$(object) ::nsf::methods::${scope}::info::method registrationhandle \$(methodName)}" set cmdname [$box do $script] if {$cmdname ne "" && [$box eval [concat dict exists \${:registered_commands} $cmdname]]} { :pdata [$box eval [concat dict get \${:registered_commands} $cmdname]] Index: library/nx/nx.tcl =================================================================== diff -u -N -r96fd7ec7c3e09038f2ac706a0ded966c2125be74 -rc4997e0189bb712287aa53d12bb3e332acfb781d --- library/nx/nx.tcl (.../nx.tcl) (revision 96fd7ec7c3e09038f2ac706a0ded966c2125be74) +++ library/nx/nx.tcl (.../nx.tcl) (revision c4997e0189bb712287aa53d12bb3e332acfb781d) @@ -1770,7 +1770,7 @@ if {$nocomplain} {$slot eval {set :nocomplain 1}} if {[info exists value]} {$slot setCheckedInstVar -nocomplain=$nocomplain $value} - return [::nsf::directdispatch [self] ::nsf::methods::object::info::method handle [$slot name]] + return [::nsf::directdispatch [self] ::nsf::methods::object::info::method registrationhandle [$slot name]] } Object method property { @@ -1802,7 +1802,7 @@ -defaultopts [list -accessor $accessor -config $config] \ $spec \ {*}[expr {[info exists default] ? [list $default] : ""}]] - return [::nsf::directdispatch [self] ::nsf::methods::class::info::method handle [$slot name]] + return [::nsf::directdispatch [self] ::nsf::methods::class::info::method registrationhandle [$slot name]] } nx::Class method property { @@ -1912,15 +1912,13 @@ # set infoMethod "::nsf::methods::class::info::method" set plainNew "::nsf::methods::class::new" - set mappedNew [::nx::NsScopedNew $infoMethod origin new] + set mappedNew [::nx::NsScopedNew $infoMethod definitionhandle new] - set nxCurrentNew [lindex [::nx::Class $infoMethod definition new] end] - set nxMapNew [expr {$nxCurrentNew eq $plainNew}] + set nxMapNew [expr {[::nx::Class $infoMethod origin new] eq $plainNew}] if {$nxMapNew} {::nsf::method::alias ::nx::Class new $mappedNew} if {[::nsf::is class ::xotcl::Class]} { - set xotclCurrentNew [lindex [::xotcl::Class $infoMethod definition new] end] - set xotclMapNew [expr { $xotclCurrentNew eq $plainNew}] + set xotclMapNew [expr {[::xotcl::Class $infoMethod origin new] eq $plainNew}] if {$xotclMapNew} {::nsf::method::alias ::xotcl::Class new $mappedNew } } # Index: library/serialize/serializer.tcl =================================================================== diff -u -N -rda37d0fc8cc3732a3ee8cbaaac2703af01ba3334 -rc4997e0189bb712287aa53d12bb3e332acfb781d --- library/serialize/serializer.tcl (.../serializer.tcl) (revision da37d0fc8cc3732a3ee8cbaaac2703af01ba3334) +++ library/serialize/serializer.tcl (.../serializer.tcl) (revision c4997e0189bb712287aa53d12bb3e332acfb781d) @@ -486,7 +486,7 @@ } # reuse warn here as well - :alias warn [Serializer info method handle warn] + :alias warn [Serializer info method registrationhandle warn] # # Methods to be executed at the begin and end of serialize all @@ -766,7 +766,7 @@ set def "" } else { set def [$o {*}$modifier info method definition $m] - set handle [$o {*}$modifier info method handle $m] + set handle [$o {*}$modifier info method registrationhandle $m] set returns [::nsf::method::property $o $handle returns] if {$returns ne ""} {append def \n [list ::nsf::method::property $o $handle returns $returns]} } Index: library/xotcl/library/xotcl2.tcl =================================================================== diff -u -N -r96fd7ec7c3e09038f2ac706a0ded966c2125be74 -rc4997e0189bb712287aa53d12bb3e332acfb781d --- library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision 96fd7ec7c3e09038f2ac706a0ded966c2125be74) +++ library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision c4997e0189bb712287aa53d12bb3e332acfb781d) @@ -645,7 +645,7 @@ # copy all methods from Object.info to Class.info # foreach m [objectInfo ::nsf::methods::object::info::methods] { - ::nsf::method::alias classInfo $m [objectInfo ::nsf::methods::object::info::method handle $m] + ::nsf::method::alias classInfo $m [objectInfo ::nsf::methods::object::info::method registrationhandle $m] } classInfo eval { Index: tests/alias.test =================================================================== diff -u -N -r128b6dbb279c86914136b8812e249c951a88baf3 -rc4997e0189bb712287aa53d12bb3e332acfb781d --- tests/alias.test (.../alias.test) (revision 128b6dbb279c86914136b8812e249c951a88baf3) +++ tests/alias.test (.../alias.test) (revision c4997e0189bb712287aa53d12bb3e332acfb781d) @@ -488,8 +488,8 @@ :public method foo {} {upvar x y; info exists y} :public method bar {} {set x 1; :foo} - :public alias bar_ [:info method handle bar] - :public alias foo_ [:info method handle foo] + :public alias bar_ [:info method registrationhandle bar] + :public alias foo_ [:info method registrationhandle foo] :public method bar2 {} {set x 1; :foo_} :create c1 @@ -499,8 +499,8 @@ :public method foo {} {:upvar x y; info exists y} :public method bar {} {set x 1; :foo} - :public alias foo_ [:info method handle foo] - :public alias bar_ [:info method handle bar] + :public alias foo_ [:info method registrationhandle foo] + :public alias bar_ [:info method registrationhandle bar] :public method bar2 {} {set x 1; :foo_} :create d1 Index: tests/info-method.test =================================================================== diff -u -N -ra390a38437dec2a7c3461f9fadef108ebf74b928 -rc4997e0189bb712287aa53d12bb3e332acfb781d --- tests/info-method.test (.../info-method.test) (revision a390a38437dec2a7c3461f9fadef108ebf74b928) +++ tests/info-method.test (.../info-method.test) (revision c4997e0189bb712287aa53d12bb3e332acfb781d) @@ -95,11 +95,10 @@ ? {c1 info method definition foo} "::c1 public method foo {} {puts foo}" ? {c1 info lookup method foo} "::c1::foo" - ? {C info method handle m} "::nsf::classes::C::m" - ? {C class info method handle mpo} "::C::mpo" + ? {C info method registrationhandle m} "::nsf::classes::C::m" + ? {C class info method registrationhandle mpo} "::C::mpo" ? {C info method definition m} {::C public method m x {return proc-[self proc]}} - ? {C info method def m} {::C public method m x {return proc-[self proc]}} ? {C class info method definition mpo} {::C public class method mpo {} {return instproc-[self proc]}} if {$::nsf::config(assertions)} { ? {C info method definition m-with-assertions} \ @@ -446,16 +445,16 @@ # # method handles for ensemble methods # - ? {C info method handle "bar"} {::nsf::classes::C::bar} - ? {C info method handle "bar a"} {::nsf::classes::C::bar a} - ? {C info method handle "bar baz y"} {::nsf::classes::C::bar baz y} + ? {C info method registrationhandle "bar"} {::nsf::classes::C::bar} + ? {C info method registrationhandle "bar a"} {::nsf::classes::C::bar a} + ? {C info method registrationhandle "bar baz y"} {::nsf::classes::C::bar baz y} # # test whether the handles for ensemble methods work # - ? {C info method parameter [C info method handle "bar"]} "" - ? {C info method parameter [C info method handle "bar b"]} "x:int y:upper" - ? {C info method parameter [C info method handle "bar baz y"]} "x:int y:upper" + ? {C info method parameter [C info method registrationhandle "bar"]} "" + ? {C info method parameter [C info method registrationhandle "bar b"]} "x:int y:upper" + ? {C info method parameter [C info method registrationhandle "bar baz y"]} "x:int y:upper" # # check methods paths as method specifications @@ -467,8 +466,8 @@ # # test class modifier on handles # - ? {C class info method handle "foo"} {::C::foo} - ? {C class info method handle "foo x"} {::C::foo x} + ? {C class info method registrationhandle "foo"} {::C::foo} + ? {C class info method registrationhandle "foo x"} {::C::foo x} # # info method definition with method paths @@ -496,14 +495,14 @@ "-callprotection -incontext:switch -methodtype -nomixins:switch -path:switch -source pattern:optional" ? {o info method parameter "::o::foo::b"} "x:int y:upper" - ? {nx::Object info method handle "info"} "::nsf::classes::nx::Object::info" - ? {nx::Object info method handle "info lookup methods"} \ + ? {nx::Object info method registrationhandle "info"} "::nsf::classes::nx::Object::info" + ? {nx::Object info method registrationhandle "info lookup methods"} \ "::nsf::classes::nx::Object::info lookup methods" - ? {nx::Object info method handle "::nsf::classes::nx::Object::info lookup methods"} \ + ? {nx::Object info method registrationhandle "::nsf::classes::nx::Object::info lookup methods"} \ "::nsf::classes::nx::Object::info lookup methods" - ? {o info method handle "foo b"} "::o::foo b" + ? {o info method registrationhandle "foo b"} "::o::foo b" } # @@ -940,24 +939,24 @@ Class create C { :method bar {} {return bar} - set h1 [:info method handle bar] + set h1 [:info method registrationhandle bar] ? [list set _ $h1] "::nsf::classes::C::bar" - ? [list [self] info method handle bar] "::nsf::classes::C::bar" + ? [list [self] info method registrationhandle bar] "::nsf::classes::C::bar" ? [list ::nsf::method::registered $h1] ::C :class method bar {} {return bar} - set h2 [:class info method handle bar] - ? [list [self] class info method handle bar] "::C::bar" + set h2 [:class info method registrationhandle bar] + ? [list [self] class info method registrationhandle bar] "::C::bar" ? [list ::nsf::method::registered $h2] ::C } Object create o { :method bar {} {return bar} - set h1 [:info method handle bar] + set h1 [:info method registrationhandle bar] ? [list set _ $h1] "::o::bar" - ? [list [self] info method handle bar] "::o::bar" + ? [list [self] info method registrationhandle bar] "::o::bar" ? [list ::nsf::method::registered $h1] ::o } @@ -972,17 +971,17 @@ nx::Test case method-origin { nx::Class create C ? {set implHandle [C public method "foo bar" {x} {;}]} "::C::slot::__foo::bar" - ? {set regHandle [C info method handle "foo bar"]} "::nsf::classes::C::foo bar" - ? {set origin [C info method origin "foo bar"]} "::C::slot::__foo::bar" + ? {set regHandle [C info method registrationhandle "foo bar"]} "::nsf::classes::C::foo bar" + ? {set origin [C info method definitionhandle "foo bar"]} "::C::slot::__foo::bar" ? {set implHandle [C public class method "foo bar" {x} {;}]} "::C::foo::bar" - ? {set regHandle [C class info method handle "foo bar"]} "::C::foo bar" - ? {set origin [C class info method origin "foo bar"]} "::C::foo::bar" + ? {set regHandle [C class info method registrationhandle "foo bar"]} "::C::foo bar" + ? {set origin [C class info method definitionhandle "foo bar"]} "::C::foo::bar" Object create o ? {set implHandle [o public method "foo bar" {x} {;}]} "::o::foo::bar" - ? {set regHandle [o info method handle "foo bar"]} "::o::foo bar" - ? {set origin [o info method origin "foo bar"]} "::o::foo::bar" + ? {set regHandle [o info method registrationhandle "foo bar"]} "::o::foo bar" + ? {set origin [o info method definitionhandle "foo bar"]} "::o::foo::bar" } # Index: tests/interceptor-slot.test =================================================================== diff -u -N -r8046b1da6bc0689f73d4dbdc3f8d1e03fd23acaf -rc4997e0189bb712287aa53d12bb3e332acfb781d --- tests/interceptor-slot.test (.../interceptor-slot.test) (revision 8046b1da6bc0689f73d4dbdc3f8d1e03fd23acaf) +++ tests/interceptor-slot.test (.../interceptor-slot.test) (revision c4997e0189bb712287aa53d12bb3e332acfb781d) @@ -220,15 +220,15 @@ C create c1 ? {c1 foo} "C B A " - ? {c1 [C info method origin foo]} "C B A " - ? {c1 [B info method origin foo]} "B A " - ? {c1 [A info method origin foo]} "A " + ? {c1 [C info method definitionhandle foo]} "C B A " + ? {c1 [B info method definitionhandle foo]} "B A " + ? {c1 [A info method definitionhandle foo]} "A " # we expect same results via dispatch with fully qualified names ? {nsf::dispatch c1 foo} "C B A " - ? {nsf::dispatch c1 [C info method origin foo]} "C B A " - ? {nsf::dispatch c1 [B info method origin foo]} "B A " - ? {nsf::dispatch c1 [A info method origin foo]} "A " + ? {nsf::dispatch c1 [C info method definitionhandle foo]} "C B A " + ? {nsf::dispatch c1 [B info method definitionhandle foo]} "B A " + ? {nsf::dispatch c1 [A info method definitionhandle foo]} "A " # # check, whether the context of "my -local" is correct @@ -238,9 +238,9 @@ C public method bar {} {nsf::my -local foo} ? {c1 bar} "C B A " - ? {c1 [C info method origin bar]} "C B A " - ? {c1 [B info method origin bar]} "B A " - ? {c1 [A info method origin bar]} "A " + ? {c1 [C info method definitionhandle bar]} "C B A " + ? {c1 [B info method definitionhandle bar]} "B A " + ? {c1 [A info method definitionhandle bar]} "A " } # @@ -259,9 +259,9 @@ Class create X -mixin {C B A} X create c1 ? {c1 foo} "C B A " - ? {c1 [C info method origin foo]} "C B A " - ? {c1 [B info method origin foo]} "B A " - ? {c1 [A info method origin foo]} "A " + ? {c1 [C info method definitionhandle foo]} "C B A " + ? {c1 [B info method definitionhandle foo]} "B A " + ? {c1 [A info method definitionhandle foo]} "A " # # Intrinsic classes and mixin classes @@ -272,11 +272,11 @@ Z create c1 -mixin {C B A} ? {c1 foo} "C B A Z Y " - ? {c1 [C info method origin foo]} "C B A Z Y " - ? {c1 [B info method origin foo]} "B A Z Y " - ? {c1 [A info method origin foo]} "A Z Y " - ? {c1 [Z info method origin foo]} "Z Y " - ? {c1 [Y info method origin foo]} "Y " + ? {c1 [C info method definitionhandle foo]} "C B A Z Y " + ? {c1 [B info method definitionhandle foo]} "B A Z Y " + ? {c1 [A info method definitionhandle foo]} "A Z Y " + ? {c1 [Z info method definitionhandle foo]} "Z Y " + ? {c1 [Y info method definitionhandle foo]} "Y " # # check, whether the context of "my -local" is correct @@ -288,11 +288,11 @@ Z public method bar {} {nsf::my -local foo} ? {c1 bar} "C B A Z Y " - ? {c1 [C info method origin bar]} "C B A Z Y " - ? {c1 [B info method origin bar]} "B A Z Y " - ? {c1 [A info method origin bar]} "A Z Y " - ? {c1 [Z info method origin bar]} "Z Y " - ? {c1 [Y info method origin bar]} "Y " + ? {c1 [C info method definitionhandle bar]} "C B A Z Y " + ? {c1 [B info method definitionhandle bar]} "B A Z Y " + ? {c1 [A info method definitionhandle bar]} "A Z Y " + ? {c1 [Z info method definitionhandle bar]} "Z Y " + ? {c1 [Y info method definitionhandle bar]} "Y " } @@ -340,11 +340,11 @@ ? {c1 info precedence} "::C ::B ::A ::Z ::Y ::nx::Object" ? {c1 bar} "Z Y " - ? {c1 [C info method origin bar]} "Z Y " - ? {c1 [B info method origin bar]} "Z Y " - ? {c1 [A info method origin bar]} "Z Y " - ? {c1 [Z info method origin bar]} "Z Y " - ? {c1 [Y info method origin bar]} "Z Y " + ? {c1 [C info method definitionhandle bar]} "Z Y " + ? {c1 [B info method definitionhandle bar]} "Z Y " + ? {c1 [A info method definitionhandle bar]} "Z Y " + ? {c1 [Z info method definitionhandle bar]} "Z Y " + ? {c1 [Y info method definitionhandle bar]} "Z Y " # # check, whether the context of "nsf::dispatch [self] -intrinsic" is correct @@ -356,11 +356,11 @@ Z public method bar {} {nsf::dispatch [self] -intrinsic foo} ? {c1 bar} "Z Y " - ? {c1 [C info method origin bar]} "Z Y " - ? {c1 [B info method origin bar]} "Z Y " - ? {c1 [A info method origin bar]} "Z Y " - ? {c1 [Z info method origin bar]} "Z Y " - ? {c1 [Y info method origin bar]} "Z Y " + ? {c1 [C info method definitionhandle bar]} "Z Y " + ? {c1 [B info method definitionhandle bar]} "Z Y " + ? {c1 [A info method definitionhandle bar]} "Z Y " + ? {c1 [Z info method definitionhandle bar]} "Z Y " + ? {c1 [Y info method definitionhandle bar]} "Z Y " } Index: tests/method-require.test =================================================================== diff -u -N -r40c99702db40bd86761bfea1f1209cc761e61e62 -rc4997e0189bb712287aa53d12bb3e332acfb781d --- tests/method-require.test (.../method-require.test) (revision 40c99702db40bd86761bfea1f1209cc761e61e62) +++ tests/method-require.test (.../method-require.test) (revision c4997e0189bb712287aa53d12bb3e332acfb781d) @@ -25,7 +25,7 @@ # nsf::proc ::get_mixin {object -per-object:switch mixinClass methodName} { ::nsf::mixin $object -per-object=${per-object} $mixinClass - return [$mixinClass info method handle $methodName] + return [$mixinClass info method registrationhandle $methodName] } # use the method provider nsf::method::provide x {::get_mixin ::MIX x} { Index: tests/methods.test =================================================================== diff -u -N -r6ec717176dee759bf70840eabb6b5728229ed8f9 -rc4997e0189bb712287aa53d12bb3e332acfb781d --- tests/methods.test (.../methods.test) (revision 6ec717176dee759bf70840eabb6b5728229ed8f9) +++ tests/methods.test (.../methods.test) (revision c4997e0189bb712287aa53d12bb3e332acfb781d) @@ -23,9 +23,9 @@ :protected property protected_setter # alias - :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] + :alias plain_alias [C info method registrationhandle plain_method] + :public alias public_alias [C info method registrationhandle public_method] + :protected alias protected_alias [C info method registrationhandle protected_method] # class-object :class method plain_object_method {} {return [current method]} @@ -37,9 +37,9 @@ :class property plain_object_setter :public class property public_object_setter :protected class property protected_object_setter - :class alias plain_object_alias [:class info method handle plain_object_method] - :public class alias public_object_alias [:class info method handle public_object_method] - :protected class alias protected_object_alias [:class info method handle protected_object_method] + :class alias plain_object_alias [:class info method registrationhandle plain_object_method] + :public class alias public_object_alias [:class info method registrationhandle public_object_method] + :protected class alias protected_object_alias [:class info method registrationhandle protected_object_method] } C create c1 { # methods @@ -58,9 +58,9 @@ :protected property protected_object_setter # alias - :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] + :alias plain_object_alias [:info method registrationhandle plain_object_method] + :public alias public_object_alias [:info method registrationhandle public_object_method] + :protected alias protected_object_alias [:info method registrationhandle protected_object_method] } C public property s0 C protected property s1 Index: tests/parameters.test =================================================================== diff -u -N -rf32527e58ada02a9089fa17e2d1a99bac89f9be9 -rc4997e0189bb712287aa53d12bb3e332acfb781d --- tests/parameters.test (.../parameters.test) (revision f32527e58ada02a9089fa17e2d1a99bac89f9be9) +++ tests/parameters.test (.../parameters.test) (revision c4997e0189bb712287aa53d12bb3e332acfb781d) @@ -1159,12 +1159,12 @@ ? {::nsf::method::setter o ints:integer,1..*} "::o::ints" ? {::nsf::method::setter o o:object} "::o::o" - ? {o info method handle ints} "::o::ints" + ? {o info method registrationhandle ints} "::o::ints" ? {o info method definition ints} "::o public setter ints:integer,1..*" ? {o info method parameter ints} "ints:integer,1..*" ? {o info method args ints} "ints" - ? {o info method handle o} "::o::o" + ? {o info method registrationhandle o} "::o::o" ? {o info method definition o} "::o public setter o:object" ? {o info method parameter o} "o:object" ? {o info method args o} "o" Index: tests/protected.test =================================================================== diff -u -N -rd8dcbc3ba475a4617d540b4499a9c41e8bf81b07 -rc4997e0189bb712287aa53d12bb3e332acfb781d --- tests/protected.test (.../protected.test) (revision d8dcbc3ba475a4617d540b4499a9c41e8bf81b07) +++ tests/protected.test (.../protected.test) (revision c4997e0189bb712287aa53d12bb3e332acfb781d) @@ -288,7 +288,7 @@ # remove the filter d1 filter "" # define call to private method via method handle - C public method foo {} { return "C.foo [[self] [C info method handle bar]]"} + C public method foo {} { return "C.foo [[self] [C info method registrationhandle bar]]"} # the behavior without filter, should be like above ? {d1 baz} "D.baz C.baz " @@ -370,13 +370,13 @@ # calls via method handles allows us to dispatch private methods, # results like "-local" resolves above - ? {c1 [C info method handle p1]} "C.p1 " - ? {c1 [C info method handle p3]} "C.p3 B.p3" + ? {c1 [C info method registrationhandle p1]} "C.p1 " + ? {c1 [C info method registrationhandle p3]} "C.p3 B.p3" # calls via method handles allows us to dispatch private methods, # results like "-local" resolves above - ? {nx::dispatch c1 [C info method handle p1]} "C.p1 " - ? {nx::dispatch c1 [C info method handle p3]} "C.p3 B.p3" + ? {nx::dispatch c1 [C info method registrationhandle p1]} "C.p1 " + ? {nx::dispatch c1 [C info method registrationhandle p3]} "C.p3 B.p3" # we can't call the private method via dispatch, since the private # methods are removed from the search for methods @@ -444,11 +444,11 @@ nx::Test case my+handle-instead-of-my-local { nx::Class create Base { :private method privateMethod {a b} { expr {$a + $b} } - :public method foo {a b} {: [Base info method handle privateMethod] $a $b} + :public method foo {a b} {: [Base info method registrationhandle privateMethod] $a $b} } nx::Class create Sub -superclass Base { - :public method bar {a b} {: [Sub info method handle privateMethod] $a $b} + :public method bar {a b} {: [Sub info method registrationhandle privateMethod] $a $b} :private method privateMethod {a b} { expr {$a * $b} } :create s1 @@ -465,11 +465,11 @@ nx::Test case dispatch-instead-of-my-local { nx::Class create Base { :private method privateMethod {a b} { expr {$a + $b} } - :public method foo {a b} { dispatch [self] [Base info method handle privateMethod] $a $b } + :public method foo {a b} { dispatch [self] [Base info method registrationhandle privateMethod] $a $b } } nx::Class create Sub -superclass Base { - :public method bar {a b} { dispatch [self] [Sub info method handle privateMethod] $a $b } + :public method bar {a b} { dispatch [self] [Sub info method registrationhandle privateMethod] $a $b } :private method privateMethod {a b} { expr {$a * $b} } :create s1 @@ -496,7 +496,7 @@ ? {o1 info} "overloads system info" ? {o1 ::nx::Object::slot::__info::vars} "v" - ? {o1 [nx::Object info method origin "info vars"]} "v" + ? {o1 [nx::Object info method definitionhandle "info vars"]} "v" #? {o1 -system info vars} "v" ? {nx::dispatch o1 -system info vars} "v" @@ -522,7 +522,7 @@ ? {c1 info} "overloads system info" ? {c1 ::nx::Object::slot::__info::vars} "v" - ? {c1 [nx::Object info method origin "info vars"]} "v" + ? {c1 [nx::Object info method definitionhandle "info vars"]} "v" #? {c1 -system info vars} "v" ? {nx::dispatch c1 -system info vars} "v" Index: tests/submethods.test =================================================================== diff -u -N -rb2ab5886fc3278e549bb2772dfce921fbd06a9e9 -rc4997e0189bb712287aa53d12bb3e332acfb781d --- tests/submethods.test (.../submethods.test) (revision b2ab5886fc3278e549bb2772dfce921fbd06a9e9) +++ tests/submethods.test (.../submethods.test) (revision c4997e0189bb712287aa53d12bb3e332acfb781d) @@ -510,7 +510,7 @@ foreach selector [list "FOO foo" "BAR BUU boo" "baz"] { Z public method $selector {} {;} set root [lindex $selector 0] - set mh [Z info method handle $root] + set mh [Z info method registrationhandle $root] $c {*}$selector ? [list set _ [join [Z msg] -]] -$root-::Z-$mh } Index: tests/tcloo.test =================================================================== diff -u -N -r8046b1da6bc0689f73d4dbdc3f8d1e03fd23acaf -rc4997e0189bb712287aa53d12bb3e332acfb781d --- tests/tcloo.test (.../tcloo.test) (revision 8046b1da6bc0689f73d4dbdc3f8d1e03fd23acaf) +++ tests/tcloo.test (.../tcloo.test) (revision c4997e0189bb712287aa53d12bb3e332acfb781d) @@ -44,7 +44,7 @@ set scope [expr {$perObject?"object":"class"}] foreach m $args { set methodHandle [::nsf::dispatch $current \ - ::nsf::methods::${scope}::info::method handle $m] + ::nsf::methods::${scope}::info::method registrationhandle $m] if {$methodHandle eq ""} { set methodHandle [::nsf::method::create $current {*}[expr {$perObject?"-per-object":""}] $m args { if {[::nsf::current nextmethod] eq ""} {