<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/parse.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-02-23T21:36:05+00:00</updated>
<entry>
<title>py: Update parse.c&amp;mpconfig.h to reflect rename of mp_lexer_show_token.</title>
<updated>2015-02-23T21:36:05+00:00</updated>
<author>
<name>nhtshot</name>
<email>nhtshot@gmail.com</email>
</author>
<published>2015-02-23T21:05:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=5d323defe4dab940494002e80c69cfb36d204a49'/>
<id>urn:sha1:5d323defe4dab940494002e80c69cfb36d204a49</id>
<content type='text'>
This function is only used when DEBUG_PRINTERS and USE_RULE_NAME are
enabled.
</content>
</entry>
<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: Initialise variables in mp_parse correctly, to satisfy gcc warning.</title>
<updated>2015-02-08T13:40:20+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-02-08T13:40:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=f804833a97c75882653e655ee95722c4cb7ae218'/>
<id>urn:sha1:f804833a97c75882653e655ee95722c4cb7ae218</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: Be more machine-portable with size of bit fields.</title>
<updated>2015-01-24T23:12:58+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-01-24T23:12:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=5c670acb1fdd04dcb9c220fee7cbeeb6b0c440e5'/>
<id>urn:sha1:5c670acb1fdd04dcb9c220fee7cbeeb6b0c440e5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py, unix, stmhal: Allow to compile with -Wshadow.</title>
<updated>2015-01-20T11:55:10+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-01-20T11:55:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=50912e7f5dc579fd2917537046793dfa30decadf'/>
<id>urn:sha1:50912e7f5dc579fd2917537046793dfa30decadf</id>
<content type='text'>
See issue #699.
</content>
</entry>
<entry>
<title>py, unix: Allow to compile with -Wsign-compare.</title>
<updated>2015-01-16T17:47:07+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-01-16T17:47:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=963a5a3e82ded7ee75adae72ae7cb14796fa150e'/>
<id>urn:sha1:963a5a3e82ded7ee75adae72ae7cb14796fa150e</id>
<content type='text'>
See issue #699.
</content>
</entry>
<entry>
<title>py: Add "default" to switches to allow better code flow analysis.</title>
<updated>2015-01-14T21:32:42+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-01-14T21:32:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d2d64f00fb7f1487c1fa21a456e003a801d7e711'/>
<id>urn:sha1:d2d64f00fb7f1487c1fa21a456e003a801d7e711</id>
<content type='text'>
This helps compiler produce smaller code.  Saves 124 bytes on stmhal and
bare-arm.
</content>
</entry>
<entry>
<title>py: Never intern data of large string/bytes object; add relevant tests.</title>
<updated>2015-01-13T16:21:23+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-01-13T16:21:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4c81ba8015238a343593468aa5173440fd392e32'/>
<id>urn:sha1:4c81ba8015238a343593468aa5173440fd392e32</id>
<content type='text'>
Previously to this patch all constant string/bytes objects were
interned by the compiler, and this lead to crashes when the qstr was too
long (noticeable now that qstr length storage defaults to 1 byte).

With this patch, long string/bytes objects are never interned, and are
referenced directly as constant objects within generated code using
load_const_obj.
</content>
</entry>
</feed>
