summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-03-30py: Don't wrap necessary function calls in assert.Damien George
2014-03-30Merge pull request #399 from pfalcon/gen-defargsDamien George
objgenerator: Handle default args to generator functions.
2014-03-30py: Fix "TypeError: 'iterator' object is not iterable", doh.Paul Sokolovsky
2014-03-30py: Implement support for generalized generator protocol.Paul Sokolovsky
Iterators and ducktype objects can now be arguments of yield from.
2014-03-30objzip: Use mp_identity().Paul Sokolovsky
2014-03-30py: Implement positional and keyword args via * and **.Damien George
Extends previous implementation with * for function calls to * and ** for both function and method calls.
2014-03-30Merge pull request #396 from pfalcon/call-starDamien George
vm: Implement CALL_FUNCTION_VAR opcode (foo(*(1, 2, 3))).
2014-03-30objgenerator: Handle default args to generator functions.Paul Sokolovsky
Addresses #397.
2014-03-30vm: Implement DELETE_FAST_N bytecode.Paul Sokolovsky
2014-03-30vm: Implement CALL_FUNCTION_VAR opcode (foo(*(1, 2, 3))).Paul Sokolovsky
2014-03-30showbc: Dump all CALL_FUNCTION_* and CALL_METHOD_* opcodes.Paul Sokolovsky
2014-03-30Merge map.h into obj.h.Damien George
Pretty much everyone needs to include map.h, since it's such an integral part of the Micro Python object implementation. Thus, the definitions are now in obj.h instead. map.h is removed.
2014-03-30Rename rt_* to mp_*.Damien George
Mostly just a global search and replace. Except rt_is_true which becomes mp_obj_is_true. Still would like to tidy up some of the names, but this will do for now.
2014-03-30stmhal: Unify naming of HW config; make SD detect configurable.Damien George
All board config macros now begin with MICROPY_HW_. Renamed PYBv10 to PYBV10, since macros should be all uppercase. Made SDCARD_DETECT configurable in mpconfigport.h, so that the SD detect pin can be easily configured.
2014-03-30objexcept: Fix another place missing proper args tuple initialization.Paul Sokolovsky
2014-03-30objgenerator.throw: Instantiate if exception type passed, just as "raise".Paul Sokolovsky
Caught by CPython test_pep380.py.
2014-03-30objgenerator.throw(): Throwing GeneratorExit is equivalent to .close().Paul Sokolovsky
According to PEP380 and caught by CPython test_pep380.py .
2014-03-30objgenerator: Store proper code_info pointer.Paul Sokolovsky
2014-03-30objgenerator: mp_obj_gen_resume() suitable only for generators.Paul Sokolovsky
2014-03-30compile: Print error messages on unimplemented relative imports.Paul Sokolovsky
2014-03-30mp_obj_print_exception(): Assert that traceback has sane number of entries.Paul Sokolovsky
2014-03-30py: Rename mp_exc_stack to mp_exc_stack_t.Damien George
2014-03-30py: Fix reraise logic.Damien George
2014-03-30Add "tracing" to try-reraise2.py test. It now fails.Damien George
2014-03-30Merge pull request #390 from pfalcon/reraise-recursiveDamien George
vm: Save current active exception on opening new try block.
2014-03-30Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-03-30stmhal: Implement selector for USB device mode; improve boot up.Damien George
Can now choose at boot up whether the USB device is CDC+MSC or CDC+HID. Choice is made by an option in boot.py, with default being CDC+MSC. HID+MSC is not currently supported, but should be easy to implement. Boot up now has ability to change the reset mode: hold down USR switch while booting and LEDs will count from 1 to 7 to indicate the boot mode. Release USR when correct mode is selected. Current modes are 1 (normal boot), 2 (safe mode), 3 (reset FS mode).
2014-03-30vm: Save current active exception on opening new try block.Paul Sokolovsky
Required to reraise correct exceptions in except block, regardless if more try blocks with active exceptions happen in the same except block. P.S. This "automagic reraise" appears to be quite wasteful feature of Python - we need to save pending exception just in case it *might* be reraised. Instead, programmer could explcitly capture exception to a variable using "except ... as var", and reraise that. So, consider disabling argless raise support as an optimization.
2014-03-30vm: WITH_CLEANUP: use POP_EXC_BLOCK().Paul Sokolovsky
2014-03-29Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-03-29stmhal: Add CDC+HID USB device.Damien George
The HID device must appear before the CDC in order for both to work at the same time. Whilst the code is working, it's not currently used.
2014-03-29vm: Establish macros PUSH_EXC_BLOCK & POP_EXC_BLOCK to deal with exc stack.Paul Sokolovsky
E.g. to handle currently_in_except_block restoring properly.
2014-03-29py: Reraising exception possible only in except block.Paul Sokolovsky
2014-03-29stmhal: Add Windows .inf file for USB CDC device.Damien George
2014-03-29Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-03-29py: Support mpz -op- float, mpz -op- complex, and complex -op- mpz.Damien George
2014-03-29vm: Elaborate comments for WITH_CLEANUP, other cosmetic fixes.Paul Sokolovsky
2014-03-29stmhal: Factor out stdio and readline to separate files.Damien George
Adds readline_init() to clear readline history on soft reset. Addresses issue #387.
2014-03-29py: Make MP_BC_SETUP_WITH use the bytecode stack for load_method.Damien George
The compiler allocates 7 entries on the stack for a with statement (following CPython, but probably can be reduced). This is enough for the method load and call in SETUP_WITH.
2014-03-29Merge pull request #389 from pfalcon/with-statementDamien George
With statement implementation
2014-03-29py: Fix regress with GeneratorExit object becoming truly const.Damien George
2014-03-29unix: Fix ffi.c to compile with latest changes to API.Damien George
2014-03-29py: Rename old const type objects to mp_type_* for consistency.Damien George
2014-03-29py: Change mp_const_* objects to macros.Damien George
Addresses issue #388.
2014-03-29Merge pull request #383 from pfalcon/yield-fromDamien George
Implement "yield from"
2014-03-29tests: Remove unimplemented exceptions from testing.Damien George
2014-03-29py: Fix typo printing complex numbers that are purely imaginary.Damien George
2014-03-29py: Free unique_code slot for outer module.Damien George
Partly (very partly!) addresses issue #386. Most importantly, at the REPL command line, each invocation does not now lead to increased memory usage (unless you define a function/lambda).
2014-03-29tests: Add "with" statement testcases.Paul Sokolovsky
2014-03-29vm: Implement "with" statement (SETUP_WITH and WITH_CLEANUP bytecodes).Paul Sokolovsky