<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/parse.c, branch v1.8.4</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.8.4</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.8.4'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2016-06-06T16:28:32+00:00</updated>
<entry>
<title>py/parse: Treat constants that start with underscore as private.</title>
<updated>2016-06-06T16:28:32+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-06-06T16:28:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=b1533c43669c037d04c87d1756355cdc8edd5e0a'/>
<id>urn:sha1:b1533c43669c037d04c87d1756355cdc8edd5e0a</id>
<content type='text'>
Assignments of the form "_id = const(value)" are treated as private
(following a similar CPython convention) and code is no longer emitted
for the assignment to a global variable.

See issue #2111.
</content>
</entry>
<entry>
<title>py: Declare constant data as properly constant.</title>
<updated>2016-05-20T11:46:20+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-05-20T11:38:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=3ff16ff52e45d4c0bf1df5fa650b72d6d835451b'/>
<id>urn:sha1:3ff16ff52e45d4c0bf1df5fa650b72d6d835451b</id>
<content type='text'>
Otherwise some compilers (eg without optimisation) will put this read-only
data in RAM instead of ROM.
</content>
</entry>
<entry>
<title>py/parse: Add uerrno to list of modules to look for constants in.</title>
<updated>2016-05-10T22:30:39+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-05-10T22:23:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=e36ff98c80aa93a2f9fdd05800aaa6e75ead2b72'/>
<id>urn:sha1:e36ff98c80aa93a2f9fdd05800aaa6e75ead2b72</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Simplify "and" action within parser by making ident-rules explicit.</title>
<updated>2016-04-14T12:49:23+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-04-14T12:23:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=0c1de1cdeea98e55710d27f7926da717086ac0fc'/>
<id>urn:sha1:0c1de1cdeea98e55710d27f7926da717086ac0fc</id>
<content type='text'>
Most grammar rules can optimise to the identity if they only have a single
argument, saving a lot of RAM building the parse tree.  Previous to this
patch, whether a given grammar rule could be optimised was defined (mostly
implicitly) by a complicated set of logic rules.  With this patch the
definition is always specified explicitly by using "and_ident" in the rule
definition in the grammar.  This simplifies the logic of the parser,
making it a bit smaller and faster.  RAM usage in unaffected.
</content>
</entry>
<entry>
<title>py: Fix constant folding and inline-asm to work with new async grammar.</title>
<updated>2016-04-13T14:26:39+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-04-13T14:21:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=eacbd7aeba3bdd634b56af544e40da87779f4a95'/>
<id>urn:sha1:eacbd7aeba3bdd634b56af544e40da87779f4a95</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/parse: When looking up consts, check they exist before checking type.</title>
<updated>2016-03-19T21:36:32+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-03-19T21:36:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=8d4d6731f56f9b1163f19d2455e8998aa0499afd'/>
<id>urn:sha1:8d4d6731f56f9b1163f19d2455e8998aa0499afd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/parse: Use m_renew_maybe to ensure that memory is shrunk in-place.</title>
<updated>2016-02-23T13:44:29+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-02-23T13:44:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d6c558c0aae53d3cd5f8871394f44bd23836307e'/>
<id>urn:sha1:d6c558c0aae53d3cd5f8871394f44bd23836307e</id>
<content type='text'>
The chunks of memory that the parser allocates contain parse nodes and
are pointed to from many places, so these chunks cannot be relocated
by the memory manager.  This patch makes it so that when a chunk is
shrunk to fit, it is not relocated.
</content>
</entry>
<entry>
<title>py: unary_op enum type fix, and a cast to remove clang warning</title>
<updated>2016-01-12T21:06:39+00:00</updated>
<author>
<name>Antonin ENFRUN</name>
<email>antonin.e@me.com</email>
</author>
<published>2016-01-12T21:06:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=efc971e8f9b69bbab32d5677239f2dfb16e8f3be'/>
<id>urn:sha1:efc971e8f9b69bbab32d5677239f2dfb16e8f3be</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/parse: Include unistd.h for ssize_t definition.</title>
<updated>2016-01-08T13:42:00+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-08T13:42:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7dbf74c5b976ae92aab5c941cc777bb0c6a36592'/>
<id>urn:sha1:7dbf74c5b976ae92aab5c941cc777bb0c6a36592</id>
<content type='text'>
In some cases ssize_t is not defined by already included headers.
</content>
</entry>
<entry>
<title>py/parse: Improve constant folding to operate on small and big ints.</title>
<updated>2016-01-07T14:40:35+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-07T14:40:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=22b2265053ef9fec4b1aedab770b32f71b0c85f7'/>
<id>urn:sha1:22b2265053ef9fec4b1aedab770b32f71b0c85f7</id>
<content type='text'>
Constant folding in the parser can now operate on big ints, whatever
their representation.  This is now possible because the parser can create
parse nodes holding arbitrary objects.  For the case of small ints the
folding is still efficient in RAM because the folded small int is stored
inplace in the parse node.

Adds 48 bytes to code size on Thumb2 architecture.  Helps reduce heap
usage because more constants can be computed at compile time, leading to
a smaller parse tree, and most importantly means that the constants don't
have to be computed at runtime (perhaps more than once).  Parser will now
be a little slower when folding due to calls to runtime to do the
arithmetic.
</content>
</entry>
</feed>
