diff options
author | Damien George <damien.p.george@gmail.com> | 2014-03-28 18:38:20 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-03-28 18:38:20 +0000 |
commit | 440f041525a01990827823d2fccd3c081ea92a14 (patch) | |
tree | 4686cb4f3367b165d809ae305f8455b60629f47a /py/runtime.c | |
parent | 182c31a2085c89c722f188102603ce857696de11 (diff) | |
download | micropython-440f041525a01990827823d2fccd3c081ea92a14.tar.gz micropython-440f041525a01990827823d2fccd3c081ea92a14.zip |
py: Fix bugs with debugging output.
show_bc now decodes the prelude correctly. Moved WRITE_FILE stuff from
runtime.c to emitglue.c.
Addresses issue #385.
Diffstat (limited to 'py/runtime.c')
-rw-r--r-- | py/runtime.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/py/runtime.c b/py/runtime.c index 762924c20a..3f637a16f9 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -20,7 +20,6 @@ #if 0 // print debugging info #define DEBUG_PRINT (1) -#define WRITE_CODE (1) #define DEBUG_printf DEBUG_printf #define DEBUG_OP_printf(...) DEBUG_printf(__VA_ARGS__) #else // don't print debugging info @@ -33,10 +32,6 @@ STATIC mp_map_t *map_locals; STATIC mp_map_t *map_globals; STATIC mp_map_t map_builtins; -#ifdef WRITE_CODE -FILE *fp_write_code = NULL; -#endif - // a good optimising compiler will inline this if necessary STATIC void mp_map_add_qstr(mp_map_t *map, qstr qstr, mp_obj_t value) { mp_map_lookup(map, MP_OBJ_NEW_QSTR(qstr), MP_MAP_LOOKUP_ADD_IF_NOT_FOUND)->value = value; @@ -68,18 +63,9 @@ void rt_init(void) { // for efficiency, left to platform-specific startup code //sys_path = mp_obj_new_list(0, NULL); //rt_store_attr(m_sys, MP_QSTR_path, sys_path); - -#ifdef WRITE_CODE - fp_write_code = fopen("out-code", "wb"); -#endif } void rt_deinit(void) { -#ifdef WRITE_CODE - if (fp_write_code != NULL) { - fclose(fp_write_code); - } -#endif mp_map_free(map_globals); mp_map_deinit(&map_builtins); mp_module_deinit(); |