nsfInt.h

Clone Tools
  • last updated 23 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
- changed ::nsf::parametersyntax(..) to ::nsf::parameter::syntax(..) - xotcl2: adjusted manual parameter syntax entries to new conventions

  1. … 6 more files in changeset.
- removed some TODOs from tests/parameters.test

- parameter dispositions:

We differentiate now between "initcmd" and "cmd": an "initcmd" is only

evaluated once, but one can provide configure values for this parameter

later. a "cmd" is executed on every evaluation, it is only possible

to pass cmds to it. The trailing argument of the configure parameters

(used e.g. for scripted object/class definitions) is now of type "cmd".

Implementation not yet complete (object cases are not correct).

  1. … 8 more files in changeset.
Method and configure parameter reform, Part 3: - added

/cls/ info lookup variables -> list of handles

/obj/ info lookup object variables -> list of handles

/obj/ info variable definition|name|parameter /handle/

- nx.tcl: added forward compatible scripted implementation of "lmap"

- nsf.c: handle names for private slots in pattern provided to AddSlotObjects(),

used e.g. in "info lookup slots /pattern/"

  1. … 7 more files in changeset.
- nx.tcl: handle "incremental" in slot reconfigure - nx.tcl: change defaultAccessor to "none"

  1. … 20 more files in changeset.
- try to print arguments in one sweep in NsfDStringPrintf() - remove "extern" declarations

  1. … 1 more file in changeset.
- moved NsfConfigEnabled from nsf.h to nsfInt.h (no need to be part of the public interface) - moved NSF_ARGPARSE_* macros to nsf.h (since arg parser is public and uses these flags)

  1. … 1 more file in changeset.
- first draft of per-object parameter caching (for per-object-mixins and per-object properties).

  1. … 3 more files in changeset.
Property Reform Part 2: better handling of per-object properties nsf.c: - changed "/class/ __objectconfigure" to "/obj/ __objectconfigure" to be able to handle per-object properties on classes properly. - renamed "info method parametersyntax" -> "info method syntax" - renamed "/obj|cls/ info method parametersyntax" into "/obj|cls/ info method syntax" - replaced "::nsf::methods::class::info::objectparameter" by "::nsf::methods::object::info::objectparameter" - new command "::nsf::parameter::specs ?-configure? ?-noposargs? slotobjs": convert provided slotobjs into a list of parameter specs - new command "::nsf::parameter::get list|name|syntax parameterspec": convert parameter spec into syntax form, or retrieve pieces of information from it (can be extended in the future) - added more or less generic list handling functions TclObjListFreeList(), TclObjListNewElement() and TclObjListAdd() used by "::nsf::parameter::specs" - replaced "::nsf::method::property /obj/ -per-object /name/ slotcontainer ?value?" by "::nsf::object::property /obj/ slotcontainer ?value?" - added "::nsf::object::property /obj/ hasperobjectslots ?value?"

nx.tcl:

- new info methods

* "/obj/ info lookup parameter definitions"

* "/obj/ info lookup parameter names"

* "/obj/ info lookup parameter list"

* "/obj/ info lookup parameter syntax"

- changed "/cls/ info parameter definition ?name?"

into "/cls/ info parameter definitions ?name?"

since ir returns a list. Still, "list" or "syntax" won't

be plural

  1. … 18 more files in changeset.
- updated 34 copyright notices

  1. … 33 more files in changeset.
changes to allow efficient tk/incr tcl compatible configure/cget - refactored code to allow to parameterize handling of required flag for parameters - don't flag an error when configure is called on an initialized object (logic: if the object is initialized, configure must have been called before, and the required action must have been already taken).

  1. … 4 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.
- configure, configure.in: Under win, the CLEANFILES missed a pattern for object files - nsfInt.h: Based on the BUILD_nsf convention, the internal header introduced a TCL_STORAGE_CLASS macro placing the dllimport attribute (under Win/MinGW builts). As a consequence, shared and stub builts ended up with function declarations annotated with dllimport (which for these cases is either unnecessary or even breaks builts because the dllexport counterpart is missing, obviously). As nsf.h includes a sane DLLIMPORT/DLLEXPORT handling (copied over from tcl.h), I simply removed the special macro handling from nsfInt.h. - NsfProcStub(): Use the EXTERN macro rather than extern directly

  1. … 3 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.
- 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.
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.
- use Tcl's EXTERN macro instead of "extern"

  1. … 5 more files in changeset.
- additional object parameter option "invokesetter" managed by nx.tcl This was necessary, since the previously implemented strategy called the setter whenever slot= was provided. This has the problem, that values could be converted twice (once by "configure", once by the setter method", which lead for the converter to a double refcounting on the value.

  1. … 3 more files in changeset.
- changed object->flags from "unsigend short" to "unsigned int" - reintroduced NSF_TCL_DELETE to address bug flagged from memdebug - extended regression test

  1. … 3 more files in changeset.
- fixed potential crash from method caching, when permissions on cmds are changed and become e.g. unresolvable - removed flag allowmethoddispatch, since behavior can be achived via private flag. - extended regression test

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

  1. … 1 more file in changeset.
- deacitivate for the time being allowmethoddispatch (make it behave always like true) - added instead new flag "perobjectdispatch" to make behavior of ensembleobjects configurable. - The behavior for keepcallerself is currently only activated for the method-interface for object dispatch, since otherwise the following would be dangerous, since "o2 foo" would destroy o2 nx::Object create o1 nsf::object::property o1 keepcallerself true nx::Object create o2 { ::public method foo {} {o1 destroy} } o2 foo

  1. … 10 more files in changeset.
- Used "gcc -ansi" to test ANSI compatibility (with MSVC in mind) - generic/nsf.c, generic/nsfShadow.c: Fixed some non-ANSI comments - generic/nsfError.c: Relocated a declaration to the beginning of the scope block (MSVC shouted here) - generic/nsfInt.h: Made sure that NSF_INLINE is only set in non-ANSI gcc builds, added a tiny portability wrapper for va_copy (to support MSVC and the gcc/clang ANSI mode)

  1. … 3 more files in changeset.
- alias reform: instead of calling first an alias with a stack frame followed by the dispatched of the aliased cmd, resolve aliases internally in dispatch. This has the advantage that we do not have to ignore the "transparent" stack frame in some sitations, and we have much less problems with the names of the aliased cmds (e.g. objects) in the introspection methods. Additionally, several problem cases disappeared from the regression test cases. In addition, the new approach is faster. - eliminating obsolete flag NSF_CSC_CALL_IS_TRANSPARENT

  1. … 9 more files in changeset.
- Added exerpimental object property "allowmethoddispatch" for child-objects to be called from parent objects via method interface. Background: both, per-object methods and childobjects are implemented via cmds in the same tcl namespace. Without special care, both are callable via the standard dispatch. Apparently, this is not always wanted. - handled allowmethoddispatch and keepcallerself in copy/move - set allowmethoddispatch per-default in XOTcl - removed visablilty of objects with "allowmethoddispatch" false in "info methods" and "info search methods" - extended regression test

  1. … 10 more files in changeset.
- simplified usage of ObjectName() and ClassName() macros (no caller parenthesis needed) - added exerpimental object property keepcaller self (currently only evaluated by aliased objects)

  1. … 8 more files in changeset.
Allow to pass casts to macros ClassName and ObjectName

- simplify macro handling with __WIN32__ - regroup some macro definitions

  1. … 1 more file in changeset.
- generic/nsfInt.h: Provided the DECR_REF_COUNT2 #define macro for __WIN32__ builds (e.g., MinGW). Thanks to Stephan Adelsberger for pointing to the issue. - Made temp file handling in a rosetta example OS-independent; thanks to Stephan Adelsberger for the initial patch

  1. … 2 more files in changeset.
- fix spelling

  1. … 1 more file in changeset.
nsf.c: - added method NsfMethodNamePath() to compute the ensemble path in error messages - reduce verbosity - extended regression test

  1. … 4 more files in changeset.