aboutsummaryrefslogtreecommitdiff
path: root/minimal
AgeCommit message (Collapse)Author
2015-08-20py: Add MICROPY_PY_BUILTINS_FILTER, disable for minimal ports.Paul Sokolovsky
Saves 320 bytes on x86.
2015-08-02minimal: Use 1 byte for qstr hash, to make port more minimal.Damien George
2015-06-22bare-arm, minimal, qemu-arm: Make do_str() take parse-input-kind as arg.Damien George
The do_str() function is provided essentially as documentation to show how to compile and execute a string. This patch makes do_str take an extra arg to specify how the string should be interpreted: either as a single line (ie from a REPL) or as multiple lines (ie from a file).
2015-06-20py: Use a wrapper to explicitly check self argument of builtin methods.Damien George
Previous to this patch a call such as list.append(1, 2) would lead to a seg fault. This is because list.append is a builtin method and the first argument to such methods is always assumed to have the correct type. Now, when a builtin method is extracted like this it is wrapped in a checker object which checks the the type of the first argument before calling the builtin function. This feature is contrelled by MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG and is enabled by default. See issue #1216.
2015-05-06pyexec: Make raw REPL work with event-driven version of pyexec.Damien George
esp8266 port now has working raw and friendly REPL, as well as working soft reset (CTRL-D at REPL, or raise SystemExit). tools/pyboard.py now works with esp8266 port.
2015-04-21py: Add attrtuple object, for space-efficient tuples with attr access.Damien George
If you need the functionality of a namedtuple but will only make 1 or a few instances, then use an attrtuple instead.
2015-04-16py: Overhaul and simplify printf/pfenv mechanism.Damien George
Previous to this patch the printing mechanism was a bit of a tangled mess. This patch attempts to consolidate printing into one interface. All (non-debug) printing now uses the mp_print* family of functions, mainly mp_printf. All these functions take an mp_print_t structure as their first argument, and this structure defines the printing backend through the "print_strn" function of said structure. Printing from the uPy core can reach the platform-defined print code via two paths: either through mp_sys_stdout_obj (defined pert port) in conjunction with mp_stream_write; or through the mp_plat_print structure which uses the MP_PLAT_PRINT_STRN macro to define how string are printed on the platform. The former is only used when MICROPY_PY_IO is defined. With this new scheme printing is generally more efficient (less layers to go through, less arguments to pass), and, given an mp_print_t* structure, one can call mp_print_str for efficiency instead of mp_printf("%s", ...). Code size is also reduced by around 200 bytes on Thumb2 archs.
2015-04-07py: Add MICROPY_PY_BUILTINS_REVERSED, disable for minimal ports.Paul Sokolovsky
2015-04-06py: Add MICROPY_PY_BUILTINS_ENUMERATE, disable for minimal ports.Paul Sokolovsky
2015-04-05string0.c: Move from stmhal/ to lib/.Paul Sokolovsky
2015-03-14py: Add MICROPY_COMP_{DOUBLE,TRIPLE}_TUPLE_ASSIGN config options.Damien George
These allow to fine-tune the compiler to select whether it optimises tuple assignments of the form a, b = c, d and a, b, c = d, e, f. Sensible defaults are provided.
2015-02-13minimal: Allow to compile without defining MICROPY_HAL_H.Damien George
2015-02-07py: Protect mp_parse and mp_compile with nlr push/pop block.Damien George
To enable parsing constants more efficiently, mp_parse should be allowed to raise an exception, and mp_compile can already raise a MemoryError. So these functions need to be protected by an nlr push/pop block. This patch adds that feature in all places. This allows to simplify how mp_parse and mp_compile are called: they now raise an exception if they have an error and so explicit checking is not needed anymore.
2015-01-20py: Implement very simple frozen modules support.Paul Sokolovsky
Only modules (not packages) supported now. Source modules can be converted to frozen module structures using tools/make-frozen.py script.
2015-01-16minimal: Make #if indent consistent.Paul Sokolovsky
2015-01-16minimal: Support even-driven REPL.Paul Sokolovsky
2015-01-14travis, minimal: Install gcc-multilib for -m32; use /bin/echo for test.Damien George
2015-01-13minimal: Add simple test; build and run minimal test on Travis CI.Damien George
2015-01-13minimal/Makefile: Remove unnecessary -I of py/ dir.Damien George
2015-01-13minimal: Add "run" make target to run emulated build with suitable tty config.Paul Sokolovsky
2015-01-13minimal: Convert "bare-arm" port to "minimal" port.Paul Sokolovsky
This enable libc functions, GC, and line-editing function. Also, UART emulation for POSIX systems is added. Emulation build is set as default.
2015-01-13minimal: New port, intended to represent minimal working code.Paul Sokolovsky
Unlike bare-arm, which is mostly intended to show raw interpreter size, without library and support code dependencies. This port is intended to be a better base to start new ports, and also will include emulation build to allow debug some aspects of embedded targets on POSIX systems. This initial commit is verbatim copy of bare-arm code.