aboutsummaryrefslogtreecommitdiff
path: root/py/runtime.c
AgeCommit message (Collapse)Author
2014-01-23py: Implement bool unary op; tidy up unary op dispatch.Damien George
2014-01-22py: Initialise loaded_module map in rt_init.Damien George
STM port crashes without this re-init. There should not be any state in the core py/ code that relies on pre-initialised data.
2014-01-22Second stage of qstr revamp: uPy str object can be qstr or not.Damien George
2014-01-21Merge branch 'master' of github.com:micropython/micropythonDamien George
Conflicts: py/objstr.c py/py.mk py/stream.c unix/main.c unix/socket.c
2014-01-21Revamp qstrs: they now include length and hash.Damien George
Can now have null bytes in strings. Can define ROM qstrs per port using qstrdefsport.h
2014-01-20Add dummy bytes() constructor.Paul Sokolovsky
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).
2014-01-20py: Put micropython module init code in builtinmp.c.Damien George
2014-01-20Expose memory stats functions via "micropython" module.Paul Sokolovsky
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.
2014-01-20Don't implicitly import "sys" module.Paul Sokolovsky
2014-01-20Pre-create sys module.Paul Sokolovsky
2014-01-19py: Add module/function/class name to exceptions.Damien George
Exceptions know source file, line and block name. Also tidy up some debug printing functions and provide a global flag to enable/disable them.
2014-01-18py: Fix VM/runtime unpack sequence bug, Issue #193.Damien George
2014-01-18Merge pull request #192 from pfalcon/arraysDamien George
Add skeleton implementation of array.array and bytearray.
2014-01-18Improve method lookup in mp_obj_class_lookup.Damien George
Now searches both locals_dict and methods. Partly addresses Issue #145.
2014-01-18Add skeleton implementation of array.array and bytearray.Paul Sokolovsky
So far, only storage, initialization, repr() and buffer protocol is implemented - alredy suitable for passing binary data around.
2014-01-18Merge pull request #191 from pfalcon/store-itemDamien George
Add store_item() virtual method to type to implement container[index] = val
2014-01-18Merge branch 'master' of github.com:dpgeorge/micropythonDamien George
2014-01-18Make VM stack grow upwards, and so no reversed args arrays.Damien George
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.
2014-01-18Add store_item() virtual method to type to implement container[index] = val.Paul Sokolovsky
2014-01-18Add OverflowError and use it for small int overflow instead of assert.Paul Sokolovsky
2014-01-16Add empty (false) value testing for strings, tuples, lists, dicts.Paul Sokolovsky
2014-01-16Add empty "micropython" module to allow more seamless CPython portability.Paul Sokolovsky
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.
2014-01-15Merge branch 'str-repr' of github.com:pfalcon/micropython into pfalcon-str-reprDamien George
Conflicts: tests/basics/tests/exception1.py
2014-01-15Merge branch 'builtins' of github.com:chipaca/micropython into chipaca-builtinsDamien George
Added some checks for number of arguments. Conflicts: py/mpqstrraw.h
2014-01-15Implement eval.Damien George
2014-01-15Implement repr.Damien George
2014-01-15added filter()John R. Lenton
2014-01-15Added mapJohn R. Lenton
2014-01-15Implement str() and repr() builtin functions.Paul Sokolovsky
2014-01-14Merge remote-tracking branch 'upstream/master' into builtinsJohn R. Lenton
2014-01-14added enumerate()John R. Lenton
2014-01-14Merge pull request #142 from chipaca/containmentDamien George
Implemented support for `in` and `not in` operators.
2014-01-14Merge pull request #165 from chipaca/builtinsDamien George
added zip()
2014-01-15Implement "is" and "is not" operators.Paul Sokolovsky
So far, don't work for strings as expected.
2014-01-13Merge remote-tracking branch 'upstream/master' into builtinsJohn R. Lenton
Conflicts: py/builtin.c py/builtin.h py/runtime.c
2014-01-13Merge remote-tracking branch 'upstream/master' into containmentJohn R. Lenton
2014-01-13Consolidate rt_make_function_[0123] to rt_make_function_n.Damien George
2014-01-13Cleanup built-ins, and fix some compiler warnings/errors.Damien George
2014-01-13sortedJohn R. Lenton
2014-01-13added zip()John R. Lenton
2014-01-13Merge remote-tracking branch 'upstream/master' into containmentJohn R. Lenton
2014-01-12Add proper checks for fits-in-small-int. Make it reusable.Paul Sokolovsky
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.
2014-01-12Merge pull request #146 from pfalcon/assert-excDamien George
Add AssertionError.
2014-01-12rt_binary_op(): Don't fall thru in case small_int op result doesn't fit back.Paul Sokolovsky
Currently it would report "operation not supported" which is confusing. Overall, this is thinko leading to undefined behavior.
2014-01-12Add AssertionError.Paul Sokolovsky
2014-01-11py: Implement staticmethod and classmethod (internally).Damien George
Still need to make built-ins by these names, and write tests.
2014-01-11Merge remote-tracking branch 'upstream/master' into containmentJohn R. Lenton
Conflicts: py/runtime.c
2014-01-11Implemented support for `in` and `not in` operators.John R. Lenton
2014-01-11py: Fix bug where == and != not handled for small_ints.Damien George
2014-01-11unified the bopsJohn R. Lenton