summaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAge
...
| * py: Use mp_obj_get_array where sequence may be a tuple or a list.Krzysztof Blazewicz2017-03-07
| |
| * py/runtime.c: Remove optimization of '*a,=b', it caused a bug.Krzysztof Blazewicz2017-03-07
| | | | | | | | | | *a, = b should always make a copy of b, instead, before this patch if b was a list it would copy only a reference to it.
| * tests/string_format_modulo2: Split off intbig test.Paul Sokolovsky2017-03-07
| |
| * tools/tinytest-codegen: Update for recent test renaming ("intbig" suffix).Paul Sokolovsky2017-03-06
| |
| * tests/float2int*: Suffix with _intbig, don't run on any other int type.Paul Sokolovsky2017-03-06
| | | | | | | | | | | | I.e. they don't run successfully with MICROPY_LONGINT_IMPL_NONE and MICROPY_LONGINT_IMPL_LONGLONG (the problem is that they generate different output than CPython, TODO to fix that).
| * float/float2int*: Make actually be parsable for MICROPY_LONGINT_IMPL_NONE.Paul Sokolovsky2017-03-06
| | | | | | | | | | | | | | | | | | | | | | | | The use of large literal numbers is a big no-no when it comes to writing programs which work with different int representations. Also, some checks are pretty adhoc (e.g using struct module to check for 64-bitness). This change bases entire detection on sys.maxsize and integer operarions, and thus more correct, even if longer. Note that this change doesn't mean that any of these tests can pass with anything but MPZ - even despite checking for various int representations, the tests aren't written to be portable among them.
| * tests/float/complex1: Split out intbig test.Paul Sokolovsky2017-03-06
| |
| * py/modsys: Use MP_SMALL_INT_MAX for sys.maxsize in case of LONGINT_IMPL_NONE.Paul Sokolovsky2017-03-06
| | | | | | | | | | | | INT_MAX used previosly is indeed max value for int, whereas on LP64 platforms, long is used for mp_int_t. Using MP_SMALL_INT_MAX is the correct way to do it anyway.
| * py/py.mk: Force nlr files to be compiled with -Os.Damien George2017-03-06
| |
| * py/nlrx86: Convert from assembler to C file with inline asm.Damien George2017-03-06
| |
| * py/nlrx64: Convert from assembler to C file with inline asm.Damien George2017-03-06
| |
| * py/nlrxtensa: Convert from assembler to C file with inline asm.Damien George2017-03-06
| | | | | | | | | | nlr_jump is a little bit inefficient because it now saves a register to the stack.
| * py/nlr.h: Mark nlr_jump_fail as NORETURN.Damien George2017-03-06
| |
| * py: Move locals/globals dicts to the thread-specific state.Damien George2017-03-06
| | | | | | | | | | | | Each threads needs to have its own private references to its current locals/globals dicts, otherwise functions running within different contexts (eg imported from different files) can behave very strangely.
| * unix/moduselect: Properly implement ipoll object iteration.Paul Sokolovsky2017-03-05
| | | | | | | | | | TODO: There's another issue to care about: poll set being modified during iteration.
| * tests/basic: Split tests into working with small ints and not working.Paul Sokolovsky2017-03-04
| | | | | | | | | | | | Tests which don't work with small ints are suffixed with _intbig.py. Some of these may still work with long long ints and need to be reclassified later.
| * tests/run-tests: Check for big int availability and skip related tests.Paul Sokolovsky2017-03-03
| | | | | | | | | | Big aka arbitrary-precision integers (implemented by MPZ module) are used in tests starting with "int_big_" or ending with "_intbig".
| * unix: Remove remaining, obsolete traces of GNU readline support.Damien George2017-03-03
| |
| * tests/basics: Add further tests for OrderedDict.Damien George2017-03-03
| |
| * py/map: Fix bugs with deletion of elements from OrderedDict.Damien George2017-03-03
| | | | | | | | | | | | | | 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
| * msvc: Add machine/pin-related sources to buildstijn2017-03-02
| | | | | | | | This fixes unresolved references after [f1ea3bc]
| * qemu-arm: Enable machine module and associated tests.Damien George2017-03-02
| |
| * stmhal/modnwcc3k: Add include for mp_hal_delay_ms.Damien George2017-03-02
| |
| * tests/extmod: Add test for machine.Signal class.Damien George2017-03-02
| |
| * unix/modmachine: Add Signal class to machine module.Damien George2017-03-02
| |
| * stmhal/modpyb: Use utime ticks ms/us functions instead of custom ones.Damien George2017-03-02
| |
| * stmhal: Rename sys_tick ticks/delay functions to corresp. mp_hal ones.Damien George2017-03-02
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * stmhal: Use mp_hal_delay_ms instead of HAL_Delay.Damien George2017-03-02
| |
| * docs/library/lcd160cr: Add note about supported JPEG format/encodings.Peter Hinch2017-02-28
| |
| * docs/machine: Fix formatting of Constants section.Paul Sokolovsky2017-02-28
| | | | | | | | Render related constants grouped together, with common description.
| * drivers/display/lcd160cr: Add check that JPEG size is less than 65536.Damien George2017-02-27
| |
| * py/objarray: Disallow slice-assignment to read-only memoryview.Damien George2017-02-27
| | | | | | | | Also comes with a test for this. Fixes issue #2904.
| * tools/gen-cpydiff.py: configurable CPython and micropython executablesKrzysztof Blazewicz2017-02-27
| |
| * docs/Makefile: define and use PYTHON as the interpreter for CPYDIFFKrzysztof Blazewicz2017-02-27
| | | | | | | | | | | | User can override PYTHON executable before running script, gen-cpydiff.py works only with Python3 and most systems register its executable as 'python3'.
| * minimal: Add ability and description to build without the compiler.Damien George2017-02-27
| |
| * lib/utils/pyexec: Allow to compile when the uPy compiler is disabled.Damien George2017-02-27
| |
| * docs/uhashlib: Provide port-neutral description.Paul Sokolovsky2017-02-26
| | | | | | | | TODO: Remove WiPy-specific chunks.
| * extmod/modurandom: Use mp_raise_ValueError().Paul Sokolovsky2017-02-24
| | | | | | | | | | 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.
| * py/runtime: mp_raise_msg(): Accept NULL argument for message.Paul Sokolovsky2017-02-24
| | | | | | | | | | | | | | | | 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.)
| * esp8266/mpconfigport.h: Enable help('modules') feature.Damien George2017-02-24
| |
| * drivers/display/lcd160cr: Fix bug with save_to_flash method.Damien George2017-02-24
| |
| * cc3200/moduos: Remove uos.sep, as it's strictly optional.Paul Sokolovsky2017-02-23
| | | | | | | | | | | | 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).
| * py/parse: Simplify handling of errors by raising them directly.Damien George2017-02-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * py: Create str/bytes objects in the parser, not the compiler.Damien George2017-02-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * tests/micropython: Add test for consts that are bignums.Damien George2017-02-24
| |
| * py/parse: Allow parser/compiler consts to be bignums.Damien George2017-02-24
| | | | | | | | | | | | | | | | | | | | | | 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.
| * tools/gen-cpydiff.py: Set the Python import path to find test modules.Damien George2017-02-22
| |
| * cc3200: Remove socket.timeout class, use OSError(ETIMEDOUT) instead.Damien George2017-02-22
| | | | | | | | | | | | | | 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.
| * cc3200/mods/modusocket: Init vars to 0 to silence compiler warnings.Damien George2017-02-22
| | | | | | | | | | Some compilers can't analyse the code to determine that these variables are always set before being used.
| * cc3200: Enable uerrno module with short, custom list of error codes.Damien George2017-02-22
| | | | | | | | | | | | | | 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.