AtomVM icon indicating copy to clipboard operation
AtomVM copied to clipboard

Rewrite module loading in order to be smaller

Open bettio opened this issue 2 months ago • 0 comments

Module code loading / parsing is implemented in opcodesswitch.h when IMPL_CODE_LOADER is defined, that relies on the mega-switch and a lot on inlined code. As a consequence the compile code takes a lot of space. The whole functionality can be replaced with a smaller parsing loop that relies on some kind of opcode definition table, saving quite a lot of space on flash memory. Last but not least, a good smarter implementation, should verify consistency and avoid some issues, such as calling missing BIFs (it causes a crash).

bettio avatar Nov 01 '25 11:11 bettio