<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/bc.h, branch v1.4.1</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.4.1</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.4.1'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2015-04-02T21:03:07+00:00</updated>
<entry>
<title>vm: Initial support for calling bytecode functions w/o C stack ("stackless").</title>
<updated>2015-04-02T21:03:07+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-03-27T23:14:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=2039757b854b656a41c9e041776ccd5dad8ec5fe'/>
<id>urn:sha1:2039757b854b656a41c9e041776ccd5dad8ec5fe</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Make old_globals part of mp_code_state structure.</title>
<updated>2015-02-15T16:24:15+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-02-15T09:12:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=53e5e0fa28d0f81be8671303ea0388da71fd20b6'/>
<id>urn:sha1:53e5e0fa28d0f81be8671303ea0388da71fd20b6</id>
<content type='text'>
Conceptually it is part of code state, so let it be allocated in the same way
as the rest of state.
</content>
</entry>
<entry>
<title>py: Move to guarded includes, everywhere in py/ core.</title>
<updated>2015-01-01T20:32:09+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-01-01T20:27:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=51dfcb4bb7613ed164952712d9a5235a7b833cde'/>
<id>urn:sha1:51dfcb4bb7613ed164952712d9a5235a7b833cde</id>
<content type='text'>
Addresses issue #1022.
</content>
</entry>
<entry>
<title>showbc: Refactor to allow inline instruction printing.</title>
<updated>2014-12-27T03:01:21+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2014-12-27T03:00:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=343266ea519927a7f1bc0a27f9c8af768d1125f7'/>
<id>urn:sha1:343266ea519927a7f1bc0a27f9c8af768d1125f7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Reduce size of VM exception stack element by 1 machine word.</title>
<updated>2014-12-22T12:49:57+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-12-22T12:49:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=74eb44c392449b54a3f0dcf268ee7448909f7b07'/>
<id>urn:sha1:74eb44c392449b54a3f0dcf268ee7448909f7b07</id>
<content type='text'>
This optimisation reduces the VM exception stack element (mp_exc_stack_t)
by 1 word, by using bit 1 of a pointer to store whether the opcode was a
FINALLY or WITH opcode.  This optimisation was pending, waiting for
maturity of the exception handling code, which has now proven itself.

Saves 1 machine word RAM for each exception (4-&gt;3 words per exception).
Increases stmhal code by 4 bytes, and decreases unix x64 code by 32
bytes.
</content>
</entry>
<entry>
<title>py: Store bytecode arg names in bytecode (were in own array).</title>
<updated>2014-10-25T19:23:13+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-10-25T14:07:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=1084b0f9c21b093618da4494508dec9ca8467e35'/>
<id>urn:sha1:1084b0f9c21b093618da4494508dec9ca8467e35</id>
<content type='text'>
This saves a lot of RAM for 2 reasons:

1. For functions that don't have default values, var args or var kw
args (which is a large number of functions in the general case), the
mp_obj_fun_bc_t type now fits in 1 GC block (previously needed 2 because
of the extra pointer to point to the arg_names array).  So this saves 16
bytes per function (32 bytes on 64-bit machines).

2. Combining separate memory regions generally saves RAM because the
unused bytes at the end of the GC block are saved for 1 of the blocks
(since that block doesn't exist on its own anymore).  So generally this
saves 8 bytes per function.

Tested by importing lots of modules:

- 64-bit Linux gave about an 8% RAM saving for 86k of used RAM.
- pyboard gave about a 6% RAM saving for 31k of used RAM.
</content>
</entry>
<entry>
<title>py: Change [u]int to mp_[u]int_t in qstr.[ch], and some other places.</title>
<updated>2014-10-03T18:52:22+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-10-03T18:52:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=39dc1454788d1c6fb06c79871c7cd6e12aeb50a0'/>
<id>urn:sha1:39dc1454788d1c6fb06c79871c7cd6e12aeb50a0</id>
<content type='text'>
This should pretty much resolve issue #50.
</content>
</entry>
<entry>
<title>py: Convert [u]int to mp_[u]int_t where appropriate.</title>
<updated>2014-10-03T17:44:14+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-10-03T17:44:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=42f3de924bc3e285490f5f293955bc6d7e5a0edf'/>
<id>urn:sha1:42f3de924bc3e285490f5f293955bc6d7e5a0edf</id>
<content type='text'>
Addressing issue #50.
</content>
</entry>
<entry>
<title>py: Use variable length encoded uints in more places in bytecode.</title>
<updated>2014-09-04T13:44:01+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-09-04T13:44:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=b534e1b9f14c189d2cef209d40f598e62164694a'/>
<id>urn:sha1:b534e1b9f14c189d2cef209d40f598e62164694a</id>
<content type='text'>
Code-info size, block name, source name, n_state and n_exc_stack now use
variable length encoded uints.  This saves 7-9 bytes per bytecode
function for most functions.
</content>
</entry>
<entry>
<title>py: Fix bug where GC collected native/viper/asm function data.</title>
<updated>2014-08-24T15:28:17+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-08-24T15:28:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=3c658a4e755a75e495303957208486e583ddb270'/>
<id>urn:sha1:3c658a4e755a75e495303957208486e583ddb270</id>
<content type='text'>
Because (for Thumb) a function pointer has the LSB set, pointers to
dynamic functions in RAM (eg native, viper or asm functions) were not
being traced by the GC.  This patch is a comprehensive fix for this.

Addresses issue #820.
</content>
</entry>
</feed>
