Commit message (Collapse) | Author | Age | |
---|---|---|---|
* | py: Fix bug in optimised for .. range. | Damien George | 2014-03-31 |
| | | | | | | Don't store final, failing value to the loop variable. This fix also makes for .. range a bit more efficient, as it uses less store/load pairs for the loop variable. | ||
* | py: Fix vstr_init for case that alloc = 0. | Damien George | 2014-03-31 |
| | |||
* | Merge branch 'master' of github.com:micropython/micropython | Damien George | 2014-03-31 |
|\ | |||
| * | objtype: Add virtual __name__ attribute. | Paul Sokolovsky | 2014-03-31 |
| | | | | | | | | | | It's virtual because it's not shown in dir(...). (That's also how CPython has it). | ||
| * | mp_resume: Dare to pass send_value of NULL. | Paul Sokolovsky | 2014-03-31 |
| | | | | | | | | | | | | | | There was thinkos that either send_value or throw_value is specified, but there were cases with both. Note that send_value is pushed onto generator's stack - but that's probably only good, because if we throw exception into gen, it should not ever use send_value, and that will be just extra "assert". | ||
| * | mp_resume: Elaborate handling of .throw() for objects which lack it. | Paul Sokolovsky | 2014-03-31 |
| | | | | | | | | | | | | In this case, the exception is just re-thrown - the ideas is that object doesn't handle this exception specially, so it will propagated per Python semantics. | ||
| * | objgenerator.throw(GeneratorExit) is not equivalent to .close(). | Paul Sokolovsky | 2014-03-31 |
| | | | | | | | | | | | | | | | | | | .throw() propagates any exceptions, and .close() swallows them. Yielding in reponse to .throw(GeneratorExit) is still fatal, and we need to handle it for .throw() case separately (previously it was handled only for .close() case). Obscure corner cases due to test_pep380.py. | ||
| * | objgenerator: Another obscure case of propagating MP_OBJ_NULL optimization. | Paul Sokolovsky | 2014-03-31 |
| | | |||
* | | py: Remove old "run time" functions that were 1 liners. | Damien George | 2014-03-31 |
| | | |||
* | | py: Disable dump_args function call entirely when not debugging. | Damien George | 2014-03-31 |
| | | | | | | | | | | Yes, I know, a good compiler will optimise this away, but I feel this is neater. | ||
* | | py: Towards default keyword arguments. | Damien George | 2014-03-31 |
|/ | | | | These are default arguments after a bare *. | ||
* | Merge branch 'master' of github.com:micropython/micropython | Damien George | 2014-03-31 |
|\ | |||
| * | py: Properly implement divide-by-zero handling. | Paul Sokolovsky | 2014-03-31 |
| | | | | | | | | | | "1/0" is sacred idiom, the shortest way to break program execution (sys.exit() is too long). | ||
| * | objfloat: Quick&dirty implementation of float floor division. | Paul Sokolovsky | 2014-03-31 |
| | | | | | | | | TODO: Likely doesn't match Python semantics for negative numbers. | ||
| * | compile: Don't try to constant-fold division by zero. | Paul Sokolovsky | 2014-03-31 |
| | | | | | | | | | | The way it is, just crashes app. And optimizing to "raise ZeroDivisionError" is probably too much. | ||
| * | objfloat: Make sure that floats always have dot (for C "double" type case). | Paul Sokolovsky | 2014-03-31 |
| | | | | | | | | | | This matches CPython behavior and hopefully can be treated as general Python semantics. | ||
| * | objfloat: Missing default: caused incorrect results for unimplemented ops. | Paul Sokolovsky | 2014-03-31 |
| | | |||
| * | objexcept: No more magic messages in exceptions, only exception arguments. | Paul Sokolovsky | 2014-03-31 |
| | | | | | | | | | | | | | | One of the reason for separate "message" (besides still unfulfilled desire to optimize memory usage) was apparent special handling of exception with messages by CPython. Well, the message is still just an exception argument, it just printed specially. Implement that with PRINT_EXC printing format. | ||
* | | py: Add LOAD_NULL bytecode and use it to simplify function calls. | Damien George | 2014-03-31 |
| | | | | | | | | | | | | | | Adding this bytecode allows to remove 4 others related to function/method calls with * and ** support. Will also help with bytecodes that make functions/closures with default positional and keyword args. | ||
* | | py: Rename and reorder parameters in emit_make_function/closure. | Damien George | 2014-03-31 |
|/ | | | | In preparation for implementing default keyword arguments. | ||
* | py: Add equality test for None object. | Damien George | 2014-03-30 |
| | |||
* | py: Add explicit conversion from float to int via int(). | Damien George | 2014-03-30 |
| | |||
* | py: Fix bug in compiler for empty class bases. | Damien George | 2014-03-30 |
| | | | | Eg class A(): pass would fail an assertion. | ||
* | py: Don't wrap necessary function calls in assert. | Damien George | 2014-03-30 |
| | |||
* | Merge pull request #399 from pfalcon/gen-defargs | Damien George | 2014-03-30 |
|\ | | | | | objgenerator: Handle default args to generator functions. | ||
| * | objgenerator: Handle default args to generator functions. | Paul Sokolovsky | 2014-03-30 |
| | | | | | | | | Addresses #397. | ||
* | | py: Fix "TypeError: 'iterator' object is not iterable", doh. | Paul Sokolovsky | 2014-03-30 |
| | | |||
* | | py: Implement support for generalized generator protocol. | Paul Sokolovsky | 2014-03-30 |
| | | | | | | | | Iterators and ducktype objects can now be arguments of yield from. | ||
* | | objzip: Use mp_identity(). | Paul Sokolovsky | 2014-03-30 |
| | | |||
* | | py: Implement positional and keyword args via * and **. | Damien George | 2014-03-30 |
| | | | | | | | | | | Extends previous implementation with * for function calls to * and ** for both function and method calls. | ||
* | | Merge pull request #396 from pfalcon/call-star | Damien George | 2014-03-30 |
|\ \ | |/ |/| | vm: Implement CALL_FUNCTION_VAR opcode (foo(*(1, 2, 3))). | ||
| * | vm: Implement CALL_FUNCTION_VAR opcode (foo(*(1, 2, 3))). | Paul Sokolovsky | 2014-03-30 |
| | | |||
* | | vm: Implement DELETE_FAST_N bytecode. | Paul Sokolovsky | 2014-03-30 |
|/ | |||
* | showbc: Dump all CALL_FUNCTION_* and CALL_METHOD_* opcodes. | Paul Sokolovsky | 2014-03-30 |
| | |||
* | Merge map.h into obj.h. | Damien George | 2014-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 George | 2014-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. | ||
* | stmhal: Unify naming of HW config; make SD detect configurable. | Damien George | 2014-03-30 |
| | | | | | | | | | 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. | ||
* | objexcept: Fix another place missing proper args tuple initialization. | Paul Sokolovsky | 2014-03-30 |
| | |||
* | objgenerator.throw: Instantiate if exception type passed, just as "raise". | Paul Sokolovsky | 2014-03-30 |
| | | | | Caught by CPython test_pep380.py. | ||
* | objgenerator.throw(): Throwing GeneratorExit is equivalent to .close(). | Paul Sokolovsky | 2014-03-30 |
| | | | | According to PEP380 and caught by CPython test_pep380.py . | ||
* | objgenerator: Store proper code_info pointer. | Paul Sokolovsky | 2014-03-30 |
| | |||
* | objgenerator: mp_obj_gen_resume() suitable only for generators. | Paul Sokolovsky | 2014-03-30 |
| | |||
* | compile: Print error messages on unimplemented relative imports. | Paul Sokolovsky | 2014-03-30 |
| | |||
* | mp_obj_print_exception(): Assert that traceback has sane number of entries. | Paul Sokolovsky | 2014-03-30 |
| | |||
* | py: Rename mp_exc_stack to mp_exc_stack_t. | Damien George | 2014-03-30 |
| | |||
* | py: Fix reraise logic. | Damien George | 2014-03-30 |
| | |||
* | Add "tracing" to try-reraise2.py test. It now fails. | Damien George | 2014-03-30 |
| | |||
* | Merge pull request #390 from pfalcon/reraise-recursive | Damien George | 2014-03-30 |
|\ | | | | | vm: Save current active exception on opening new try block. | ||
| * | vm: Save current active exception on opening new try block. | Paul Sokolovsky | 2014-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/micropython | Damien George | 2014-03-30 |
|\| |