<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/compile.c, 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-03-26T16:52:45+00:00</updated>
<entry>
<title>py, compiler: When just bytecode, make explicit calls instead of table.</title>
<updated>2015-03-26T16:52:45+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-03-26T16:44:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4112590a602fa11b4d9a3df3ed5c55df56c0dc62'/>
<id>urn:sha1:4112590a602fa11b4d9a3df3ed5c55df56c0dc62</id>
<content type='text'>
When just the bytecode emitter is needed there is no need to have a
dynamic method table for the emitter back-end, and we can instead
directly call the mp_emit_bc_XXX functions.  This gives a significant
reduction in code size and a very slight performance boost for the
compiler.

This patch saves 1160 bytes code on Thumb2 and 972 bytes on x86, when
native emitters are disabled.

Overall savings in code over the last 3 commits are:

bare-arm: 1664 bytes.
minimal:  2136 bytes.
stmhal:    584 bytes (it has native emitter enabled).
cc3200:   1736 bytes.
</content>
</entry>
<entry>
<title>py, compiler: Remove emit_pass1 code, using emit_bc to do its job.</title>
<updated>2015-03-26T16:52:45+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-03-26T15:49:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a210c774f9cfbcde284f5b8a63442b4d6da1ae5b'/>
<id>urn:sha1:a210c774f9cfbcde284f5b8a63442b4d6da1ae5b</id>
<content type='text'>
First pass for the compiler is computing the scope (eg if an identifier
is local or not) and originally had an entire table of methods dedicated
to this, most of which did nothing.  With changes from previous commit,
this set of methods can be removed and the methods from the bytecode
emitter used instead, with very little modification -- this is what is
done in this commit.

This factoring has little to no impact on the speed of the compiler
(tested by compiling 3763 Python scripts and timing it).

This factoring reduces code size by about 270-300 bytes on Thumb2 archs,
and 400 bytes on x86.
</content>
</entry>
<entry>
<title>py, compiler: Refactor load/store/delete_id logic to reduce code size.</title>
<updated>2015-03-26T16:52:45+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-03-26T14:42:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=542bd6b4a1ead90fde42f24d01c82580f9d048de'/>
<id>urn:sha1:542bd6b4a1ead90fde42f24d01c82580f9d048de</id>
<content type='text'>
Saves around 230 bytes on Thumb2 and 750 bytes on x86.
</content>
</entry>
<entry>
<title>py: Fix bug in compiler which allowed through illegal augmented assign.</title>
<updated>2015-03-25T23:06:48+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-03-25T23:06:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=44f65c0e2f5ce27ce90bbec218ecb39cba9d75a2'/>
<id>urn:sha1:44f65c0e2f5ce27ce90bbec218ecb39cba9d75a2</id>
<content type='text'>
It allowed such things as (a, b) += c.
</content>
</entry>
<entry>
<title>py: Simplify some logic in compiler; add comments about CPython compat.</title>
<updated>2015-03-25T22:06:47+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-03-25T22:06:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=aedf583af27207bc87ebdbf8f1191ac6cbeb1756'/>
<id>urn:sha1:aedf583af27207bc87ebdbf8f1191ac6cbeb1756</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py, extmod: Remove include of unnecessary system headers.</title>
<updated>2015-03-14T23:11:25+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-03-14T23:11:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=1ef26b35c1682637de143ccb0449acb42428ed5c'/>
<id>urn:sha1:1ef26b35c1682637de143ccb0449acb42428ed5c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Add MICROPY_COMP_{DOUBLE,TRIPLE}_TUPLE_ASSIGN config options.</title>
<updated>2015-03-14T13:11:35+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-03-14T13:11:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=42e0c593084784cb0b630d99b8361bc88abadb78'/>
<id>urn:sha1:42e0c593084784cb0b630d99b8361bc88abadb78</id>
<content type='text'>
These allow to fine-tune the compiler to select whether it optimises
tuple assignments of the form a, b = c, d and a, b, c = d, e, f.
Sensible defaults are provided.
</content>
</entry>
<entry>
<title>py: In compiler, put macro guard around potentially unused asm vars.</title>
<updated>2015-03-14T12:59:31+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-03-14T12:59:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a77ffe66b23fe0f367af3dd64ae94b56fbf947d3'/>
<id>urn:sha1:a77ffe66b23fe0f367af3dd64ae94b56fbf947d3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Simplify some inline-assembler error messages, but retain meaning.</title>
<updated>2015-03-03T17:11:18+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-03-03T17:11:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=3665d0b2ffd41dac6be01016ac15afc0157ac393'/>
<id>urn:sha1:3665d0b2ffd41dac6be01016ac15afc0157ac393</id>
<content type='text'>
Just to reduce code size.  Messages are still to the point and
unambiguous.
</content>
</entry>
<entry>
<title>py: Give error for duplicate label in inline assembler.</title>
<updated>2015-03-03T17:08:02+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-03-03T17:08:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=9c5cabb502b59e5cc4354c8ca66be3d4a3e03bf9'/>
<id>urn:sha1:9c5cabb502b59e5cc4354c8ca66be3d4a3e03bf9</id>
<content type='text'>
</content>
</entry>
</feed>
