nsfStack.c

Clone Tools
  • last updated 11 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.
- adding spaces after comma in argument lists

  1. … 5 more files in changeset.
- 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.
- 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.
* The newest trunk version of Tcl in fossil has TclStackFree() and TclStackAlloc() removed We had to substitute this functions. Unfortunately, the lifetime of the strack structures has changed, so we had shuffle some interals around.

  1. … 4 more files in changeset.
DTrace: * added "nsf::configure dtrace on|off" for skipping package initialization (to be handled in D script) * make compliation clean

  1. … 7 more files in changeset.
- dtrace improvements: * track objects in method invocations * trace result codes in method-return * add some dtrace sample scripts

  1. … 10 more files in changeset.
- first steps towards DTRACE support

  1. … 5 more files in changeset.
- cleanup and documentation of nsf-specific interp state - nsf::configure: added an option "profile on|off" (per default off)

  1. … 5 more files in changeset.
- added profile support for nsf::proc

  1. … 3 more files in changeset.
- nx.tcl: provide caching for computed values of object slots to make method objectparameter nearly twice as fast; direct changes on slots require a reconfigure call. - nsf.c: removed SUBST from shadow commands (does not appear to be necessary any more) - nsf.c: fixing a memory leak (some substituted values were not freed correctly) - nsf.c: fix potential crash for epoched cmds - some minor updates for profiling support

  1. … 8 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. … 2 more files in changeset.
- nsfStack.c: provide hook to obtain callers information in profiling code

Adding buffer-local emacs settings to the *.c files

  1. … 11 more files in changeset.
- reanimated NSF_PROFILE

  1. … 5 more files in changeset.
- nsf.c: changed handling of cmdPtrs in callstack content. * we use now explicit reference counting using NsfCommandPreserve/NsfCommandRelease * as a consequence, we do not need the following functions Nsf_DeleteCommandFromToken() and CallStackClearCmdReferences() any more. * the flag NSF_CSC_OBJECT_ACTIVATED is not needed anymore and was removed

- removed a small memory leak when a destroy method of an object o

deletes its grandparents namespace, containing also this class of o

(and its methods). Significantly eased by the change above.

  1. … 4 more files in changeset.
- new function Nsf_NextHashEntry() simular Tcl_NextHashEntry(), but handles triggered hash entry deletions - fixed reference count in AliasDeleteObjectReference()

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

- fixed potential access to freed memory (actually when checking if namespace was removed by Tcl); found this problem when compiling Tcl with SYSTEM_MALLOC (own modified version of tclThreadAlloc.c) - fixed memory leak (namespace names and structures)

  1. … 4 more files in changeset.
- defined UNUSED macro to get more checking on unused arguments

  1. … 3 more files in changeset.
- removed leftover -public flag in nsf::method - general cleanup: removed unused arguments

  1. … 7 more files in changeset.
- removed unneded functions: NsfComputePrecedence(), NsfComputeDependents(), Nsf_SetVar2Ex(), NsfOSetInstVar(), Nsf_ObjGetVar2(), NsfOGetInstVar(), qNsfCreateObject() - removed unneeded external declarations: NsfClassListAdd() NsfClassListFree() - make extern declarations explicit - grouped most extern definitions together - improved documentation - moved variable declarations to inner scopes - removed warning from cppcheck()

  1. … 9 more files in changeset.
- follow Tcl nameing convention (uppercase functions)

  1. … 3 more files in changeset.
- perform relation handling in objectparameters outside of object-frame

  1. … 2 more files in changeset.
- show "unwind unstacked entry" message appear only when debug level>0 - removed fixed TODO entries

  1. … 2 more files in changeset.