micropython/extmod
Damien George c64eb4f8ce extmod/vfs: Replace VLA in proxy func with small, static sized array.
VLAs can be expensive on stack usage due to stack alignment requirements,
and also the fact that extra local variables are needed to track the
dynamic size of the stack.  So using fixed-size arrays when possible can
help to reduce code size and stack usage.

In this particular case, the maximum value of n_args in the VLA is 2 and so
it's more efficient to just allocate this array with a fixed size.  This
reduces code size by around 30 bytes on Thumb2 and Xtensa archs.  It also
reduces total stack usage of the function: on Thumb2 the usage with VLA is
between 40 and 48 bytes, which is reduced to 32; on Xtensa, VLA usage is
between 64 and 80 bytes, reduced to 32; on x86-64 it's at least 88 bytes
reduced to 80.
2017-10-27 18:01:25 +11:00
..
crypto-algorithms extmod/crypto-algorithms/sha256: Remove non-standard memory.h header. 2017-04-27 15:01:01 +03:00
lwip-include all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
re1.5 extmod/re1.5: Upgrade to v0.8.2, adds hook for stack overflow checking. 2017-10-02 21:20:47 +03:00
uzlib extmod/uzlib: Update to upstream v2.1. 2016-10-11 07:13:23 +03:00
machine_i2c.c all: Convert remaining "mp_uint_t n_args" to "size_t n_args". 2017-08-30 10:59:58 +10:00
machine_i2c.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
machine_mem.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
machine_mem.h all: Use the name MicroPython consistently in comments 2017-07-31 18:35:40 +10:00
machine_pinbase.c extmod/machine_pinbase: Put PinBase singleton in ROM. 2017-09-12 16:00:21 +10:00
machine_pinbase.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
machine_pulse.c extmod/machine_pulse: Make time_pulse_us() not throw exceptions. 2017-02-05 14:20:17 +03:00
machine_pulse.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
machine_signal.c extmod/machine_signal: Fix parsing of invert arg when Pin is first arg. 2017-07-26 12:51:46 +10:00
machine_signal.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
machine_spi.c extmod/machine_spi: Remove EVENT_POLL_HOOK from soft-SPI transfer func. 2017-02-06 14:38:33 +11:00
machine_spi.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
misc.h extmod/uos_dupterm: Update uos.dupterm() and helper funcs to have index. 2017-10-13 20:01:57 +11:00
modbtree.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
modframebuf.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
modlwip.c all: Use NULL instead of "" when calling mp_raise exception helpers. 2017-10-24 22:39:36 +11:00
modonewire.c extmod/mod{lwip,onewire,webrepl}: Convert to mp_rom_map_elem_t. 2017-07-29 18:24:16 +03:00
modubinascii.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
modubinascii.h all: Use the name MicroPython consistently in comments 2017-07-31 18:35:40 +10:00
moductypes.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
moduhashlib.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
moduheapq.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
modujson.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
modurandom.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
modure.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
moduselect.c all: Use the name MicroPython consistently in comments 2017-07-31 18:35:40 +10:00
modussl_axtls.c all: Use NULL instead of "" when calling mp_raise exception helpers. 2017-10-24 22:39:36 +11:00
modussl_mbedtls.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
modutimeq.c all: Use NULL instead of "" when calling mp_raise exception helpers. 2017-10-24 22:39:36 +11:00
moduzlib.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
modwebrepl.c all: Use NULL instead of "" when calling mp_raise exception helpers. 2017-10-24 22:39:36 +11:00
modwebsocket.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
modwebsocket.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
uos_dupterm.c extmod/uos_dupterm: Swallow any errors from dupterm closing the stream. 2017-10-19 14:10:17 +11:00
utime_mphal.c py,extmod: Some casts and minor refactors to quiet compiler warnings. 2017-07-07 11:32:22 +10:00
utime_mphal.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
vfs.c extmod/vfs: Replace VLA in proxy func with small, static sized array. 2017-10-27 18:01:25 +11:00
vfs.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
vfs_fat.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
vfs_fat.h all: Use the name MicroPython consistently in comments 2017-07-31 18:35:40 +10:00
vfs_fat_diskio.c all: Use the name MicroPython consistently in comments 2017-07-31 18:35:40 +10:00
vfs_fat_file.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
vfs_fat_misc.c all: Remove inclusion of internal py header files. 2017-10-04 12:37:50 +11:00
vfs_reader.c py: Allow lexer to raise exceptions during construction. 2017-03-14 11:52:05 +11:00
virtpin.c all: Rename mp_obj_type_t::stream_p to protocol. 2016-06-18 18:44:57 +03:00
virtpin.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00