nsf

Clone Tools
  • last updated 19 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
- added support for "class variable" - added tests for "variable" + multiplicity and "class variable"

- nx::Attribute: changed method 'checkInstVar' to 'setCheckedInstVar' - set only fresh variables via per-object method "variable" and "attribute" - added flag -concomplain to per-object method "variable" and "attribute" - extended regression test

- add reference value in tests, update TODO

- nx: factor out method createFromParameterSpec - method variable: * check default value * added shortcut, when no slot object is needed * extended regression test

- generalized "nsf::object::initialized" to nsf::object::property objectName initialized|class|rootmetaclass|rootclass|slotcontainer

- regularized more nsf::* names: renamed "nsf::createobjectsystem" => "nsf::objectsystem::create" renamed "nsf::unknown" => "nsf::object::unknown" renamed "nsf::dispatch" => "nsf::object::dispatch"

    • -11
    • +11
    /library/xotcl/library/xotcl2.tcl
  1. … 3 more files in changeset.
- better error message

- fix typo

- library/mongodb: * added new index options "-sparse" and "-background"

- library/mongodb: * updated to current interface in git HEAD * added flag timeout to mongo::connect

- first draft of separation of attribute -> variable + accessor

- make sure to always initialize variables

- reamed ObjectParameterSlot attribute from nosetter => accessor (positive formulation)

- 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+).

- reduce verbosity - redoce scope of variables

- adding spaces after comma in argument lists

- fix typos in string "unknown" (unknwon, unkown)

- provide backward compatibility for unknwon method (when method contains spaces). - some minor cleanup - extended regression test

- 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.

- 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 ...

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

- 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 ...

Merge branch '2.0.0-develop' of ssh://alice.wu-wien.ac.at/usr/local/src/git-repo/xotcl into 2.0.0-develop

- preliminary fix for volatile called through redsidual args - new regression test file volatile.test

    • -0
    • +85
    /tests/volatile.test
- Reduced verbosity in nsf.c, reactivated a test case

- tests/forward.test, tests/methods.test: Remove some intermediary statements

- 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.

- 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()

- correct result type