Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: a48afc79a66d36d84bd17f30f7bb152138b0a71c523f8e32873d689973de6542
Ticket: db36fa5122259be74d0ccadd102e076094703052
compiled lindex botches index artihmetic
User & Date: dgp on 2018-03-06 15:36:13
Changes

  1. icomment:
    
    In Tcl 8.5 the opcode INST_LIST_RANGE_IMM is issued only
    in the compilation of [lassign] to determine the return value
    of the command as, effectively, [lrange $l $last+1 end].
    The integer value $last+1 is an operand and "-2" is used for "end",
    making use of the encoding facility.
    
    The same effect could have been achieved with operand values
    of either LIST_MAX or INT_MAX.
    
    Conclusion: Tcl 8.5 makes little use of the index encoding, and
    no necessary use.  Lots of excess unused capability in the
    execution engine.
    
  2. login: "dgp"
  3. mimetype: "text/plain"