MICROPY_PERSISTENT_CODE must be enabled, and then enabling
MICROPY_PERSISTENT_CODE_LOAD/SAVE (either or both) will allow loading
and/or saving of code (at the moment just bytecode) from/to a .mpy file.
Main changes when MICROPY_PERSISTENT_CODE is enabled are:
- qstrs are encoded as 2-byte fixed width in the bytecode
- all pointers are removed from bytecode and put in const_table (this
includes const objects and raw code pointers)
Ultimately this option will enable persistence for not just bytecode but
also native code.
This makes select.poll() interface fully compatible with CpYthon. Also, make
their numeric values of these options compatible with Linux (and by extension,
with iBCS2 standard, which jopefully means compatibility with other Unices too).
- A single ffcon.h file to configure fatfs settings across ports.
- A single diskio.h file with common drive definitions.
- Removed now reduntand ffconf_template.h.
Now, if we build for an architecture which doesn't have dedicated support
for getting registers for GC scanning, fallback to setjmp-based method
automatically. It's still possible to force setjmp-based implementation
on archs with dedicated support (e.g. for testing, or for peculiar calling
conventions/optimizations).
Currently, the only place that clears the bit is in gc_collect.
So if a block with a finalizer is allocated, and subsequently
freed, and then the block is reallocated with no finalizer then
the bit remains set.
This could also be fixed by having gc_alloc clear the bit, but
I'm pretty sure that free is called way less than alloc, so doing
it in free is more efficient.
This patch allows you to stop auto-indent by pressing enter on a second
blank line. Easier than having to use backspace, and prevents new users
from getting stuck in auto-indent mode.
This patch adds/subtracts a constant from the 30-bit float representation
so that str/qstr representations are favoured: they now have all the high
bits set to zero. This makes encoding/decoding qstr strings more
efficient (and they are used more often than floats, which are now
slightly less efficient to encode/decode).
Saves about 300 bytes of code space on Thumb 2 arch.
The default setting of using the "highest" method available doesn't
work with some servers like Microsoft Azure. TLSV1 seems to work with
pretty much any server.
I left memzip in for the time being, so you can choose in
the Makefile whether to USE_FROZEN or USE_MEMZIP.
It looks like using frozen saves about 2472 bytes (using my
set of 15 python files), mostly due to overheads in the
zip file format.