diff options
| author | Damien George <damien.p.george@gmail.com> | 2018-04-04 14:24:03 +1000 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2018-04-04 14:24:03 +1000 |
| commit | 3f420c0c27bd6daa5af39517925be55b9b9a9ab3 (patch) | |
| tree | e5b2da7eae2a600dc1580e0e4baed9efe6f14f4c /py/runtime.c | |
| parent | 323b5f7270ee0e3c9000c0fb0d5f74ec049337c2 (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/runtime.c')
| -rw-r--r-- | py/runtime.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/py/runtime.c b/py/runtime.c index 219ec22de..4efb29bec 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -83,8 +83,10 @@ void mp_init(void) { MICROPY_PORT_INIT_FUNC; #endif + #if MICROPY_ENABLE_COMPILER // optimization disabled by default MP_STATE_VM(mp_optimise_value) = 0; + #endif // init global module dict mp_obj_dict_init(&MP_STATE_VM(mp_loaded_modules_dict), 3); |
