<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/grammar.h, branch 5.3.x</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=5.3.x</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=5.3.x'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2018-06-22T07:00:29+00:00</updated>
<entry>
<title>py/compile: Combine expr, xor_expr and and_expr into one function.</title>
<updated>2018-06-22T07:00:29+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-06-19T04:20:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=25ae98f07cb3c4488cb955403dfe56b8bb8db6f0'/>
<id>urn:sha1:25ae98f07cb3c4488cb955403dfe56b8bb8db6f0</id>
<content type='text'>
This and the previous 4 commits combined have change in code size of:

   bare-arm:   -92
minimal x86:  -544
   unix x64:  -544
unix nanbox:  -712
      stm32:  -116
     cc3200:  -128
    esp8266:  -348
      esp32:  -232
</content>
</entry>
<entry>
<title>py/compile: Combine or_test and and_test compile functions.</title>
<updated>2018-06-22T07:00:29+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-06-19T04:10:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=36e474e83fa26cb78a9312dce5dc53a467c5d8b7'/>
<id>urn:sha1:36e474e83fa26cb78a9312dce5dc53a467c5d8b7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/compile: Combine global and nonlocal statement compile functions.</title>
<updated>2018-06-22T07:00:29+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-06-19T04:04:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=1a7109d65aa87596c7ce1824037fe298109962e9'/>
<id>urn:sha1:1a7109d65aa87596c7ce1824037fe298109962e9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/compile: Combine subscript_2 and subscript_3 into one function.</title>
<updated>2018-06-22T07:00:29+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-06-19T03:57:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d23bec3fc89d1c1f7a2ac8023161e3f2620ffa13'/>
<id>urn:sha1:d23bec3fc89d1c1f7a2ac8023161e3f2620ffa13</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/compile: Combine break and continue compile functions.</title>
<updated>2018-06-22T07:00:29+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-06-19T03:54:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c14919792868d0e42bb84d61e584797c6c977114'/>
<id>urn:sha1:c14919792868d0e42bb84d61e584797c6c977114</id>
<content type='text'>
</content>
</entry>
<entry>
<title>all: Use the name MicroPython consistently in comments</title>
<updated>2017-07-31T08:35:40+00:00</updated>
<author>
<name>Alexander Steffen</name>
<email>devel.20.webmeister@spamgourmet.com</email>
</author>
<published>2017-06-30T07:22:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=55f33240f3d7051d4213629e92437a36f1fac50e'/>
<id>urn:sha1:55f33240f3d7051d4213629e92437a36f1fac50e</id>
<content type='text'>
There were several different spellings of MicroPython present in comments,
when there should be only one.
</content>
</entry>
<entry>
<title>py/compile: Combine arith and bit-shift ops into 1 compile routine.</title>
<updated>2017-07-05T05:49:00+00:00</updated>
<author>
<name>Krzysztof Blazewicz</name>
<email>blazewicz.krzysztof@gmail.com</email>
</author>
<published>2017-04-27T19:32:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a040fb89e7b8507aa775b0620de1770642b0f5ee'/>
<id>urn:sha1:a040fb89e7b8507aa775b0620de1770642b0f5ee</id>
<content type='text'>
This refactoring saves code space.
</content>
</entry>
<entry>
<title>py/compile: Refactor handling of special super() call.</title>
<updated>2017-04-22T11:46:32+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-04-18T12:52:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=5335942b599d85263d3c18eb99ff5ebd04a8bc98'/>
<id>urn:sha1:5335942b599d85263d3c18eb99ff5ebd04a8bc98</id>
<content type='text'>
This patch refactors the handling of the special super() call within the
compiler.  It removes the need for a global (to the compiler) state variable
which keeps track of whether the subject of an expression is super.  The
handling of super() is now done entirely within one function, which makes
the compiler a bit cleaner and allows to easily add more optimisations to
super calls.

Changes to the code size are:

   bare-arm: +12
    minimal:  +0
   unix x64: +48
unix nanbox: -16
     stmhal:  +4
     cc3200:  +0
    esp8266: -56
</content>
</entry>
<entry>
<title>py/grammar: Remove unused rule.</title>
<updated>2017-02-17T01:48:45+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-02-17T01:48:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=bdebfaa4bf422ef164fa78257b59415e5dffc6cb'/>
<id>urn:sha1:bdebfaa4bf422ef164fa78257b59415e5dffc6cb</id>
<content type='text'>
Since the recent changes to string/bytes literal concatenation, this rule
is no longer used.
</content>
</entry>
<entry>
<title>py: Do adjacent str/bytes literal concatenation in lexer, not compiler.</title>
<updated>2017-02-17T01:12:40+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-02-17T01:12:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=534b7c368dc2af7720f3aaed0c936ef46d773957'/>
<id>urn:sha1:534b7c368dc2af7720f3aaed0c936ef46d773957</id>
<content type='text'>
It's much more efficient in RAM and code size to do implicit literal string
concatenation in the lexer, as opposed to the compiler.

RAM usage is reduced because the concatenation can be done right away in the
tokeniser by just accumulating the string/bytes literals into the lexer's
vstr.  Prior to this patch adjacent strings/bytes would create a parse tree
(one node per string/bytes) and then in the compiler a whole new chunk of
memory was allocated to store the concatenated string, which used more than
double the memory compared to just accumulating in the lexer.

This patch also significantly reduces code size:

bare-arm: -204
minimal:  -204
unix x64: -328
stmhal:   -208
esp8266:  -284
cc3200:   -224
</content>
</entry>
</feed>
