Enable ure, center, partition, frozenset, splitlines, reversed for Express builds.#138
Merged
tannewt merged 2 commits intoadafruit:masterfrom May 22, 2017
Merged
Conversation
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Express builds have >40k free in flash. I've added several minor Python features that were turned off, but are small and convenient. I also turned on one major extra: the
uremodule, which is very useful for reducing the size of ad hoc parsing code.Bytes used for each addition (measured in 0.9.7 builds):
47588 bytes free in flash
MICROPY_PY_BUILTINS_STR_CENTER: 120 bytesMICROPY_PY_BUILTINS_STR_PARTITION: 264 bytesMICROPY_PY_BUILTINS_STR_FROZENSET: 272 bytesMICROPY_PY_BUILTINS_STR_SPLITLINES: 200 bytesMICROPY_PY_BUILTINS_REVERSED: 176 bytesMICROPY_PY_URE: 2944 bytestotal 4096
before additions: 47588 bytes free
after: 43592 bytes free
A couple of notes:
frozensetis actually slightly broken: the sets aren't immutable (fixed in a later version of micropython).ujson, but there were errors building due to some #defines invfs_fat_file.h(here) that cause undefined symbols. This is also fixed in a later version of micropython: the vfs code was refactored significantly.