nodemcu / nodemcu-firmware

Lua based interactive firmware for ESP8266, ESP8285 and ESP32
https://nodemcu.readthedocs.io
MIT License
7.64k stars 3.12k forks source link

NFC: tweak lua53 byte extraction #3414

Closed nwf closed 2 years ago

nwf commented 3 years ago

This is a first, very small, very tentative step in divorcing our Lua runtime from the ESP8266 / Xtensa architecture. In particular, rather than using hard-coded offsets when defining byte extractor functions, we rely on the C compiler to compute offsets for us. I've tried to make this something that might plausibly go upstream, too (and have begun work on the other direction of "meet in the middle", making a patch set against an upstream Lua 5.3, with the goal of reaching parity with app/lua53).

This PR should be completely cosmetic, generating identical assembler (but different DWARF, naturally).

nwf commented 2 years ago

This seems to survive local testing!

HHHartmann commented 2 years ago

Is this ready to go,

nwf commented 2 years ago

It's good by me. Want to hit Rebase and merge?