Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: ed73fe5a2e5fed52d87835244c14b09f77f1eb4c
Ticket: 536831ffffffffffffffffffffffffffffffffff
Tcl_SubstObj: add precompilation
User & Date: dkf on 2002-04-18 20:22:18
Changes

  1. icomment:
    Logged In: YES 
    user_id=79902
    
    The problem is that the code to recover from an exceptional
    situation (i.e. continue) can't figure out where the script
    portion of the string ends when that script is not
    well-formed.  In a sense, the terminator for the script
    actually lies beyond the end of the string it is embedded
    in!  This is not good.  At this point, it either picks a
    random square bracket that would otherwise have been part of
    the script itself, or just uses the end of the command that
    generated the exceptional condition, and while it would be
    possible (I suppose) to characterise this behaviour, it
    seems to me that this would be specifying a bug.
    
    As I said below, the fix is to work out where the boundaries
    of the command are before evaluating it.  That's best
    combined with some kind of cached compilation step (you can
    only cache if the subst flags are the same, of course.)
    
    Nothing else in Tcl uses this tricky kind of simultaneous
    parsing and evaluation.  (Not nowadays anyway.) 
    Furthermore, it is only now that there is a way to tell it
    occurred because before all exceptions stopped the
    processing of the string.
    
    
  2. login: "dkf"
  3. mimetype: "text/plain"
  4. username: "dkf"