• Fred Drake's avatar
    More micro-optimizations. · d05ff27d
    Fred Drake authored
    A (minor) change to the bytecode format: for "extended" attributes
    (handled by TALInterpreter.attrAction()), the instruction contains the
    integer previously retrieved from the actionIndex table; the bytecode
    generator now takes care of the lookup.  This allows attrAction() to
    no longer need to lookup the table that it used to lookup the
    integers.
    
    Many handlers are now separated into TAL and non-TAL versions -- the
    TALInterpreter constructor determines which dispatch table to use when
    it initializes self.tal (which is not changed later).  This allows
    each of the handlers to do only what is needed without having to
    decide based on the self.tal attribute.
    
    TALInterpreter.do_startTag() no longer contains a special case for an
    empty attribute list; that case is already optimized away by the
    bytecode generator.  What remains would actually work in that case,
    but it simply doesn't occur.  This removes one test of the attrList
    parameter.
    d05ff27d
TALInterpreter.py 21.2 KB