<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/parse.c, branch v1.7</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.7</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.7'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2016-03-19T21:36:32+00:00</updated>
<entry>
<title>py/parse: When looking up consts, check they exist before checking type.</title>
<updated>2016-03-19T21:36:32+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-03-19T21:36:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=8d4d6731f56f9b1163f19d2455e8998aa0499afd'/>
<id>urn:sha1:8d4d6731f56f9b1163f19d2455e8998aa0499afd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/parse: Use m_renew_maybe to ensure that memory is shrunk in-place.</title>
<updated>2016-02-23T13:44:29+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-02-23T13:44:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d6c558c0aae53d3cd5f8871394f44bd23836307e'/>
<id>urn:sha1:d6c558c0aae53d3cd5f8871394f44bd23836307e</id>
<content type='text'>
The chunks of memory that the parser allocates contain parse nodes and
are pointed to from many places, so these chunks cannot be relocated
by the memory manager.  This patch makes it so that when a chunk is
shrunk to fit, it is not relocated.
</content>
</entry>
<entry>
<title>py: unary_op enum type fix, and a cast to remove clang warning</title>
<updated>2016-01-12T21:06:39+00:00</updated>
<author>
<name>Antonin ENFRUN</name>
<email>antonin.e@me.com</email>
</author>
<published>2016-01-12T21:06:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=efc971e8f9b69bbab32d5677239f2dfb16e8f3be'/>
<id>urn:sha1:efc971e8f9b69bbab32d5677239f2dfb16e8f3be</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/parse: Include unistd.h for ssize_t definition.</title>
<updated>2016-01-08T13:42:00+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-08T13:42:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7dbf74c5b976ae92aab5c941cc777bb0c6a36592'/>
<id>urn:sha1:7dbf74c5b976ae92aab5c941cc777bb0c6a36592</id>
<content type='text'>
In some cases ssize_t is not defined by already included headers.
</content>
</entry>
<entry>
<title>py/parse: Improve constant folding to operate on small and big ints.</title>
<updated>2016-01-07T14:40:35+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-07T14:40:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=22b2265053ef9fec4b1aedab770b32f71b0c85f7'/>
<id>urn:sha1:22b2265053ef9fec4b1aedab770b32f71b0c85f7</id>
<content type='text'>
Constant folding in the parser can now operate on big ints, whatever
their representation.  This is now possible because the parser can create
parse nodes holding arbitrary objects.  For the case of small ints the
folding is still efficient in RAM because the folded small int is stored
inplace in the parse node.

Adds 48 bytes to code size on Thumb2 architecture.  Helps reduce heap
usage because more constants can be computed at compile time, leading to
a smaller parse tree, and most importantly means that the constants don't
have to be computed at runtime (perhaps more than once).  Parser will now
be a little slower when folding due to calls to runtime to do the
arithmetic.
</content>
</entry>
<entry>
<title>py/parse: Optimise away parse node that's just parenthesis around expr.</title>
<updated>2016-01-07T13:07:52+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-07T13:07:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=93b3726240ed50aa162d47519d38b1713f93298a'/>
<id>urn:sha1:93b3726240ed50aa162d47519d38b1713f93298a</id>
<content type='text'>
Before this patch, (x+y)*z would be parsed to a tree that contained a
redundant identity parse node corresponding to the parenthesis.  With
this patch such nodes are optimised away, which reduces memory
requirements for expressions with parenthesis, and simplifies the
compiler because it doesn't need to handle this identity case.

A parenthesis parse node is still needed for tuples.
</content>
</entry>
<entry>
<title>py: Add MICROPY_ENABLE_COMPILER and MICROPY_PY_BUILTINS_EVAL_EXEC opts.</title>
<updated>2015-12-18T12:35:44+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-12-18T12:35:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=dd5353a4054024a411aa343a22ffcd16195a16ad'/>
<id>urn:sha1:dd5353a4054024a411aa343a22ffcd16195a16ad</id>
<content type='text'>
MICROPY_ENABLE_COMPILER can be used to enable/disable the entire compiler,
which is useful when only loading of pre-compiled bytecode is supported.
It is enabled by default.

MICROPY_PY_BUILTINS_EVAL_EXEC controls support of eval and exec builtin
functions.  By default they are only included if MICROPY_ENABLE_COMPILER
is enabled.

Disabling both options saves about 40k of code size on 32-bit x86.
</content>
</entry>
<entry>
<title>py/parse: Replace mp_int_t/mp_uint_t with size_t etc, where appropriate.</title>
<updated>2015-12-17T13:06:05+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-12-17T13:06:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=16a6a47a7bda60704a34290bc77768bfde0d41ce'/>
<id>urn:sha1:16a6a47a7bda60704a34290bc77768bfde0d41ce</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Add support for 64-bit NaN-boxing object model, on 32-bit machine.</title>
<updated>2015-11-29T14:25:36+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-11-27T17:09:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=b8cfb0d7b2c91ea1e17f6caeabfc9cb23166cdc1'/>
<id>urn:sha1:b8cfb0d7b2c91ea1e17f6caeabfc9cb23166cdc1</id>
<content type='text'>
To use, put the following in mpconfigport.h:

    #define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_D)
    #define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_DOUBLE)
    typedef int64_t mp_int_t;
    typedef uint64_t mp_uint_t;
    #define UINT_FMT "%llu"
    #define INT_FMT "%lld"

Currently does not work with native emitter enabled.
</content>
</entry>
<entry>
<title>py: Wrap all obj-ptr conversions in MP_OBJ_TO_PTR/MP_OBJ_FROM_PTR.</title>
<updated>2015-11-29T14:25:35+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-11-27T17:01:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=999cedb90ff0827cdb9dfe0e4faa6ebc1739d271'/>
<id>urn:sha1:999cedb90ff0827cdb9dfe0e4faa6ebc1739d271</id>
<content type='text'>
This allows the mp_obj_t type to be configured to something other than a
pointer-sized primitive type.

This patch also includes additional changes to allow the code to compile
when sizeof(mp_uint_t) != sizeof(void*), such as using size_t instead of
mp_uint_t, and various casts.
</content>
</entry>
</feed>
