<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/vm.c, branch 5.0.0-beta.3</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=5.0.0-beta.3</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=5.0.0-beta.3'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2019-10-22T01:57:03+00:00</updated>
<entry>
<title>Refine _bleio</title>
<updated>2019-10-22T01:57:03+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2019-09-14T19:40:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ae30a1e5aa198bdeee7dce04194b027ff4e3d65a'/>
<id>urn:sha1:ae30a1e5aa198bdeee7dce04194b027ff4e3d65a</id>
<content type='text'>
This PR refines the _bleio API. It was originally motivated by
the addition of a new CircuitPython service that enables reading
and modifying files on the device. Moving the BLE lifecycle outside
of the VM motivated a number of changes to remove heap allocations
in some APIs.

It also motivated unifying connection initiation to the Adapter class
rather than the Central and Peripheral classes which have been removed.
Adapter now handles the GAP portion of BLE including advertising, which
has moved but is largely unchanged, and scanning, which has been enhanced
to return an iterator of filtered results.

Once a connection is created (either by us (aka Central) or a remote
device (aka Peripheral)) it is represented by a new Connection class.
This class knows the current connection state and can discover and
instantiate remote Services along with their Characteristics and
Descriptors.

Relates to #586
</content>
</entry>
<entry>
<title>Revert "py/vm: Improve performance of opcode dispatch when using switch stmt."</title>
<updated>2018-08-25T11:14:58+00:00</updated>
<author>
<name>Noralf Trønnes</name>
<email>noralf@tronnes.org</email>
</author>
<published>2018-08-25T11:14:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=2d1fecc80430618ff295498c421064be28796822'/>
<id>urn:sha1:2d1fecc80430618ff295498c421064be28796822</id>
<content type='text'>
This reverts commit 869024dd6e62905b7e1069b547856a769b3b24ba.

Ctrl-C stopped producing KeyboardInterrupt with this change on CircuitPython.

The Unix and stm32 ports handles Ctrl-C differently with a handler which is
probably why they where not affected.

Fixes #1092
</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>py/objtype: Don't expose mp_obj_instance_attr().</title>
<updated>2018-06-08T01:48:25+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-05-25T07:08:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=bace1a16d056cc755f12f525b9f2bfb3cb4b4b50'/>
<id>urn:sha1:bace1a16d056cc755f12f525b9f2bfb3cb4b4b50</id>
<content type='text'>
mp_obj_is_instance_type() can be used instead to check for instance types.
</content>
</entry>
<entry>
<title>py/vm: Improve performance of opcode dispatch when using switch stmt.</title>
<updated>2018-05-18T01:47:03+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-05-18T01:47:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=869024dd6e62905b7e1069b547856a769b3b24ba'/>
<id>urn:sha1:869024dd6e62905b7e1069b547856a769b3b24ba</id>
<content type='text'>
Before this patch, when using the switch statement for dispatch in the VM
(not computed goto) a pending exception check was done after each opcode.
This is not necessary and this patch makes the pending exception check only
happen when explicitly requested by certain opcodes, like jump.  This
improves performance of the VM by about 2.5% when using the switch.
</content>
</entry>
<entry>
<title>py/vm: Use enum names instead of magic numbers in multi-opcode dispatch.</title>
<updated>2018-05-18T01:44:26+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-05-18T01:44:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=46ce395130305ce3299ae0dfd42502d29837c39f'/>
<id>urn:sha1:46ce395130305ce3299ae0dfd42502d29837c39f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/vm: Adjust #if logic for gil_divisor so braces are balanced.</title>
<updated>2018-05-16T02:33:39+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-05-16T02:33:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=1b7487e519c2e2a66f2f5a45ebd238d0773ca3d3'/>
<id>urn:sha1:1b7487e519c2e2a66f2f5a45ebd238d0773ca3d3</id>
<content type='text'>
Having balanced braces { and } makes it easier to navigate the function.
</content>
</entry>
<entry>
<title>py/vm: Optimise handling of stackless mode when pystack is enabled.</title>
<updated>2018-04-03T14:51:10+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-04-03T14:51:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=bc36521386a2c608be06fa8a5bf110b050dd1052'/>
<id>urn:sha1:bc36521386a2c608be06fa8a5bf110b050dd1052</id>
<content type='text'>
When pystack is enabled mp_obj_fun_bc_prepare_codestate() will always
return a valid pointer, and if there is no more pystack available then it
will raise an exception (a RuntimeError).  So having pystack enabled with
stackless enabled automatically gives strict stackless mode.  There is
therefore no need to have code for strict stackless mode when pystack is
enabled, and this patch optimises the VM for such a case.
</content>
</entry>
<entry>
<title>py/vm: Don't do unnecessary updates of ip and sp variables.</title>
<updated>2018-04-03T14:46:31+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-04-03T14:46:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c7f880eda38783817bd490b8f2f0b60412c3b73c'/>
<id>urn:sha1:c7f880eda38783817bd490b8f2f0b60412c3b73c</id>
<content type='text'>
Neither the ip nor sp variables are used again after the execution of the
RAISE_VARARGS opcode, so they don't need to be updated.
</content>
</entry>
<entry>
<title>py/vm: Simplify handling of special-case STOP_ITERATION in yield from.</title>
<updated>2018-02-27T04:48:09+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-02-27T04:48:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a9f6d4921829195d7310aa8b07a4a705577161a5'/>
<id>urn:sha1:a9f6d4921829195d7310aa8b07a4a705577161a5</id>
<content type='text'>
There's no need to have MP_OBJ_NULL a special case, the code can re-use
the MP_OBJ_STOP_ITERATION value to signal the special case and the VM can
detect this with only one check (for MP_OBJ_STOP_ITERATION).
</content>
</entry>
</feed>
