Skip to content
  • Damien George's avatar
    py/lexer: Simplify and reduce code size for operator tokenising. · 5010d195
    Damien George authored
    By removing the 'E' code from the operator token encoding mini-language the
    tokenising can be simplified.  The 'E' code was only used for the !=
    operator which is now handled as a special case; the optimisations for the
    general case more than make up for the addition of this single, special
    case.  Furthermore, the . and ... operators can be handled in the same way
    as != which reduces the code size a little further.
    
    This simplification also removes a "goto".
    
    Changes in code size for this patch are (measured in bytes):
    
    bare-arm:       -48
    minimal x86:    -64
    unix x86-64:   -112
    unix nanbox:    -64
    stmhal:         -48
    cc3200:         -48
    esp8266:        -76
    5010d195