<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/objfun.c, branch v1.3.7</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.3.7</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.3.7'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2014-11-05T21:16:41+00:00</updated>
<entry>
<title>py: Fix some macros defines; cleanup some includes.</title>
<updated>2014-11-05T21:16:41+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-11-05T21:16:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7860c2a68acd1ccd28cb4bb87819487fd6966a9e'/>
<id>urn:sha1:7860c2a68acd1ccd28cb4bb87819487fd6966a9e</id>
<content type='text'>
</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: Fix types, uint -&gt; mp_uint_t.</title>
<updated>2014-09-29T18:42:06+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-09-29T15:26:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a7329615eb5b55869ae8a460f9b9be5be04a5bee'/>
<id>urn:sha1:a7329615eb5b55869ae8a460f9b9be5be04a5bee</id>
<content type='text'>
</content>
</entry>
<entry>
<title>stmhal: Initialise stack pointer correctly.</title>
<updated>2014-09-23T09:59:05+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-09-23T09:59:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=eaaebf3291a12ff65ca5c7f16e0d486fbde10efa'/>
<id>urn:sha1:eaaebf3291a12ff65ca5c7f16e0d486fbde10efa</id>
<content type='text'>
Stack is full descending and must be 8-byte aligned.  It must start off
pointing to just above the last byte of RAM.

Previously, stack started pointed to last byte of RAM (eg 0x2001ffff)
and so was not 8-byte aligned.  This caused a bug in combination with
alloca.

This patch also updates some debug printing code.

Addresses issue #872 (among many other undiscovered issues).
</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>Change some parts of the core API to use mp_uint_t instead of uint/int.</title>
<updated>2014-08-29T23:35:11+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-08-29T23:35:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ecc88e949ca5e307d22da4605a40d39ea2df9e3b'/>
<id>urn:sha1:ecc88e949ca5e307d22da4605a40d39ea2df9e3b</id>
<content type='text'>
Addressing issue #50, still some way to go yet.
</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>
<entry>
<title>py: Viper can now store to global.</title>
<updated>2014-08-15T22:47:59+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-08-15T22:47:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=e6c0dff9671c493e9a13a22a1b8902dee88da064'/>
<id>urn:sha1:e6c0dff9671c493e9a13a22a1b8902dee88da064</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Allow viper to have type annotations.</title>
<updated>2014-08-15T15:45:41+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-08-15T15:45:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=2ac4af6946543ae96cf3659468e1b8cabb057f85'/>
<id>urn:sha1:2ac4af6946543ae96cf3659468e1b8cabb057f85</id>
<content type='text'>
Viper functions can now be annotated with the type of their arguments
and return value.  Eg:

@micropython.viper
def f(x:int) -&gt; int:
    return x + 1
</content>
</entry>
</feed>
