Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 47166a3e8937c036ce6b401831b8f9cf5b2aa3d0
Ticket: 4955f5d8a4dce006e063f924bc9709f7850ecb6a
tailcall splicing spot vs. raw TclInvokeObjectCommand
User & Date: ferrieux on 2014-05-16 22:19:47
Changes

  1. icomment:
    OK, I've dug. Compiling both lablTk and Tcl in -g sheds a bit more light:
    
    (gdb) where
    ...
    #10 0x00007fa2b074b58f in TclInvokeObjectCommand (clientData=0x265fea0, interp=0x25ce440, argc=5, argv=0x2625ad0) at /home/alex/src/fos/tcl/generic/tclBasic.c:2466
    #11 0x00007fa2b0b31398 in camltk_tcl_direct_eval (v=140336735435760) at cltkEval.c:210
    
    And in fact the lablTk caller does *not* use string-based Tcl_Eval, but TclInvokeObjectCommand, as info.proc returned by Tcl_GetCommandInfo:
    
      Tcl_ResetResult(cltclinterp);
      if (Tcl_GetCommandInfo(cltclinterp,argv[0],&info)) { 
        ...
        if (info.proc == NULL) {
           .. (use Tcl_Eval)
         } else {
          result = (*info.proc)(info.clientData,cltclinterp,size,(const char**)argv);
        }
    
    So maybe to reproduce the issue we should find a way to do the same, as "barely" as possible, from tcltest. Any idea ?
    
  2. login: "ferrieux"
  3. mimetype: "text/plain"