nsf.c

Clone Tools
  • last updated 13 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
- make sure to place declarations only at the begin of a block - minor code cleanup

  1. … 1 more file in changeset.
- 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.
- generalized "nsf::object::initialized" to nsf::object::property objectName initialized|class|rootmetaclass|rootclass|slotcontainer

  1. … 4 more files in changeset.
- regularized more nsf::* names: renamed "nsf::createobjectsystem" => "nsf::objectsystem::create" renamed "nsf::unknown" => "nsf::object::unknown" renamed "nsf::dispatch" => "nsf::object::dispatch"

  1. … 17 more files in changeset.
- make sure to always initialize variables

- tests/parameters.test: Tracked down the relevant Tcl issue (fossil check-in 769801ace1) resulting in the bignum double-rounding problem, observed earlier. The work-around is setting the tcl precision level to 17. I made it applying conditionally, depending on the Tcl patch level as the work-around is not needed anymore fore 8.5.10+. - generic/nsf.c: Correct usage of TclDumpMemoryInfo() for changes in 8.5.10, introduced by fossil check-in 4a9ba46064. Memdebug builts (--enable-symbols=mem) therefore require a recent Tcl version (8.5.10+).

  1. … 1 more file in changeset.
- reduce verbosity - redoce scope of variables

  1. … 1 more file in changeset.
- adding spaces after comma in argument lists

  1. … 5 more files in changeset.
- fix typos in string "unknown" (unknwon, unkown)

  1. … 3 more files in changeset.
- provide backward compatibility for unknwon method (when method contains spaces). - some minor cleanup - extended regression test

  1. … 2 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.
- generic/nsf.c / CallConfigureMethod() + CmdMethodDispatch(): Rephrased the accompanying docstrings slightly, to align the documentation to the underlying implementation details.

- generic/nsf.c / NsfOConfigureMethod(): Configure adds frames to its callstack context, however, so far the callstack modifications have not honoured the fact that configure() can be called from uplevel'ed call sites. The callstack context resulting from a prior uplevel was erased by the call frame introductions. As a consequence, parameter-dispatched methods found themselves in a wrong variable frame context. The suggested patch adds uplevel awareness in the most generic way I could think of. The entire test suite runs against the patched NsfOConfigureMethod(). However, I might be missing unwanted consequences for untested cases ... we need to think of further test scenarios ...

  1. … 1 more file 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.
Merge branch '2.0.0-develop' of ssh://alice.wu-wien.ac.at/usr/local/src/git-repo/xotcl into 2.0.0-develop

  1. … 1 more file in changeset.
- preliminary fix for volatile called through redsidual args - new regression test file volatile.test

  1. … 4 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.
Merge branch '2.0.0-develop' of ssh://alice.wu-wien.ac.at/usr/local/src/git-repo/xotcl into 2.0.0-develop

- nsf.c: * new file nsfPointer.c * generic new value checker ConvertToPointer to handle c-level conversions (which can be registed from nsf extensions) * extern defined interface for the pointer converter: Nsf_PointerTypeLookup(), Nsf_PointerTypeRegister(), Nsf_PointerAdd(), Nsf_PointerDelete(), Nsf_PointerInit(), Nsf_PointerExit(). - library mongodb * changed mongoAPI to pointer converter interface

  1. … 12 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.
- 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: Re-introduce trimming for "names" of unknown parameter options.

- 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.
- renamed gentclAPI.decls to nsfAPI.decls - renamed tclAPI.h to nsfAPI.h - added nsf.m4 to git for the time being

  1. … 7 more files in changeset.
- genAPI.decls and nsf.c: bring cmds in same order - nsf.c: align naming conventions

  1. … 3 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.
-blank changes