summaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAge
* py: Allow lexer to raise exceptions during construction.Damien George2017-03-14
| | | | | | | | | | | | | | | | | | | | | | | | This patch refactors the error handling in the lexer, to simplify it (ie reduce code size). A long time ago, when the lexer/parser/compiler were first written, the lexer and parser were designed so they didn't use exceptions (ie nlr) to report errors but rather returned an error code. Over time that has gradually changed, the parser in particular has more and more ways of raising exceptions. Also, the lexer never really handled all errors without raising, eg there were some memory errors which could raise an exception (and in these rare cases one would get a fatal nlr-not-handled fault). This patch accepts the fact that the lexer can raise exceptions in some cases and allows it to raise exceptions to handle all its errors, which are for the most part just out-of-memory errors during construction of the lexer. This makes the lexer a bit simpler, and also the persistent code stuff is simplified. What this means for users of the lexer is that calls to it must be wrapped in a nlr handler. But all uses of the lexer already have such an nlr handler for the parser (and compiler) so that doesn't put any extra burden on the callers.
* pic16bit/main: Make nlr_jump_fail never return.Damien George2017-03-14
|
* zephyr/main: Remove unused __fatal_error().Paul Sokolovsky2017-03-14
|
* tests/extmod: Add a test for core VFS functionality, sans any filesystem.Damien George2017-03-13
|
* extmod/vfs: Rewrite path lookup algo to support relative paths from root.Damien George2017-03-13
| | | | | | | For example, if the current directory is the root dir then this patch allows one to do uos.listdir('mnt'), where 'mnt' is a valid mount point. Previous to this patch such a thing would not work, on needed to do uos.listdir('/mnt') instead.
* qemu-arm: Add basic uos module with generic VFS capabilities.Damien George2017-03-13
|
* extmod/vfs_fat: Allow to compile with MICROPY_VFS_FAT disabled.Damien George2017-03-13
| | | | | Some ports may want to compile with generic MICROPY_VFS support but without the VfsFat class. This patch allows such a thing.
* zephyr/main: nlr_jump_fail: Fix noreturn warning.Paul Sokolovsky2017-03-13
|
* zephyr: Move "minimal" configuration building to a separate wrapper script.Paul Sokolovsky2017-03-12
| | | | | | | | | | | | | | Minimal config can be now build with: ./make-minimal BOARD=... This is required because of Makefile.exports magic, which in its turn depends on PROJ_CONF to be set correctly at the beginning of Makefile parsing at all times. Instead of adding more and more workarounds for that, it's better to just move minimal support to a separate wrapper. Also, remove Zephyr 1.5 era cruft from Makefile, and add support for Zephyr's "run" target which supercedes older "qemu" target in upstream.
* zephyr: Make sure that generated prj.conf is updated only on content changes.Paul Sokolovsky2017-03-12
| | | | | | | | | | This is a typical problem with make: we want to trigger rebuilds only if file actually changed, not if its timestamp changed. In this case, it's aggravated by the fact that prj.conf depends on the value of BOARD variable, so we need to do some tricks anyway. We still don't try to detect if just BOARD changed, just try to generate new prj.conf.tmp every time (quick), but do actual replacement of prj.conf only if its content changed.
* tests/misc/: Make few tests skippable.Paul Sokolovsky2017-03-11
|
* extmod/vfs_fat: Remove obsolete and unused str/len members.Damien George2017-03-10
|
* cc3200/mptask: Allocate flash VFS struct on the heap to trace root ptrs.Damien George2017-03-10
|
* stmhal/main: Allocate flash's VFS struct on the heap to trace root ptrs.Damien George2017-03-10
|
* tests/extmod: Rename websocket test to websocket_basic.Damien George2017-03-10
| | | | | | This is so that the filename of the test doesn't clash with the module name itself (being "websocket"), and lead to potential problems executing the test.
* stmhal/mphalport: Get ticks_cpu() working on F7 MCUs.Damien George2017-03-10
|
* tests/basics/fun_error: Split out skippable test.Paul Sokolovsky2017-03-10
|
* tests/feature_check/int_big: Rework "big int" detection.Paul Sokolovsky2017-03-10
| | | | | | MICROPY_LONGINT_IMPL_LONGLONG doesn't have overflow detection, so just parsing a large number won't give an error, we need to print it out to check that the whole number was parsed.
* py/objint_longlong: Implement mp_obj_int_from_bytes_impl().Paul Sokolovsky2017-03-10
| | | | This makes int.from_bytes() work for MICROPY_LONGINT_IMPL_LONGLONG.
* tests/micropython/opt_level: Clarify the expected output for opt_level == 3.Paul Sokolovsky2017-03-09
|
* tests/micropython/heapalloc_traceback: Fix backtrace line # after refactor.Paul Sokolovsky2017-03-09
|
* tests/micropython: Make uio-using tests skippable.Paul Sokolovsky2017-03-09
|
* zephyr/modzephyr: Fix typo in identifier.Paul Sokolovsky2017-03-09
|
* tests/dict_fromkeys: Split out skippable part.Paul Sokolovsky2017-03-09
|
* tests/extmod: Add websocket tests.Alex March2017-03-09
| | | | | | | | These short unit tests test the base uPy methods as well as parts of the websocket protocol, as implemented by uPy. @dpgeorge converted the original socket based tests by @hosaka to ones that only require io.BytesIO.
* tests/extmod: Add very basic feature test for ussl module.Damien George2017-03-09
| | | | | | | | This test just tests that the basic functions/methods can be called with the appropriate arguments. There is no real test of underlying functionality. Thanks to @hosaka for the initial implementation of this test.
* tests/float: Make various tests skippable.Paul Sokolovsky2017-03-09
|
* tests/basic: Make various tests skippable.Paul Sokolovsky2017-03-09
|
* py/nlrx64: Fixes to support Mac OS.Damien George2017-03-08
| | | | | | Two independent fixes: - need to prefix symbols referenced from asm with underscore; - need to undo the C-function prelude.
* zephyr/modzephyr: Add a module for Zephyr-specific things.Paul Sokolovsky2017-03-08
| | | | | | Mostly intended to ease experimentation, no particular plans for APIs so far (far less their stability), is_preempt_thread() provided is mostly an example.
* README: Explicitly mention "await" support, and formatting for keywords.Paul Sokolovsky2017-03-08
|
* py/nlrx86: Add workaround for Zephyr.Paul Sokolovsky2017-03-07
| | | | Actually, this removes -fno-omit-frame-pointer workaround for Zephyr.
* extmod/modutimeq: Make scheduling fair (round-robin).Paul Sokolovsky2017-03-07
| | | | | | | By adding back monotonically increasing field in addition to time field. As heapsort is not stable, without this, among entried added and readded at the same time instant, some might be always selected, and some might never be selected, leading to scheduling starvation.
* tests/uctypes_array_assign_native_le: Split off intbig part.Paul Sokolovsky2017-03-07
|
* docs/esp8266/tutorial: Update since esptool 1.3 added Python 3 support.James Ouyang2017-03-07
| | | | | esptool 1.3 now supports both Python 2.7 and 3.4+. Updated github link to now-official espressif repo.
* docs/library/lcd160cr: Add link to framebuf page.Rami Ali2017-03-07
|
* docs/library: Add framebuf documentation.Rami Ali2017-03-07
|
* tests/micropython/: Split off intbig tests.Paul Sokolovsky2017-03-07
|
* tests/basics/unpack1.py: Test if *a, = b copies b when b is a list.Krzysztof Blazewicz2017-03-07
|
* tests/basics/string_join.py: Add test case where argument is not iterable.Krzysztof Blazewicz2017-03-07
|
* 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
|