Skip to content
Tcl Source Code History Of Ticket 3098085fffffffff
Login

History Of Ticket 3098085fffffffff

Artifacts Associated With Ticket 3098085fffffffff

  1. Ticket change [f3b7008fe6] (rid 129763) by gneumann on 2010-10-29 09:43:25:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      The following problem showed up in aolserver, which produces a blueprint of all tcl-commands for initializing per-thread interpreter. This blueprint contains app procs, .... and as well ensembles. When a Tcl ensemble (e.g. info) is recreated, it looses its compileProc, which has the consequence that e.g. "info exists" is not compiled properly anymore. Not sure, if this qualifies as a bug, but it is certainly "unexpected behavior". 
      
      The problem at hand can be "solved" by reconfiguring instead of redefining preexisting ensembles (my current fix), but i would think that using TclCompileEnsemble() would make as well sense for user ensembles, which could benefit as well from the compiler, when the ensemble contains e.g. "info exists". I would have expected, that all ensembles have the same compileProc.
      
      The details: the script below shows the bytecode before and after a scripted ensemble definition. before, "info exists" is compiled to 
      
        Command 1: "info exists foo"
          (0) existScalar %v0 # var "foo"
          (5) done 
      
      after, it is just the "info command"
      
        Command 1: "info exists foo"
          (0) push1 0 # "info"
          (2) push1 1 # "exists"
          (4) push1 2 # "foo"
          (6) invokeStk1 3 
          (8) done 
      
      This was observed with tcl 8.5.9 and tcl 8.6b*, mac os x and debian/ubuntu linux (32 and 64bit)
      -gustaf neumann
      
      ======================================
      proc foo {} {info exists foo}
      puts [::tcl::unsupported::disassemble proc foo]
      
        namespace eval ::tcl::info {
          namespace ensemble create -command ::info -unknown {} -subcommands {} -prefixes 1 -map {
            args ::tcl::info::args body ::tcl::info::body cmdcount ::tcl::info::cmdcount 
            commands ::tcl::info::commands complete ::tcl::info::complete default ::tcl::info::default 
            exists ::tcl::info::exists frame ::tcl::info::frame functions ::tcl::info::functions 
            globals ::tcl::info::globals hostname ::tcl::info::hostname level ::tcl::info::level 
            library ::tcl::info::library loaded ::tcl::info::loaded locals ::tcl::info::locals 
            nameofexecutable ::tcl::info::nameofexecutable patchlevel ::tcl::info::patchlevel 
            procs ::tcl::info::procs script ::tcl::info::script 
            sharedlibextension ::tcl::info::sharedlibextension tclversion ::tcl::info::tclversion 
            vars ::tcl::info::vars}
        }
      proc foo {} {info exists foo}
      puts [::tcl::unsupported::disassemble proc foo]
      
      
    4. foundin initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "gneumann"
    10. subsystem initialized to: "21. [namespace]"
    11. title initialized to: "ensemble loosing compileProc"
    12. type initialized to: "RFE"
  2. Ticket change [f41cbd97ad] (rid 129847) by dkf on 2010-11-03 04:38:10:

    1. icomment:
      I know it's awkward, but the problem is that being compilable adds a fairly heavy overhead to the ensemble; every time the ensemble is modified, it causes a flush of all existing bytecodes and a rebuild from source of everything (well, it bumps an epoch counter which has that effect). I didn't want to inflict that cost on everything so non-compiled ensembles are much cheaper to modify (so packages like Snit weren't massively punished) but that has the side effect of meaning that these complexity costs are necessarily borne *somewhere*.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  3. Ticket change [9fc484da23] (rid 96699) by dkf on 2010-11-03 04:40:34:

    1. icomment:
      Maybe it would be easier to do something smarter... but I don't know what to do right now. This was the best compromise I could think of. :-)
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  4. Ticket change [22764005fd] (rid 130751) by msofer on 2011-01-31 19:40:30:

    1. assignee changed to: "dkf"
  5. Ticket change [29a23f64b3] (rid 88899) by dkf on 2011-11-17 21:15:40:

    1. icomment:
      
      
      data_type - 360894
      
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. subsystem changed to: "21. [namespace]"
    5. title changed to: "Create compiled ensembles"
    6. username: "dkf"
  6. Ticket change [9b76bfb91e] (rid 111129) by dkf on 2012-05-26 20:11:43:

    1. icomment:
      A workaround is to simply update the existing ::info ensemble with a new -map
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  7. Ticket change [3cbbcb5d70] (rid 120960) by dkf on 2012-05-26 20:11:44:

    1. priority changed to: "3 Low"