<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/persistentcode.c, branch v1.9.3</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.9.3</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.9.3'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2017-10-04T23:49:44+00:00</updated>
<entry>
<title>py/persistentcode: Bump .mpy version number to version 3.</title>
<updated>2017-10-04T23:49:44+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-10-04T23:48:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ff93fd4f50321c6190e1659b19e64fef3045a484'/>
<id>urn:sha1:ff93fd4f50321c6190e1659b19e64fef3045a484</id>
<content type='text'>
The binary and unary ops have changed bytecode encoding.
</content>
</entry>
<entry>
<title>all: Remove inclusion of internal py header files.</title>
<updated>2017-10-04T01:37:50+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-10-04T01:37:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a3dc1b1957d2c96d7c60c2c629c95077b03488a1'/>
<id>urn:sha1:a3dc1b1957d2c96d7c60c2c629c95077b03488a1</id>
<content type='text'>
Header files that are considered internal to the py core and should not
normally be included directly are:
    py/nlr.h - internal nlr configuration and declarations
    py/bc0.h - contains bytecode macro definitions
    py/runtime0.h - contains basic runtime enums

Instead, the top-level header files to include are one of:
    py/obj.h - includes runtime0.h and defines everything to use the
        mp_obj_t type
    py/runtime.h - includes mpstate.h and hence nlr.h, obj.h, runtime0.h,
        and defines everything to use the general runtime support functions

Additional, specific headers (eg py/objlist.h) can be included if needed.
</content>
</entry>
<entry>
<title>py/persistentcode: Define mp_raw_code_save_file() for any unix target.</title>
<updated>2017-09-25T07:09:05+00:00</updated>
<author>
<name>Anton Patrushev</name>
<email>apatrushev@gmail.com</email>
</author>
<published>2017-09-22T17:44:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=f008263022f794c056d8d102deaa62760822761a'/>
<id>urn:sha1:f008263022f794c056d8d102deaa62760822761a</id>
<content type='text'>
A unix target should provide POSIX open/write/close functions regardless of
its machine architecture.  Fixes issue #3325.
</content>
</entry>
<entry>
<title>py/persistentcode: Allow to compile with complex numbers disabled.</title>
<updated>2017-06-07T14:28:28+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-06-07T14:28:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=72732fea1a041b94448d98ad4fd53545caa758ab'/>
<id>urn:sha1:72732fea1a041b94448d98ad4fd53545caa758ab</id>
<content type='text'>
</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: Allow lexer to raise exceptions during construction.</title>
<updated>2017-03-14T00:52:05+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-03-14T00:16:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=1831034be13fef5344583c557ff089df31788251'/>
<id>urn:sha1:1831034be13fef5344583c557ff089df31788251</id>
<content type='text'>
This patch refactors the error handling in the lexer, to simplify it (ie
reduce code size).

A long time ago, when the lexer/parser/compiler were first written, the
lexer and parser were designed so they didn't use exceptions (ie nlr) to
report errors but rather returned an error code.  Over time that has
gradually changed, the parser in particular has more and more ways of
raising exceptions.  Also, the lexer never really handled all errors without
raising, eg there were some memory errors which could raise an exception
(and in these rare cases one would get a fatal nlr-not-handled fault).

This patch accepts the fact that the lexer can raise exceptions in some
cases and allows it to raise exceptions to handle all its errors, which are
for the most part just out-of-memory errors during construction of the
lexer.  This makes the lexer a bit simpler, and also the persistent code
stuff is simplified.

What this means for users of the lexer is that calls to it must be wrapped
in a nlr handler.  But all uses of the lexer already have such an nlr
handler for the parser (and compiler) so that doesn't put any extra burden
on the callers.
</content>
</entry>
<entry>
<title>py/persistentcode: Bump .mpy version due to change in bytecode.</title>
<updated>2017-02-16T13:19:34+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-02-16T13:19:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6a11048af1d01c78bdacddadd1b72dc7ba7c6478'/>
<id>urn:sha1:6a11048af1d01c78bdacddadd1b72dc7ba7c6478</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/persistentcode: Replace mp_uint_t with size_t where appropriate.</title>
<updated>2017-02-16T05:51:16+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-02-16T05:04:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=891dc5c62ce9b266f0352fc96ed78f36ee9fc825'/>
<id>urn:sha1:891dc5c62ce9b266f0352fc96ed78f36ee9fc825</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Factor out persistent-code reader into separate files.</title>
<updated>2016-11-16T07:13:50+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-11-16T05:04:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6b239c271c9c7041f9741c2a0f348f350808ad8a'/>
<id>urn:sha1:6b239c271c9c7041f9741c2a0f348f350808ad8a</id>
<content type='text'>
Implementations of persistent-code reader are provided for POSIX systems
and systems using FatFS.  Macros to use these are MICROPY_READER_POSIX and
MICROPY_READER_FATFS respectively.  If an alternative implementation is
needed then a port can define the function mp_reader_new_file.
</content>
</entry>
<entry>
<title>py: Factor persistent code load/save funcs into persistentcode.[ch].</title>
<updated>2016-11-16T05:14:14+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-11-16T00:55:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6810f2c134f9329e9dc18f4e0d3a1936ca6d8011'/>
<id>urn:sha1:6810f2c134f9329e9dc18f4e0d3a1936ca6d8011</id>
<content type='text'>
</content>
</entry>
</feed>
