<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/runtime.c, branch v1.9.1</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.9.1</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.9.1'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2017-04-10T07:07:26+00:00</updated>
<entry>
<title>py/runtime: When init'ing kbd intr exc, use tuple ptr instead of object.</title>
<updated>2017-04-10T07:07:26+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-04-10T07:07:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=79ce6649524b08732e15d86c4ff61266c3ec14ed'/>
<id>urn:sha1:79ce6649524b08732e15d86c4ff61266c3ec14ed</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Change mp_uint_t to size_t for mp_obj_str_get_data len arg.</title>
<updated>2017-03-29T01:56:45+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-03-25T08:48:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6b341075376705ee1fe9e003b76b09afa59778f4'/>
<id>urn:sha1:6b341075376705ee1fe9e003b76b09afa59778f4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Convert mp_uint_t to size_t for tuple/list accessors.</title>
<updated>2017-03-29T01:56:17+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-03-25T08:35:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6213ad7f466df12c734dc527993bbb46c9d9eb5c'/>
<id>urn:sha1:6213ad7f466df12c734dc527993bbb46c9d9eb5c</id>
<content type='text'>
This patch changes mp_uint_t to size_t for the len argument of the
following public facing C functions:

mp_obj_tuple_get
mp_obj_list_get
mp_obj_get_array

These functions take a pointer to the len argument (to be filled in by the
function) and callers of these functions should update their code so the
type of len is changed to size_t.  For ports that don't use nan-boxing
there should be no change in generate code because the size of the type
remains the same (word sized), and in a lot of cases there won't even be a
compiler warning if the type remains as mp_uint_t.

The reason for this change is to standardise on the use of size_t for
variables that count memory (or memory related) sizes/lengths.  It helps
builds that use nan-boxing.
</content>
</entry>
<entry>
<title>py: Use mp_raise_TypeError/mp_raise_ValueError helpers where possible.</title>
<updated>2017-03-28T11:37:26+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-03-28T11:37:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=94c41bb06f6482ece0717c5bd63266b8da063caa'/>
<id>urn:sha1:94c41bb06f6482ece0717c5bd63266b8da063caa</id>
<content type='text'>
Saves 168 bytes on bare-arm.
</content>
</entry>
<entry>
<title>py: Use mp_locals/mp_globals accessor funcs instead of MP_STATE_CTX.</title>
<updated>2017-03-24T07:41:11+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-03-24T07:41:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=707f16b05c663ec3bdaf0ab0713e349638acd0fe'/>
<id>urn:sha1:707f16b05c663ec3bdaf0ab0713e349638acd0fe</id>
<content type='text'>
To improve maintainability of the code.
</content>
</entry>
<entry>
<title>py: Add micropython.schedule() function and associated runtime code.</title>
<updated>2017-03-20T04:20:26+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-02-16T07:05:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6e74d24f30bca3fb70876b1fb9a6b3a59850b83c'/>
<id>urn:sha1:6e74d24f30bca3fb70876b1fb9a6b3a59850b83c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Use mp_obj_get_array where sequence may be a tuple or a list.</title>
<updated>2017-03-07T05:48:16+00:00</updated>
<author>
<name>Krzysztof Blazewicz</name>
<email>blazewicz.krzysztof@gmail.com</email>
</author>
<published>2017-03-04T11:29:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7e480e8a30e5e293586bd4806f02a481a08648ca'/>
<id>urn:sha1:7e480e8a30e5e293586bd4806f02a481a08648ca</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/runtime.c: Remove optimization of '*a,=b', it caused a bug.</title>
<updated>2017-03-07T05:48:16+00:00</updated>
<author>
<name>Krzysztof Blazewicz</name>
<email>blazewicz.krzysztof@gmail.com</email>
</author>
<published>2017-03-06T07:46:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=1215dc47e2eb8ad3d70e3f1aa1a36a98024019a2'/>
<id>urn:sha1:1215dc47e2eb8ad3d70e3f1aa1a36a98024019a2</id>
<content type='text'>
*a, = b should always make a copy of b, instead, before this patch
if b was a list it would copy only a reference to it.
</content>
</entry>
<entry>
<title>py/runtime: mp_raise_msg(): Accept NULL argument for message.</title>
<updated>2017-02-24T14:57:25+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2017-02-24T14:57:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4b3da603248fd4e273853af9dd57fbb3c61a9e07'/>
<id>urn:sha1:4b3da603248fd4e273853af9dd57fbb3c61a9e07</id>
<content type='text'>
In this case, raise an exception without a message.

This would allow to shove few code bytes comparing to currently used
mp_raise_msg(..., "") pattern. (Actual savings depend on function code
alignment used by a particular platform.)
</content>
</entry>
<entry>
<title>py: De-optimise some uses of mp_getiter, so they don't use the C stack.</title>
<updated>2017-02-16T08:11:34+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-02-13T04:44:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=e6003f466e6f5b7eddd01740666230b62ab5a872'/>
<id>urn:sha1:e6003f466e6f5b7eddd01740666230b62ab5a872</id>
<content type='text'>
In these cases the heap is anyway used to create a new object so no real
need to use the C stack for iterating.  It saves a few bytes of code size.
</content>
</entry>
</feed>
