<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/emitbc.c, branch v1.3.2</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.3.2</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.3.2'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2014-09-08T22:05:16+00:00</updated>
<entry>
<title>py: Convert [u]int to mp_[u]int_t in emit.h and associated .c files.</title>
<updated>2014-09-08T22:05:16+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-09-08T22:05:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7ff996c2377b191ff829e6e03815acf9bfe85a14'/>
<id>urn:sha1:7ff996c2377b191ff829e6e03815acf9bfe85a14</id>
<content type='text'>
Towards resolving 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: 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>
<entry>
<title>py: Improve encoding scheme for line-number to bytecode map.</title>
<updated>2014-07-31T16:12:01+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-07-31T16:12:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4747becc6423e8161519ad6850e09137f14742a8'/>
<id>urn:sha1:4747becc6423e8161519ad6850e09137f14742a8</id>
<content type='text'>
Reduces by about a factor of 10 on average the amount of RAM needed to
store the line-number to bytecode map in the bytecode prelude.

Using CPython3.4's stdlib for statistics: previously, an average of
13 bytes were used per (bytecode offset, line-number offset) pair, and
now with this improvement, that's down to 1.3 bytes on average.

Large RAM usage before was due to some very large steps in line numbers,
both from the start of the first line in a function way down in the
file, and also functions that have big comments and/or big strings in
them (both cases were significant).

Although the savings are large on average for the CPython stdlib, it
won't have such a big effect for small scripts used in embedded
programming.

Addresses issue #648.
</content>
</entry>
<entry>
<title>emitbc: Fix structure field alignment issue.</title>
<updated>2014-07-12T12:57:28+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2014-07-12T11:51:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=58c9586c343870e721512975af55cf210b45f756'/>
<id>urn:sha1:58c9586c343870e721512975af55cf210b45f756</id>
<content type='text'>
dummy_data field is accessed as uint value (e.g.
in emit_write_bytecode_byte_ptr), but is not aligned as such, which causes
bus errors or incorrect behavior on any arch requiring strictly aligned
data (ARM pre-v7, MIPS, etc, etc).
</content>
</entry>
<entry>
<title>Rename machine_(u)int_t to mp_(u)int_t.</title>
<updated>2014-07-03T12:25:24+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-07-03T12:25:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=40f3c026823f8951a2fa04e9c7fc93c75bc27bec'/>
<id>urn:sha1:40f3c026823f8951a2fa04e9c7fc93c75bc27bec</id>
<content type='text'>
See discussion in issue #50.
</content>
</entry>
<entry>
<title>py: Improvements to native emitter.</title>
<updated>2014-06-30T04:17:25+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-06-30T04:17:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=b601d9574ad03a18d3eb476d631f547c7ea28243'/>
<id>urn:sha1:b601d9574ad03a18d3eb476d631f547c7ea28243</id>
<content type='text'>
Native emitter can now compile try/except blocks using nlr_push/nlr_pop.
It probably only works for 1 level of exception handling.  It doesn't
work on Thumb (only x64).

Native emitter can also handle some additional op codes.

With this patch, 198 tests now pass using "-X emit=native" option to
micropython.
</content>
</entry>
<entry>
<title>py: Include mpconfig.h before all other includes.</title>
<updated>2014-06-21T19:43:22+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2014-06-21T19:43:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=59c675a64c1d9757d50ad4627da67a6f996a99fb'/>
<id>urn:sha1:59c675a64c1d9757d50ad4627da67a6f996a99fb</id>
<content type='text'>
It defines types used by all other headers.

Fixes #691.
</content>
</entry>
<entry>
<title>py: For optimization level -O3 and higher, remove lineno info from bytecode.</title>
<updated>2014-06-03T09:32:59+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2014-06-02T16:39:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=b8f117dd32aae6d2d8108ba101961d00df123e4f'/>
<id>urn:sha1:b8f117dd32aae6d2d8108ba101961d00df123e4f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Fix break from within a for loop.</title>
<updated>2014-05-30T14:20:41+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-05-30T14:20:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=25c84643b6c4da169cdb11de54f027e3c477c301'/>
<id>urn:sha1:25c84643b6c4da169cdb11de54f027e3c477c301</id>
<content type='text'>
Needed to pop the iterator object when breaking out of a for loop.  Need
also to be careful to unwind exception handler before popping iterator.

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