From 3f420c0c27bd6daa5af39517925be55b9b9a9ab3 Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 4 Apr 2018 14:24:03 +1000 Subject: py: Don't include mp_optimise_value or opt_level() if compiler disabled. Without the compiler enabled the mp_optimise_value is unused, and the micropython.opt_level() function is not useful, so exclude these from the build to save RAM and code size. --- py/mpstate.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'py/mpstate.h') diff --git a/py/mpstate.h b/py/mpstate.h index 816698f4e..16c4bf6c5 100644 --- a/py/mpstate.h +++ b/py/mpstate.h @@ -199,7 +199,9 @@ typedef struct _mp_state_vm_t { mp_thread_mutex_t qstr_mutex; #endif + #if MICROPY_ENABLE_COMPILER mp_uint_t mp_optimise_value; + #endif // size of the emergency exception buf, if it's dynamically allocated #if MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF && MICROPY_EMERGENCY_EXCEPTION_BUF_SIZE == 0 -- cgit v1.2.3