Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b430f0d2812f9b035aa5767cd828ce67115405b4
Ticket: 4955f5d8a4dce006e063f924bc9709f7850ecb6a
tailcall splicing spot vs. raw TclInvokeObjectCommand
User & Date: dkf on 2014-05-20 17:32:38
Changes

  1. icomment:
    Since we can detect the situation with <tt>tailcall</tt>, we can (informatively) prevent it from crashing. Failing that, we can at least make it cleanly <tt>Tcl_Panic</tt> with a description that makes sense to downstream users, rather than saying something which only Miguel understands, but doing this in Tcl errors would indeed be best. These are the steps that should be taken prior to doing anything to actually make the OCaml work…
    <p>
    But I want to continue to explore other options to changing those procedures because forcing Tk to Do The Wrong Thing™ because of third party API abuse <i>really</i> strikes me as a massively retrograde step.
    <p>
    One possible fix would be to make procedures install a string command implementation (which Tcl wouldn't normally use) that does “the right thing”, delegating through <tt>Tcl_EvalObjv</tt> if there's no context. That wouldn't interfere with anything, since we never promised at all that procedures would not do such a thing (nor would anyone poking their fingers in really be thinking to look for such a trick).
    <p>
    We still need to fix things. It's just that right now, we can't say that the OCaml code won't try to use the trick with calling procedures they've created themselves that contain <tt>tailcall</tt>; we cannot possibly prevent them from doing that.
    
  2. login: "dkf"
  3. mimetype: "text/html"
  4. username: "dkf"