diff options
author | Damien George <damien.p.george@gmail.com> | 2017-08-30 11:51:25 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-08-30 11:51:25 +1000 |
commit | 414537711dd05531c63eb830bfc9c3eecf657b1e (patch) | |
tree | e885b26c0e1ef94b189955546015893d704aaa1e /py/mpconfig.h | |
parent | 39b465ca831d0ec866c2a137dccbfec7f7badfba (diff) | |
download | micropython-414537711dd05531c63eb830bfc9c3eecf657b1e.tar.gz micropython-414537711dd05531c63eb830bfc9c3eecf657b1e.zip |
py: Add MICROPY_USE_SMALL_HEAP_COMPILER option, disabled by default.
This new option allows the original and new parser/compiler to coexist.
Diffstat (limited to 'py/mpconfig.h')
-rw-r--r-- | py/mpconfig.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h index dac8a903c9..3c2962f9a4 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -358,6 +358,14 @@ #define MICROPY_COMP_RETURN_IF_EXPR (0) #endif +// Whether to use an alternate parser and compiler optimised for small heaps. +// This parser/compiler uses more code space but a lot less heap when building +// the parse tree. But it has the disadvantage that the entire parse tree must +// fit in a contiguous chunk of memory on the heap. +#ifndef MICROPY_USE_SMALL_HEAP_COMPILER +#define MICROPY_USE_SMALL_HEAP_COMPILER (0) +#endif + /*****************************************************************************/ /* Internal debugging stuff */ @@ -678,7 +686,7 @@ typedef double mp_float_t; // Support for async/await/async for/async with #ifndef MICROPY_PY_ASYNC_AWAIT -#define MICROPY_PY_ASYNC_AWAIT (1) +#define MICROPY_PY_ASYNC_AWAIT (!MICROPY_USE_SMALL_HEAP_COMPILER) #endif // Issue a warning when comparing str and bytes objects |