<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/nativeglue.c, branch 0.9.4</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=0.9.4</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=0.9.4'/>
<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/viper: Allow casting of Python integers to viper pointers.</title>
<updated>2016-02-09T13:29:20+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-02-09T13:29:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=3e02b1d19a4b1fb36ee36b0d43144bad6b797f2f'/>
<id>urn:sha1:3e02b1d19a4b1fb36ee36b0d43144bad6b797f2f</id>
<content type='text'>
This allows you to pass a number (being an address) to a viper function
that expects a pointer, and also allows casting of integers to pointers
within viper functions.

This was actually the original behaviour, but it regressed due to native
type identifiers being promoted to 4 bits in width.
</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/viper: Truncate viper integer args so they can be up to 32-bit.</title>
<updated>2016-01-07T16:48:20+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-07T16:48:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=dd0a0f79d777684aba7986d44fae1a6eff176151'/>
<id>urn:sha1:dd0a0f79d777684aba7986d44fae1a6eff176151</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Rename MP_BOOL() to mp_obj_new_bool() for consistency in naming.</title>
<updated>2015-10-11T12:18:15+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-10-11T09:09:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=1b586f3a734c27c78080fb2173bbde17168cb9e4'/>
<id>urn:sha1:1b586f3a734c27c78080fb2173bbde17168cb9e4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Remove mp_load_const_bytes and instead load precreated bytes object.</title>
<updated>2015-06-25T14:42:13+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-06-25T14:42:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=59fba2d6ea31c134c9c0b88dc73cd25b236f167c'/>
<id>urn:sha1:59fba2d6ea31c134c9c0b88dc73cd25b236f167c</id>
<content type='text'>
Previous to this patch each time a bytes object was referenced a new
instance (with the same data) was created.  With this patch a single
bytes object is created in the compiler and is loaded directly at execute
time as a true constant (similar to loading bignum and float objects).
This saves on allocating RAM and means that bytes objects can now be
used when the memory manager is locked (eg in interrupts).

The MP_BC_LOAD_CONST_BYTES bytecode was removed as part of this.

Generated bytecode is slightly larger due to storing a pointer to the
bytes object instead of the qstr identifier.

Code size is reduced by about 60 bytes on Thumb2 architectures.
</content>
</entry>
<entry>
<title>py: Remove mp_load_const_str and replace uses with inlined version.</title>
<updated>2015-06-25T13:58:41+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-06-25T13:58:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ed570e4b2a0a68e43b191fb0d5b45fb2ec83aca4'/>
<id>urn:sha1:ed570e4b2a0a68e43b191fb0d5b45fb2ec83aca4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Implement full func arg passing for native emitter.</title>
<updated>2015-04-07T21:43:28+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-04-06T21:38:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=9988618e0e0f5c319e31b135d993e22efb593093'/>
<id>urn:sha1:9988618e0e0f5c319e31b135d993e22efb593093</id>
<content type='text'>
This patch gets full function argument passing working with native
emitter.  Includes named args, keyword args, default args, var args
and var keyword args.  Fully Python compliant.

It reuses the bytecode mp_setup_code_state function to do all the hard
work.  This function is slightly adjusted to accommodate native calls,
and the native emitter is forced a bit to emit similar prelude and
code-info as bytecode.
</content>
</entry>
<entry>
<title>py: Implement calling functions with *args in native emitter.</title>
<updated>2015-04-06T21:48:21+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-04-06T21:48:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=78772ada0ddc9222c0338f94a42e33e10bb24b55'/>
<id>urn:sha1:78772ada0ddc9222c0338f94a42e33e10bb24b55</id>
<content type='text'>
</content>
</entry>
</feed>
