Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: cbbff9ad7294aa68fbd798061260c339326a465c
Ticket: 2868499fffffffffffffffffffffffffffffffff
TIP #348: Substituted errorStack
User & Date: ferrieux on 2009-09-29 06:00:27
Changes

  1. icomment:
    First slight improvement: explicitly skip iPtr->rootFramePtr, like in [info level $n], since the root frame will always have argc==0. This removes the parasitic {} always found at the end of ::errorStack, and also an extra one generated by [tailcall] and [coroutine].
    
    Next improvements planned:
    
    (1) make the on/off switch more efficient by using a linked boolean var rather than the existence of ::errorStack which costs a hash lookup when negative.
    
    (2) make the list building slightly more efficient by using a backbone of Tcl_Obj as Cons'es (linked list), and turning it into a Tcl list only in a read trace attached to ::errorStack (instead of directly lappending as is currently the case. This construction is wasted in caught, expected exception handling where the errorStack is not used).
    
    (3) proper ::tcl namespace + test cases.
    
    
    
  2. login: "ferrieux"
  3. mimetype: "text/plain"
  4. username: "ferrieux"