- Jun 22, 2018
-
-
Damien George authored
This and the previous 4 commits combined have change in code size of: bare-arm: -92 minimal x86: -544 unix x64: -544 unix nanbox: -712 stm32: -116 cc3200: -128 esp8266: -348 esp32: -232
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
- Jul 31, 2017
-
-
Alexander Steffen authored
There were several different spellings of MicroPython present in comments, when there should be only one.
-
- Jul 05, 2017
-
-
Krzysztof Blazewicz authored
This refactoring saves code space.
-
- Apr 22, 2017
-
-
Damien George authored
This patch refactors the handling of the special super() call within the compiler. It removes the need for a global (to the compiler) state variable which keeps track of whether the subject of an expression is super. The handling of super() is now done entirely within one function, which makes the compiler a bit cleaner and allows to easily add more optimisations to super calls. Changes to the code size are: bare-arm: +12 minimal: +0 unix x64: +48 unix nanbox: -16 stmhal: +4 cc3200: +0 esp8266: -56
-
- Feb 17, 2017
-
-
Damien George authored
Since the recent changes to string/bytes literal concatenation, this rule is no longer used.
-
Damien George authored
It's much more efficient in RAM and code size to do implicit literal string concatenation in the lexer, as opposed to the compiler. RAM usage is reduced because the concatenation can be done right away in the tokeniser by just accumulating the string/bytes literals into the lexer's vstr. Prior to this patch adjacent strings/bytes would create a parse tree (one node per string/bytes) and then in the compiler a whole new chunk of memory was allocated to store the concatenated string, which used more than double the memory compared to just accumulating in the lexer. This patch also significantly reduces code size: bare-arm: -204 minimal: -204 unix x64: -328 stmhal: -208 esp8266: -284 cc3200: -224
-
- Feb 16, 2017
-
-
Damien George authored
Grammar rules have 2 variants: ones that are attached to a specific compile function which is called to compile that grammar node, and ones that don't have a compile function and are instead just inspected to see what form they take. In the compiler there is a table of all grammar rules, with each entry having a pointer to the associated compile function. Those rules with no compile function have a null pointer. There are 120 such rules, so that's 120 words of essentially wasted code space. By grouping together the compile vs no-compile rules we can put all the no-compile rules at the end of the list of rules, and then we don't need to store the null pointers. We just have a truncated table and it's guaranteed that when indexing this table we only index the first half, the half with populated pointers. This patch implements such a grouping by having a specific macro for the compile vs no-compile grammar rules (DEF_RULE vs DEF_RULE_NC). It saves around 460 bytes of code on 32-bit archs.
-
- Apr 14, 2016
-
-
Damien George authored
Most grammar rules can optimise to the identity if they only have a single argument, saving a lot of RAM building the parse tree. Previous to this patch, whether a given grammar rule could be optimised was defined (mostly implicitly) by a complicated set of logic rules. With this patch the definition is always specified explicitly by using "and_ident" in the rule definition in the grammar. This simplifies the logic of the parser, making it a bit smaller and faster. RAM usage in unaffected.
-
- Apr 13, 2016
-
-
pohmelie authored
They are sugar for marking function as generator, "yield from" and pep492 python "semantically equivalents" respectively. @dpgeorge was the original author of this patch, but @pohmelie made changes to implement `async for` and `async with`.
-
- Mar 16, 2016
-
-
Damien George authored
Previous to this patch, the "**b" in "a**b" had its own parse node with just one item (the "b"). Now, the "b" is just the last element of the power parse-node. This saves (a tiny bit of) RAM when compiling.
-
- Nov 23, 2015
-
-
Damien George authored
This patch checks that there is only one *, and that ** is last in the arg list.
-
- Nov 17, 2015
-
-
Damien George authored
-
- Oct 08, 2015
-
-
Damien George authored
This patch eliminates the need for a nested parse node for assignments and keyword arguments. It saves a little bit of RAM when parsing.
-
- Jul 24, 2015
-
-
Damien George authored
-
- Apr 21, 2015
-
-
Damien George authored
-
Damien George authored
-
- Feb 08, 2015
-
-
Damien George authored
Previous to this patch, a big-int, float or imag constant was interned (made into a qstr) and then parsed at runtime to create an object each time it was needed. This is wasteful in RAM and not efficient. Now, these constants are parsed straight away in the parser and turned into objects. This allows constants with large numbers of digits (so addresses issue #1103) and takes us a step closer to #722.
-
- Dec 27, 2014
-
-
Damien George authored
This patch makes the MICROPY_PY_BUILTINS_SLICE compile-time option fully disable the builtin slice operation (when set to 0). This includes removing the slice sytanx from the grammar. Now, enabling slice costs 4228 bytes on unix x64, and 1816 bytes on stmhal.
-
Damien George authored
This patch makes MICROPY_PY_BUILTINS_SET compile-time option fully disable the builtin set object (when set to 0). This includes removing set constructor/comprehension from the grammar, the compiler and the emitters. Now, enabling set costs 8168 bytes on unix x64, and 3576 bytes on stmhal.
-
- Dec 20, 2014
-
-
Damien George authored
This saves around 100 bytes code space on stmhal, more on unix.
-
- May 03, 2014
-
-
Damien George authored
Blanket wide to all .c and .h files. Some files originating from ST are difficult to deal with (license wise) so it was left out of those. Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
-
- Apr 27, 2014
-
-
Damien George authored
New way uses slightly less ROM and RAM, should be slightly faster, and, most importantly, allows to catch the error "non-keyword arg following keyword arg". Addresses issue #466.
-
- Feb 10, 2014
-
-
Paul Sokolovsky authored
-
- Feb 05, 2014
-
-
Damien George authored
-
- Jan 15, 2014
-
-
Damien George authored
-
- Jan 04, 2014
-
-
Damien George authored
-
- Dec 12, 2013
-
-
Damien authored
-
- Oct 18, 2013
-
-
Damien authored
-
- Oct 04, 2013
-
-
Damien authored
-