aboutsummaryrefslogtreecommitdiff
path: root/py/mpstate.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2018-04-04 14:24:03 +1000
committerDamien George <damien.p.george@gmail.com>2018-04-04 14:24:03 +1000
commit3f420c0c27bd6daa5af39517925be55b9b9a9ab3 (patch)
treee5b2da7eae2a600dc1580e0e4baed9efe6f14f4c /py/mpstate.h
parent323b5f7270ee0e3c9000c0fb0d5f74ec049337c2 (diff)
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.
Diffstat (limited to 'py/mpstate.h')
-rw-r--r--py/mpstate.h2
1 files changed, 2 insertions, 0 deletions
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