<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/objfun.c, branch 1.0.0-rc.2</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=1.0.0-rc.2</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=1.0.0-rc.2'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2016-12-09T06:06:21+00:00</updated>
<entry>
<title>py: Allow inline-assembler emitter to be generic.</title>
<updated>2016-12-09T06:06:21+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-12-09T02:17:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ad297a1950c74c35c90dd655ae9a69d33ed28dc0'/>
<id>urn:sha1:ad297a1950c74c35c90dd655ae9a69d33ed28dc0</id>
<content type='text'>
This patch refactors some code so that it is easier to integrate new
inline assemblers for different architectures other than ARM Thumb.
</content>
</entry>
<entry>
<title>py: Specialise builtin funcs to use separate type for fixed arg count.</title>
<updated>2016-10-21T05:26:01+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-10-18T00:49:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=571e6f26dbd7e0e38441bc402f76d293303063b2'/>
<id>urn:sha1:571e6f26dbd7e0e38441bc402f76d293303063b2</id>
<content type='text'>
Builtin functions with a fixed number of arguments (0, 1, 2 or 3) are
quite common.  Before this patch the wrapper for such a function cost
3 machine words.  After this patch it only takes 2, which can reduce the
code size by quite a bit (and pays off even more, the more functions are
added).  It also makes function dispatch slightly more efficient in CPU
usage, and furthermore reduces stack usage for these cases.  On x86 and
Thumb archs the dispatch functions are now tail-call optimised by the
compiler.

The bare-arm port has its code size increase by 76 bytes, but stmhal drops
by 904 bytes.  Stack usage by these builtin functions is decreased by 48
bytes on Thumb2 archs.
</content>
</entry>
<entry>
<title>py/objfun: Use if instead of switch to check return value of VM execute.</title>
<updated>2016-09-27T13:08:10+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-09-27T13:08:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=0c595fa0947c837e837b495aecd0ae04a4b64d2f'/>
<id>urn:sha1:0c595fa0947c837e837b495aecd0ae04a4b64d2f</id>
<content type='text'>
It's simpler and improves code coverage.
</content>
</entry>
<entry>
<title>py/objfun: Remove unnecessary check for viper fun with 5 or more args.</title>
<updated>2016-09-27T13:05:51+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-09-27T13:05:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c71edaed73e7c000747b58da8d9c8c807b519d07'/>
<id>urn:sha1:c71edaed73e7c000747b58da8d9c8c807b519d07</id>
<content type='text'>
The native emitter/compiler restricts viper functions to 4 args, so there
is no need for an extra check in the dynamic dispatch.
</content>
</entry>
<entry>
<title>py: Rename struct mp_code_state to mp_code_state_t.</title>
<updated>2016-08-27T13:21:00+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-08-27T13:21:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=581a59a456654e881a228a99f135777e0335f1e1'/>
<id>urn:sha1:581a59a456654e881a228a99f135777e0335f1e1</id>
<content type='text'>
Also at _t to mp_exc_stack pre-declaration in struct typedef.
</content>
</entry>
<entry>
<title>py/objfun: Allow inline-asm functions to be called with 4 arguments.</title>
<updated>2016-03-16T08:22:26+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-03-16T08:22:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=9a58316de235fed23566f9898de43b57fab85d7d'/>
<id>urn:sha1:9a58316de235fed23566f9898de43b57fab85d7d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Extend native type-sig to use 4 bits, so uint is separate to ptr.</title>
<updated>2016-02-02T23:16:05+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-02-02T23:16:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=5f3e005b6791634b104fa6385c8a9bf5ed1af164'/>
<id>urn:sha1:5f3e005b6791634b104fa6385c8a9bf5ed1af164</id>
<content type='text'>
Before this patch, the native types for uint and ptr/ptr8/ptr16/ptr32
all overlapped and it was possible to make a mistake in casting.  Now,
these types are all separate and any coding mistakes will be raised
as runtime errors.
</content>
</entry>
<entry>
<title>py/inlineasm: Add ability to specify return type of asm_thumb funcs.</title>
<updated>2016-01-27T14:27:10+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-15T15:20:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=8f54c08691faa3dd859852d211230fd7d9791abd'/>
<id>urn:sha1:8f54c08691faa3dd859852d211230fd7d9791abd</id>
<content type='text'>
Supported return types are: object, bool, int, uint.

For example:

@micropython.asm_thumb
def foo(r0, r1) -&gt; uint:
    add(r0, r0, r1)
</content>
</entry>
<entry>
<title>py: Change type of .make_new and .call args: mp_uint_t becomes size_t.</title>
<updated>2016-01-11T00:48:41+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-03T09:59:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a0c97814dfcb0debbde8be99539e3d5ca2334e54'/>
<id>urn:sha1:a0c97814dfcb0debbde8be99539e3d5ca2334e54</id>
<content type='text'>
This patch changes the type signature of .make_new and .call object method
slots to use size_t for n_args and n_kw (was mp_uint_t.  Makes code more
efficient when mp_uint_t is larger than a machine word.  Doesn't affect
ports when size_t and mp_uint_t have the same size.
</content>
</entry>
<entry>
<title>py: Change struct and macro for builtin fun so they can be type checked.</title>
<updated>2016-01-03T11:53:44+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-03T11:53:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=1b0aab621baf081bf1cbeb38a29bd37fbc135cc7'/>
<id>urn:sha1:1b0aab621baf081bf1cbeb38a29bd37fbc135cc7</id>
<content type='text'>
</content>
</entry>
</feed>
