Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 9a40a74ea467b99441d824d3919e53d392395187
Ticket: 4955f5d8a4dce006e063f924bc9709f7850ecb6a
tailcall splicing spot vs. raw TclInvokeObjectCommand
User & Date: ferrieux on 2014-05-12 22:28:59
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    When called at level 1 in Tcl_Eval (the old, string-based one), tailcall panics:
    
      tailcall cannot find the right splicing spot: should not happen!
    
    By level 1 I mean: in a proc directly called by Tcl_Eval:
    
      proc f {} {tailcall g}
      proc g {} {puts GGG}
    
      /* in C */ Tcl_Eval(interp,"f");
    
    At levels 2 and above, everything is fine:
    
      proc h {} f
    
      /* in C */ Tcl_Eval(interp,"h");
    
    Note that this needle was in the haystack of a Tk embedding scenario: "lablTk", which is a prominent Tk binding for OCaml. It turns out that lablTk, being older than NRE, only calls the string-based API; it also 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
          }
      }
    
  5. foundin changed to: "8.6"
  6. is_private changed to: "0"
  7. login: "ferrieux"
  8. priority changed to: "5 Medium"
  9. resolution changed to: "None"
  10. severity changed to: "Severe"
  11. status changed to: "Open"
  12. submitter changed to: "ferrieux"
  13. subsystem changed to: "60. NRE and coroutines"
  14. title changed to: "tailcall splicing spot vs. string-based Tcl_Eval"
  15. type changed to: "Bug"