summaryrefslogtreecommitdiffstatshomepage
path: root/py
Commit message (Collapse)AuthorAge
* objlist: We no longer need to assert on mem alloc results.Paul Sokolovsky2014-04-28
| | | | They either succeed or raise exception.
* objlist: Use static small int constructor.Paul Sokolovsky2014-04-28
|
* py: Add '*' qstr for 'import *'; use blank qstr for comprehension arg.Damien George2014-04-27
|
* py: Remove unnecessary LOAD_CONST_ID bytecode.Damien George2014-04-27
| | | | It's the same as LOAD_CONST_STR.
* py: Eliminate 'op' variable in VM dispatch loop.Damien George2014-04-27
| | | | | Remembering the last op is rarely needed, and when it is, can simply use *save_ip.
* py: Save some ROM by shortening compiler error messages.Damien George2014-04-27
| | | | Messages are still explanatory, while taking a little less ROM.
* py: Change the way function arguments are compiled.Damien George2014-04-27
| | | | | | | | 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.
* py: Implement keyword-only args.Damien George2014-04-27
| | | | | | | Implements 'def f(*, a)' and 'def f(*a, b)', but not default keyword-only args, eg 'def f(*, a=1)'. Partially addresses issue #524.
* Merge branch 'master' of github.com:micropython/micropythonDamien George2014-04-26
|\
| * py: "read" & "write" are so common that make them core.Paul Sokolovsky2014-04-26
| | | | | | | | Few other strings move to core, but make depend on "io" module.
| * objstringio: Compile only if MICROPY_ENABLE_MOD_IO defined.Paul Sokolovsky2014-04-26
| |
| * modio: Implement io.StringIO class.Paul Sokolovsky2014-04-26
| |
* | py, gc: Only zero out the extra bytes at the end of the heap chunk.Damien George2014-04-26
|/ | | | | This is a small optimisation to zero out only the additional bytes that the caller did not ask for.
* Simplify names for argcheck.c / arg parsing.Damien George2014-04-26
|
* Add ARRAY_SIZE macro, and use it where possible.Damien George2014-04-26
|
* Merge branch 'master' of github.com:micropython/micropythonDamien George2014-04-26
|\
| * objstr: Optimize .rstrip() by scanning string from end.Paul Sokolovsky2014-04-26
| |
| * objstr: Implement .lstrip() & .rstrip().Paul Sokolovsky2014-04-26
| | | | | | | | Share code with .strip(). TODO: optimize .rstrip().
| * streams: Make .write() support arbitrary objects with buffer interface.Paul Sokolovsky2014-04-26
| | | | | | | | This in particular fixes writing str vs bytes.
* | py: Make collections module configurable, enabled by default.Damien George2014-04-26
|/
* py: Add MICROPY_ENABLE_DOC_STRING, disabled by default.Damien George2014-04-25
| | | | | | Also add a few STATIC's to some compile functions that should have them. Addresses issue #521.
* Merge branch 'master' of github.com:micropython/micropythonDamien George2014-04-25
|\
| * py: Support instance __call__ method.Paul Sokolovsky2014-04-25
| |
| * py, gc: Fix old gc_realloc for case when NULL is passed in as ptr.Damien George2014-04-25
| |
* | py, gc: Zero out newly allocated blocks in the GC.Damien George2014-04-25
|/ | | | | | | | | | | | | | | | | | | | | | | | 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.
* py, vm: Fix recent bug where state is freed too early.Damien George2014-04-24
|
* py, vm: Free heap-allocated state if it was allocated on the heap.Damien George2014-04-24
|
* Merge pull request #519 from pfalcon/exc-no-ptr-to-fieldDamien George2014-04-24
|\ | | | | objexcept: Don't store args tuple within exception object.
| * objexcept: Don't store args tuple within exception object.Paul Sokolovsky2014-04-23
| | | | | | | | To avoid pointer-to-field GC problem.
* | Merge pull request #518 from pfalcon/vm-traceDamien George2014-04-24
|\ \ | | | | | | vm: Add rudimentary bytecode execution tracing capability.
| * | vm: Add rudimentary bytecode execution tracing capability.Paul Sokolovsky2014-04-23
| |/
* / Makefile: Allow to override "super optimization" options used for some files.Paul Sokolovsky2014-04-24
|/ | | | To help with debugging issue like #510 for example.
* showbc: MAKE_CLOSURE*: Update for new closed-over encoding.Paul Sokolovsky2014-04-23
|
* emitglue: Typo fix in var name.Paul Sokolovsky2014-04-23
|
* builtinimport: If there was error compiling imported module, raise exception.Paul Sokolovsky2014-04-22
|
* objexcept: Add mp_obj_new_exception_arg1() convenience function.Paul Sokolovsky2014-04-22
|
* py: Add 'align' and 'data' meta-instructions to inline assembler.Damien George2014-04-21
|
* py: Fix super() bug, where it didn't allow instance access.Damien George2014-04-21
| | | | | This is a one-liner fix. It gets the class-super.py test passing, but is probably not a complete fix.
* Merge branch 'master' of github.com:micropython/micropythonDamien George2014-04-21
|\
| * py: Add win32-specific header for alloca().Paul Sokolovsky2014-04-20
| |
| * nlrx86.S: Another ifdef for win32 symbol underscoring issues.Paul Sokolovsky2014-04-20
| |
* | py: Small change to mp_arg_parse_all.Damien George2014-04-21
|/
* objarray: Slice subscription operation: properly test for op subtype.Paul Sokolovsky2014-04-20
| | | | | Also, checked that both bytearray and array.array actually support generic (a-la list) slice assignment and deletion. Added TODOs.
* gc: gc_realloc(): Fix byte-to-block calculation.Paul Sokolovsky2014-04-20
|
* py, gc: Further simplify coding-style of gc_realloc.Damien George2014-04-20
| | | | No logic changes, just coding style to make it easy to read.
* py: Wrap #if's around emitter functions that are used only by emitcpy.Damien George2014-04-20
| | | | | | | 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.
* py: Making closures now passes pointer to stack, not a tuple for vars.Damien George2014-04-20
| | | | | | | 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.
* objclosure: Store reference to entire closed variables tuple.Paul Sokolovsky2014-04-20
| | | | Avoids pointer-to-field garbage collection issue. Fixes #510.
* objcell: Add disabled by default print method for debugging.Paul Sokolovsky2014-04-20
|
* gc: "new" gc_realloc: Rewrite in plain C, fixing bunch of bugs.Paul Sokolovsky2014-04-20
| | | | | | 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.