<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/runtime.h, branch v1.9.2</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.9.2</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.9.2'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2017-08-13T12:52:33+00:00</updated>
<entry>
<title>all: Raise exceptions via mp_raise_XXX</title>
<updated>2017-08-13T12:52:33+00:00</updated>
<author>
<name>Javier Candeira</name>
<email>javier@candeira.com</email>
</author>
<published>2017-08-09T04:40:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=35a1fea90b2cae9d5cc8e9eab62ba4c67e8786db'/>
<id>urn:sha1:35a1fea90b2cae9d5cc8e9eab62ba4c67e8786db</id>
<content type='text'>
  - Changed: ValueError, TypeError, NotImplementedError
  - OSError invocations unchanged, because the corresponding utility
    function takes ints, not strings like the long form invocation.
  - OverflowError, IndexError and RuntimeError etc. not changed for now
    until we decide whether to add new utility functions.
</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>all: Unify header guard usage.</title>
<updated>2017-07-18T01:57:39+00:00</updated>
<author>
<name>Alexander Steffen</name>
<email>devel.20.webmeister@spamgourmet.com</email>
</author>
<published>2017-06-29T21:14:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=299bc625864b9e624ed599c94a5f95870516139a'/>
<id>urn:sha1:299bc625864b9e624ed599c94a5f95870516139a</id>
<content type='text'>
The code conventions suggest using header guards, but do not define how
those should look like and instead point to existing files. However, not
all existing files follow the same scheme, sometimes omitting header guards
altogether, sometimes using non-standard names, making it easy to
accidentally pick a "wrong" example.

This commit ensures that all header files of the MicroPython project (that
were not simply copied from somewhere else) follow the same pattern, that
was already present in the majority of files, especially in the py folder.

The rules are as follows.

Naming convention:
* start with the words MICROPY_INCLUDED
* contain the full path to the file
* replace special characters with _

In addition, there are no empty lines before #ifndef, between #ifndef and
one empty line before #endif. #endif is followed by a comment containing
the name of the guard macro.

py/grammar.h cannot use header guards by design, since it has to be
included multiple times in a single C file. Several other files also do not
need header guards as they are only used internally and guaranteed to be
included only once:
* MICROPY_MPHALPORT_H
* mpconfigboard.h
* mpconfigport.h
* mpthreadport.h
* pin_defs_*.h
* qstrdefs*.h
</content>
</entry>
<entry>
<title>py: Add LOAD_SUPER_METHOD bytecode to allow heap-free super meth calls.</title>
<updated>2017-04-22T13:39:20+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-04-18T23:45:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=dd11af209d226b7d18d5148b239662e30ed60bad'/>
<id>urn:sha1:dd11af209d226b7d18d5148b239662e30ed60bad</id>
<content type='text'>
This patch allows the following code to run without allocating on the heap:

    super().foo(...)

Before this patch such a call would allocate a super object on the heap and
then load the foo method and call it right away.  The super object is only
needed to perform the lookup of the method and not needed after that.  This
patch makes an optimisation to allocate the super object on the C stack and
discard it right after use.

Changes in code size due to this patch are:

   bare-arm: +128
    minimal: +232
   unix x64: +416
unix nanbox: +364
     stmhal: +184
    esp8266: +340
     cc3200: +128
</content>
</entry>
<entry>
<title>py: Remove MP_STATE_CTX, use MP_STATE_THREAD instead (it's an alias).</title>
<updated>2017-03-24T07:43:28+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-03-24T07:43:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=64a4f11b2d6f880aa6fb1aaa10b2603d3faa1cd0'/>
<id>urn:sha1:64a4f11b2d6f880aa6fb1aaa10b2603d3faa1cd0</id>
<content type='text'>
MP_STATE_CTX was recently aliased to MP_STATE_THREAD and can now be
removed.
</content>
</entry>
<entry>
<title>py: Add micropython.schedule() function and associated runtime code.</title>
<updated>2017-03-20T04:20:26+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-02-16T07:05:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6e74d24f30bca3fb70876b1fb9a6b3a59850b83c'/>
<id>urn:sha1:6e74d24f30bca3fb70876b1fb9a6b3a59850b83c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Add iter_buf to getiter type method.</title>
<updated>2017-02-16T07:38:06+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-09T23:14:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ae8d86758631e62466a55d179897d2111c3cb1c1'/>
<id>urn:sha1:ae8d86758631e62466a55d179897d2111c3cb1c1</id>
<content type='text'>
Allows to iterate over the following without allocating on the heap:
- tuple
- list
- string, bytes
- bytearray, array
- dict (not dict.keys, dict.values, dict.items)
- set, frozenset

Allows to call the following without heap memory:
- all, any, min, max, sum

TODO: still need to allocate stack memory in bytecode for iter_buf.
</content>
</entry>
<entry>
<title>py/runtime: Convert mp_uint_t to size_t where appropriate.</title>
<updated>2017-02-16T05:51:13+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-02-16T04:32:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4e3bac2e42788aa9312a6145aef18da083eac2df'/>
<id>urn:sha1:4e3bac2e42788aa9312a6145aef18da083eac2df</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/objtype: Implement __call__ handling for an instance w/o heap alloc.</title>
<updated>2016-11-21T22:33:55+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-11-21T22:33:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=037e6912c60f4f05a3866d525392f9c76914d0f1'/>
<id>urn:sha1:037e6912c60f4f05a3866d525392f9c76914d0f1</id>
<content type='text'>
By refactoring and reusing code from objboundmeth.
</content>
</entry>
<entry>
<title>py: Add mp_raise_OSError(errno) helper function.</title>
<updated>2016-10-07T02:31:59+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-10-07T02:31:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=3a0a7717304cc34a4d6ef55f767666c918c185b5'/>
<id>urn:sha1:3a0a7717304cc34a4d6ef55f767666c918c185b5</id>
<content type='text'>
This is an often used code pattern, and its use reduces code size of the
core by about 100 bytes.
</content>
</entry>
</feed>
