<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/runtime.h, branch 4.0.0-beta.7</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=4.0.0-beta.7</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=4.0.0-beta.7'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2019-04-09T18:36:10+00:00</updated>
<entry>
<title>Fix boards with no shared busses.</title>
<updated>2019-04-09T18:36:10+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2019-04-09T18:36:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=72992070c5137ce44969555828673ba7ccd69f08'/>
<id>urn:sha1:72992070c5137ce44969555828673ba7ccd69f08</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py changes for supporting superclass constructors that take kwargs</title>
<updated>2019-01-15T01:29:19+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2019-01-14T23:14:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=72d993d60c5e5238942491df00776ca31f9758a1'/>
<id>urn:sha1:72d993d60c5e5238942491df00776ca31f9758a1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wip: advertising works, but not connection</title>
<updated>2018-12-27T05:04:04+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2018-12-27T05:04:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4167bf5b241eec4e5a04c36d7f7c66d43a8bb921'/>
<id>urn:sha1:4167bf5b241eec4e5a04c36d7f7c66d43a8bb921</id>
<content type='text'>
</content>
</entry>
<entry>
<title>More UUID work; use mp_raise for exceptions</title>
<updated>2018-11-21T04:04:58+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2018-11-21T04:04:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=1763ffe2450fa07c74db225cc5ef3a6e2feb669b'/>
<id>urn:sha1:1763ffe2450fa07c74db225cc5ef3a6e2feb669b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Compress all translated strings with Huffman coding.</title>
<updated>2018-08-17T00:40:57+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2018-08-16T01:32:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=de5a9d72dcdaacdd5048195cd5bab007f4b2baef'/>
<id>urn:sha1:de5a9d72dcdaacdd5048195cd5bab007f4b2baef</id>
<content type='text'>
This saves code space in builds which use link-time optimization.
The optimization drops the untranslated strings and replaces them
with a compressed_string_t struct. It can then be decompressed to
a c string.

Builds without LTO work as well but include both untranslated
strings and compressed strings.

This work could be expanded to include QSTRs and loaded strings if
a compress method is added to C. Its tracked in #531.
</content>
</entry>
<entry>
<title>compiles and runs; hangs on import storage;storage.VfsFat.&lt;tab&gt;</title>
<updated>2018-07-14T02:51:10+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2018-07-14T02:51:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=e2e01efa84d2ed46d004edf48076e4701accc176'/>
<id>urn:sha1:e2e01efa84d2ed46d004edf48076e4701accc176</id>
<content type='text'>
</content>
</entry>
<entry>
<title>WIP: after merge; before testing</title>
<updated>2018-07-11T20:45:30+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2018-07-11T20:45:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7c219600a246d8956d0b23ea3f5d125a820e6b6a'/>
<id>urn:sha1:7c219600a246d8956d0b23ea3f5d125a820e6b6a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/runtime: Add mp_load_method_protected helper which catches exceptions</title>
<updated>2018-05-10T13:00:04+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-05-10T13:00:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=bc87b862fd22afb38ed7392b69474286fa5fe19f'/>
<id>urn:sha1:bc87b862fd22afb38ed7392b69474286fa5fe19f</id>
<content type='text'>
This new helper function acts like mp_load_method_maybe but is wrapped in
an NLR handler so it can catch exceptions.  It prevents AttributeError from
propagating out, and optionally all other exceptions.  This helper can be
used to fully implement hasattr (see follow-up commit), and also for cases
where mp_load_method_maybe is used but it must now raise an exception.
</content>
</entry>
<entry>
<title>py: Introduce a Python stack for scoped allocation.</title>
<updated>2017-12-11T02:49:09+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-11-26T12:28:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=02d830c035aca166d70551e485ccd2d1658189c9'/>
<id>urn:sha1:02d830c035aca166d70551e485ccd2d1658189c9</id>
<content type='text'>
This patch introduces the MICROPY_ENABLE_PYSTACK option (disabled by
default) which enables a "Python stack" that allows to allocate and free
memory in a scoped, or Last-In-First-Out (LIFO) way, similar to alloca().

A new memory allocation API is introduced along with this Py-stack.  It
includes both "local" and "nonlocal" LIFO allocation.  Local allocation is
intended to be equivalent to using alloca(), whereby the same function must
free the memory.  Nonlocal allocation is where another function may free
the memory, so long as it's still LIFO.

Follow-up patches will convert all uses of alloca() and VLA to the new
scoped allocation API.  The old behaviour (using alloca()) will still be
available, but when MICROPY_ENABLE_PYSTACK is enabled then alloca() is no
longer required or used.

The benefits of enabling this option are (or will be once subsequent
patches are made to convert alloca()/VLA):
- Toolchains without alloca() can use this feature to obtain correct and
  efficient scoped memory allocation (compared to using the heap instead
  of alloca(), which is slower).
- Even if alloca() is available, enabling the Py-stack gives slightly more
  efficient use of stack space when calling nested Python functions, due to
  the way that compilers implement alloca().
- Enabling the Py-stack with the stackless mode allows for even more
  efficient stack usage, as well as retaining high performance (because the
  heap is no longer used to build and destroy stackless code states).
- With Py-stack and stackless enabled, Python-calling-Python is no longer
  recursive in the C mp_execute_bytecode function.

The micropython.pystack_use() function is included to measure usage of the
Python stack.
</content>
</entry>
<entry>
<title>py/runtime: Move mp_exc_recursion_depth to runtime and rename to raise.</title>
<updated>2017-12-11T02:49:09+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-11-20T06:29:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=5b8998da6dfed6c8f54b8b34228f25d93dbb9d29'/>
<id>urn:sha1:5b8998da6dfed6c8f54b8b34228f25d93dbb9d29</id>
<content type='text'>
For consistency this helper function is renamed to match the other
exception helpers, and moved to their location in runtime.c.
</content>
</entry>
</feed>
