| Commit message (Collapse) | Author | Age |
|\ |
|
| |\
| | |
| | | |
Initial support for subclassing native types
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Even of these, some features do not yet work as expected.
|
| | |
| | |
| | |
| | |
| | |
| | | |
This implements checking of base types, allocation and basic initialization,
and optimized support for special method lookups. Other features are not yet
supported.
|
|/ /
| |
| |
| | |
This documentation is now available at micropython.org/doc/
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| | |
Also give proper error message when trying to construct a non-existent
LED.
Addresses issue #530.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
And this is not good.
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Had choice of either interning or forcing full equality comparison, and
chose latter. See comments in mp_map_lookup.
Addresses issue #523.
|
|
|
|
| |
Addresses issue #526.
|
|
|
|
|
|
|
|
|
|
| |
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()
|
|
|
|
|
|
| |
Also, clear up freed slots in containers.
As a follow up to 32bef315be8e56ad2d7f69223fe7b9606893b6ab.
|
|
|
|
| |
They either succeed or raise exception.
|
| |
|
| |
|
|
|
|
| |
It's the same as LOAD_CONST_STR.
|
|
|
|
|
| |
Remembering the last op is rarely needed, and when it is, can simply use
*save_ip.
|
|
|
|
| |
Messages are still explanatory, while taking a little less ROM.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Implements 'def f(*, a)' and 'def f(*a, b)', but not default
keyword-only args, eg 'def f(*, a=1)'.
Partially addresses issue #524.
|
|\ |
|
| |
| |
| |
| | |
Few other strings move to core, but make depend on "io" module.
|
| | |
|
| | |
|
|/
|
|
|
| |
This is a small optimisation to zero out only the additional bytes that
the caller did not ask for.
|
| |
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| | |
Share code with .strip(). TODO: optimize .rstrip().
|
| |
| |
| |
| |
| | |
This is CPython-compliant (except that CPython doesn't support buffer
protocol for str).
|
| |
| |
| |
| | |
This in particular fixes writing str vs bytes.
|
| | |
|
|/ |
|
|
|
|
|
|
| |
Also add a few STATIC's to some compile functions that should have them.
Addresses issue #521.
|
|\ |
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
Qemu
|
| | |
|