<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/objfun.c, branch 3.0.0</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=3.0.0</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=3.0.0'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2017-10-04T01:37:50+00:00</updated>
<entry>
<title>all: Remove inclusion of internal py header files.</title>
<updated>2017-10-04T01:37:50+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-10-04T01:37:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a3dc1b1957d2c96d7c60c2c629c95077b03488a1'/>
<id>urn:sha1:a3dc1b1957d2c96d7c60c2c629c95077b03488a1</id>
<content type='text'>
Header files that are considered internal to the py core and should not
normally be included directly are:
    py/nlr.h - internal nlr configuration and declarations
    py/bc0.h - contains bytecode macro definitions
    py/runtime0.h - contains basic runtime enums

Instead, the top-level header files to include are one of:
    py/obj.h - includes runtime0.h and defines everything to use the
        mp_obj_t type
    py/runtime.h - includes mpstate.h and hence nlr.h, obj.h, runtime0.h,
        and defines everything to use the general runtime support functions

Additional, specific headers (eg py/objlist.h) can be included if needed.
</content>
</entry>
<entry>
<title>py: Add verbose debug compile-time flag MICROPY_DEBUG_VERBOSE.</title>
<updated>2017-08-15T01:53:36+00:00</updated>
<author>
<name>Stefan Naumann</name>
<email>me@stefannaumann.de</email>
</author>
<published>2017-07-24T16:55:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ace9fb54053c29574bdf81ffacc5ddcf9d4b45d9'/>
<id>urn:sha1:ace9fb54053c29574bdf81ffacc5ddcf9d4b45d9</id>
<content type='text'>
It enables all the DEBUG_printf outputs in the py/ source code.
</content>
</entry>
<entry>
<title>all: Use the name MicroPython consistently in comments</title>
<updated>2017-07-31T08:35:40+00:00</updated>
<author>
<name>Alexander Steffen</name>
<email>devel.20.webmeister@spamgourmet.com</email>
</author>
<published>2017-06-30T07:22:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=55f33240f3d7051d4213629e92437a36f1fac50e'/>
<id>urn:sha1:55f33240f3d7051d4213629e92437a36f1fac50e</id>
<content type='text'>
There were several different spellings of MicroPython present in comments,
when there should be only one.
</content>
</entry>
<entry>
<title>py: Provide mp_decode_uint_skip() to help reduce stack usage.</title>
<updated>2017-06-09T03:36:33+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-06-09T03:31:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a8a5d1e8c8db3b7c64e1921005ceb5a5d47280f4'/>
<id>urn:sha1:a8a5d1e8c8db3b7c64e1921005ceb5a5d47280f4</id>
<content type='text'>
Taking the address of a local variable leads to increased stack usage, so
the mp_decode_uint_skip() function is added to reduce the need for taking
addresses.  The changes in this patch reduce stack usage of a Python call
by 8 bytes on ARM Thumb, by 16 bytes on non-windowing Xtensa archs, and by
16 bytes on x86-64.  Code size is also slightly reduced on most archs by
around 32 bytes.
</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: Reduce size of mp_code_state_t structure.</title>
<updated>2017-03-17T05:39:13+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-03-17T03:54:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=71a3d6ec3bd02c5bd13334537e1bd146bb643bad'/>
<id>urn:sha1:71a3d6ec3bd02c5bd13334537e1bd146bb643bad</id>
<content type='text'>
Instead of caching data that is constant (code_info, const_table and
n_state), store just a pointer to the underlying function object from which
this data can be derived.

This helps reduce stack usage for the case when the mp_code_state_t
structure is stored on the stack, as well as heap usage when it's stored
on the heap.

The downside is that the VM becomes a little more complex because it now
needs to derive the data from the underlying function object.  But this
doesn't impact the performance by much (if at all) because most of the
decoding of data is done outside the main opcode loop.  Measurements using
pystone show that little to no performance is lost.

This patch also fixes a nasty bug whereby the bytecode can be reclaimed by
the GC during execution.  With this patch there is always a pointer to the
function object held by the VM during execution, since it's stored in the
mp_code_state_t structure.
</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/objfun: Convert mp_uint_t to size_t where appropriate.</title>
<updated>2017-02-16T05:51:16+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-02-16T05:34:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=dbcdb9f8d8d5dd56ede1f0705355679a11b75658'/>
<id>urn:sha1:dbcdb9f8d8d5dd56ede1f0705355679a11b75658</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Allow inline-assembler emitter to be generic.</title>
<updated>2016-12-09T06:06:21+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-12-09T02:17:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ad297a1950c74c35c90dd655ae9a69d33ed28dc0'/>
<id>urn:sha1:ad297a1950c74c35c90dd655ae9a69d33ed28dc0</id>
<content type='text'>
This patch refactors some code so that it is easier to integrate new
inline assemblers for different architectures other than ARM Thumb.
</content>
</entry>
</feed>
