summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-12-31docs: Bump version to 1.5.2.v1.5.2Damien George
2015-12-31lib/libc/string0: Use uintptr_t instead of uint32_t.Damien George
This makes the code portable to non-32-bit architectures.
2015-12-30stmhal: Fix USB on the STM32F429DISC boardDave Hylands
The USB REPL has been broken since commit 1be0fde45c8d84eaf04851af96f06aad8171b2b2 This patch allows the STM32F429DISC board (which uses the USB_HS PHY)
2015-12-31py/map: In map lookup, check for fixed map independent of ordered map.Damien George
It's possible to have a fixed map that is properly hashed (ie not simply ordered).
2015-12-31tools: Add C middle-processor to make builtin tables proper hash tables.Damien George
2015-12-31docs: Add discussion on interrupt handlers incl uPy specific techniques.Peter Hinch
2015-12-30extmod/modlwip: Use _ERR_BADF instead of magic number.Paul Sokolovsky
2015-12-30extmod/modlwip: Avoid magic numeric values in memcpy().Paul Sokolovsky
2015-12-30extmod/modlwip: User proper field name and value names for socket state.Paul Sokolovsky
2015-12-30esp8266/modesp: Allow to compile out proprietary espconn stuff.Paul Sokolovsky
2015-12-29extmod/modlwip: Mark some lwip_socket_obj_t's fields as volatile.Paul Sokolovsky
Any fields changed by asynchronous callbacks must be volatile.
2015-12-29extmod/modlwip: tcp_recv: Use more regular and responsive poll pattern.Paul Sokolovsky
Polling once in 100ms means dismal performance. TODO: Propagate this pattern to other polling places.
2015-12-28stmhal: Add struct qstr to block of qstrs needed for MICROPY_PY_STRUCT.Dave Hylands
Otherwise build fails if uctypes is disabled.
2015-12-28windows: Propagate MICROPY_PY_OS_DUPTERM handling from unix port.Paul Sokolovsky
2015-12-28unix: Implement uos.dupterm(). Conditional on MICROPY_PY_OS_DUPTERM.Paul Sokolovsky
2015-12-27py/gc: Improve mark/sweep debug output.Paul Sokolovsky
Previously, mark operation weren't logged at all, while it's quite useful to see cascade of marks in case of over-marking (and in other cases too). Previously, sweep was logged for each block of object in memory, but that doesn't make much sense and just lead to longer output, harder to parse by a human. Instead, log sweep only once per object. This is similar to other memory manager operations, e.g. an object is allocated, then freed. Or object is allocated, then marked, otherwise swept (one log entry per operation, with the same memory address in each case).
2015-12-27esp8266: mac() function belongs to network module per the latest API.Paul Sokolovsky
2015-12-26windows/msvc: Nicer handling of asserts and 'invalid' parametersstijn
The default bahaviour for debug builds is to show dialog boxes for asserts and invalid parameter handling. This is not so nice in general and causes the Appveyor debug builds to hang because the io\file_seek.py test passes a closed file descriptor to lseek. Disable this behaviour by printing assert messages to the output instead of showing the dialog, and by disabling 'invalid' parameter handling which causes the affected functions to just return an error and set errno appropriately.
2015-12-26py/map: Add fast-path for hashing of map index when it is a qstr.Damien George
Map indicies are most commonly a qstr, and adding a fast-path for hashing of a qstr increases overall performance of the runtime. On pyboard there is a 4% improvement in the pystone benchmark for a cost of 20 bytes of code size. It's about a 2% improvement on unix.
2015-12-26tests: Skip class_bind_self.py for native emitter.Damien George
2015-12-26py: Be more restrictive binding self when looking up instance attrs.Damien George
When looking up and extracting an attribute of an instance, some attributes must bind self as the first argument to make a working method call. Previously to this patch, any attribute that was callable had self bound as the first argument. But Python specs require the check to be more restrictive, and only functions, closures and generators should have self bound as the first argument Addresses issue #1675.
2015-12-26lib/utils: Add pyexec_frozen_module to load and execute frozen module.Damien George
This is a convenience function similar to pyexec_file. It should be used instead of raw mp_parse_compile_execute because the latter does not catch and report exceptions.
2015-12-26extmod/modubinascii: Add "separator" argument to hexlify().Paul Sokolovsky
This is extension to CPython, it allows to easily produce human-readable hex dump: >>> ubinascii.hexlify(b"\xaa\x55\xaa\x55", b" ") b'aa 55 aa 55'
2015-12-25extmod/fsusermount: Move module qstrs to global pool from stmhal port.Paul Sokolovsky
2015-12-24tests: Skip try-finally test for native emitter.Damien George
2015-12-24py: Handle case of return within the finally block of try-finally.Damien George
Addresses issue #1636.
2015-12-23tests: Add tests for stream IO errors.Damien George
2015-12-23unix/unix_mphal: Raise KeyboardInterrupt straight from signal handler.Paul Sokolovsky
POSIX doesn't guarantee something like that to work, but it works on any system with careful signal implementation. Roughly, the requirement is that signal handler is executed in the context of the process, its main thread, etc. This is true for Linux. Also tested to work without issues on MacOSX.
2015-12-22unix: Properly cancel REPL input when Ctrl-C is pressed.Damien George
2015-12-22stmhal: Add pyb.irq_stats() to get statistics about IRQ calls.Damien George
Adds a lot of code, makes IRQs a bit less efficient, but is very useful for debugging. Usage: pyb.irq_stats() returns a memory view that can be read and written, eg: list(pyb.irq_stats()) pyb.irq_stats()[0] pyb.irq_stats()[0] = 0 The patch provides general IRQ_ENTER() and IRQ_EXIT() macros that can be modified to provide further IRQ statistics if desired.
2015-12-21esp8266: Remove superfluous includes.Paul Sokolovsky
2015-12-21esp8266/modesp: flash_read() takes 2 args (fix typo).Paul Sokolovsky
2015-12-21windows: Better handling of Ctrl-Cstijn
This builds upon the changes made in 2195046365c. Using signal() does not produce reliable results so SetConsoleCtrlHandler is used, and the handler is installed only once during initialization instead of removing it in mp_hal_set_interrupt_char when it is not strictly needed anymore, since removing it might lead to Ctrl-C events being missed because they are fired on a seperate thread which might only become alive after the handler was removed.
2015-12-20extmod/moduhashlib: Add namespace prefix for crypto-algorithms/sha256.h.Paul Sokolovsky
Everyone loves to names similar things the same, then there're conflicts between different libraries. The namespace prefix used is "CRYAL_", which is weird, and that's good, as that minimizes chance of another conflict.
2015-12-20tests: Add tests for %-formatting of bytes.Paul Sokolovsky
This requires CPython3.5, to not require switching to it, just use .exp file.
2015-12-20py/objstr: Applying % (format) operator to bytes should return bytes, not str.Paul Sokolovsky
2015-12-20py/objstr: Make sure that b"%s" % b"foo" uses undecorated bytes value.Paul Sokolovsky
I.e. the expected result for above is b"foo", whereas previously we got b"b'foo'".
2015-12-19py/mpprint: Fix printing of 64bit integers for 64bit windows buildsstijn
This makes all tests pass again for 64bit windows builds which would previously fail for anything printing ranges (builtin_range/unpack1) because they were printed as range( ld, ld ). This is done by reusing the mp_vprintf implementation for MICROPY_OBJ_REPR_D for 64bit windows builds (both msvc and mingw-w64) since the format specifier used for 64bit integers is also %lld, or %llu for the unsigned version. Note these specifiers used to be fetched from inttypes.h, which is the C99 way of working with printf/scanf in a portable way, but mingw-w64 wants to be backwards compatible with older MS C runtimes and uses the non-portable %I64i instead of %lld in inttypes.h, so remove the use of said header again in mpconfig.h and define the specifiers manually.
2015-12-19stmhal: Add mem8/mem16/mem32 operations to machine module.Dave Hylands
This uses the newly factored machine_mem functions.
2015-12-18stmhal: Change PLL configuration for STM32F7DISC.Fabian
Changes USB clock from 50MHz to 48MHz which improves USB communication.
2015-12-18windows: Add Appveyor CI builds for msvc port.stijn
Appveyor is like Travis, but for Windows builds. The appveyor.yml configuration will build the msvc port in all configuration/platform conbinations, and run the tests for each of those.
2015-12-18py/obj: Fix float constants for MICROPY_OBJ_REPR_C.Damien George
2015-12-18lib/libm: Allow math funcs to be used by non-Thumb archs.Damien George
Requires addition of software implementation of sqrtf function.
2015-12-18stmhal, cc3200: Actually implement machine -> umachine module weak link.Paul Sokolovsky
2015-12-18msvc: Add dirent.h/.c implementationstijn
This fixes the build after adding directory iteration in d874702
2015-12-18unix: machine_mem improvementsDave Hylands
This basically introduces the MICROPY_MACHINE_MEM_GET_READ_ADDR and MICROPY_MACHINE_MEM_GET_WRITE_ADDR macros. If one of them is not defined, then a default identity function is provided.
2015-12-18py/gc: When printing info, use %u instead of UINT_FMT for size_t args.Damien George
Ideally we'd use %zu for size_t args, but that's unlikely to be supported by all runtimes, and we would then need to implement it in mp_printf. So simplest and most portable option is to use %u and cast the argument to uint(=unsigned int). Note: reason for the change is that UINT_FMT can be %llu (size suitable for mp_uint_t) which is wider than size_t and prints incorrect results.
2015-12-18py: Add MICROPY_ENABLE_COMPILER and MICROPY_PY_BUILTINS_EVAL_EXEC opts.Damien George
MICROPY_ENABLE_COMPILER can be used to enable/disable the entire compiler, which is useful when only loading of pre-compiled bytecode is supported. It is enabled by default. MICROPY_PY_BUILTINS_EVAL_EXEC controls support of eval and exec builtin functions. By default they are only included if MICROPY_ENABLE_COMPILER is enabled. Disabling both options saves about 40k of code size on 32-bit x86.
2015-12-18py/emitglue: Add include of unistd.h for read function.Damien George
2015-12-18py/compile: Simplify compilation of comprehension iterators.Damien George
Saves 88 bytes on Thumb2, and 200 bytes on x86-64 archs.