nsf.c

Clone Tools
  • last updated 10 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
- handle cyclical superclassclass dependencies during object system finalize - extend regression test

  1. … 2 more files in changeset.
nsf.c: - ignore in internall calls to "dealloc" protection settings - handle cyclical class dependencies during object system finalize - extend regression test

  1. … 2 more files in changeset.
- Addressed a number of issues in the NX slot infrastructure (which revealed themselves when running Mark's BusinessActivities implementation in XOTcl2 mode): - generic/nsf.c: Initcmd blocks (as set for registering per-class slot traces) were subjected to argument checks causing unexpected behavior (e.g., attempts of unboxing initcmds as Tcl lists or of checking initcmds against value types). This was fixed by exempting NSF_ARG_INITCMD params from argument checking in ArgumentCheck() explicitly. - library/nx/nx.tcl: For per-class parameters, the use of valuechangedcmd effectively overruled the default value specified (simply because the generated initcmd holding the trace statements took the place of the default value). While for defaultcmd and for valuecmd the parallel use of default is forbidden, the valuechangedcmd semantics allow for specifying a default, in principle. This was fixed by providing a default-setting statement in the initcmd. - tests/parameters.test: Added tests to cover the above (and beyond). - library/xotcl/library/xotcl2.tcl: Extended the backwards compatibility of the hybrid XOTcl2/NX slots infrastructure to the XOTcl 1 interface: This includes support for inline -proc statements and instvar. This compat level corresponds to the slot interface as documented (by examples) in the XOTcl language ref and the manual. - library/xotcl/tests/slottest.xotcl: Added tests for the above compat enhancements.

  1. … 4 more files in changeset.
Most issues resolved, however, the ordering of default vs. traces is pending

  1. … 4 more files in changeset.
- Replaced errorneous check using the object-specific rather than the class-specific options in the query mode of ::nsf::relation with class-filter. This prevented [::nsf::relation /cls/ class-filter] from returning any filter info. As a consequence, the incremental interface of the filter slot failed (e.g., [/cls/ filter add aFilterProc] effectively reset the class-filter cmd list instead of adding to it). Thx are due to Markus Moldaschl for reporting the issue. - Aligning class-filter and object-filter behaviour on errors during filter additions to the state-preserving behaviour of object-mixin and class-mixin. - Adding basic tests on object-filter/class-filter (::nsf::relation, filter slot interface) and specific ones to cover the above issues.

  1. … 2 more files in changeset.
Aligning class-filter and object-filter behaviour on errors during filter additions to the state-preserving behavior of object-mixin and class-mixin

Replaced errorneous variable check which prevented [::nsf::relation /obj/ class-filter] from returning any filter info

- added a SlotContainerCmdResolver() to avoid interaction of slot names with names of callable tcl commands. Without the SlotContainerCmdResolver() the call to "list" in a property named "list" leads to a call to the container object ::Test2::slot::list instead to the intended ::list. The implementation is not perfect, since it ignores the namespace path inside the slot container. - added regression test.

  1. … 2 more files in changeset.
nsfShadow.c - bump MethodEpoch when a tcl ::rename command happens on a nsf method (which might be cached in a Tcl_Obj) This fixes a crash reported by Arthur Schreiber nsf.c: - make NsfInstanceMethodEpochIncr() and NsfObjectMethodEpochIncr() accessible from all files using nsfInt.h - remove experimental code (backslash escaping for "," in parameter option parse

  1. … 4 more files in changeset.
- fix compilation when dtrace is activated (missing parthesis, many thanks to Victor Guerra for noticing)

- generic/nsf.c, ObjectDispatch(): Re-arranged the handling of fully-qualified method dispatches with the selectors resolving to existing objects and, in particular, nested (namespace-qualified) objects. Prior to that, dispatches such as "::C ::parent::child" were not covered appropriately: ::parent was reported as valid regObj and so the dispatcher continued to dispatch to the cmd "::parent::child" in the self-context ::parent::child ... with unwanted side-effects (e.g., XOTcl's unknown handling was bypassed). - tests/methods.test: Added basic tests on the (current) handling for such ::* dispatches and a specific test set on the intended XOTcl behaviour.

  1. … 1 more file in changeset.
Merge branch 'master' of ssh://alice.wu-wien.ac.at/usr/local/src/git-repo/nsf

- allow parens in property names (array syntax) - added "/obj/ info name" (as alternative to "namspace tail [self]")

  1. … 3 more files in changeset.
- use newer style of tcl-obj interface instead of sprintf

- implement escaping for comma in value of parameter options: escaping in values can be achived via duplicating the comma. - extend regression test

  1. … 2 more files in changeset.
- explorative implementation of object method dispatches with KEEP_CALLER_SELF and no NSF_PER_OBJECT_DISPATCH - extend regression test

  1. … 2 more files in changeset.
nsf.c: - refactor ObjectCmdMethodDispatch() for clarity - prepare work on object method dispatches with KEEP_CALLER_SELF and no NSF_PER_OBJECT_DISPATCH

  1. … 1 more file in changeset.
- fix off-by-one error

- fix typo

nsf.c: - generalize stack monitor by handling growing and shrinking stacks - refactor into funciton CheckCStack()

  1. … 1 more file in changeset.
- added compile macro NSF_STACKCHECK to provide stack monitoring/debugging (especially useful for multi threaded programs, where stack is more limited)

  1. … 4 more files in changeset.
- protect serial generation for parameters via mutex

  1. … 1 more file in changeset.
- fix compilation when compiled without threads (many thanks for r.zaumseil for noting this).

  1. … 1 more file in changeset.
- pass property name to slot "initialize" method to conform with the interface to "assign", "get" ... (all these receive the property name as well) - allow slot "initialize" method to be protected (handled similarly to "init")

  1. … 3 more files in changeset.
nsf.c: - added object parameter option "slotinitialize" - renamed object parameter option "invokesetter" -> "slotassign" - call slot.assign instead of setter of object - removed restriction on nosetter/invokesetter: nosetter can be used in connection with slotassign - added regression test for slot.initialize

  1. … 4 more files in changeset.
- Fixed a bad interaction between Tcl's apply (pushing lambda frames) and the variable resolvers. The variable resolver was not able to resolve variables, while the command resolver was still working correctly. - Extended regression test

  1. … 2 more files in changeset.
- improve error message to indicate, that nsf refuses to overwrite (redefine) some cmds

  1. … 2 more files in changeset.
- don't allow method to overwrite child object - extended regression test - documented new feature as incompatibility with XOTcl 1

  1. … 4 more files in changeset.
- don't allow object creation to overwrite non-object cmds (e.g. procs)

  1. … 5 more files in changeset.
- use Tcl's EXTERN macro instead of "extern"

  1. … 5 more files in changeset.