<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/mpstate.h, branch v1.5.2</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.5.2</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.5.2'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2015-12-17T12:41:40+00:00</updated>
<entry>
<title>py/qstr: Use size_t instead of mp_uint_t when counting allocated bytes.</title>
<updated>2015-12-17T12:41:40+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-12-17T12:41:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=257848587fb03879e145a34c8065927cf4d1532f'/>
<id>urn:sha1:257848587fb03879e145a34c8065927cf4d1532f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/gc: Use size_t instead of mp_uint_t to count things related to heap.</title>
<updated>2015-12-17T01:09:11+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-12-17T01:09:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d977d268e848c1005d9105ebb6d789fb31b06c03'/>
<id>urn:sha1:d977d268e848c1005d9105ebb6d789fb31b06c03</id>
<content type='text'>
size_t is the correct type to use to count things related to the size of
the address space.  Using size_t (instead of mp_uint_t) is important for
the efficiency of ports that configure mp_uint_t to larger than the
machine word size.
</content>
</entry>
<entry>
<title>py/modsys: Implement sys.modules.</title>
<updated>2015-12-04T22:13:29+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-12-04T22:09:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=1a1d11fa32ba043d22995d28cbc039cfa5f3cc46'/>
<id>urn:sha1:1a1d11fa32ba043d22995d28cbc039cfa5f3cc46</id>
<content type='text'>
This for example will allow people to reload modules which didn't load
successfully (e.g. due to syntax error).
</content>
</entry>
<entry>
<title>py: Wrap all obj-ptr conversions in MP_OBJ_TO_PTR/MP_OBJ_FROM_PTR.</title>
<updated>2015-11-29T14:25:35+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-11-27T17:01:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=999cedb90ff0827cdb9dfe0e4faa6ebc1739d271'/>
<id>urn:sha1:999cedb90ff0827cdb9dfe0e4faa6ebc1739d271</id>
<content type='text'>
This allows the mp_obj_t type to be configured to something other than a
pointer-sized primitive type.

This patch also includes additional changes to allow the code to compile
when sizeof(mp_uint_t) != sizeof(void*), such as using size_t instead of
mp_uint_t, and various casts.
</content>
</entry>
<entry>
<title>py/gc: Move away from using mp_uint_t, instead use uintptr_t and size_t.</title>
<updated>2015-11-29T14:25:04+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-11-27T13:07:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=94fe6e523d42ecc342c1f6a9734ed2edf232ddbd'/>
<id>urn:sha1:94fe6e523d42ecc342c1f6a9734ed2edf232ddbd</id>
<content type='text'>
The GC works with concrete pointers and so the types should reflect this.
</content>
</entry>
<entry>
<title>py/mpstate: Make mp_pending_exception volatile.</title>
<updated>2015-11-17T14:27:21+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-11-17T14:27:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=994ff738c8f12c1f7fd994ed45b2e191a9bc6ee4'/>
<id>urn:sha1:994ff738c8f12c1f7fd994ed45b2e191a9bc6ee4</id>
<content type='text'>
It can change asynchronously.
</content>
</entry>
<entry>
<title>extmod/modlwip: slip: Use stream protocol and be port-independent.</title>
<updated>2015-10-26T21:04:59+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-10-26T21:04:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=e0d7740a2294ed6bc7c6237f1a12413e0c5a9ce1'/>
<id>urn:sha1:e0d7740a2294ed6bc7c6237f1a12413e0c5a9ce1</id>
<content type='text'>
Based on the original patch by Galen Hazelwood:
https://github.com/micropython/micropython/pull/1517 .
</content>
</entry>
<entry>
<title>py: Improve allocation policy of qstr data.</title>
<updated>2015-07-14T21:56:32+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-06-13T20:53:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ade9a052365247be5ed4ce8b53c2164a576a4a05'/>
<id>urn:sha1:ade9a052365247be5ed4ce8b53c2164a576a4a05</id>
<content type='text'>
Previous to this patch all interned strings lived in their own malloc'd
chunk.  On average this wastes N/2 bytes per interned string, where N is
the number-of-bytes for a quanta of the memory allocator (16 bytes on 32
bit archs).

With this patch interned strings are concatenated into the same malloc'd
chunk when possible.  Such chunks are enlarged inplace when possible,
and shrunk to fit when a new chunk is needed.

RAM savings with this patch are highly varied, but should always show an
improvement (unless only 3 or 4 strings are interned).  New version
typically uses about 70% of previous memory for the qstr data, and can
lead to savings of around 10% of total memory footprint of a running
script.

Costs about 120 bytes code size on Thumb2 archs (depends on how many
calls to gc_realloc are made).
</content>
</entry>
<entry>
<title>modsys: Add basic sys.exc_info() implementation.</title>
<updated>2015-04-25T00:49:23+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-04-25T00:17:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=8b85d14b92a65e92862861038c0fe96e6c616c3e'/>
<id>urn:sha1:8b85d14b92a65e92862861038c0fe96e6c616c3e</id>
<content type='text'>
The implementation is very basic and non-compliant and provided solely for
CPython compatibility. The function itself is bad Python2 heritage, its
usage is discouraged.
</content>
</entry>
<entry>
<title>py: Put mp_sys_path, mp_sys_argv and gc_collected in mp_state_ctx_t.</title>
<updated>2015-02-07T17:24:10+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-02-07T17:24:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=e1e359ff59d6bbf09441cc1f3965be63f1046182'/>
<id>urn:sha1:e1e359ff59d6bbf09441cc1f3965be63f1046182</id>
<content type='text'>
Without mp_sys_path and mp_sys_argv in the root pointer section of the
state, their memory was being incorrectly collected by GC.
</content>
</entry>
</feed>
