summaryrefslogtreecommitdiffstatshomepage
path: root/py
Commit message (Collapse)AuthorAge
* py: Add explicit conversion from float to int via int().Damien George2014-03-30
|
* py: Fix bug in compiler for empty class bases.Damien George2014-03-30
| | | | Eg class A(): pass would fail an assertion.
* py: Don't wrap necessary function calls in assert.Damien George2014-03-30
|
* Merge pull request #399 from pfalcon/gen-defargsDamien George2014-03-30
|\ | | | | objgenerator: Handle default args to generator functions.
| * objgenerator: Handle default args to generator functions.Paul Sokolovsky2014-03-30
| | | | | | | | Addresses #397.
* | py: Fix "TypeError: 'iterator' object is not iterable", doh.Paul Sokolovsky2014-03-30
| |
* | py: Implement support for generalized generator protocol.Paul Sokolovsky2014-03-30
| | | | | | | | Iterators and ducktype objects can now be arguments of yield from.
* | objzip: Use mp_identity().Paul Sokolovsky2014-03-30
| |
* | py: Implement positional and keyword args via * and **.Damien George2014-03-30
| | | | | | | | | | Extends previous implementation with * for function calls to * and ** for both function and method calls.
* | Merge pull request #396 from pfalcon/call-starDamien George2014-03-30
|\ \ | |/ |/| vm: Implement CALL_FUNCTION_VAR opcode (foo(*(1, 2, 3))).
| * vm: Implement CALL_FUNCTION_VAR opcode (foo(*(1, 2, 3))).Paul Sokolovsky2014-03-30
| |
* | vm: Implement DELETE_FAST_N bytecode.Paul Sokolovsky2014-03-30
|/
* showbc: Dump all CALL_FUNCTION_* and CALL_METHOD_* opcodes.Paul Sokolovsky2014-03-30
|
* Merge map.h into obj.h.Damien George2014-03-30
| | | | | | 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.
* Rename rt_* to mp_*.Damien George2014-03-30
| | | | | | | 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.
* objexcept: Fix another place missing proper args tuple initialization.Paul Sokolovsky2014-03-30
|
* objgenerator.throw: Instantiate if exception type passed, just as "raise".Paul Sokolovsky2014-03-30
| | | | Caught by CPython test_pep380.py.
* objgenerator.throw(): Throwing GeneratorExit is equivalent to .close().Paul Sokolovsky2014-03-30
| | | | According to PEP380 and caught by CPython test_pep380.py .
* objgenerator: Store proper code_info pointer.Paul Sokolovsky2014-03-30
|
* objgenerator: mp_obj_gen_resume() suitable only for generators.Paul Sokolovsky2014-03-30
|
* compile: Print error messages on unimplemented relative imports.Paul Sokolovsky2014-03-30
|
* mp_obj_print_exception(): Assert that traceback has sane number of entries.Paul Sokolovsky2014-03-30
|
* py: Rename mp_exc_stack to mp_exc_stack_t.Damien George2014-03-30
|
* py: Fix reraise logic.Damien George2014-03-30
|
* 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.
* vm: WITH_CLEANUP: use POP_EXC_BLOCK().Paul Sokolovsky2014-03-30
|
* 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
|
* 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
|/
* 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
| * 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
| |
* | 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"
| * | 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
| | |
* | | 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 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
|
* 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
|