- 03 Mar, 2017 3 commits
-
-
Damien George authored
-
Damien George authored
-
Damien George authored
There were 2 bugs, now fixed by this patch: - after deleting an element the len of the dict did not decrease by 1 - after deleting an element searching through the dict could lead to a seg fault due to there being an MP_OBJ_SENTINEL in the ordered array
-
- 02 Mar, 2017 8 commits
-
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
The renames are: HAL_Delay -> mp_hal_delay_ms sys_tick_udelay -> mp_hal_delay_us sys_tick_get_microseconds -> mp_hal_ticks_us And mp_hal_ticks_ms is added to provide the full set of timing functions. Also, a separate HAL_Delay function is added which differs slightly from mp_hal_delay_ms and is intended for use only by the ST HAL functions.
-
Damien George authored
- 28 Feb, 2017 1 commit
-
-
Peter Hinch authored
-
- 27 Feb, 2017 7 commits
-
-
Paul Sokolovsky authored
Render related constants grouped together, with common description.
-
Damien George authored
-
Damien George authored
Also comes with a test for this. Fixes issue #2904.
-
Krzysztof Blazewicz authored
-
Krzysztof Blazewicz authored
User can override PYTHON executable before running script, gen-cpydiff.py works only with Python3 and most systems register its executable as 'python3'.
-
Damien George authored
-
Damien George authored
-
- 25 Feb, 2017 1 commit
-
-
Paul Sokolovsky authored
TODO: Remove WiPy-specific chunks.
-
- 24 Feb, 2017 9 commits
-
-
Paul Sokolovsky authored
For the standard unix x86_64 build, this saves 11 bytes on object file level, but no difference in executable size due to (bloaty) code alignment.
-
Paul Sokolovsky authored
In this case, raise an exception without a message. This would allow to shove few code bytes comparing to currently used mp_raise_msg(..., "") pattern. (Actual savings depend on function code alignment used by a particular platform.)
-
Damien George authored
-
Damien George authored
-
Paul Sokolovsky authored
In MicroPython, the path separator is guaranteed to be "/", extra unneeded things take precious code space (in the port which doesn't have basic things like floating-port support).
-
Damien George authored
The parser was originally written to work without raising any exceptions and instead return an error value to the caller. But it's now required that a call to the parser be wrapped in an nlr handler, so we may as well make use of that fact and simplify the parser so that it doesn't need to keep track of any memory errors that it had. The parser anyway explicitly raises an exception at the end if there was an error. This patch simplifies the parser by letting the underlying memory allocation functions raise an exception if they fail to allocate any memory. And if there is an error parsing the "<id> = const(<val>)" pattern then that also raises an exception right away instead of trying to recover gracefully and then raise.
-
Damien George authored
Previous to this patch any non-interned str/bytes objects would create a special parse node that held a copy of the str/bytes data. Then in the compiler this data would be turned into a str/bytes object. This actually lead to 2 copies of the data, one in the parse node and one in the object. The parse node's copy of the data would be freed at the end of the compile stage but nevertheless it meant that the peak memory usage of the parse/compile stage was higher than it needed to be (by an amount equal to the number of bytes in all the non-interned str/bytes objects). This patch changes the behaviour so that str/bytes objects are created directly in the parser and the object stored in a const-object parse node (which already exists for bignum, float and complex const objects). This reduces peak RAM usage of the parse/compile stage, simplifies the parser and compiler, and reduces code size by about 170 bytes on Thumb2 archs, and by about 300 bytes on Xtensa archs.
-
Damien George authored
-
Damien George authored
This patch allows uPy consts to be bignums, eg: X = const(1 << 100) The infrastructure for consts to be a bignum (rather than restricted to small integers) has been in place for a while, ever since constant folding was upgraded to allow bignums. It just required a small change (in this patch) to enable it.
-
- 22 Feb, 2017 9 commits
-
-
Damien George authored
-
Damien George authored
socket.timeout is a subclass of OSError, and using the latter is more efficient than having a dedicated class. The argument of OSError is ETIMEDOUT so the error can be distinguished from other kinds of OSErrors. This follows how the esp8266 port does it.
-
Damien George authored
Some compilers can't analyse the code to determine that these variables are always set before being used.
-
Damien George authored
Since we recently replaced the OSError string messages with simple error codes, having the uerrno module gets back some user friendly error messages. The total code size (after removing strings, replacing with uerrno module) is decreased.
-
Damien George authored
It's configurable by defining MICROPY_PY_UERRNO_LIST. If this is not defined then a default is provided.
-
Damien George authored
It's configured by MICROPY_PY_UERRNO_ERRORCODE and enabled by default (since that's the behaviour before this patch). Without this dict the lookup of errno codes to strings must use the uerrno module itself.
-
Damien George authored
-
Damien George authored
-
Damien George authored
It saves about 400 bytes of code space because the functions can now be inlined.
-
- 21 Feb, 2017 2 commits
-
-
Damien George authored
-
Damien George authored
Fixes issues #2880 and #2881.
-