summaryrefslogtreecommitdiff
path: root/unix
AgeCommit message (Collapse)Author
2015-03-03py: Add MICROPY_MALLOC_USES_ALLOCATED_SIZE to allow simpler malloc API.Damien George
2015-03-01travis: Add automated coverage testing using coveralls.Damien George
2015-02-27objarray: Implement array slice assignment.Paul Sokolovsky
This is rarely used feature which takes enough code to implement, so is controlled by MICROPY_PY_ARRAY_SLICE_ASSIGN config setting, default off. But otherwise it may be useful, as allows to update arbitrary-sized data buffers in-place. Slice is yet to implement, and actually, slice assignment implemented in such a way that RHS of assignment should be array of the exact same item typecode as LHS. CPython has it more relaxed, where RHS can be any sequence of compatible types (e.g. it's possible to assign list of int's to a bytearray slice). Overall, when all "slice write" features are implemented, it may cost ~1KB of code.
2015-02-25modffi: Implement 'O' type handling for func arguments.Paul Sokolovsky
2015-02-22py: Make math special functions configurable and disabled by default.Damien George
The implementation of these functions is very large (order 4k) and they are rarely used, so we don't enable them by default. They are however enabled in stmhal and unix, since we have the room.
2015-02-11modffi: Add toplevel func() function to create a function by pointer.Paul Sokolovsky
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-02-06modffi: Add .addr() method to just get symbol address.Paul Sokolovsky
2015-01-31py: Add MICROPY_PY_ALL_SPECIAL_METHODS and __iadd__ special method under it.Paul Sokolovsky
2015-01-29unix: Add "coverage" target to do coverage testing using gcov.Damien George
2015-01-25modffi: 's' (string) return type: handle NULL properly (return None).Paul Sokolovsky
2015-01-22modffi: Support return values of mp_obj_t type.Paul Sokolovsky
2015-01-21modffi: Support open own executable using open(None).Paul Sokolovsky
2015-01-20py, unix: Allow to compile with -Wunused-parameter.Damien George
See issue #699.
2015-01-20py, unix, stmhal: Allow to compile with -Wshadow.Damien George
See issue #699.
2015-01-16unix: Update .gitignore for "fast" and "minimal" builds.Damien George
2015-01-16unix: Add target to build "minimal" uPy interpreter.Damien George
2015-01-16py, unix: Allow to compile with -Wsign-compare.Damien George
See issue #699.
2015-01-14unix, windows: Don't call mp_unix_mark_exec on windows.Damien George
2015-01-14py, unix: Trace root pointers with native emitter under unix port.Damien George
Native code has GC-heap pointers in it so it must be scanned. But on unix port memory for native functions is mmap'd, and so it must have explicit code to scan it for root pointers.
2015-01-12py, unix, lib: Allow to compile with -Wold-style-definition.Damien George
2015-01-12py: Can compile with -Wmissing-declarations and -Wmissing-prototypes.Damien George
2015-01-12py, unix: Allow to compile with -Wdouble-promotion.Damien George
Ref issue #699.
2015-01-10py: Add config option MICROPY_COMP_MODULE_CONST for module consts.Damien George
Compiler optimises lookup of module.CONST when enabled (an existing feature). Disabled by default; enabled for unix, windows, stmhal. Costs about 100 bytes ROM on stmhal.
2015-01-09py: Add MICROPY_PY_MICROPYTHON_MEM_INFO to enable mem-info funcs.Damien George
This allows to enable mem-info functions in micropython module, even if MICROPY_MEM_STATS is not enabled. In this case, you get mem_info and qstr_info but not mem_{total,current,peak}.
2015-01-09py: Disable stack checking by default; enable on most ports.Damien George
2015-01-08unix: Allow to compile with float support disabled.Damien George
2015-01-08Remove obsolete bss-related code/build featuresstijn
GC for unix/windows builds doesn't make use of the bss section anymore, so we do not need the (sometimes complicated) build features and code related to it
2015-01-07py: Add option to cache map lookup results in bytecode.Damien George
This is a simple optimisation inspired by JITing technology: we cache in the bytecode (using 1 byte) the offset of the last successful lookup in a map. This allows us next time round to check in that location in the hash table (mp_map_t) for the desired entry, and if it's there use that entry straight away. Otherwise fallback to a normal map lookup. Works for LOAD_NAME, LOAD_GLOBAL, LOAD_ATTR and STORE_ATTR opcodes. On a few tests it gives >90% cache hit and greatly improves speed of code. Disabled by default. Enabled for unix and stmhal ports.
2015-01-07py: Put all global state together in state structures.Damien George
This patch consolidates all global variables in py/ core into one place, in a global structure. Root pointers are all located together to make GC tracing easier and more efficient.
2015-01-03unix: Enable -fno-crossjumping for fast build.Paul Sokolovsky
Confirmed that it improves perfomance of simple "for i in range(N): pass" loop by 15% on Core2.
2015-01-01unix: Prefix includes with py/; remove need for -I../py.Damien George
2015-01-01py: Move to guarded includes, everywhere in py/ core.Damien George
Addresses issue #1022.
2015-01-01py: Add basic framework for issuing compile/runtime warnings.Paul Sokolovsky
2014-12-29py: Add include guards to mpconfig,misc,qstr,obj,runtime,parsehelper.Damien George
2014-12-27py: Allow to properly disable builtin "set" object.Damien George
This patch makes MICROPY_PY_BUILTINS_SET compile-time option fully disable the builtin set object (when set to 0). This includes removing set constructor/comprehension from the grammar, the compiler and the emitters. Now, enabling set costs 8168 bytes on unix x64, and 3576 bytes on stmhal.
2014-12-27Makefiles: Support py/*.h includes per #1022.Paul Sokolovsky
2014-12-23unix, windows: Add _os.system() call.Paul Sokolovsky
system() is the basic function to support automation of tasks, so have it available builtin, for example, for bootstrapping rest of micropython environment.
2014-12-19unix/windows: Make sure that process exit code is portable 8-bit value.Paul Sokolovsky
This fixes FORCED_EXIT internal flag leaking into Windows exit code.
2014-12-17unix: Rename "time" module to "utime" to allow extensibility.Paul Sokolovsky
Name choosen per latest conventions and for compatibiity with stmhal port.
2014-12-16modffi: Support void (None) return value for Python callback functions.Paul Sokolovsky
2014-12-15modffi: 64-bit cleanness (fixes actual bug in callback arg handling).Paul Sokolovsky
2014-12-14unix: Enable Thumb2 and ARM emitters by default on corresponding archs.Paul Sokolovsky
2014-12-10py: Make functions static where appropriate.Damien George
2014-12-10unix: add unlink function to os moduleNikita Nazarenko
2014-12-09py: Allow builtins to be overridden.Damien George
This patch adds a configuration option (MICROPY_CAN_OVERRIDE_BUILTINS) which, when enabled, allows to override all names within the builtins module. A builtins override dict is created the first time the user assigns to a name in the builtins model, and then that dict is searched first on subsequent lookups. Note that this implementation doesn't allow deleting of names. This patch also does some refactoring of builtins code, creating the modbuiltins.c file. Addresses issue #959.
2014-12-08modsys: Add sys.print_exception(exc, file=sys.stdout) function.Paul Sokolovsky
The function is modeled after traceback.print_exception(), but unbloated, and put into existing module to save overhead on adding another module. Compliant traceback.print_exception() is intended to be implemented in micropython-lib in terms of sys.print_exception(). This change required refactoring mp_obj_print_exception() to take pfenv_t interface arguments. Addresses #751.
2014-12-05py: Rename mp_obj_int_get to mp_obj_int_get_truncated; fix struct.pack.Damien George
mp_obj_int_get_truncated is used as a "fast path" int accessor that doesn't check for overflow and returns the int truncated to the machine word size, ie mp_int_t. Use mp_obj_int_get_truncated to fix struct.pack when packing maximum word sized values. Addresses issues #779 and #998.
2014-12-05py: Optimise lexer by exposing lexer type.Damien George
mp_lexer_t type is exposed, mp_token_t type is removed, and simple lexer functions (like checking current token kind) are now inlined. This saves 784 bytes ROM on 32-bit unix, 348 bytes on stmhal, and 460 bytes on bare-arm. It also saves a tiny bit of RAM since mp_lexer_t is a bit smaller. Also will run a bit more efficiently.
2014-12-01modmicropython: Move mem_info() and qstr_info() functions from unix port.Paul Sokolovsky
TODO: Merge useful functionality from modpyb too.