varresolutiontest.xotcl

Clone Tools
  • last updated 21 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
- make sure to use "XOTcl 2.0" instead of just XOTcl in "package req" to avoid confusions due to beta state - remove more obsolete and untested files

  1. … 56 more files in changeset.
- renamed varresolutiontest to .tcl - updated TODO

  1. … 3 more files in changeset.
- new function CheckVarName() to check for colons in instance variable names - unified name-checking in "nx::var import|exists|set" - extended regression test

  1. … 2 more files in changeset.
- don't allow names with namespace separators or colon prefix in importvar/instvar - provide error message, when method (proc scope) is not found - fix array boundaries for looping on variables in importvar/instvar - extended regression test

  1. … 3 more files in changeset.
- changed prefix from "::next::" to "::nx"

  1. … 21 more files in changeset.
- namespace changes: mostly due to marketing reasons, the naming of the top-level namespace changed from "xotcl2" to "next". reasons: xotcl is hard to pronounce for beginners, sounds like "exotic" (but who wants to program in an exotic language) has a certain stigma of strange namings (e.g. "instproc"), is seen as a precursor of tcloo, the top-level namespace ::xotcl2:: is not very nice either, the separation of framework and language is not clear.

We have now:

::next (the new object system, former ::xotcl2)

::next::core (framework, primitives)

::xotcl (former xotcl1)

- "::xotcl::use" no longer needed, use Tcl standard mechanisms instead

(e.g. "package req next"; "package req XOTcl", "namespace import ::next*")

  1. … 48 more files in changeset.
- xotcl 1.6.6: make sure to load always xotcl 1 versions when needed - xotcl 1.6.6: make compilation clean when compiled with assertions on

  1. … 19 more files in changeset.
- minor cleanup (varresolution test and comment)

  1. … 1 more file in changeset.
- keep variables defined from an CMETHOD frame local to this frame (e.g. initcmd, -nonleaf option, ...); previously variables without xotcl resolver prefix were defined globally - fix regression test according to previous item - generalize nonXotclObjectProcFrame() and rename it to activeProcFrame()^

  1. … 5 more files in changeset.
- working towards KEEP_VARS_IN_CMETHOD_FRAME

  1. … 3 more files in changeset.
- requireNameSpace: * fix potental crash in requireNameSpace in objscoped methods by swapping all vartable references in objscopes on stack to the vartable in the namespace, when it is created - extending regression test

  1. … 3 more files in changeset.
- initcmd: use for initcmds CMETHOD frames instead of OBJECT stack frames - initcmd: skip parent-stack frame's objscope for initcmd - changed hash-based lookup of children into a cmd-based lookup - extended regression test

  1. … 5 more files in changeset.
- fixed namespace handling on stack for objects with namespaces (before, it was possible that a variable was created in an object's namespace without -objscope) - as a consequence, ListChildren() had to be adjused, since it depended on the previous namespace handling on the stack - fixed object sesolving in NsDotVarResolver() (before, it was possible that NsDotVarResolver could create variables in the wrong namespace) - simplified NsDotVarResolver() - more cleanup in name resolver * USE_DOT is gone * XOTclDotDotCmd() removed * improved performance of InterpCompiledDotVarResolver() * made LookupVarFromTable() obsolete and removed it * renamed DotVarResolver() and friends to ColonVarResolver() etc. - extended regression test

  1. … 10 more files in changeset.
- fixed compilation for tcl 8.6b1

  1. … 1 more file in changeset.
- experimental change of resolver name prefix char from dot to single colon

  1. … 16 more files in changeset.
- NsDotVarResolver: don't create variables on CMETHOD frames when their names do not start with a "."

- general overhaul of XOTcl_PushFrame()XOTcl_PopFrame():

new functions:

* XOTcl_PushFrameCsc()/XOTcl_PopFrameCsc(): for CMETHOD fames

* XOTcl_PushFrameObj()/XOTcl_PopFrameObj(): for OBJECT frames

(objscope)

- preallocate obj->vartable in XOTcl_PushFrameObj() to

avoid situations where to non-existing vartable is created

on demand at different places (e.g. on stack and in

var resolver)

- caller of convertToRelationtype(): make sure that last argument

keeping the result is large enough to held pointer (in case of

sizeof(void) != sizeof(int)

  1. … 6 more files in changeset.
- use uplevel in slot add/delete to evalute in calling namespace (for not fully qualified object names) - determine namespace in test method "?" to allow its execution in an "namespace eval" - added regression tests

  1. … 6 more files in changeset.
- extend regression test

- improved comments

- modernize test a little: all local definitions of proc "?" are gone. - added interface to test: "Test parameter count SOMEVALUE" to specify conveniently e.g. the number of tests the be executed - add XOTCL_CM_NO_UNKNOWN to dispatch of defaultmethod

  1. … 13 more files in changeset.
- added experimental flag for alias "-noleaf" to force a stack frame to be written (e.g. necessary for "next"). makes only sense for aliases to c-implemented cmds

- fix inconsistent behaviour of dotVarResolver

"o eval {set .x 1}" was setting var ".x" instead of "x"

The problem was due to a interaction between

the namespace varResolver() and the DotVarResolver()

- fix for DotCmdResolver during compilation of a proc by Tcl.

- extended regression text

- found 2 potential bugs (not fixed yet)

  1. … 9 more files in changeset.
- added existence test for slot extractor (needed for 8.5.8) - added refcounting CallStackDoDestroy() to ensure existance of object until end of function - make sure to call PrimitiveDestroy() before DeleteCommandFromToken(), otherwise e.g. unset traces on this object cannot be executed - regression test works again

  1. … 7 more files in changeset.
- moved xotcl-1.* definition into an own library file - renamed library/lib/changeXOTclVersion.xotcl to library/lib/changeXOTclVersion to ease pkgIndex generation - new function "xotcl::use xotcl1" or "xotcl::use xotcl2" to ease switching between xotcl 1 and 2 - changed library/lib/test to xotcl2 - added for all regression test "xotcl::use xotcl1" instead of "namespace import ::xotcl::*"

  1. … 27 more files in changeset.
- supporting "per-object" for alias - extending regression test

  1. … 1 more file in changeset.
- DotCmdResolver() with XOTclDotCmd() only lookups within XOTCL_METHOD_FRAMES to minimize interactions supports efficient method-lookup via notation {.method in method bodies} - extended regression tests

  1. … 4 more files in changeset.
- factor out VarHashTableCreate() and CompiledLocalsLookup() - new debug flag VAR_RESOLVER_TRACE - new varResolver DotVarResolver(): catches variable names starting with a ".", only lookups within XOTCL_METHOD_FRAMES to minimize interactions - don't clobber from guard calls for 8.5 and earlier as well - extended regression tests

  1. … 3 more files in changeset.
- made compiledlocal handler more robust - added regression tests for compiled local handler

  1. … 1 more file in changeset.
merge with 1.6.3 (HEAD)

    • -0
    • +152
    ./varresolutiontest.xotcl
  1. … 130 more files in changeset.
- removed references to 1.6.2

- add comments to var resolution tests for objects without namespaces