Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: d425cee112f81e5b5798dfe3acddaba729044dfc
Ticket: 4955f5d8a4dce006e063f924bc9709f7850ecb6a
tailcall splicing spot vs. raw TclInvokeObjectCommand
User & Date: ferrieux on 2014-05-17 09:24:31
Changes

  1. comment changed to:
    When called at level 1 in TclInvokeObjectCommand, tailcall panics:
    
      tailcall cannot find the right splicing spot: should not happen!
    
    By level 1 I mean: in a proc directly called by TclInvokeObjectCommand:
    
      proc f {} {tailcall g}
      proc g {} {puts GGG}
    
      /* in C */ Tcl_GetCommandInfo(interp,"f",&info);
      /* in C */ (*info.proc)(info.clientData,interp...);
    
    At levels 2 and above, everything is fine:
    
      proc h {} f
    
      /* in C */ Tcl_GetCommandInfo(interp,"h",&info);
      /* in C */ (*info.proc)(info.clientData,interp...);
    
    Note that this needle was in the haystack of a Tk embedding scenario: "lablTk", which is a prominent Tk binding for OCaml.
    
     https://groups.google.com/d/msg/comp.lang.tcl/HWROy01ZrXY/ElUbGyWvg44J
    
    It turns out that in Unix, the color picker and other similar nonnative modal dialogs have a level-1 tailcall:
    
      # in tk.tcl
      if {![llength [info commands tk_chooseColor]]} {
          proc ::tk_chooseColor {args} {
      	tailcall ::tk::dialog::color:: {*}$args
          }
      }
    
  2. icomment:
    Updated title and description to reflect the fact that Tcl_Eval is not involved at all.
    
  3. login: "ferrieux"
  4. mimetype: "text/plain"
  5. title changed to:
    tailcall splicing spot vs. raw TclInvokeObjectCommand