summaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAge
* Merge branch 'master' of github.com:micropython/micropythonDamien George2014-04-30
|\
| * Merge pull request #528 from pfalcon/native-subclass1Damien George2014-04-30
| |\ | | | | | | Initial support for subclassing native types
| | * tests: Add test for calling inherited native method on subclass.Paul Sokolovsky2014-04-30
| | |
| | * objtype: Support calling normal methods inherited from native base class.Paul Sokolovsky2014-04-30
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * tests: Add test for accessing attribute of inherited native type.Paul Sokolovsky2014-04-29
| | |
| | * objtype: Add support for looking up non-method attrs in native base class.Paul Sokolovsky2014-04-29
| | |
| | * tests: Add basic tests for subclassing native types and using special methods.Paul Sokolovsky2014-04-29
| | | | | | | | | | | | Even of these, some features do not yet work as expected.
| | * objtype: Implement basic framework for subclassing native types.Paul Sokolovsky2014-04-29
| | | | | | | | | | | | | | | | | | This implements checking of base types, allocation and basic initialization, and optimized support for special method lookups. Other features are not yet supported.
* | | stmhal, docs: Small changes to URL links; adds list of files if none given.Damien George2014-04-30
|/ / | | | | | | This documentation is now available at micropython.org/doc/
* | stmhal: Reinstate CC3000 driver from old stm/ port.Damien George2014-04-30
| | | | | | | | | | | | It's not enabled by default because it doesn't fully work. It can connect to an AP, get an IP address and do a host-lookup, but not yet do send or recv on a socket.
* | stmhal: Make LED.intensity return the same value it was set to.Damien George2014-04-30
| | | | | | | | | | | | | | Also give proper error message when trying to construct a non-existent LED. Addresses issue #530.
* | objfun: Factor out function to report positional args mismatch.Paul Sokolovsky2014-04-30
| |
* | py: Abstract no-return attribute for functions a bit.Paul Sokolovsky2014-04-30
| |
* | py: If setjmp NLR implementation is forced, omit native versions.Paul Sokolovsky2014-04-30
| |
* | nlr.h: As we treat all warnings as errors, can't use #warning.Paul Sokolovsky2014-04-30
| | | | | | | | And this is not good.
* | stmhal: Oops, typo.Damien George2014-04-29
| |
* | stmhal: Add documentation in comments, and script to generate HTML.Damien George2014-04-29
|/ | | | | | | | | | | | | | Decided to write own script to pull documentation from comments in C code. Style for writing auto generated documentation is: start line with /// and then use standard markdown to write the comment. Keywords recognised by the scraper begin with backslash. See code for examples. Running: python gendoc.py modpyb.c accel.c adc.c dac.c extint.c i2c.c led.c pin.c rng.c servo.c spi.c uart.c usrsw.c, will generate a HTML structure in gendoc-out/. gendoc.py is crude but functional. Needed something quick, and this was it.
* py: Fix bug in map lookup of interned string vs non-interned.Damien George2014-04-28
| | | | | | | Had choice of either interning or forcing full equality comparison, and chose latter. See comments in mp_map_lookup. Addresses issue #523.
* py: Fix lexerunix, where not all data may be read from a file.Damien George2014-04-28
| | | | Addresses issue #526.
* py: Remove silly comment about interning keywords.Damien George2014-04-28
| | | | | | | | | | 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()
* py: Clear allocated, but unused memory in containers.Paul Sokolovsky2014-04-28
| | | | | | Also, clear up freed slots in containers. As a follow up to 32bef315be8e56ad2d7f69223fe7b9606893b6ab.
* objlist: We no longer need to assert on mem alloc results.Paul Sokolovsky2014-04-28
| | | | They either succeed or raise exception.
* objlist: Use static small int constructor.Paul Sokolovsky2014-04-28
|
* py: Add '*' qstr for 'import *'; use blank qstr for comprehension arg.Damien George2014-04-27
|
* py: Remove unnecessary LOAD_CONST_ID bytecode.Damien George2014-04-27
| | | | It's the same as LOAD_CONST_STR.
* py: Eliminate 'op' variable in VM dispatch loop.Damien George2014-04-27
| | | | | Remembering the last op is rarely needed, and when it is, can simply use *save_ip.
* py: Save some ROM by shortening compiler error messages.Damien George2014-04-27
| | | | Messages are still explanatory, while taking a little less ROM.
* py: Change the way function arguments are compiled.Damien George2014-04-27
| | | | | | | | 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.
* py: Implement keyword-only args.Damien George2014-04-27
| | | | | | | Implements 'def f(*, a)' and 'def f(*a, b)', but not default keyword-only args, eg 'def f(*, a=1)'. Partially addresses issue #524.
* Merge branch 'master' of github.com:micropython/micropythonDamien George2014-04-26
|\
| * py: "read" & "write" are so common that make them core.Paul Sokolovsky2014-04-26
| | | | | | | | Few other strings move to core, but make depend on "io" module.
| * objstringio: Compile only if MICROPY_ENABLE_MOD_IO defined.Paul Sokolovsky2014-04-26
| |
| * modio: Implement io.StringIO class.Paul Sokolovsky2014-04-26
| |
* | py, gc: Only zero out the extra bytes at the end of the heap chunk.Damien George2014-04-26
|/ | | | | This is a small optimisation to zero out only the additional bytes that the caller did not ask for.
* Simplify names for argcheck.c / arg parsing.Damien George2014-04-26
|
* Add ARRAY_SIZE macro, and use it where possible.Damien George2014-04-26
|
* Merge branch 'master' of github.com:micropython/micropythonDamien George2014-04-26
|\
| * objstr: Optimize .rstrip() by scanning string from end.Paul Sokolovsky2014-04-26
| |
| * objstr: Implement .lstrip() & .rstrip().Paul Sokolovsky2014-04-26
| | | | | | | | Share code with .strip(). TODO: optimize .rstrip().
| * modsocket: Make .send() support arbitrary objects with buffer interface.Paul Sokolovsky2014-04-26
| | | | | | | | | | This is CPython-compliant (except that CPython doesn't support buffer protocol for str).
| * streams: Make .write() support arbitrary objects with buffer interface.Paul Sokolovsky2014-04-26
| | | | | | | | This in particular fixes writing str vs bytes.
* | bare-arm: Disable more stuff to reduce binary size.Damien George2014-04-26
| |
* | py: Make collections module configurable, enabled by default.Damien George2014-04-26
|/
* py: Add MICROPY_ENABLE_DOC_STRING, disabled by default.Damien George2014-04-25
| | | | | | Also add a few STATIC's to some compile functions that should have them. Addresses issue #521.
* Merge branch 'master' of github.com:micropython/micropythonDamien George2014-04-25
|\
| * py: Support instance __call__ method.Paul Sokolovsky2014-04-25
| |
| * py, gc: Fix old gc_realloc for case when NULL is passed in as ptr.Damien George2014-04-25
| |
* | py, gc: Zero out newly allocated blocks in the GC.Damien George2014-04-25
|/ | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge pull request #515 from errordeveloper/qemuDamien George2014-04-24
|\ | | | | Qemu
| * travis: should test building qemu-arm as well.Ilya Dmitrichenko2014-04-21
| |