generic

Clone Tools
  • last updated 9 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
nsf.c - base MixinInvalidateObjOrders() on DependentSubClasses() and avoid the need of using a separate hash table for class-mixin handling. The new implementation is several times faster and improves the speed of the functions CleanupDestroyClass(), SuperclassAdd() and NsfRelationClassMixinsSet(). Adding a class-mixin to ::xotcl::Object in OpenACS is more than 4x faster. - remove obsolete function MixinResetOrderForInstances() - rename ResetOrderOfClassesUsedAsMixins() to ResetOrderOfObjectsUsingThisClassAsObjectMixin() - used consistenlty DependentSubClasses() instead of TransitiveSubClasses() for invalidations. - extend regression test

  1. … 2 more files in changeset.
nsf.c: - improve performance of MixinInvalidateObjOrders() by about 30% by recomping the list of the dependent classes over and over again, since MixinInvalidateObjOrders() iterates over the full list already. - Document NsfRelationClassMixinsSet() and add nonnull declarations and the usual assertions()

  1. … 1 more file in changeset.
- added experimental code feature CYCLIC_MIXIN_ERROR

  1. … 2 more files in changeset.
nsf.c: - new function DependentSubClasses() to determine all classes that inherit from a given class. The result extend TransitiveSubClasses() by including class mixin relationships. - simplify NsfParameterCacheClassInvalidateCmd() by using the new function DependentSubClasses(). With the new implementation, NsfParameterCacheClassInvalidateCmd() is as efficient as before without to MostGeneralSuperclass optimization (but being complete now) when working on the root classes (an more efficient on subclasses).

  1. … 1 more file in changeset.
- fixed error message for forward ... onerror and method paths. The command "C object mixin" returns now "::C object mixin add|clear|delete|get|guard|set" and not "::C mixin add|clear|delete|get|guard|set" as before.

  1. … 2 more files in changeset.
- rename nsf::parameter:invalidate::classcache -> nsf::parameter::cache::classinvalidate nsf::parameter:invalidate::objectcache -> nsf::parameter::cache::objectinvalidate reasons: (a) remove single colon inside the name, (b) put verb to the end

  1. … 5 more files in changeset.
- use functions IsRootClass(), IsRootMetaClass() and IsBaseClass() to access object/class properties - add gcc attribute "pure"

  1. … 1 more file in changeset.
nsf.c: - cleanup of NsfParameterInvalidateClassCacheCmd(): performance improvements. After the fixing of indirect mixin validation, performance of invalidation went up by a factor of 5. At least, in some important cases (invalidation of rootclasses like nx::Object / xotcl::Object), we are again on the same level as before (actually slightly faster).

  1. … 2 more files in changeset.
- reduce variable scopes

- minor cleanup

  1. … 1 more file in changeset.
- nsf.c: - Let "/cls/ info mixinof -closure" return as well implicit mixin classes to make it easier to determine class dependencies.

Example:

nx::Class create M0

nx::Class create M1 -superclass M0

nx::Class create M2 -superclass M1

nx::Class create C

nx::Class create D -superclass C

C mixin add M2

# M2 is mixed into C, and implicitely into D

#

# Since M2 is a subclass of M1, classes C and D depend as well

# on M1 and M0, as seen in the heritage:

? {C info heritage} ":M2 ::M1 ::M0 ::nx::Object"

? {D info heritage} ":M2 ::M1 ::M0 ::C ::nx::Object"

# previously, only "M2 info mixinof -closure" showed the

# mixin relations, even with "-closure", while M1 and M0 did not.

? {M2 info mixinof -closure} "::C ::D"

# now these show the same relations (in this example).

? {M1 info mixinof -closure} "::C ::D"

? {M0 info mixinof -closure} "::C ::D"

- harden code

  1. … 1 more file in changeset.
- provide contextObj when required argument is missing

nsf.c: - added options to filter output from ::nsf::cmd::info parameter options (args, syntax, parameter) - deleted: - "/obj/ info lookup configure parameters ?pattern?" - "/obj/ info lookup configure syntax" - added: - "/obj/ info lookup parameters /methodName/ ?pattern?" - "/obj/ info lookup syntax /methodName/ ?pattern?" This covers as well - "/obj/ info lookup parameters configure|create|new|... ?pattern?" - extend regression test

  1. … 6 more files in changeset.
- remove dead code

- white-space change

- improve error message

nsf.c, gentclAPI.tcl: - new argument types "virtualobjectargs" and "virtualclassargs" for context-specific argument resolutions: when a context object is provided, arguments of type "virtualobjectargs" are determined based on the slots applicable for the object (like "... lookup ..."), arguments of type "virtualclassargs" are resolved against a class. These types are used as follows: /obj/ configure /virtualobjectargs/ /cls/ create /name/ /virtualclassargs/ /cls/ recreate /name/ /virtualclassargs/ /cls/ new ?-childof /obj/? /virtualclassargs/ This new feature allows us to provide better error messages and to make much of the "... info ... configure parameter ..." infrastructure much less important. - For "virtualclassargs" we need the functionality to obtain from the C-Code based on a class the configure parameters applicable to objects of this class. - add argument "-context ..." to "cmd::info" to pass the context object (so far the only place where the context-object is used) - object system configuration parameters changes: new: -class.configureparameter new: -object.configureparameter removed: -class.objectparameter

  1. … 11 more files in changeset.
nsf.c - renamed parameter::get -> parameter::info - renamed method::get -> cmd::info

  1. … 5 more files in changeset.
gentclAPI.tcl: - handle duplicated domains by folding these to a single definition

nsf.c:

- added command nsf::method::get.

Rationale: provide a central place to obtain information

about all kind of method handles, which might be

- scripted and c-based methods

- nsf::procs

- plain tcl procs

- cmds (with and without paramter definitions)

- make results of ListMethod() robust against missing

information (e.g. plain tcl cmds, missing object registrations,

etc.)

- factor out common code for ListMethod call sites

for per-object methods, instance methods and procs/cmds

to ListMethodResolve()

- return errors from failing converter registrations

- extend regression test (new test set nsf-method.test)

  1. … 2 more files in changeset.
- minor cleanup

  1. … 3 more files in changeset.
- make error-checks as unlikely to succeed

- return class of desired object in nsf::parameter::get when provided

  1. … 1 more file in changeset.
nsf.c: - extend nsf::parameter::get to obtained more detailed information for obejcts/classes/metaclasses/baseclasses and specified types - extend regression test

  1. … 2 more files in changeset.
nsf.c - force again literal "-guard" in a "mixinreg" type to avoid potential confusions - Base nsfRelationSet for mixins on cmds rather than TclObjs to avoid confusions and duplication of guard detection logic - Add interp to NsfMixinregGet() and NsfFilterregGet() to be able to return error messages - return more error message from mixinreg converter - provide at least minimal support for "funny class names" (i.e. containing spaces) - FinalObjectDeletion: don't enforce namespace = 1 for cases with wierd namespace deletion order - extended regression test

  1. … 3 more files in changeset.
- added methods "info lookup filters ?-guards? ?/pattern/?" and "info lookup methods *-guards? ?/pattern/?" - extended regression test

  1. … 4 more files in changeset.
- improve handling of space in object names

  1. … 1 more file in changeset.
nsfObj.c: - allow to omit "-guard" within arguments to flag definition of a filter/mixin guard - extended regression test

  1. … 2 more files in changeset.
- name parameter option "slotset" instead of "slotassign"

  1. … 8 more files in changeset.
nsf.c: - fixed unary argument passing notation for "-nocomplain" of nsf::var and for 42 other options of other commands

nx.tcl:

- added flag -nocomplain to "/obj/ /prop/ unset ?-nocomplain?"

  1. … 3 more files in changeset.