<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/parse.h, 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-02-13T02:29:46+00:00</updated>
<entry>
<title>py: Expose compile.c:list_get as mp_parse_node_extract_list.</title>
<updated>2015-02-13T02:29:46+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-02-13T02:29:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=dfe944c3e5c2a7fa04c3416266728ffce6332bf8'/>
<id>urn:sha1:dfe944c3e5c2a7fa04c3416266728ffce6332bf8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Parse big-int/float/imag constants directly in parser.</title>
<updated>2015-02-08T01:57:40+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-02-08T01:57:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7d414a1b52d193bab2c94cf56932e1eba23ba542'/>
<id>urn:sha1:7d414a1b52d193bab2c94cf56932e1eba23ba542</id>
<content type='text'>
Previous to this patch, a big-int, float or imag constant was interned
(made into a qstr) and then parsed at runtime to create an object each
time it was needed.  This is wasteful in RAM and not efficient.  Now,
these constants are parsed straight away in the parser and turned into
objects.  This allows constants with large numbers of digits (so
addresses issue #1103) and takes us a step closer to #722.
</content>
</entry>
<entry>
<title>py: Protect mp_parse and mp_compile with nlr push/pop block.</title>
<updated>2015-02-07T18:33:58+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-02-07T18:33:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=0bfc7638baa4c5a4a2351364ab770a188dcab302'/>
<id>urn:sha1:0bfc7638baa4c5a4a2351364ab770a188dcab302</id>
<content type='text'>
To enable parsing constants more efficiently, mp_parse should be allowed
to raise an exception, and mp_compile can already raise a MemoryError.
So these functions need to be protected by an nlr push/pop block.

This patch adds that feature in all places.  This allows to simplify how
mp_parse and mp_compile are called: they now raise an exception if they
have an error and so explicit checking is not needed anymore.
</content>
</entry>
<entry>
<title>py: Move to guarded includes, everywhere in py/ core.</title>
<updated>2015-01-01T20:32:09+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-01-01T20:27:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=51dfcb4bb7613ed164952712d9a5235a7b833cde'/>
<id>urn:sha1:51dfcb4bb7613ed164952712d9a5235a7b833cde</id>
<content type='text'>
Addresses issue #1022.
</content>
</entry>
<entry>
<title>py: Move to guarded includes for compile.h and related headers.</title>
<updated>2014-12-27T14:12:17+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2014-12-25T21:29:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=8ab6f9067412d9f73fe88d42d81c0b4c4f1fd20b'/>
<id>urn:sha1:8ab6f9067412d9f73fe88d42d81c0b4c4f1fd20b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Convert [u]int to mp_[u]int_t where appropriate.</title>
<updated>2014-10-03T17:44:14+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-10-03T17:44:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=42f3de924bc3e285490f5f293955bc6d7e5a0edf'/>
<id>urn:sha1:42f3de924bc3e285490f5f293955bc6d7e5a0edf</id>
<content type='text'>
Addressing issue #50.
</content>
</entry>
<entry>
<title>parser: Convert (u)int to mp_(u)int_t.</title>
<updated>2014-07-03T13:13:33+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-07-03T13:13:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=381618269a9eb3e49d0e42d389d2dec312907577'/>
<id>urn:sha1:381618269a9eb3e49d0e42d389d2dec312907577</id>
<content type='text'>
</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: Fix check of small-int overflow when parsing ints.</title>
<updated>2014-05-28T13:51:12+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-05-28T13:51:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d1e355ea8e2a5a17ee126f5c3d173b2e6f33e460'/>
<id>urn:sha1:d1e355ea8e2a5a17ee126f5c3d173b2e6f33e460</id>
<content type='text'>
Also unifies use of SMALL_INT_FITS macro across parser and runtime.
</content>
</entry>
<entry>
<title>py: Don't automatically intern strings in parser.</title>
<updated>2014-05-25T21:06:06+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-05-25T21:06:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=5042bce8fb268849ba1afcbeb946b840318c4e49'/>
<id>urn:sha1:5042bce8fb268849ba1afcbeb946b840318c4e49</id>
<content type='text'>
This completes non-automatic interning of strings in the parser, so that
doc strings don't take up RAM.  It complicates the parser and compiler,
and bloats stmhal by about 300 bytes.  It's complicated because now
there are 2 kinds of parse-nodes that can be strings: interned leaves
and non-interned structs.
</content>
</entry>
</feed>
