aboutsummaryrefslogtreecommitdiff
path: root/py/objlist.c
AgeCommit message (Collapse)Author
2014-01-27list.pop(): Don't allow ->alloc drop to zero, which causes unexpected behavior.Paul Sokolovsky
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-21sequence.c: Start to refactor sequence operations for reuse among types.Paul Sokolovsky
2014-01-19Change int to uint for n_args in function with variable arguments.Damien George
2014-01-19Tiny optimisation in objlist.c; a new test for inheritance.Damien 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-15type->print(): Distinguish str() and repr() variety by passing extra param.Paul Sokolovsky
2014-01-14Tidy up.Damien George
2014-01-13Made sorted() raise an exception instead of aborting when given no ↵John R. Lenton
arguments; moved around some things in objfun.c as a consequence
2014-01-13sortedJohn R. Lenton
2014-01-12list: Implement comparison operators.Paul Sokolovsky
2014-01-12list: Add extend() methods and += operator.Paul Sokolovsky
2014-01-11unified the bopsJohn R. Lenton
2014-01-11list: Implement list multiplication.Paul Sokolovsky
2014-01-08py: Stuff qstr in object pointer; keys for mp_map_t are now always mp_obj_t.Damien George
2014-01-07py: Small big fix to type declarations.Damien George
2014-01-07A bit of stylistic cleanup (chose the wrong side during conflict resolution).John R. Lenton
2014-01-07Merge remote-tracking branch 'upstream/master' into listsort. Lots of ↵John R. Lenton
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
2014-01-07This implements a better (more python-conformant) list.sort.John R. Lenton
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.
2014-01-07Merge branch 'cplusplus' of https://github.com/ian-v/micropython into ↵Damien George
ian-v-cplusplus Conflicts: py/objcomplex.c
2014-01-06Make list and str method tables statician-v
2014-01-06Revert MP_BOOL, etc. and use <stdbool.h> insteadian-v
2014-01-06Co-exist with C++ (issue #85)ian-v
2014-01-06Merge remote-tracking branch 'upstream/master' into list_reverseJohn R. Lenton
2014-01-05Merge branch 'list_remove' of git://github.com/chipaca/micropython into ↵Damien George
chipaca-list_remove
2014-01-05Merge pull request #92 from chipaca/list_insertDamien George
List insert. Fixes issue #61.
2014-01-05Merge pull request #91 from chipaca/list_indexDamien George
Fix off-by-one in non-default values of index's 2nd and 3rd arguments.
2014-01-05Merge remote-tracking branch 'upstream/master' into list_reverseJohn R. Lenton
2014-01-05Merge remote-tracking branch 'upstream/master' into list_removeJohn R. Lenton
2014-01-05Merge remote-tracking branch 'upstream/master' into list_insertJohn R. Lenton
2014-01-05Fix off-by-one in non-default values of index's 2nd and 3rd arguments.John R. Lenton
2014-01-05Convert many object types structs to use C99 tagged initializer syntax.Paul Sokolovsky
2014-01-05Fix qstr in objlist.c; add more tests for list.index.Damien George
list.index fails on an edge case.
2014-01-05Merge remote-tracking branch 'upstream/master' into list_indexJohn R. Lenton
2014-01-04Convert Python types to proper Python type hierarchy.Damien George
Now much more inline with how CPython does types.
2014-01-04Merge pull request #70 from chipaca/list_countDamien George
Implements list.count. Fixes isue #55.
2014-01-04Split qstr into pools, and put initial pool in ROM.Damien George
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).
2014-01-04Implements list.reverse; fixes issue #66John R. Lenton
2014-01-04Implements list.remove (in terms of list.index and list.pop).John R. Lenton
Fixes issue #63.
2014-01-04Implements list.insert. Fixes issue #61.John R. Lenton
2014-01-04Implements list.index. Fixes issue #57.John R. Lenton
2014-01-03Implemented list.countJohn R. Lenton
2014-01-03Implemented list.copy. Fixes issue #54.John R. Lenton
2014-01-03Added list.clear. Fixes issue #53.John R. Lenton
2014-01-03Worked on list.pop:John R. Lenton
* Fixes issue #51 * Adds a specific error message for when you try to pop an empty list. * Releases some memory if the list has shurnk a lot.
2014-01-03Changed to use memcpy.John R. Lenton
2014-01-03Add a bit of whitespace.John R. Lenton
2014-01-03untabifiedJohn R. Lenton
2014-01-03Add list addition (fixes: #39)John R. Lenton