summaryrefslogtreecommitdiffstatshomepage
path: root/py/runtime.c
Commit message (Collapse)AuthorAge
* py: Implement bool unary op; tidy up unary op dispatch.Damien George2014-01-23
|
* py: Initialise loaded_module map in rt_init.Damien George2014-01-22
| | | | | STM port crashes without this re-init. There should not be any state in the core py/ code that relies on pre-initialised data.
* Second stage of qstr revamp: uPy str object can be qstr or not.Damien George2014-01-22
|
* Merge branch 'master' of github.com:micropython/micropythonDamien George2014-01-21
|\ | | | | | | | | | | | | | | | | Conflicts: py/objstr.c py/py.mk py/stream.c unix/main.c unix/socket.c
| * Add dummy bytes() constructor.Paul Sokolovsky2014-01-20
| | | | | | | | | | | | Currently, MicroPython strings are mix between CPython byte and unicode strings. So, conversion is null so far. This dummy implementation is intended for compatibility with CPython (so, same code can run on both).
* | Revamp qstrs: they now include length and hash.Damien George2014-01-21
|/ | | | | Can now have null bytes in strings. Can define ROM qstrs per port using qstrdefsport.h
* py: Put micropython module init code in builtinmp.c.Damien George2014-01-20
|
* Expose memory stats functions via "micropython" module.Paul Sokolovsky2014-01-20
| | | | | | | These are micropython.mem_total(), .mem_current(), .mem_peak(). These are 3 individual functions with simple scalar return value to make sure that calls to these functions themselves have minimal (hopefully zero) impact on memory allocation.
* Don't implicitly import "sys" module.Paul Sokolovsky2014-01-20
|
* Pre-create sys module.Paul Sokolovsky2014-01-20
|
* py: Add module/function/class name to exceptions.Damien George2014-01-19
| | | | | | | Exceptions know source file, line and block name. Also tidy up some debug printing functions and provide a global flag to enable/disable them.
* py: Fix VM/runtime unpack sequence bug, Issue #193.Damien George2014-01-18
|
* Merge pull request #192 from pfalcon/arraysDamien George2014-01-18
|\ | | | | Add skeleton implementation of array.array and bytearray.
| * Add skeleton implementation of array.array and bytearray.Paul Sokolovsky2014-01-18
| | | | | | | | | | So far, only storage, initialization, repr() and buffer protocol is implemented - alredy suitable for passing binary data around.
* | Improve method lookup in mp_obj_class_lookup.Damien George2014-01-18
|/ | | | Now searches both locals_dict and methods. Partly addresses Issue #145.
* Merge pull request #191 from pfalcon/store-itemDamien George2014-01-18
|\ | | | | Add store_item() virtual method to type to implement container[index] = val
| * Add store_item() virtual method to type to implement container[index] = val.Paul Sokolovsky2014-01-18
| |
* | Merge branch 'master' of github.com:dpgeorge/micropythonDamien George2014-01-18
|\|
| * Add OverflowError and use it for small int overflow instead of assert.Paul Sokolovsky2014-01-18
| |
* | Make VM stack grow upwards, and so no reversed args arrays.Damien George2014-01-18
|/ | | | | | | | | | | | | | | Change state layout in VM so the stack starts at state[0] and grows upwards. Locals are at the top end of the state and number downwards. This cleans up a lot of the interface connecting the VM to C: now all functions that take an array of Micro Python objects are in order (ie no longer in reverse). Also clean up C API with keyword arguments (call_n and call_n_kw replaced with single call method that takes keyword arguments). And now make_new takes keyword arguments. emitnative.c has not yet been changed to comply with the new order of stack layout.
* Add empty (false) value testing for strings, tuples, lists, dicts.Paul Sokolovsky2014-01-16
|
* Add empty "micropython" module to allow more seamless CPython portability.Paul Sokolovsky2014-01-16
| | | | | | | Implicit "micropython" module contains (at least) codegeneration decorators. Make it explicit, so an app could have "import micropython". On MicroPython, that will be no-op. On CPython, that will give a chance to have a module with placeholder decorators.
* Merge branch 'str-repr' of github.com:pfalcon/micropython into pfalcon-str-reprDamien George2014-01-15
|\ | | | | | | | | Conflicts: tests/basics/tests/exception1.py
| * Implement str() and repr() builtin functions.Paul Sokolovsky2014-01-15
| |
* | Merge branch 'builtins' of github.com:chipaca/micropython into chipaca-builtinsDamien George2014-01-15
|\ \ | | | | | | | | | | | | | | | | | | Added some checks for number of arguments. Conflicts: py/mpqstrraw.h
| * | added filter()John R. Lenton2014-01-15
| | |
| * | Added mapJohn R. Lenton2014-01-15
| | |
| * | Merge remote-tracking branch 'upstream/master' into builtinsJohn R. Lenton2014-01-14
| |\|
| * | added enumerate()John R. Lenton2014-01-14
| | |
* | | Implement eval.Damien George2014-01-15
| | |
* | | Implement repr.Damien George2014-01-15
| |/ |/|
* | Merge pull request #142 from chipaca/containmentDamien George2014-01-14
|\ \ | |/ |/| Implemented support for `in` and `not in` operators.
| * Merge remote-tracking branch 'upstream/master' into containmentJohn R. Lenton2014-01-13
| |\
| * \ Merge remote-tracking branch 'upstream/master' into containmentJohn R. Lenton2014-01-13
| |\ \
| * \ \ Merge remote-tracking branch 'upstream/master' into containmentJohn R. Lenton2014-01-11
| |\ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: py/runtime.c
| * | | | Implemented support for `in` and `not in` operators.John R. Lenton2014-01-11
| | | | |
* | | | | Merge pull request #165 from chipaca/builtinsDamien George2014-01-14
|\ \ \ \ \ | | | | | | | | | | | | added zip()
| * \ \ \ \ Merge remote-tracking branch 'upstream/master' into builtinsJohn R. Lenton2014-01-13
| |\ \ \ \ \ | | | |_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: py/builtin.c py/builtin.h py/runtime.c
| * | | | | sortedJohn R. Lenton2014-01-13
| | | | | |
| * | | | | added zip()John R. Lenton2014-01-13
| | |_|_|/ | |/| | |
* | | | | Implement "is" and "is not" operators.Paul Sokolovsky2014-01-15
| |/ / / |/| | | | | | | | | | | So far, don't work for strings as expected.
* | | | Consolidate rt_make_function_[0123] to rt_make_function_n.Damien George2014-01-13
| | | |
* | | | Cleanup built-ins, and fix some compiler warnings/errors.Damien George2014-01-13
|/ / /
* | | Add proper checks for fits-in-small-int. Make it reusable.Paul Sokolovsky2014-01-12
| | | | | | | | | | | | | | | | | | | | | We likely should make mp_obj_new_int() inline, and rely on its encapsulated check rather than inline checks everywhere explicitly. Also, parser for big small int values is still broken.
* | | Merge pull request #146 from pfalcon/assert-excDamien George2014-01-12
|\ \ \ | | | | | | | | Add AssertionError.
| * | | Add AssertionError.Paul Sokolovsky2014-01-12
| | | |
* | | | rt_binary_op(): Don't fall thru in case small_int op result doesn't fit back.Paul Sokolovsky2014-01-12
|/ / / | | | | | | | | | | | | Currently it would report "operation not supported" which is confusing. Overall, this is thinko leading to undefined behavior.
* | / py: Implement staticmethod and classmethod (internally).Damien George2014-01-11
| |/ |/| | | | | Still need to make built-ins by these names, and write tests.
* | py: Fix bug where == and != not handled for small_ints.Damien George2014-01-11
|/
* unified the bopsJohn R. Lenton2014-01-11
|