Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 5263c9620ad913054ddb4fbb30acd9652573b09d
Ticket: 1973096fffffffffffffffffffffffffffffffff
bytecompiling uplevel, with access to the LVT
User & Date: msofer on 2008-05-27 21:37:46
Changes

  1. icomment:
    Logged In: YES 
    user_id=148712
    Originator: YES
    
    Just noticed a problem with the LVT patch, in a contrived (but possible) scenario: assume a proc starts to run but redefines and calls itself. On returning from the nested call the Proc struct (and specifically its local vars) reflect the NEW compilation, which is different from the running one. If in this situation an [uplevel] script is called, it will be compiled to run with the new LVT (as found in the Proc's data), and then actually run with the old one (as found in the CallFrame's localCache)!
    
    This is fixable (and will be fixed) by looking up local vars in the CallFrame's localCache instead of using the Proc data during compilation. In the meantime, the patch here should work fine as long as that unlikely scenario is avoided. Not good for committing, but good enough for preliminary evaluation.
    
    
    
  2. login: "msofer"
  3. mimetype: "text/plain"
  4. username: "msofer"