Clone
 

stefan sobernig <stefan.sobernig@wu.ac.at> in nsf

* nsf.c (NsfMethodForwardCmd): Provide correct scoping condition when requesting a method handle for a submethod forwarder. Added basic tests.

* nsf.c, nsfStack.c: Bump copyright years.

* nsf.c (ObjectCmdMethodDispatch), protected.test: For ensemble (submethod) dispatches, since ever, call protection had not been enforced at all. This commit enables call protection (protected) for ensembles and adds basic tests. * nsfStack.c (GetSelfObj): To allow one to resolve the self reference at arbitrary callstack levels, separate GetSelfObj into GetSelfObj (macro) for the topmost self and GetSelfObj2.

* nsf.c (NsfCCreateMethod): During a shutdown, in a filter setting, objv is not necessarily populated. Prior to this fix, the following crashes on exit for "ObjStr(objv[1])":

nx::Class create Klass

Klass public object method expand args {

return [[self] new {*}$args]

}

Klass object filters add expand

Along the way, rendered the print-out more informative.

* nsf.c (FindNextMethod): Provide revised, streamlined implementation of FindSelfNext as FindNextMethod. FindSelfNext is maintained, but unused for the time being.

* nsf.c (NsfCurrentCmd), nsfStack.c (CallStackNextFrameOfType): Render [current isnextcall] aware of ensembles. Extended submethods.test to cover [current isnextcall] within ensembles.

nsf.c (FindSelfNext): Render [current nextmethod] aware of ensembles. Added basic tests.

submethods.test: Clean up ensembles on top-level objects.

nx-test.tcl (nx::test case): As (ensemble) methods are currently not covered by the auto-cleanup feature of "nx::test case", I took care of not cleaning up the per-class ensemble slots while the alias is still available. This led to dangling aliases in cases such as:

package req nx::test

nx::Class create ::A

nx::test case tmp {

::A public method "oo ps" {} {;}; # creates ::A::slot::__oo plus alias pointing to it.

}

A create a

a oo ps; # "target "::A::slot::__oo" of alias oo apparently disappeared"

Along the way, modernized nx::test case a little (apply).

* nsf.c (GetNextArguments): Ensemble method names via the colon resolver were not cleansed for the colon, leading to a broken method lookup chain. Fix for SF Ticket #1. Added basic tests.

* nsf.c, forward.test (ForwardArg): Extend to recognize alternative element separators in list string reps (NsfHasTclSpace).

* nsf.c, nsf-cmd.test (ObjectFindMethod): Extend to recognize all element separator chars (NsfHasTclSpace).

* nsf.c, parameters.test (NsfMethodSetterCmd): Make list detection aware of all list separator chars (NsfHasTclSpace).

* nsf.c, parameters.test (NsfOResidualargsMethod): Extend XOTcl's list-notation support to recognize all Tcl list separators (NsfHasTclSpace).

* nsf.c, nsfInt.h: Start housekeeping work on Tcl command/proc names vs. NSF method names to avoid conflicts between ensemle methods and e.g. whitespace-containing command names. Added helper macro NsfHasTclSpace and some first tests. To be continued.

* nsf.c (NsfMethodPropertyCmd,NsfForwardPropertyCmd): Remove extra whitespace from error message.

* methods.test: Add basic tests on composite names under the default unknown handler.

Merge branch 'master' of ssh://alice.wu-wien.ac.at/usr/local/src/git-repo/nsf

* nsf.c (DispatchUnknownMethod): Sanitize messages emitted by default unknown handler. Unless in the context of an ensemble object (NSF_KEEP_CALLER_SELF, NSF_PER_OBJECT_DISPATCH), make sure that the entire method name, incl. multi-word names, are fully reported.

Fix wording in TODO

Leave some TODOs to think about

* nx.tcl (VariableSlot): Fix value=delete to actually accept and implement "-nocomplain". Added tests (missing so far entirely) and updated the man pages accordingly.

* nx.tcl, parameters.test (defineIncrementalOperations): Make sure value=add and value=delete actually run value checkers and, in case of "convert", pick up the conversion result. Added basic test.

* nsf.c (ArgumentCheck): Set parentheses correctly.

* nx.tcl (makeIncrementalOperations, defineIncrementalOperations): Avoid repeated slot= entries in options. Fix a typo.

* nsf.c (ArgumentCheck): Avoid double dispatching to value checkers (built-in and type=*) for "slotset" parameters. Previously, configure and then the value=set (value=add) method triggered one dispatch each. Now, the configure pass skips the check and shifts sole responsibility on the value=set/ value=add methods. Added basic test cases to parameters.test to capture the intended call semantics.

Merge branch 'master' of ssh://alice.wu-wien.ac.at/usr/local/src/git-repo/nsf

Regenerated migration and tutorial, to account for recently fixed typos and fix markup generation

    • -1111
    • +346
    /doc/next-tutorial/next-tutorial.html
* Makefile.in: Unify ASCIIDOC exec configuration.

* next-migration.txt: Address some typos (thx to Guenter Ernst for reporting).