summaryrefslogtreecommitdiff
path: root/py
AgeCommit message (Collapse)Author
2014-10-16objclosure: Fix printing of generator closures.Paul Sokolovsky
The code previously assumed that only functions can be closed over.
2014-10-15py: Fix GC realloc issue, where memory chunks were never shrunk.Damien George
Previously, a realloc to a smaller memory chunk size would not free the unused blocks in the tail of the chunk.
2014-10-15py: Fix dummy definition of BEGIN/END_ATOMIC_SECTION.Damien George
2014-10-13modzlibd: Remove, superceded by moduzlib.Paul Sokolovsky
2014-10-12Merge pull request #904 from pfalcon/moduzlibDamien George
Module "uzlib" - based on similarly named library
2014-10-13moduzlib: Integrate into the system.Paul Sokolovsky
2014-10-12py: Add module weak link support.Damien George
With this patch a port can enable module weak link support and provide a dict of qstr->module mapping. This mapping is looked up only if an import fails to find the requested module in the filesystem. This allows to have the builtin module named, eg, usocket, and provide a weak link of "socket" to the same module, but this weak link can be overridden if a file by the name "socket.py" is found in the import path.
2014-10-12py: Fix x86 viper code generation, mem8 <-> mem16 for load.Damien George
2014-10-12py: Implement native load for viper.Damien George
Viper can now do: ptr8(buf)[0], which loads a byte from a buffer using machine instructions.
2014-10-12py: Implement and,or,xor native ops for viper.Damien George
2014-10-12modure: Make sure that re1.5 compiled in only of modure itself is enabled.Paul Sokolovsky
This is achieved by including re1.5 *.c files straight from modure.c .
2014-10-11modure: Initial module, using re1.5 (which is based on re1 codebase).Paul Sokolovsky
https://github.com/pfalcon/re1.5
2014-10-09py: Add further checks for failed malloc in lexer init functions.Damien George
2014-10-09Merge branch 'lexer-crash' of https://github.com/dhylands/micropython into ↵Damien George
dhylands-lexer-crash
2014-10-09py: Add #if guard around gc-specific code.Damien George
2014-10-08Make lexer fail gracefully when memory can't be allocated.Dave Hylands
2014-10-07Allow real memory errors (from locked gc) to be reported with traceback.Dave Hylands
2014-10-06py: Extra autodetect for little endianness using __LITTLE_ENDIAN__.Damien George
2014-10-06py: Make mp_binary_set_val work on big endian machine.Damien George
2014-10-06py: Make int.to_bytes work on big endian machine.Damien George
Partly addresses issue #856.
2014-10-06py: Try to autodetect machine endianness when not defined by port.Damien George
2014-10-05py: Implement proper context save/restore for eval/exec; factor code.Damien George
This has benefits all round: code factoring for parse/compile/execute, proper context save/restore for exec, allow to sepcify globals/locals for eval, and reduced ROM usage by >100 bytes on stmhal and unix. Also, the call to mp_parse_compile_execute is tail call optimised for the import code, so it doesn't increase stack memory usage.
2014-10-05py: Make compiler return a proper exception on SyntaxError.Damien George
2014-10-04Implement missing ARM emitter functions for viperFabian Vogt
2014-10-03py: Fix unix-cpy to compile with uint->mp_uint_t changes.Damien George
2014-10-03py: Change [u]int to mp_[u]int_t in qstr.[ch], and some other places.Damien George
This should pretty much resolve issue #50.
2014-10-03py: Use UINT_FMT instead of %d.Damien George
2014-10-03py: Convert [u]int to mp_[u]int_t where appropriate.Damien George
Addressing issue #50.
2014-09-30py: Remove IOError since it's deprecated; use OSError instead.Damien George
In CPython IOError (and EnvironmentError) is deprecated and aliased to OSError. All modules that used to raise IOError now raise OSError (or a derived exception). In Micro Python we never used IOError (except 1 place, incorrectly) and so don't need to keep it. See http://legacy.python.org/dev/peps/pep-3151/ for background.
2014-09-29py: Allow x86-64 to mov r16 to rm16 with extended src reg.Damien George
Fixes bug with x86-64 viper ptr16.
2014-09-29py: Fix viper store on x86; add tests for viper ptr16.Damien George
2014-09-29py: Add casting to viper; add native mem stores to viper.Damien George
Viper can now do the following: def store(p:ptr8, c:int): p[0] = c This does a store of c to the memory pointed to by p using a machine instructions inline in the code.
2014-09-29py: Implement more binary ops for viper emitter.Damien George
This included a bit of restructuring of the assembler backends. Note that the ARM backend is missing a few functions and won't compile.
2014-09-29py: Allow viper to use ints as direct conditionals in jumps.Damien George
Allows things like: if 1: ...
2014-09-29py: Fix types, uint -> mp_uint_t.Damien George
2014-09-29py: Make macro names in assemblers consistent, and tidy up a bit.Damien George
2014-09-29py: Add store r8 and store r16 ops to asm_x86 and asm_x64.Damien George
2014-09-29py: In asmthumb, clean up unit/int types and ite ops.Damien George
2014-09-28Fix error: unknown type name 'size_t'bvernoux
2014-09-26py: Clean up nlr*.S to make it easier to read; fix clang .bss error.Damien George
It seems that newer versions of clang don't like the .bss directive, so we don't use it for OSX. Addressing issues #865 and #875.
2014-09-25py: Simplify JSON str printing (while still conforming to JSON spec).Damien George
The JSON specs are relatively flexible and allow us to use one function to print strings, be they ascii, bytes or utf-8 encoded.
2014-09-25py: Tidy up exception matching; allow matching of tuple of exceptions.Damien George
Addresses issue #864.
2014-09-25py: For malloc and vstr functions, use size_t exclusively for int type.Damien George
It seems most sensible to use size_t for measuring "number of bytes" in malloc and vstr functions (since that's what size_t is for). We don't use mp_uint_t because malloc and vstr are not Micro Python specific.
2014-09-23py: Free non-interned strings in the parser when not needed.Damien George
mp_parse_node_free now frees the memory associated with non-interned strings. And the parser calls mp_parse_node_free when discarding a non-used node (such as a doc string). Also, the compiler now frees the parse tree explicitly just before it exits (as opposed to relying on the caller to do this). Addresses issue #708 as best we can.
2014-09-23py: Make native emitter handle multi-compare and not/is not/not in ops.Damien George
2014-09-23stmhal: Initialise stack pointer correctly.Damien George
Stack is full descending and must be 8-byte aligned. It must start off pointing to just above the last byte of RAM. Previously, stack started pointed to last byte of RAM (eg 0x2001ffff) and so was not 8-byte aligned. This caused a bug in combination with alloca. This patch also updates some debug printing code. Addresses issue #872 (among many other undiscovered issues).
2014-09-21extmod: Add loads to ujson module.Damien George
2014-09-17py: Add 'builtins' module.Damien George
2014-09-17py: Add native json printing using existing print framework.Damien George
Also add start of ujson module with dumps implemented. Enabled in unix and stmhal ports. Test passes on both.
2014-09-17py: Make dict use a bit less RAM when iterating; properly del values.Damien George
Heap RAM was being allocated to print dicts and do some other types of iterating. Now these iterations use 1 word of state on the stack. Deleting elements from a dict was not allowing the value to be reclaimed by the GC. This is now fixed.