summaryrefslogtreecommitdiff
path: root/py
AgeCommit message (Collapse)Author
2014-02-01py: mp_execute_byte_code has 2 arg arrays, for more efficient default params.Damien George
2014-02-01Merge branch 'fun-defargs' of github.com:pfalcon/micropython into ↵Damien George
pfalcon-fun-defargs
2014-02-01Implement default function arguments (for Python functions).Paul Sokolovsky
TODO: Decide if we really need separate bytecode for creating functions with default arguments - we would need same for closures, then there're keywords arguments too. Having all combinations is a small exponential explosion, likely we need just 2 cases - simplest (no defaults, no kw), and full - defaults & kw.
2014-02-01Add exception stack unwind support for RETURN_VALUE.Paul Sokolovsky
This properly implements return from try/finally block(s). TODO: Consider if we need to do any value stack unwinding for RETURN_VALUE case. Intuitively, this is "success" return, so value stack should be in good shape, and unwinding shouldn't be required.
2014-01-31Merge pull request #246 from pfalcon/exc_stack_entryDamien George
vm: Introduce structure for exception stack entry, record entry type.
2014-01-31py: Simplified rt_call_function_n_kw.Damien George
2014-01-31Merge branch 'fix_str_call' of github.com:msiemens/micropython into ↵Damien George
msiemens-fix_str_call
2014-01-31py: Make str.replace do 2 passes over the string.Damien George
2014-01-31Merge branch 'master' of github.com:xbe/micropython into xbe-masterDamien George
2014-01-31Fix SIGSEV when running "a"()Markus Siemens
rt_call_function_n_kw did check for integers but not for strings being called. Added a check so running "a"() won't SIGSEV but throw an exception.
2014-01-31Update VM stacks comments.Paul Sokolovsky
2014-01-31vm: Introduce structure for exception stack entry, record entry type.Paul Sokolovsky
Also, handle SETUP_FINALLY opcode.
2014-01-31Dump 4 more bytecodes (loop and finally ones).Paul Sokolovsky
2014-01-31Typo fixes in comments.Paul Sokolovsky
2014-01-30Implement str.replace and add tests for it.xbe
2014-01-31py: Add MICROPY_ENABLE_FLOAT around a float specific piece of code.Damien George
2014-01-30Merge pull request #239 from pfalcon/end_finallyDamien George
vm: Add basic implementation of END_FINALLY opcode.
2014-01-30Fix Makefiles: -O3 option was not being applied; mkdir for STM.Damien George
2014-01-30vm: Add basic implementation of END_FINALLY opcode.Paul Sokolovsky
Allows to have nested try blocks with except filters. TODO: Don't add END_FINALLY's exception re-raise points to traceback.
2014-01-30py: Improve __bool__ and __len__ dispatch; add slots for them.Damien George
2014-01-30Implement __bool__ and __len__ via unary_op virtual method for all types.Paul Sokolovsky
__bool__() and __len__() are just the same as __neg__() or __invert__(), and require efficient dispatching implementation (not requiring search/lookup). type->unary_op() is just the right choice for this short of adding standalone virtual method(s) to already big mp_obj_type_t structure.
2014-01-30realloc(): Log original memory ptr too.Paul Sokolovsky
To alloc complete memory alloc flow tracing.
2014-01-29Merge branch 'master' of github.com:msiemens/micropython into msiemens-masterDamien George
2014-01-29py: Add compile option to enable/disable source line numbers.Damien George
2014-01-29stm: Add optional memory debugging output.Damien George
2014-01-29py: Simplify fastn in VM; reduce size of unique code struct.Damien George
We still have FAST_[0,1,2] byte codes, but they now just access the fastn array (before they had special local variables). It's now simpler, a bit faster, and uses a bit less stack space (on STM at least, which is most important). The only reason now to keep FAST_[0,1,2] byte codes is for compressed byte code size.
2014-01-29py: Fix bug with LOAD_METHOD; fix int->machine_int_t for small int.Damien George
LOAD_METHOD bug was: emitbc did not correctly calculate the amount of stack usage for a LOAD_METHOD operation. small int bug was: int was being used to pass small ints, when it should have been machine_int_t.
2014-01-29py: Msg in exception is no longer interned.Damien George
2014-01-29Add qstr_info() function and bindings for unix port.Damien George
2014-01-28py: Implement 'not' in compiler, and improve rt_is_true.Damien George
2014-01-29mp_obj_new_bytearray_by_ref(): Allow to create array by reference.Paul Sokolovsky
This is special feature for FFI.
2014-01-28Fixed problems with nlx86.S on LinuxMarkus Siemens
Fixed '#ifdef's so Linux would compile again and added .scl and .type for Windows.
2014-01-28Added Windows port (see #233)Markus Siemens
2014-01-28bytearray: Print objects properly.Paul Sokolovsky
2014-01-28Factor out quoted string print function for reuse (mp_str_print_quoted()).Paul Sokolovsky
2014-01-28array: CPython prints empty arrays inconsistently (only typecode, no []).Paul Sokolovsky
2014-01-28Don't pre-import array module.Paul Sokolovsky
2014-01-28array.array: Allow to create empty arrays.Paul Sokolovsky
2014-01-27Merge pull request #231 from iabdalkader/masterDamien George
Fix implicit double conversion warning
2014-01-27Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-01-27py: Add unary op not for NoneType, bool, tuple, list, dict; fix for int.Damien George
2014-01-27long int: Implement more operations.Paul Sokolovsky
2014-01-27Fix implicit double conversion warningmux
2014-01-27list.pop(): Don't allow ->alloc drop to zero, which causes unexpected behavior.Paul Sokolovsky
2014-01-27gen.send(): Throw StopIteration. Also, explicitly shutdown finished gen.Paul Sokolovsky
Otherwise, some generator statements still may be spuriously executed on subsequent calls to next()/send().
2014-01-26Implement send() method for generators.Paul Sokolovsky
2014-01-26Functions of fixed number of args are special-cased only for 3 or less args.Paul Sokolovsky
2014-01-26Add MP_OBJ_IS_INT(), for symmetry with MP_OBJ_IS_STR().Paul Sokolovsky
2014-01-25Merge pull request #225 from dhylands/fix-make-depDamien George
Fixed dependency problem for qstrdefs.generated.h
2014-01-25Fixed dependency problem for qstrdefs.generated.hDave Hylands
The problem manifests itself in make 4.0 I also fixed the LINK message when linking the final executable for unix and unix-cpy.