diff options
author | Damien George <damien.p.george@gmail.com> | 2016-09-23 12:13:51 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-09-23 12:13:51 +1000 |
commit | e97df976008ea8d3dbd291ebcc72f5416d63a7ce (patch) | |
tree | 9120ac0ccd23d9cdf0dd105742b48157b3b05fd6 /py/bc.c | |
parent | 46ab042230510d71b05df04ab73131a5fd4f3d2d (diff) | |
download | micropython-e97df976008ea8d3dbd291ebcc72f5416d63a7ce.tar.gz micropython-e97df976008ea8d3dbd291ebcc72f5416d63a7ce.zip |
py: Shrink mp_arg_t struct by using reduced-size integer members.
qstrs ids are restricted to fit within 2 bytes already (eg in persistent
bytecode) so it's safe to use a uint16_t to store them in mp_arg_t. And
the flags member only needs a maximum of 2 bytes so can also use uint16_t.
Savings in code size can be significant when many mp_arg_t structs are
used for argument parsing. Eg, this patch reduces stmhal by 480 bytes.
Diffstat (limited to 'py/bc.c')
0 files changed, 0 insertions, 0 deletions