aboutsummaryrefslogtreecommitdiff
path: root/py
AgeCommit message (Collapse)Author
2014-04-27py: Save some ROM by shortening compiler error messages.Damien George
Messages are still explanatory, while taking a little less ROM.
2014-04-27py: Change the way function arguments are compiled.Damien George
New way uses slightly less ROM and RAM, should be slightly faster, and, most importantly, allows to catch the error "non-keyword arg following keyword arg". Addresses issue #466.
2014-04-27py: Implement keyword-only args.Damien George
Implements 'def f(*, a)' and 'def f(*a, b)', but not default keyword-only args, eg 'def f(*, a=1)'. Partially addresses issue #524.
2014-04-26Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-04-26py, gc: Only zero out the extra bytes at the end of the heap chunk.Damien George
This is a small optimisation to zero out only the additional bytes that the caller did not ask for.
2014-04-26py: "read" & "write" are so common that make them core.Paul Sokolovsky
Few other strings move to core, but make depend on "io" module.
2014-04-26objstringio: Compile only if MICROPY_ENABLE_MOD_IO defined.Paul Sokolovsky
2014-04-26modio: Implement io.StringIO class.Paul Sokolovsky
2014-04-26Simplify names for argcheck.c / arg parsing.Damien George
2014-04-26Add ARRAY_SIZE macro, and use it where possible.Damien George
2014-04-26Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-04-26py: Make collections module configurable, enabled by default.Damien George
2014-04-26objstr: Optimize .rstrip() by scanning string from end.Paul Sokolovsky
2014-04-26objstr: Implement .lstrip() & .rstrip().Paul Sokolovsky
Share code with .strip(). TODO: optimize .rstrip().
2014-04-26streams: Make .write() support arbitrary objects with buffer interface.Paul Sokolovsky
This in particular fixes writing str vs bytes.
2014-04-25py: Add MICROPY_ENABLE_DOC_STRING, disabled by default.Damien George
Also add a few STATIC's to some compile functions that should have them. Addresses issue #521.
2014-04-25Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-04-25py, gc: Zero out newly allocated blocks in the GC.Damien George
Also add some more debugging output to gc_dump_alloc_table(). Now that newly allocated heap is always zero'd, maybe we just make this a policy for the uPy API to keep it simple (ie any new implementation of memory allocation must zero all allocations). This follows the D language philosophy. Before this patch, a previously used memory block which had pointers in it may still retain those pointers if the new user of that block does not actually use the entire block. Eg, if I want 5 blocks worth of heap, I actually get 8 (round up to nearest 4). Then I never use the last 3, so they keep their old values, which may be pointers pointing to the heap, hence preventing GC. In rare (or maybe not that rare) cases, this leads to long, unintentional "linked lists" within the GC'd heap, filling it up completely. It's pretty rare, because you have to reuse exactly that memory which is part of this "linked list", and reuse it in just the right way. This should fix issue #522, and might have something to do with issue #510.
2014-04-25py: Support instance __call__ method.Paul Sokolovsky
2014-04-25py, gc: Fix old gc_realloc for case when NULL is passed in as ptr.Damien George
2014-04-24py, vm: Fix recent bug where state is freed too early.Damien George
2014-04-24py, vm: Free heap-allocated state if it was allocated on the heap.Damien George
2014-04-24Merge pull request #519 from pfalcon/exc-no-ptr-to-fieldDamien George
objexcept: Don't store args tuple within exception object.
2014-04-24Merge pull request #518 from pfalcon/vm-traceDamien George
vm: Add rudimentary bytecode execution tracing capability.
2014-04-24Makefile: Allow to override "super optimization" options used for some files.Paul Sokolovsky
To help with debugging issue like #510 for example.
2014-04-23objexcept: Don't store args tuple within exception object.Paul Sokolovsky
To avoid pointer-to-field GC problem.
2014-04-23vm: Add rudimentary bytecode execution tracing capability.Paul Sokolovsky
2014-04-23showbc: MAKE_CLOSURE*: Update for new closed-over encoding.Paul Sokolovsky
2014-04-23emitglue: Typo fix in var name.Paul Sokolovsky
2014-04-22builtinimport: If there was error compiling imported module, raise exception.Paul Sokolovsky
2014-04-22objexcept: Add mp_obj_new_exception_arg1() convenience function.Paul Sokolovsky
2014-04-21py: Add 'align' and 'data' meta-instructions to inline assembler.Damien George
2014-04-21py: Fix super() bug, where it didn't allow instance access.Damien George
This is a one-liner fix. It gets the class-super.py test passing, but is probably not a complete fix.
2014-04-21Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-04-21py: Small change to mp_arg_parse_all.Damien George
2014-04-20py: Add win32-specific header for alloca().Paul Sokolovsky
2014-04-20nlrx86.S: Another ifdef for win32 symbol underscoring issues.Paul Sokolovsky
2014-04-20objarray: Slice subscription operation: properly test for op subtype.Paul Sokolovsky
Also, checked that both bytearray and array.array actually support generic (a-la list) slice assignment and deletion. Added TODOs.
2014-04-20gc: gc_realloc(): Fix byte-to-block calculation.Paul Sokolovsky
2014-04-20py, gc: Further simplify coding-style of gc_realloc.Damien George
No logic changes, just coding style to make it easy to read.
2014-04-20py: Wrap #if's around emitter functions that are used only by emitcpy.Damien George
3 emitter functions are needed only for emitcpy, and so we can #if them out when compiling with emitcpy support. Also remove unused SETUP_LOOP bytecode.
2014-04-20py: Making closures now passes pointer to stack, not a tuple for vars.Damien George
Closed over variables are now passed on the stack, instead of creating a tuple and passing that. This way memory for the closed over variables can be allocated within the closure object itself. See issue #510 for background.
2014-04-20objclosure: Store reference to entire closed variables tuple.Paul Sokolovsky
Avoids pointer-to-field garbage collection issue. Fixes #510.
2014-04-20objcell: Add disabled by default print method for debugging.Paul Sokolovsky
2014-04-20gc: "new" gc_realloc: Rewrite in plain C, fixing bunch of bugs.Paul Sokolovsky
There were typos, various rounding errors trying to do concurrent counting in bytes vs blocks, complex conditional paths, superfluous variables, etc., etc., all leading to obscure segfaults.
2014-04-20gc: Recover simple gc_realloc implementation, make easier to switch between.Paul Sokolovsky
2014-04-20modstruct: Add 'O' typecode for passing mp_obj_t.Paul Sokolovsky
Useful as callback data, etc.
2014-04-20modstruct: Use proper int accessor which checks input value type.Paul Sokolovsky
2014-04-20Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-04-20py: Fix mp_arg_parse_all.Damien George