summaryrefslogtreecommitdiffstatshomepage
path: root/py/objfun.c
Commit message (Collapse)AuthorAge
* 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.
* Merge remote-tracking branch 'upstream/master' into builtinsJohn R. Lenton2014-01-13
|\ | | | | | | | | | | | | Conflicts: py/builtin.c py/builtin.h py/runtime.c
| * Consolidate rt_make_function_[0123] to rt_make_function_n.Damien George2014-01-13
| |
| * Initialize is_kw for dynamically allocated mp_obj_fun_native_t ojects.Dave Hylands2014-01-13
| | | | | | | | This should fix issue #171
* | Made sorted() raise an exception instead of aborting when given no ↵John R. Lenton2014-01-13
|/ | | | arguments; moved around some things in objfun.c as a consequence
* py: Stuff qstr in object pointer; keys for mp_map_t are now always mp_obj_t.Damien George2014-01-08
|
* Merge remote-tracking branch 'upstream/master' into listsort. Lots of ↵John R. Lenton2014-01-07
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | conflict fun. Conflicts: py/obj.h py/objbool.c py/objboundmeth.c py/objcell.c py/objclass.c py/objclosure.c py/objcomplex.c py/objdict.c py/objexcept.c py/objfun.c py/objgenerator.c py/objinstance.c py/objmodule.c py/objrange.c py/objset.c py/objslice.c
| * Merge branch 'cplusplus' of https://github.com/ian-v/micropython into ↵Damien George2014-01-07
| |\ | | | | | | | | | | | | | | | | | | ian-v-cplusplus Conflicts: py/objcomplex.c
| | * Co-exist with C++ (issue #85)ian-v2014-01-06
| |/
* / This implements a better (more python-conformant) list.sort.John R. Lenton2014-01-07
|/ | | | | | | | It's not really about that, though; it's about me figuring out a sane way forward for keyword-argument functions (and function metadata). But it's useful as is, and shouldn't break any existing code, so here you have it; I'm going to park it in my mind for a bit while sorting out the rest of the dict branch.
* Merge pull request #92 from chipaca/list_insertDamien George2014-01-05
|\ | | | | List insert. Fixes issue #61.
| * Merge remote-tracking branch 'upstream/master' into list_insertJohn R. Lenton2014-01-05
| |\
| * | Implements list.insert. Fixes issue #61.John R. Lenton2014-01-04
| | |
* | | Convert many object types structs to use C99 tagged initializer syntax.Paul Sokolovsky2014-01-05
| |/ |/|
* | Convert Python types to proper Python type hierarchy.Damien George2014-01-04
| | | | | | | | Now much more inline with how CPython does types.
* | Split qstr into pools, and put initial pool in ROM.Damien George2014-01-04
|/ | | | | | | | | | | | | | | | Qstr's are now split into a linked-list of qstr pools. This has 2 benefits: the first pool can be in ROM (huge benefit, since we no longer use RAM for the core qstrs), and subsequent pools use m_new for the next pool instead of m_renew (thus avoiding a huge single table for all the qstrs). Still would be better to use a hash table, but this scheme takes us part of the way (eventually convert the pools to hash tables). Also fixed bug with import. Also improved the way the module code is referenced (not magic number 1 anymore).
* Basic implementation of import.Damien George2014-01-03
| | | | | | import works for simple cases. Still work to do on finding the right script, and setting globals/locals correctly when running an imported function.
* Change memory allocation API to require size for free and realloc.Damien2013-12-29
|
* Change object representation from 1 big union to individual structs.Damien2013-12-21
A big change. Micro Python objects are allocated as individual structs with the first element being a pointer to the type information (which is itself an object). This scheme follows CPython. Much more flexible, not necessarily slower, uses same heap memory, and can allocate objects statically. Also change name prefix, from py_ to mp_ (mp for Micro Python).