Skip to content
Tcl Source Code History Of Ticket 3075155
Login

History Of Ticket 3075155

Artifacts Associated With Ticket 3075155

  1. Ticket change [b22fb677f4] (rid 98287) by msofer on 2010-09-24 22:03:10:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      When I disable the command compiler (juts add '0&&' at the start of the condition in tclCompile.c line 1639), there is a nasty-looking error:
      
      ==== oo-27.6 variables declaration - non-interference of levels FAILED
      ==== Contents of test case:
      
          oo::class create foo {
      superclass master
      variable x!
      constructor {} {set x! 1}
      method y {} {incr x!}
          }
          foo create bar
          oo::objdefine bar {
      variable y!
      method y {} {list [next] [incr y!] [info var] [info local]}
      export eval
          }
          bar y
          list [bar y] [lsort [info object vars bar]] [bar eval {info vars *!}]
      
      ---- Result was:
      {3 2 {} {}} {x! y!} {x! y!}
      ---- Result should have been (exact matching):
      {3 2 y! {}} {x! y!} {x! y!}
      ==== oo-27.6 FAILED
      
      There is also a segfault in itcl's typeoption.test, which may well be related.
      
      The build is configured as 
        CFLAGS=-DPURIFY ./configure --disable-shared --enable-symbols
      
    4. foundin initialized to: "obsolete: 8.6b1.1"
    5. is_private initialized to: "0"
    6. priority initialized to: "8"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "msofer"
    10. subsystem initialized to: "35. TclOO Package"
    11. title initialized to: "oo depends on bytecoding?"
    12. type initialized to: "Bug"
  2. Ticket change [43871c015c] (rid 116567) by dkf on 2010-09-26 00:53:48:

    1. icomment:
      Variable resolver involved! Argh!
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  3. Ticket change [8a5be61dcd] (rid 127383) by msofer on 2010-09-26 19:03:16:

    1. icomment:
      From the chat:
      [14:56]dkfmiguel: It looks like it's something to do with variable resolvers. I don't pretend to understand those (and have probably got it wrong, I accept) and write code for them by doing the equivalent of throwing rocks at stuff until it seems to work.
      [14:57]dkfI suspect that the highly restricted resolver used by TclOO is too restricted, but since proc^Wmethod bodies are always compiled I don't care 
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  4. Ticket change [f4b53565ee] (rid 129967) by msofer on 2010-09-26 19:04:51:

    1. icomment:
      After quick look at TclInfoVarsCmd(), it seems that [info vars] is not resolver-aware at all
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  5. Ticket change [0c74dec6dc] (rid 114177) by msofer on 2010-09-26 19:54:51:

    1. icomment:
      This led to discovery of (related, not the same) Bug #3075907. If that one is resolved as an implementation bug, this test is wrong. If it is instead a doc bug, this test is correct.
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  6. Ticket change [f602081b7a] (rid 130216) by msofer on 2010-09-27 16:24:05:

    1. icomment:
      The problem seems to be:
      
      1. On a normal build, the presence of y! is detected at compile time by the [incr] compiler. This causes y! to live in the LVT and the resolver to be called at proc loading time. Due to #3075907 y! is reported by [info vars]
      
      2. With command compilers disabled (in this particular case, it is enough to not compile incr), y! is not in the LVT: it will only exist when it is given a value
      
      This is all as should be, assuming [info vars] behaved as doc'ed in the man page. Given #3075907 the behaviour depends on the set of commands that are bytecompiled. 
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  7. Ticket change [09cec41220] (rid 113720) by msofer on 2010-09-27 17:07:44:

    1. icomment:
      Just replacing [incr] by an equivalent [myIncr] or forcing a non-bc'ed [incr] displays the difference: running the attached script outputs
      
      {3 2 y! {}} {x! y!} {x! y!}
      {3 2 {} {}} {x! y!} {x! y!}
      {3 2 {} {}} {x! y!} {x! y!}
      
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  8. Ticket change [0f540e1336] (rid 94772) by msofer on 2010-09-27 17:08:08:

    1. icomment:
      
      
      File Added - 387998: show.tcl
      
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  9. Add attachment "show.tcl" [1421a4ab3f] (rid 124337) by msofer on 2010-09-27 17:08:08.

  10. Ticket change [7e11b72900] (rid 97344) by msofer on 2010-09-27 22:43:12:

    1. icomment:
      In order for this to work properly if we maintain the current behaviour (ie, if #3075907 is declared a doc bug), we should extend Tcl_ResolverInfo to contain a listProc to be used by [info vars]. This new function would list all variable names that are able to be resolved in the current context.
      
      The alternative would probably be unnecessarily expensive: that all OO methods be initialised to contain locals linked to every defined variable, initially undefined.
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  11. Ticket change [47250e52dc] (rid 99642) by dkf on 2010-10-20 06:36:04:

    1. assignee changed to: "msofer"
    2. icomment:
      Your analysis looks correct. I'll assign it to you (for now) since I'm not going to do any hacking in the guts of resolvers if I can possibly help it.
      
      
    3. login: "dkf"
    4. mimetype: "text/plain"
    5. username: "dkf"
  12. Ticket change [64c538f86f] (rid 92829) by dkf on 2010-10-20 06:36:25:

    1. subsystem changed to: "07. Variables"
  13. Ticket change [633e210957] (rid 92544) by dkf on 2011-03-11 18:47:07:

    1. icomment:
      I'm not very excited about this after all. Turns out quite a bit of the rest of Tcl also breaks if we disable command compilation.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  14. Ticket change [a83b87227b] (rid 98941) by dkf on 2011-03-11 18:47:08:

    1. priority changed to: "7 High"
  15. Ticket change [d864046948] (rid 107427) by dkf on 2011-03-11 18:56:06:

    1. icomment:
      It's the interaction of [info variables] with variable resolvers (a feature not used in the rest of the core, hence the bug showing up in TclOO). Having a LVT smooths all that out in this case, but that's hardly ideal.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  16. Ticket change [71835cb9ec] (rid 259706) by serhiy.storchaka on 2026-10-21 10:03:36:

    1. icomment:
      Since 8.6.0 ([0b5e337729], bug [2712377]), [info vars] in a method lists the declared object variables itself, so the result no longer depends on bytecompilation. The show.tcl cases give the same result on 8.6 and 9.x.
      
    2. login: "serhiy.storchaka"
    3. mimetype: "text/x-fossil-wiki"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  17. Ticket change [c540e25f95] (rid 260001) by serhiy.storchaka on 2026-10-22 17:19:30:

    1. closedate changed to: "2461334.919174757"
    2. closer changed to: "serhiy.storchaka"
    3. login: "serhiy.storchaka"