Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 8c738d0ba54b5b472201bbf71a151f63ece9b146ea511f8b7d48296ca3b66dc7
Ticket: e02798626dfbcd7b33db19e0fc3a9fb9fa0714f4
clock command is 8 times slower with Tcl 9.0b1
User & Date: sebres on 2024-02-27 16:31:59
Changes

  1. icomment:
    This is fixed now (see branch [./timeline?r=fix-e02798626d--msgcat-regress|fix-e02798626d--msgcat-regress]).
    There is no regression anymore (it looks even faster than 8.6 now)...
    
    As already mentioned, it also fixes unintentional set of <code>Class</code> variable in uplevel frame.<br/>
    Additionally I added <code>-command</code> to the <code>namespace which</code>, to avoid confusing <code>self</code> with a variable (since we're searching for command <code>self</code> here).
    
    Although better would be to rewrite ::msgcat::PackageNamespaceGet completely, without regexp and without attempts to detect a namespace by self-invocation, if tclOO would implement one of this facilities:
    
      - something like <code>info object isa oo <i>frame</i></code>, to detect frame/ns belongs to tclOO
    
      - something like <code>info class namespace <i>frame</i></code>, to return class ns if frame/ns belongs to tclOO, otherwise empty string
    
      - something like <code>info frame-namespace</code>, to return ns for the current frame regardless what current frame is (NS/tclOO/etc).
    
    No idea, whether there is better way to retrieve it at tcl-level now. May be Donal (dkf) know?
    
    Anyway, it works as expected now, tests passed too.
    
    Please test and review. If the fix is OK, I'll merge it in 8.7/9.0.
    
  2. login: "sebres"
  3. mimetype: "text/x-fossil-wiki"
  4. resolution changed to: "Fixed"
  5. status changed to: "Pending"