aseba-community / thymio-vpl2

Next generation VPL for Thymio using Qt Quick from Qt 5.x
GNU Lesser General Public License v3.0
2 stars 5 forks source link

bitfields in compiler are filled from the msb, generating large bytecode #28

Closed stephanemagnenat closed 7 years ago

stephanemagnenat commented 7 years ago

As bitfileds in the VPL2-to-aesl compiler are filled from the msb, the aseba compiler must generate LARGE_IMMEDIATE loads which take 4 bytes, while if these bitfields would be filled from lsb, a SMALE_IMMEDIATE load would be sufficient for most cases, saving a lot of bytecode for VPL2 code.

stephanemagnenat commented 7 years ago

One a simple line following program in simple mode (3 event-actions pairs, with one event and one action each), this would reduce the bytecode usage from 38% to 34%.