- Jul 31, 2017
-
-
Alexander Steffen authored
There were several different spellings of MicroPython present in comments, when there should be only one.
-
- Jul 18, 2017
-
-
Alexander Steffen authored
The code conventions suggest using header guards, but do not define how those should look like and instead point to existing files. However, not all existing files follow the same scheme, sometimes omitting header guards altogether, sometimes using non-standard names, making it easy to accidentally pick a "wrong" example. This commit ensures that all header files of the MicroPython project (that were not simply copied from somewhere else) follow the same pattern, that was already present in the majority of files, especially in the py folder. The rules are as follows. Naming convention: * start with the words MICROPY_INCLUDED * contain the full path to the file * replace special characters with _ In addition, there are no empty lines before #ifndef, between #ifndef and one empty line before #endif. #endif is followed by a comment containing the name of the guard macro. py/grammar.h cannot use header guards by design, since it has to be included multiple times in a single C file. Several other files also do not need header guards as they are only used internally and guaranteed to be included only once: * MICROPY_MPHALPORT_H * mpconfigboard.h * mpconfigport.h * mpthreadport.h * pin_defs_*.h * qstrdefs*.h
-
- Feb 17, 2017
-
-
Damien George authored
-
Damien George authored
Previous to this patch there was an explicit check for errors with line continuation (where backslash was not immediately followed by a newline). But this check is not necessary: if there is an error then the remaining logic of the tokeniser will reject the backslash and correctly produce a syntax error.
-
Damien George authored
Since the table of keywords is sorted, we can use strcmp to do the search and stop part way through the search if the comparison is less-than. Because all tokens that are names are subject to this search, this optimisation will improve the overall speed of the lexer when processing a script. The change also decreases code size by a little bit because we now use strcmp instead of the custom str_strn_equal function.
-
- Dec 21, 2016
-
-
Damien George authored
The lexer is very mature and this debug function is no longer used. If it's really needed one can uncomment it and recompile.
-
- Nov 16, 2016
-
-
Damien George authored
-
- 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`.
-
- Jun 04, 2015
-
-
Damien George authored
See issue #1306.
-
- Mar 19, 2015
-
-
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.
-
- Jan 07, 2015
-
-
Damien George authored
This patch consolidates all global variables in py/ core into one place, in a global structure. Root pointers are all located together to make GC tracing easier and more efficient.
-
- Jan 01, 2015
-
-
Damien George authored
Addresses issue #1022.
-
- Dec 27, 2014
-
-
Paul Sokolovsky authored
-
- Dec 05, 2014
-
-
Damien George authored
mp_lexer_t type is exposed, mp_token_t type is removed, and simple lexer functions (like checking current token kind) are now inlined. This saves 784 bytes ROM on 32-bit unix, 348 bytes on stmhal, and 460 bytes on bare-arm. It also saves a tiny bit of RAM since mp_lexer_t is a bit smaller. Also will run a bit more efficiently.
-
- Jul 30, 2014
-
-
Damien George authored
Lexer is now 8-bit clean inside strings.
-
- Jul 03, 2014
-
-
Damien George authored
-
- Jun 03, 2014
-
-
Paul Sokolovsky authored
This allows to have multiple "optimization" levels (CPython has two (-OO removes docstrings), we can have more).
-
- 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/.
-
- Feb 05, 2014
-
-
Damien George authored
-
- Jan 25, 2014
-
-
Damien George authored
-
- Jan 18, 2014
-
-
Damien George authored
Byte code has a map from byte-code offset to source-code line number, used to give better error messages.
-
- Jan 15, 2014
-
-
Damien George authored
Parser no longer prints an error, but instead returns an exception ID and message.
-
- Jan 12, 2014
-
-
Damien George authored
-
- Jan 08, 2014
-
-
Damien George authored
-
- Jan 06, 2014
- Jan 04, 2014
-
-
Damien George authored
-
- Jan 03, 2014
-
-
Damien George authored
import works for simple cases. Still work to do on finding the right script, and setting globals/locals correctly when running an imported function.
-
- Dec 21, 2013
-
-
Damien authored
A big change. Micro Python objects are allocated as individual structs with the first element being a pointer to the type information (which is itself an object). This scheme follows CPython. Much more flexible, not necessarily slower, uses same heap memory, and can allocate objects statically. Also change name prefix, from py_ to mp_ (mp for Micro Python).
-
- Oct 20, 2013
- Oct 09, 2013
-
-
Damien authored
-
- Oct 04, 2013
-
-
Damien authored
-