summaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAge
* esp8266: Put more literal and text obj data in irom0_0_seg.Damien George2015-05-13
| | | | | | | With newer versions of esp_iot_sdk the iram1_0_seg started to overflow. Now it doesn't. Addresses issue #1254.
* esp8266: Add module weak links; link time to utime.Damien George2015-05-13
|
* esp8266: Add utime and pyb.RTCJosef Gajdusek2015-05-13
|
* esp8266: Update the linker scriptJosef Gajdusek2015-05-13
| | | | | Moved modesp.o to flash and increased size of the irom0_0_seg segment. The new value was taken from NodeMCU linker script.
* lib: Move time utility functions to common library.Josef Gajdusek2015-05-13
|
* esp8266: Implement time functionsJosef Gajdusek2015-05-12
|
* stmhal: Add os.rename function.Steve Zatz2015-05-12
|
* unix: Add some extra coverage tests for vstr and attrtuple.Damien George2015-05-12
|
* tests: Add further tests for class defining __hash__.Damien George2015-05-12
|
* py: Add mp_obj_get_int_truncated and use it where appropriate.Damien George2015-05-12
| | | | | | mp_obj_get_int_truncated will raise a TypeError if the argument is not an integral type. Use mp_obj_int_get_truncated only when you know the argument is a small or big int.
* py: Convert hash API to use MP_UNARY_OP_HASH instead of ad-hoc function.Damien George2015-05-12
| | | | | | | | | | | | | | Hashing is now done using mp_unary_op function with MP_UNARY_OP_HASH as the operator argument. Hashing for int, str and bytes still go via fast-path in mp_unary_op since they are the most common objects which need to be hashed. This lead to quite a bit of code cleanup, and should be more efficient if anything. It saves 176 bytes code space on Thumb2, and 360 bytes on x86. The only loss is that the error message "unhashable type" is now the more generic "unsupported type for __hash__".
* vm: Properly handle StopIteration raised in user instance iterator.Paul Sokolovsky2015-05-11
| | | | I.e. in bytecode Python functions.
* objgenerator: Can optimize StopIteration to STOP_ITERATION only if arg is None.Paul Sokolovsky2015-05-11
| | | | | | Unfortunately, MP_OBJ_STOP_ITERATION doesn't have means to pass an associated value, so we can't optimize StopIteration exception with (non-None) argument to MP_OBJ_STOP_ITERATION.
* objgenerator: If generator yielded STOP_ITERATION value, it's stopped.Paul Sokolovsky2015-05-11
| | | | | MP_OBJ_STOP_ITERATION is equivalent of raising StopIteration, except mp_vm_return_kind_t for it is "yield".
* sthmal/rtc.c: Add calibration() method to get/set RTC fine-tuning value.blmorris2015-05-11
|
* vm: Null pointer test when checking for StopIteration optimizations.Paul Sokolovsky2015-05-10
| | | | | | | When generator raises exception, it is automatically terminated (by setting its code_state.ip to 0), which interferes with this check. Triggered in particular by CPython's test_pep380.py.
* unix: Include stdio.h to allow easy debugging with printf().Paul Sokolovsky2015-05-10
|
* runtime: Add TODO for mp_resume() on handling .close().Paul Sokolovsky2015-05-10
| | | | | | | | | | Exceptions in .close() should be ignored (dumped to sys.stderr, not propagated), but in uPy, they are propagated. Fix would require nlr-wrapping .close() call, which is expensive. Bu on the other hand, .close() is not called often, so maybe that's not too bad (depends, if it's finally called and that causes stack overflow, there's nothing good in that). And yet on another hand, .close() can be implemented to catch exceptions on its side, and that should be the right choice.
* unix: Print unhandled exception to stderr, like CPython does.Paul Sokolovsky2015-05-10
|
* py: iternext() may not return MP_OBJ_NULL, only MP_OBJ_STOP_ITERATION.Paul Sokolovsky2015-05-10
| | | | | Testing for incorrect value led to premature termination of generator containing yield from for such iterator (e.g. "yield from [1, 2]").
* ACKNOWLEDGEMENTS: Add 1 backer name.Damien George2015-05-09
|
* unix: Fix thumb2 vs arm native emitter auto-detection.Paul Sokolovsky2015-05-08
| | | | Make thumb2 have priority over arm.
* emitnative: Revamp ARM codegen compile after full-arg support refactors.Paul Sokolovsky2015-05-08
| | | | | | The code was apparently broken after 9988618e0e0f5c319e31b135d993e22efb593093 "py: Implement full func arg passing for native emitter.". This attempts to propagate those changes to ARM emitter.
* unix: Make extra-coverage function callable from Python scripts.Damien George2015-05-08
| | | | | This allows the output of the extra-coverage tests to be checked using the normal run-tests script.
* unix: Add special function to improve coverage.Damien George2015-05-08
| | | | | | The function and corresponding command-line option are only enabled for the coverage build. They are used to exercise uPy features that can't be properly tested by Python scripts.
* tests: Add test for machine module (mem* functions).Damien George2015-05-08
|
* tools: Add script to install "upip" package manager.Paul Sokolovsky2015-05-07
| | | | | | | | upip is a simple and light-weight package manager for MicroPython modules, offering subset of pip functionality. upip is part of micropython-lib project: https://github.com/micropython/micropython-lib/tree/master/upip This script bootstraps upip by downloading and unpacking it directly from PyPI repository, with all other packages to be installed with upip itself.
* cc3200: Enable MICROPY_MODULE_WEAK_LINKS.Daniel Campora2015-05-07
|
* tools/pyboard.py: Add "--follow" option to wait for output indefinitely.Damien George2015-05-07
| | | | Also flush stdout so you can see output as it comes.
* stmhal: Move debug UART repl to after uart_init0 call.Dave Hylands2015-05-06
|
* esp8266: Add support for frozen modulesJosef Gajdusek2015-05-06
|
* esp8266: Add .onsent callback supportJosef Gajdusek2015-05-06
| | | | | The function passed to socket.onsent() gets called after data is succesfully sent by the socket.
* esp8266: Initialize socket->connlist to NULLJosef Gajdusek2015-05-06
| | | | This was causing crashes in .onconnect()
* unix-cpy: Fix adjustment of stack size when leaving exception handler.Damien George2015-05-06
| | | | Also remove __debug__ from one of the bytecode tests.
* esp8266: Fix garbage collector by hard-coding stack end address.Josef Gajdusek2015-05-06
| | | | | | | As user_init() is not a true main functions, the stack pointer captured within is not pointing at the base of the stack. This caused gc_collect being called with sp being higher than stack_end, causing integer overflow and crashing as gc tried to scan almost the entire address space.
* py: Fix naming of function arguments when function is a closure.Damien George2015-05-06
| | | | Addresses issue #1226.
* mkrules.mk: Add comment why dependency parsing regex was tweaked.Paul Sokolovsky2015-05-06
| | | | (Windows compatibility.)
* Adjust sed regex that processes dependency file from compilerAri Suutari2015-05-06
| | | | | so that resulting file is correct also on windows systems (ie. with file names containing drive letter).
* pyexec: Make raw REPL work with event-driven version of pyexec.Damien George2015-05-06
| | | | | | | esp8266 port now has working raw and friendly REPL, as well as working soft reset (CTRL-D at REPL, or raise SystemExit). tools/pyboard.py now works with esp8266 port.
* tests: Fix cmd_showbc now that LOAD_CONST_ELLIPSIS bytecode is gone.Damien George2015-05-05
|
* esp8266: Return CPU frequency in Hz.Damien George2015-05-05
|
* esp8266: Fix endian of address returned by esp.getaddrinfo()Josef Gajdusek2015-05-05
|
* py: Remove LOAD_CONST_ELLIPSIS bytecode, use LOAD_CONST_OBJ instead.Damien George2015-05-05
| | | | | Ellipsis constant is rarely used so no point having an extra bytecode for it.
* obj: Handle user instance hash based on Python adhoc rules.Paul Sokolovsky2015-05-05
| | | | | | User instances are hashable by default (using __hash__ inherited from "object"). But if __eq__ is defined and __hash__ not defined in particular class, instance is not hashable.
* objsingleton: New home for Ellipsis and NotImplemented.Paul Sokolovsky2015-05-05
| | | | | | | Having NotImplemented as MP_OBJ_SENTINEL turned out to be problematic (it needs to be checked for in a lot of places, otherwise it'll crash as would pass MP_OBJ_IS_OBJ()), so made a proper singleton value like Ellipsis, both of them sharing the same type.
* cc3200: Define MICROPY_CPYTHON_COMPAT=0.Daniel Campora2015-05-05
| | | | | This only disables some corner case functionality to keep C Python compatibility, and saves ~600 bytes.
* modbuiltins: Add NotImplemented builtin constant.Paul Sokolovsky2015-05-04
| | | | | | | | | | | | From https://docs.python.org/3/library/constants.html#NotImplemented : "Special value which should be returned by the binary special methods (e.g. __eq__(), __lt__(), __add__(), __rsub__(), etc.) to indicate that the operation is not implemented with respect to the other type; may be returned by the in-place binary special methods (e.g. __imul__(), __iand__(), etc.) for the same purpose. Its truth value is true." Some people however appear to abuse it to mean "no value" when None is a legitimate value (don't do that).
* modstruct: Rename module to "ustruct", to allow full Python-level impl.Paul Sokolovsky2015-05-04
|
* modstruct: Group module qstr's together.Paul Sokolovsky2015-05-04
|
* esp8266: Add esp.socket class, with ESP-style socket functionality.Josef Gajdusek2015-05-04
| | | | | | | * UDP currently not supported * As there is no way (that I know of) the espconn_regist_connectcb() callback can recognize on which socket has the connection arrived, only one listening function at a time is supported