Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 39db7ef651a74038f3a7c0f7ff55d0aa6172d492
Ticket: 480896ffffffffffffffffffffffffffffffffff
duplicated code, wrong level counts
User & Date: msofer on 2001-11-12 13:07:00
Changes

  1. assignee changed to: "hobbs"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    The code of the INST_INVOKE instructions
    tclExecute.c:TclExecuteByteCode) essentially duplicates
    the code of tclParse.c:EvalObjv.
    
    The attached patch removes this duplication by havinf
    INST_INVOKE actually call the objv evaluation code
    (renamed to TclEvalObjvInternal andnot static to
    tclParse.c any longer).
    
    While doing this, an inconsistency in the computation
    of iPtr->numLevels was discovered: 
    
    * when evaluating a bytecode (INST_INVOKE), a command
    invocation does not increase the levels. If the command
    is a proc invocation, the levels are increased while
    evaluating the body.
    
    * when doing a direct evaluation (EvalObjv), a command
    invocation increases the levels. If the command is a
    proc, the levels are increased again when evaluating
    the body.
    
    This inconsistency is also corrected in the patch. With
    it, a command invocation always increases the levels.
    Proc calls increase the levels just *once* (by
    decreasing it before evaling the body, and restoring
    the old value afterwards).
    
    The last correction introduced: the error message on
    too many nested calls is now the same for all possible
    issuers.
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "msofer"
  9. subsystem changed to: "47. Bytecode Compiler"
  10. title changed to: "duplicated code, wrong level counts"
  11. type changed to: "Bug"