summaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAge
* py: Rename mp_exc_stack to mp_exc_stack_t.Damien George2014-03-30
|
* py: Fix reraise logic.Damien George2014-03-30
|
* Add "tracing" to try-reraise2.py test. It now fails.Damien George2014-03-30
|
* Merge pull request #390 from pfalcon/reraise-recursiveDamien George2014-03-30
|\ | | | | vm: Save current active exception on opening new try block.
| * vm: Save current active exception on opening new try block.Paul Sokolovsky2014-03-30
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge branch 'master' of github.com:micropython/micropythonDamien George2014-03-30
|\|
| * vm: WITH_CLEANUP: use POP_EXC_BLOCK().Paul Sokolovsky2014-03-30
| |
* | stmhal: Implement selector for USB device mode; improve boot up.Damien George2014-03-30
| | | | | | | | | | | | | | | | | | | | | | 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).
* | Merge branch 'master' of github.com:micropython/micropythonDamien George2014-03-29
|\|
| * vm: Establish macros PUSH_EXC_BLOCK & POP_EXC_BLOCK to deal with exc stack.Paul Sokolovsky2014-03-29
| | | | | | | | E.g. to handle currently_in_except_block restoring properly.
| * py: Reraising exception possible only in except block.Paul Sokolovsky2014-03-29
| |
* | stmhal: Add CDC+HID USB device.Damien George2014-03-29
|/ | | | | | | 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.
* stmhal: Add Windows .inf file for USB CDC device.Damien George2014-03-29
|
* Merge branch 'master' of github.com:micropython/micropythonDamien George2014-03-29
|\
| * vm: Elaborate comments for WITH_CLEANUP, other cosmetic fixes.Paul Sokolovsky2014-03-29
| |
* | py: Support mpz -op- float, mpz -op- complex, and complex -op- mpz.Damien George2014-03-29
|/
* stmhal: Factor out stdio and readline to separate files.Damien George2014-03-29
| | | | | Adds readline_init() to clear readline history on soft reset. Addresses issue #387.
* py: Make MP_BC_SETUP_WITH use the bytecode stack for load_method.Damien George2014-03-29
| | | | | | 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.
* Merge pull request #389 from pfalcon/with-statementDamien George2014-03-29
|\ | | | | With statement implementation
| * tests: Add "with" statement testcases.Paul Sokolovsky2014-03-29
| |
| * vm: Implement "with" statement (SETUP_WITH and WITH_CLEANUP bytecodes).Paul Sokolovsky2014-03-29
| |
* | py: Fix regress with GeneratorExit object becoming truly const.Damien George2014-03-29
| |
* | unix: Fix ffi.c to compile with latest changes to API.Damien George2014-03-29
| |
* | py: Rename old const type objects to mp_type_* for consistency.Damien George2014-03-29
| |
* | py: Change mp_const_* objects to macros.Damien George2014-03-29
| | | | | | | | Addresses issue #388.
* | Merge pull request #383 from pfalcon/yield-fromDamien George2014-03-29
|\ \ | | | | | | Implement "yield from"
| * | tests: Add testcases for yield from.Paul Sokolovsky2014-03-28
| | |
| * | py: yield from: Elaborate GeneratorExit (gen.close()) handling.Paul Sokolovsky2014-03-28
| | | | | | | | | | | | | | | Handling of GeneratorExit is really peculiar - it subverts normal exception propagation rules.
| * | py: Core "yield from" implementation.Paul Sokolovsky2014-03-28
| | |
* | | tests: Remove unimplemented exceptions from testing.Damien George2014-03-29
| | |
* | | py: Fix typo printing complex numbers that are purely imaginary.Damien George2014-03-29
| | |
* | | py: Free unique_code slot for outer module.Damien George2014-03-29
| |/ |/| | | | | | | | | 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).
* | vm: Make sure that exception triple is <type, instance, traceback>.Paul Sokolovsky2014-03-29
| | | | | | | | | | | | | | 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.
* | vm: Factor out exception block setup to a macro.Paul Sokolovsky2014-03-29
| | | | | | | | Will be reused in WITH bytecodes.
* | Merge branch 'master' of github.com:micropython/micropythonDamien George2014-03-29
|\ \
| * \ Merge pull request #382 from pfalcon/genexit-instDamien George2014-03-29
| |\ \ | | | | | | | | objgenerator: close(): Throw instance of GeneratorExit (not type).
| | * | objgenerator: close(): Throw instance of GeneratorExit (not type).Paul Sokolovsky2014-03-28
| | |/ | | | | | | | | | | | | To comply with Python semantics and allow use of mp_obj_is_subclass_fast() for exception matching.
| * / py: Fix bugs with debugging output.Damien George2014-03-28
| |/ | | | | | | | | | | | | show_bc now decodes the prelude correctly. Moved WRITE_FILE stuff from runtime.c to emitglue.c. Addresses issue #385.
| * showbc: Add few bytecodes related to "with".Paul Sokolovsky2014-03-28
| |
* | stmhal: Add TODO's to exti.c; fix delay in lcd.c.Damien George2014-03-29
|/
* py: Thin out predefined exceptions.Damien George2014-03-27
| | | | | Only exceptions that are actually used are left prefedined. Hierarchy is still there, and removed exceptions are just commented out.
* py: Fix typo printing complex numbers.Damien George2014-03-27
|
* py: Rename emit_pre so they have globally unique names.Damien George2014-03-27
|
* py: Factor out code from runtime.c to emitglue.c.Damien George2014-03-27
|
* py: complex_print uses format_float if single precision fp used.Damien George2014-03-27
|
* py: Put n_state for bytecode in the bytecode prelude.Damien George2014-03-27
| | | | | | | | | | | Rationale: setting up the stack (state for locals and exceptions) is really part of the "code", it's the prelude of the function. For example, native code adjusts the stack pointer on entry to the function. Native code doesn't need to know n_state for any other reason. So putting the state size in the bytecode prelude is sensible. It reduced ROM usage on STM by about 30 bytes :) And makes it easier to pass information about the bytecode between functions.
* py: Calculate maximum exception stack size in compiler.Damien George2014-03-27
|
* py: Fix bug in type_store_attr, trying to store to ROM.Damien George2014-03-27
|
* py: Restore CPython compatibility in compiler for closures with def args.Damien George2014-03-26
|
* Merge pull request #381 from pfalcon/closure-defargsDamien George2014-03-26
|\ | | | | py: Support closures with default args.