summaryrefslogtreecommitdiff
path: root/py
AgeCommit message (Collapse)Author
2014-05-02objexcept: Support tracebacks for user Exception subclasses.Paul Sokolovsky
2014-05-02objtype: Rename mp_obj_class_t -> mp_obj_instance_t and move to local header.Paul Sokolovsky
TODO: Rename methods.
2014-05-02objtype: .print() Exception instances in adhoc way.Paul Sokolovsky
This is ugly, just as expected.
2014-05-01Merge pull request #544 from lurch/fix-minmaxPaul Sokolovsky
Fix the builtin min() and max() functions (and add tests).
2014-05-01objfun: More debug logging.Paul Sokolovsky
2014-05-01objgenerator: Fix check for too few args passed to gen function.Paul Sokolovsky
2014-05-01objgenerator: .print(): Output real underlying function name.Paul Sokolovsky
2014-05-01Fix the builtin min() and max() functions (and add tests).Andrew Scheller
Fixes #539
2014-05-01py: Add tentative scheme for error messages configuration.Paul Sokolovsky
2014-05-01objfun: Add function name accessor and .print slot method.Paul Sokolovsky
2014-04-30Merge pull request #528 from pfalcon/native-subclass1Damien George
Initial support for subclassing native types
2014-04-30objfun: Factor out function to report positional args mismatch.Paul Sokolovsky
2014-04-30py: Abstract no-return attribute for functions a bit.Paul Sokolovsky
2014-04-30py: If setjmp NLR implementation is forced, omit native versions.Paul Sokolovsky
2014-04-30nlr.h: As we treat all warnings as errors, can't use #warning.Paul Sokolovsky
And this is not good.
2014-04-30objtype: Support calling normal methods inherited from native base class.Paul Sokolovsky
Biggest part of this support is refactoring mp_obj_class_lookup() to return standard "bound member" pair (mp_obj_t[2]). Actual support of inherited native methods is 3 lines then. Some inherited features may be not supported yet (e.g. native class methods, native properties, etc., etc.). There may be opportunities for further optimization too.
2014-04-29objtype: Add support for looking up non-method attrs in native base class.Paul Sokolovsky
2014-04-29objtype: Implement basic framework for subclassing native types.Paul Sokolovsky
This implements checking of base types, allocation and basic initialization, and optimized support for special method lookups. Other features are not yet supported.
2014-04-28py: Fix bug in map lookup of interned string vs non-interned.Damien George
Had choice of either interning or forcing full equality comparison, and chose latter. See comments in mp_map_lookup. Addresses issue #523.
2014-04-28py: Fix lexerunix, where not all data may be read from a file.Damien George
Addresses issue #526.
2014-04-28py: Remove silly comment about interning keywords.Damien George
Of course, keywords are turned into lexer tokens in the lexer, so will never need to be interned (unless you do something like x="def"). As it is now, the following on pyboard makes no new qstrs: import pyb pyb.info()
2014-04-28py: Clear allocated, but unused memory in containers.Paul Sokolovsky
Also, clear up freed slots in containers. As a follow up to 32bef315be8e56ad2d7f69223fe7b9606893b6ab.
2014-04-28objlist: We no longer need to assert on mem alloc results.Paul Sokolovsky
They either succeed or raise exception.
2014-04-28objlist: Use static small int constructor.Paul Sokolovsky
2014-04-27py: Add '*' qstr for 'import *'; use blank qstr for comprehension arg.Damien George
2014-04-27py: Remove unnecessary LOAD_CONST_ID bytecode.Damien George
It's the same as LOAD_CONST_STR.
2014-04-27py: Eliminate 'op' variable in VM dispatch loop.Damien George
Remembering the last op is rarely needed, and when it is, can simply use *save_ip.
2014-04-27py: Save some ROM by shortening compiler error messages.Damien George
Messages are still explanatory, while taking a little less ROM.
2014-04-27py: Change the way function arguments are compiled.Damien George
New way uses slightly less ROM and RAM, should be slightly faster, and, most importantly, allows to catch the error "non-keyword arg following keyword arg". Addresses issue #466.
2014-04-27py: Implement keyword-only args.Damien George
Implements 'def f(*, a)' and 'def f(*a, b)', but not default keyword-only args, eg 'def f(*, a=1)'. Partially addresses issue #524.
2014-04-26Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-04-26py, gc: Only zero out the extra bytes at the end of the heap chunk.Damien George
This is a small optimisation to zero out only the additional bytes that the caller did not ask for.
2014-04-26py: "read" & "write" are so common that make them core.Paul Sokolovsky
Few other strings move to core, but make depend on "io" module.
2014-04-26objstringio: Compile only if MICROPY_ENABLE_MOD_IO defined.Paul Sokolovsky
2014-04-26modio: Implement io.StringIO class.Paul Sokolovsky
2014-04-26Simplify names for argcheck.c / arg parsing.Damien George
2014-04-26Add ARRAY_SIZE macro, and use it where possible.Damien George
2014-04-26Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-04-26py: Make collections module configurable, enabled by default.Damien George
2014-04-26objstr: Optimize .rstrip() by scanning string from end.Paul Sokolovsky
2014-04-26objstr: Implement .lstrip() & .rstrip().Paul Sokolovsky
Share code with .strip(). TODO: optimize .rstrip().
2014-04-26streams: Make .write() support arbitrary objects with buffer interface.Paul Sokolovsky
This in particular fixes writing str vs bytes.
2014-04-25py: Add MICROPY_ENABLE_DOC_STRING, disabled by default.Damien George
Also add a few STATIC's to some compile functions that should have them. Addresses issue #521.
2014-04-25Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-04-25py, gc: Zero out newly allocated blocks in the GC.Damien George
Also add some more debugging output to gc_dump_alloc_table(). Now that newly allocated heap is always zero'd, maybe we just make this a policy for the uPy API to keep it simple (ie any new implementation of memory allocation must zero all allocations). This follows the D language philosophy. Before this patch, a previously used memory block which had pointers in it may still retain those pointers if the new user of that block does not actually use the entire block. Eg, if I want 5 blocks worth of heap, I actually get 8 (round up to nearest 4). Then I never use the last 3, so they keep their old values, which may be pointers pointing to the heap, hence preventing GC. In rare (or maybe not that rare) cases, this leads to long, unintentional "linked lists" within the GC'd heap, filling it up completely. It's pretty rare, because you have to reuse exactly that memory which is part of this "linked list", and reuse it in just the right way. This should fix issue #522, and might have something to do with issue #510.
2014-04-25py: Support instance __call__ method.Paul Sokolovsky
2014-04-25py, gc: Fix old gc_realloc for case when NULL is passed in as ptr.Damien George
2014-04-24py, vm: Fix recent bug where state is freed too early.Damien George
2014-04-24py, vm: Free heap-allocated state if it was allocated on the heap.Damien George
2014-04-24Merge pull request #519 from pfalcon/exc-no-ptr-to-fieldDamien George
objexcept: Don't store args tuple within exception object.