diff options
author | Damien George <damien.p.george@gmail.com> | 2017-03-29 10:55:36 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-03-29 10:56:52 +1100 |
commit | 5010d1958feee84fe49f887ff6e4b1d37d211152 (patch) | |
tree | 57ae2f6a7f51b9fdfc4ee8371df0643b2b5f12a0 /py/compile.c | |
parent | e93c4ca18101e97ab5d427b97d4e0b6a72e31deb (diff) | |
download | micropython-5010d1958feee84fe49f887ff6e4b1d37d211152.tar.gz micropython-5010d1958feee84fe49f887ff6e4b1d37d211152.zip |
py/lexer: Simplify and reduce code size for operator tokenising.
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
Diffstat (limited to 'py/compile.c')
0 files changed, 0 insertions, 0 deletions