disposition.test

Clone Tools
  • last updated 3 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
- generic/nsf.c: Fixed [current callingmethod] for submethods (i.e., reporting submethods as calling methods, including their methodpath). Added tests covering the fix (see tests/submethods.test). - generic/nsfStack.c (CallStackMethodPath): Re-arranged the traversal slightly, to escape non-ensemble frames (eval CFRAMEs) as parts of the method path. Added test (see tests/submethods.test). - library/nx/nx.tcl: Corrected the impl of Ensemble->defaultmethod() (e.g., used self instead of current) - tests/disposition.test: Fixed test cases turned out to be false positives. Before the fixes, [current methodpath] gave non-empty results for simple object aliases.

  1. … 4 more files in changeset.
- first draft of separation of attribute -> variable + accessor

  1. … 4 more files in changeset.
- TODO: Added an entry concerning callstack introspection (as discussed today) - generic/nsf.c: Some minor renaming in NsfOConfigureMethod(); made sure that intermediate frames resulting from forward-parameter dispatches are equally marked INACTIVE. - tests/disposition.test: Added tests covering uplevel/upvar support under parameter/disposition dispatches (i.e., uplevel and upvar calls from within parameter-dispatched methods); the tests also cover XOTcl's residualargs dispatches.

  1. … 3 more files in changeset.
Squashed commit of the following:

commit 901efa4cb4e1bbd55a8c47ebb79f4c7b4b397668

Author: ssoberni <stefan.sobernig@wu-wien.ac.at>

Date: Wed Jul 6 17:51:38 2011 +0200

- generic/nsf.c: Provide the [current class] context to submethods

- tests/disposition.test: Added some tests on the interaction of

INACTIVE frames (mixin, filter) and submethods

- tests/submethods.test: Testing [current class] context for submethods

  1. … 3 more files in changeset.
- generic/nsfStack.c: Revised my former patch for traversing callstacks under ensemle dispatches. We fixed the traversal-ending gateway expression; and added transparency for INACTIVE frames when assembling the method path. Added further tests, remain to be completed ...

  1. … 2 more files in changeset.
- Reduced verbosity in nsf.c, reactivated a test case

  1. … 1 more file in changeset.
- nsfStack.c / CallStackMethodPath(): Providing a fix for reporting method paths correctly when dispatching to ensembles from alias parameters. Prior to that fix, the intermediate (and inactive) CMETHOD frame wrapping configure() calls caused [current methodpath]s to report empty string elements. Added some test cases. - nsf.c / ObjectDispatch(), DispatchUnknownMethod(): When testing objects as alias parameter targets, I found cases when the default (C-level) unknown handler was invoked upon. The result was an unknown message which reported the delegator object as "unknown" method! This was due to injecting the delegator object into the argument vector at position 0, subsequently used by the C-level unknown handler. First, I tried to make the C-level unknown handler aware of the ensemble call context (by funneling through the CSC and frame flags) but this turned out to be complicated to achieve this simple task. As an alternative, I suggest the following patch: The first argument in unknown calls is treated as a list, and dependening on the call context (ensemble vs. non-ensemble) contains all the necessary call data. For ensemble methods, it is the delegator object, the entire method path (as returned by [current methodpath]), and the actual unknown selector. The default C-level handler, treating the call info as list, resorts to reporting the last element of the list which is always the unknown selector. Custom (ensemble-level, application-level) unknown handler can wrap and further process the information as necessary. To demonstrate the usefulness, I rewrote EnsembleObject->unknown() accordingly. I checked for Tcl_Obj leaks. - Added some tests on objects as targets of alias object parameter. To be continued.

  1. … 6 more files in changeset.
- nsf.c: * report only fully initialized slot objects via "info slots" to avoid chicken-egg problem during method "objectparameter" * added flag -array to ::nsf::var::exists to check, whether the variable is an array (to avoid "o eval {array exists ...}" in the serializer. * provided flags to VarExists instead of multiple args * don't add new pointer entries in Nsf_PointerTypeLookup()

  1. … 9 more files in changeset.
- generic/nsf.c: Shuffled around the word order and adding some quoting in the error message for enforcing multivalued, non-empty list multiplicities; to differentiate between parameter name and value literals etc.

  1. … 2 more files in changeset.
- tests/disposition.test: Added tests covering "dispos vs. return checker" and "dispos vs. uplevel/upvar"

- nsf.c: no good reason to disallow user defined types for for alias, forward or initcmd

  1. … 2 more files in changeset.
- generic/nsf.c: Aligned error messages for parameter options; Re-arranged control flow in ParamOptionParse() slightly, do allow for [string is] types being used as options of disposition types. Refactored code slightly (e.g., removed unneeded, intermediary Tcl_Objs). - tests/disposition.test: Extended test suite, in particular, for covering multiplicity types as parameter options of disposition types. - tests/parameters.test: Adjusting for rephrased error messages.

  1. … 2 more files in changeset.
- nsf.c: * Don't output non-consuming procs (which are always called) via parametersyntax (shows, what a user can input) * additional command ::nsf::object::initialized to check whether an object is already initialized * new function DispatchInitMethod() similar to DispatchDefaultMethod() * let residualargs call init directly instead of doing it the inidrect way * provided ability to call init with object parameters at arbitrary times * switch from Tcl_ObjCmdProc style interface (ClientData first) to a C stype interface for DispatchDefaultMethod(), DispatchUnknownMethod() * bring cmd definitions for nsf::object in right order - extended regression test

  1. … 9 more files in changeset.
- nsf.c: * added refcounting to parameter definitions (needed, when aliased object parameter redefined the actual objectparameters) * removed hardcoded call to remaining args * switched implentation of xotcl2 to use object parameter with parameter option "args" * removed residualargs from object system definition * extended regression test

  1. … 5 more files in changeset.
- nsf.c: * improved source code documentation * added parameter option "args" in order to get eventually rid of hard-wired residual args. * improved a few error messages * fixed object parameters consisting only of plain parameters (previously, no parameters were returned in this case, e.g. for method parameters; but object parameter code depends on it) - extended and updated regression tests

  1. … 7 more files in changeset.
- minor editing

- regression tests: * added disposition.test * extended regression tests

    • -0
    • +451
    ./disposition.test
  1. … 3 more files in changeset.