Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: bc1e4015d41053beaf45e57f0ceb8f15cc74dea6d9448f76ed37c00426ffb7bf
Ticket: 87271f7cd6ab29a076b36e31041a8c940c20d943
TclOO + coroutine + event loop = coredump
User & Date: dkf on 2024-05-17 13:37:32
Changes

  1. icomment:
    It turns out that all the stuff relating to the `Command` and the `ExtraFrameInfo` can be held in the `ProcedureMethod`; the lifespan is right and we don't use that `Command` to communicate the compilation context namespace to the bytecode compiler (procedures _do_ use that, but we pass that as a direct argument). Doing that means that we don't need to initialise things so often (provided we take care when we clone a class or object) and allows us to avoid entirely keeping a linked stack of `PMFrameData`s that need to be put back correctly, and that lets us avoid a bunch of bugs and crashes (including this one!).
    
    There's one down-side: the `ProcedureMethod` structure size changes. I believe that nobody but TclOO itself should ever know the size of that structure (let alone allocate one!) so it's not a problem, but I don't know if Itcl is playing tricks.
    
  2. login: "dkf"
  3. mimetype: "text/x-markdown"