aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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
2014-03-29vm: Make sure that exception triple is <type, instance, traceback>.Paul Sokolovsky
This reduntant triple is one of the ugliest parts of Python, which they chickened out to fix in Python3. We really should consider passing just as single exception instance (without breaking Python-level APIs of course), but until we do, let's follow CPython layout.
2014-03-29vm: Factor out exception block setup to a macro.Paul Sokolovsky
Will be reused in WITH bytecodes.
2014-03-29Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-03-29Merge pull request #382 from pfalcon/genexit-instDamien George
objgenerator: close(): Throw instance of GeneratorExit (not type).
2014-03-29stmhal: Add TODO's to exti.c; fix delay in lcd.c.Damien George
2014-03-28py: Fix bugs with debugging output.Damien George
show_bc now decodes the prelude correctly. Moved WRITE_FILE stuff from runtime.c to emitglue.c. Addresses issue #385.
2014-03-28tests: Add testcases for yield from.Paul Sokolovsky
2014-03-28py: yield from: Elaborate GeneratorExit (gen.close()) handling.Paul Sokolovsky
Handling of GeneratorExit is really peculiar - it subverts normal exception propagation rules.
2014-03-28py: Core "yield from" implementation.Paul Sokolovsky
2014-03-28objgenerator: close(): Throw instance of GeneratorExit (not type).Paul Sokolovsky
To comply with Python semantics and allow use of mp_obj_is_subclass_fast() for exception matching.