Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b994ed46b4e1a96a71df165eadb7056d8fee7223
Ticket: 1688593fffffffffffffffffffffffffffffffff
compiling variable links
User & Date: msofer on 2007-03-27 01:16:03
Changes

  1. icomment:
    Logged In: YES 
    user_id=148712
    Originator: YES
    
    (1) on returning TCL_ERROR from a command compiler, all instructions that were previously emitted will be cleaned up. The only "garbage" that may remain are newly created literals
    
    (2) that thing is supposed to only compile to bytecodes when all the local variables are known at compile time, and to return TCL_ERROR if any one fails. Is there a bug?
    
    I see that eg
    
      proc a {} {set a b; upvar 1 $::q $a}
    
    is not compiled but calls [upvar] at runtime:
    
      Command 1: "set a b"
        (0) push1 0         # "b"
        (2) storeScalar1 %v0        # var "a"
        (4) pop
      Command 2: "upvar 1 $::q $a"
        (5) push1 3         # "upvar"
        (7) push1 1         # "1"
        (9) push1 2         # "::q"
        (11) loadScalarStk
        (12) loadScalar1 %v0        # var "a"
        (14) invokeStk1 4
        (16) done
    
    
    
  2. login: "msofer"
  3. mimetype: "text/plain"
  4. username: "msofer"