summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-03-30 13:54:02 +0100
committerDamien George <damien.p.george@gmail.com>2014-03-30 13:54:02 +0100
commitdf6567e6345c763182fa237a4497ab94ee6ffc20 (patch)
tree402a2bde9d55a10c204f8d766bda228b4f02b74a
parentd17926db710189db97a49e9b2e72d782fc404231 (diff)
downloadmicropython-df6567e6345c763182fa237a4497ab94ee6ffc20.tar.gz
micropython-df6567e6345c763182fa237a4497ab94ee6ffc20.zip
Merge map.h into obj.h.
Pretty much everyone needs to include map.h, since it's such an integral part of the Micro Python object implementation. Thus, the definitions are now in obj.h instead. map.h is removed.
-rw-r--r--py/builtin.c1
-rw-r--r--py/builtinevex.c1
-rw-r--r--py/builtinimport.c1
-rw-r--r--py/map.c3
-rw-r--r--py/map.h48
-rw-r--r--py/modarray.c1
-rw-r--r--py/modcollections.c1
-rw-r--r--py/modmath.c1
-rw-r--r--py/modmicropython.c1
-rw-r--r--py/obj.c1
-rw-r--r--py/obj.h63
-rw-r--r--py/objarray.c1
-rw-r--r--py/objcomplex.c1
-rw-r--r--py/objdict.c1
-rw-r--r--py/objfun.c1
-rw-r--r--py/objgenerator.c1
-rw-r--r--py/objlist.c1
-rw-r--r--py/objmodule.c1
-rw-r--r--py/objset.c1
-rw-r--r--py/objstr.c1
-rw-r--r--py/objtuple.c1
-rw-r--r--py/objtype.c1
-rw-r--r--py/runtime.c1
-rw-r--r--py/runtime.h10
-rw-r--r--py/sequence.c1
-rw-r--r--stm/adc.c1
-rw-r--r--stm/audio.c1
-rw-r--r--stm/exti.c1
-rw-r--r--stm/file.c1
-rw-r--r--stm/i2c.c1
-rw-r--r--stm/led.c1
-rw-r--r--stm/pin.c1
-rw-r--r--stm/pin_map.c1
-rw-r--r--stm/pybmodule.c1
-rw-r--r--stm/pybwlan.c1
-rw-r--r--stm/sdcard.c1
-rw-r--r--stm/servo.c1
-rw-r--r--stm/usart.c1
-rw-r--r--stmhal/accel.c1
-rw-r--r--stmhal/adc.c1
-rw-r--r--stmhal/dac.c1
-rw-r--r--stmhal/exti.c1
-rw-r--r--stmhal/file.c1
-rw-r--r--stmhal/help.c1
-rw-r--r--stmhal/i2c.c1
-rw-r--r--stmhal/led.c1
-rw-r--r--stmhal/modos.c1
-rw-r--r--stmhal/modpyb.c1
-rw-r--r--stmhal/modtime.c1
-rw-r--r--stmhal/pin_map.c1
-rw-r--r--stmhal/sdcard.c1
-rw-r--r--stmhal/servo.c1
-rw-r--r--stmhal/usart.c1
-rw-r--r--unix/ffi.c1
-rw-r--r--unix/file.c1
-rw-r--r--unix/main.c1
-rw-r--r--unix/socket.c1
57 files changed, 61 insertions, 116 deletions
diff --git a/py/builtin.c b/py/builtin.c
index a8a7009708..d606db17f4 100644
--- a/py/builtin.c
+++ b/py/builtin.c
@@ -8,7 +8,6 @@
#include "obj.h"
#include "runtime0.h"
#include "runtime.h"
-#include "map.h"
#include "builtin.h"
#if MICROPY_ENABLE_FLOAT
diff --git a/py/builtinevex.c b/py/builtinevex.c
index 92550a7965..264aa77f31 100644
--- a/py/builtinevex.c
+++ b/py/builtinevex.c
@@ -12,7 +12,6 @@
#include "compile.h"
#include "runtime0.h"
#include "runtime.h"
-#include "map.h"
#include "builtin.h"
STATIC mp_obj_t parse_compile_execute(mp_obj_t o_in, mp_parse_input_kind_t parse_input_kind) {
diff --git a/py/builtinimport.c b/py/builtinimport.c
index 4ba1d146a6..8feb2a01ba 100644
--- a/py/builtinimport.c
+++ b/py/builtinimport.c
@@ -17,7 +17,6 @@
#include "compile.h"
#include "runtime0.h"
#include "runtime.h"
-#include "map.h"
#include "builtin.h"
#define PATH_SEP_CHAR '/'
diff --git a/py/map.c b/py/map.c
index d1c368c6ae..d424c277cc 100644
--- a/py/map.c
+++ b/py/map.c
@@ -5,13 +5,12 @@
#include "qstr.h"
#include "obj.h"
#include "runtime0.h"
-#include "map.h"
// approximatelly doubling primes; made with Mathematica command: Table[Prime[Floor[(1.7)^n]], {n, 3, 24}]
// prefixed with zero for the empty case.
STATIC int doubling_primes[] = {0, 7, 19, 43, 89, 179, 347, 647, 1229, 2297, 4243, 7829, 14347, 26017, 47149, 84947, 152443, 273253, 488399, 869927, 1547173, 2745121, 4861607};
-int get_doubling_prime_greater_or_equal_to(int x) {
+STATIC int get_doubling_prime_greater_or_equal_to(int x) {
for (int i = 0; i < sizeof(doubling_primes) / sizeof(int); i++) {
if (doubling_primes[i] >= x) {
return doubling_primes[i];
diff --git a/py/map.h b/py/map.h
deleted file mode 100644
index 0614af3c42..0000000000
--- a/py/map.h
+++ /dev/null
@@ -1,48 +0,0 @@
-typedef struct _mp_map_elem_t {
- mp_obj_t key;
- mp_obj_t value;
-} mp_map_elem_t;
-
-// TODO maybe have a truncated mp_map_t for fixed tables, since alloc=used
-// put alloc last in the structure, so the truncated version does not need it
-// this would save 1 ROM word for all ROM objects that have a locals_dict
-// would also need a trucated dict structure
-
-typedef struct _mp_map_t {
- machine_uint_t all_keys_are_qstrs : 1;
- machine_uint_t table_is_fixed_array : 1;
- machine_uint_t used : (8 * sizeof(machine_uint_t) - 2);
- machine_uint_t alloc;
- mp_map_elem_t *table;
-} mp_map_t;
-
-typedef struct _mp_set_t {
- machine_uint_t alloc;
- machine_uint_t used;
- mp_obj_t *table;
-} mp_set_t;
-
-typedef enum _mp_map_lookup_kind_t {
- MP_MAP_LOOKUP, // 0
- MP_MAP_LOOKUP_ADD_IF_NOT_FOUND, // 1
- MP_MAP_LOOKUP_REMOVE_IF_FOUND, // 2
- MP_MAP_LOOKUP_FIRST = 4,
-} mp_map_lookup_kind_t;
-
-typedef struct _mp_obj_dict_t {
- mp_obj_base_t base;
- mp_map_t map;
-} mp_obj_dict_t;
-
-int get_doubling_prime_greater_or_equal_to(int x);
-void mp_map_init(mp_map_t *map, int n);
-void mp_map_init_fixed_table(mp_map_t *map, int n, const mp_obj_t *table);
-mp_map_t *mp_map_new(int n);
-void mp_map_deinit(mp_map_t *map);
-void mp_map_free(mp_map_t *map);
-mp_map_elem_t* mp_map_lookup(mp_map_t *map, mp_obj_t index, mp_map_lookup_kind_t lookup_kind);
-void mp_map_clear(mp_map_t *map);
-
-void mp_set_init(mp_set_t *set, int n);
-mp_obj_t mp_set_lookup(mp_set_t *set, mp_obj_t index, mp_map_lookup_kind_t lookup_kind);
-void mp_set_clear(mp_set_t *set);
diff --git a/py/modarray.c b/py/modarray.c
index 2544f7ed59..51c221fff3 100644
--- a/py/modarray.c
+++ b/py/modarray.c
@@ -2,7 +2,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "builtin.h"
STATIC const mp_map_elem_t mp_module_array_globals_table[] = {
diff --git a/py/modcollections.c b/py/modcollections.c
index ad951d5e9e..3401600bb1 100644
--- a/py/modcollections.c
+++ b/py/modcollections.c
@@ -2,7 +2,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "builtin.h"
STATIC const mp_map_elem_t mp_module_collections_globals_table[] = {
diff --git a/py/modmath.c b/py/modmath.c
index b814822531..c3ea55f936 100644
--- a/py/modmath.c
+++ b/py/modmath.c
@@ -4,7 +4,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "builtin.h"
#if MICROPY_ENABLE_FLOAT
diff --git a/py/modmicropython.c b/py/modmicropython.c
index 96ceb811c9..23187c03e9 100644
--- a/py/modmicropython.c
+++ b/py/modmicropython.c
@@ -2,7 +2,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "builtin.h"
// Various builtins specific to MicroPython runtime,
diff --git a/py/obj.c b/py/obj.c
index d6fa374306..d72a538b71 100644
--- a/py/obj.c
+++ b/py/obj.c
@@ -9,7 +9,6 @@
#include "obj.h"
#include "runtime0.h"
#include "runtime.h"
-#include "map.h"
mp_obj_type_t *mp_obj_get_type(mp_obj_t o_in) {
if (MP_OBJ_IS_SMALL_INT(o_in)) {
diff --git a/py/obj.h b/py/obj.h
index 6e334e1c88..88d9253ec6 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -83,9 +83,52 @@ typedef struct _mp_obj_base_t mp_obj_base_t;
#define MP_DEFINE_CONST_STATICMETHOD_OBJ(obj_name, fun_name) const mp_obj_static_class_method_t obj_name = {{&mp_type_staticmethod}, fun_name}
#define MP_DEFINE_CONST_CLASSMETHOD_OBJ(obj_name, fun_name) const mp_obj_static_class_method_t obj_name = {{&mp_type_classmethod}, fun_name}
-// Need to declare this here so we are not dependent on map.h
-struct _mp_map_t;
-struct _mp_map_elem_t;
+// Underlying map/hash table implementation (not dict object or map function)
+
+typedef struct _mp_map_elem_t {
+ mp_obj_t key;
+ mp_obj_t value;
+} mp_map_elem_t;
+
+// TODO maybe have a truncated mp_map_t for fixed tables, since alloc=used
+// put alloc last in the structure, so the truncated version does not need it
+// this would save 1 ROM word for all ROM objects that have a locals_dict
+// would also need a trucated dict structure
+
+typedef struct _mp_map_t {
+ machine_uint_t all_keys_are_qstrs : 1;
+ machine_uint_t table_is_fixed_array : 1;
+ machine_uint_t used : (8 * sizeof(machine_uint_t) - 2);
+ machine_uint_t alloc;
+ mp_map_elem_t *table;
+} mp_map_t;
+
+typedef enum _mp_map_lookup_kind_t {
+ MP_MAP_LOOKUP, // 0
+ MP_MAP_LOOKUP_ADD_IF_NOT_FOUND, // 1
+ MP_MAP_LOOKUP_REMOVE_IF_FOUND, // 2
+ MP_MAP_LOOKUP_FIRST = 4,
+} mp_map_lookup_kind_t;
+
+void mp_map_init(mp_map_t *map, int n);
+void mp_map_init_fixed_table(mp_map_t *map, int n, const mp_obj_t *table);
+mp_map_t *mp_map_new(int n);
+void mp_map_deinit(mp_map_t *map);
+void mp_map_free(mp_map_t *map);
+mp_map_elem_t* mp_map_lookup(mp_map_t *map, mp_obj_t index, mp_map_lookup_kind_t lookup_kind);
+void mp_map_clear(mp_map_t *map);
+
+// Underlying set implementation (not set object)
+
+typedef struct _mp_set_t {
+ machine_uint_t alloc;
+ machine_uint_t used;
+ mp_obj_t *table;
+} mp_set_t;
+
+void mp_set_init(mp_set_t *set, int n);
+mp_obj_t mp_set_lookup(mp_set_t *set, mp_obj_t index, mp_map_lookup_kind_t lookup_kind);
+void mp_set_clear(mp_set_t *set);
// Type definitions for methods
@@ -95,7 +138,7 @@ typedef mp_obj_t (*mp_fun_2_t)(mp_obj_t, mp_obj_t);
typedef mp_obj_t (*mp_fun_3_t)(mp_obj_t, mp_obj_t, mp_obj_t);
typedef mp_obj_t (*mp_fun_t)(void);
typedef mp_obj_t (*mp_fun_var_t)(uint n, const mp_obj_t *);
-typedef mp_obj_t (*mp_fun_kw_t)(uint n, const mp_obj_t *, struct _mp_map_t *);
+typedef mp_obj_t (*mp_fun_kw_t)(uint n, const mp_obj_t *, mp_map_t *);
typedef enum {
PRINT_STR, PRINT_REPR
@@ -384,12 +427,16 @@ machine_int_t mp_obj_tuple_hash(mp_obj_t self_in);
mp_obj_t mp_obj_list_append(mp_obj_t self_in, mp_obj_t arg);
void mp_obj_list_get(mp_obj_t self_in, uint *len, mp_obj_t **items);
void mp_obj_list_store(mp_obj_t self_in, mp_obj_t index, mp_obj_t value);
-mp_obj_t mp_obj_list_sort(uint n_args, const mp_obj_t *args, struct _mp_map_t *kwargs);
+mp_obj_t mp_obj_list_sort(uint n_args, const mp_obj_t *args, mp_map_t *kwargs);
// dict
+typedef struct _mp_obj_dict_t {
+ mp_obj_base_t base;
+ mp_map_t map;
+} mp_obj_dict_t;
uint mp_obj_dict_len(mp_obj_t self_in);
mp_obj_t mp_obj_dict_store(mp_obj_t self_in, mp_obj_t key, mp_obj_t value);
-struct _mp_map_t *mp_obj_dict_get_map(mp_obj_t self_in);
+mp_map_t *mp_obj_dict_get_map(mp_obj_t self_in);
// set
void mp_obj_set_store(mp_obj_t self_in, mp_obj_t item);
@@ -423,9 +470,9 @@ MP_DECLARE_CONST_FUN_OBJ(mp_identity_obj);
typedef struct _mp_obj_module_t {
mp_obj_base_t base;
qstr name;
- struct _mp_map_t *globals;
+ mp_map_t *globals;
} mp_obj_module_t;
-struct _mp_map_t *mp_obj_module_get_globals(mp_obj_t self_in);
+mp_map_t *mp_obj_module_get_globals(mp_obj_t self_in);
// staticmethod and classmethod types; defined here so we can make const versions
// this structure is used for instances of both staticmethod and classmethod
diff --git a/py/objarray.c b/py/objarray.c
index 3251ce969b..ea8654b456 100644
--- a/py/objarray.c
+++ b/py/objarray.c
@@ -6,7 +6,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "runtime0.h"
#include "runtime.h"
#include "binary.h"
diff --git a/py/objcomplex.c b/py/objcomplex.c
index afda721cfc..3fba568946 100644
--- a/py/objcomplex.c
+++ b/py/objcomplex.c
@@ -8,7 +8,6 @@
#include "obj.h"
#include "parsenum.h"
#include "runtime0.h"
-#include "map.h"
#if MICROPY_ENABLE_FLOAT
diff --git a/py/objdict.c b/py/objdict.c
index cb8e9d3e65..a9dbb76c44 100644
--- a/py/objdict.c
+++ b/py/objdict.c
@@ -7,7 +7,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "runtime0.h"
#include "runtime.h"
diff --git a/py/objfun.c b/py/objfun.c
index d4fa7592f7..019101bedf 100644
--- a/py/objfun.c
+++ b/py/objfun.c
@@ -9,7 +9,6 @@
#include "qstr.h"
#include "obj.h"
#include "objtuple.h"
-#include "map.h"
#include "runtime0.h"
#include "runtime.h"
#include "bc.h"
diff --git a/py/objgenerator.c b/py/objgenerator.c
index ce02e6f3ab..d1bae30de1 100644
--- a/py/objgenerator.c
+++ b/py/objgenerator.c
@@ -6,7 +6,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "runtime.h"
#include "bc.h"
#include "objgenerator.h"
diff --git a/py/objlist.c b/py/objlist.c
index c2feb01319..1030a862a2 100644
--- a/py/objlist.c
+++ b/py/objlist.c
@@ -6,7 +6,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "runtime0.h"
#include "runtime.h"
diff --git a/py/objmodule.c b/py/objmodule.c
index a388ca3f37..cc5944b665 100644
--- a/py/objmodule.c
+++ b/py/objmodule.c
@@ -8,7 +8,6 @@
#include "obj.h"
#include "objmodule.h"
#include "runtime.h"
-#include "map.h"
#include "builtintables.h"
STATIC mp_map_t mp_loaded_modules_map; // TODO: expose as sys.modules
diff --git a/py/objset.c b/py/objset.c
index 9b0ac2b107..2cabf6c509 100644
--- a/py/objset.c
+++ b/py/objset.c
@@ -9,7 +9,6 @@
#include "obj.h"
#include "runtime.h"
#include "runtime0.h"
-#include "map.h"
typedef struct _mp_obj_set_t {
mp_obj_base_t base;
diff --git a/py/objstr.c b/py/objstr.c
index d02924c506..2dd7015c58 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -7,7 +7,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "runtime0.h"
#include "runtime.h"
diff --git a/py/objtuple.c b/py/objtuple.c
index faa355e5bd..6186640604 100644
--- a/py/objtuple.c
+++ b/py/objtuple.c
@@ -6,7 +6,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "runtime0.h"
#include "runtime.h"
#include "objtuple.h"
diff --git a/py/objtype.c b/py/objtype.c
index 05d39b1217..1275124803 100644
--- a/py/objtype.c
+++ b/py/objtype.c
@@ -6,7 +6,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "runtime0.h"
#include "runtime.h"
diff --git a/py/runtime.c b/py/runtime.c
index a434d318e9..ed01a5be08 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -12,7 +12,6 @@
#include "runtime0.h"
#include "runtime.h"
#include "emitglue.h"
-#include "map.h"
#include "builtin.h"
#include "builtintables.h"
#include "bc.h"
diff --git a/py/runtime.h b/py/runtime.h
index 1934ccd1e4..b3d70d939c 100644
--- a/py/runtime.h
+++ b/py/runtime.h
@@ -3,10 +3,10 @@ void mp_deinit(void);
void mp_check_nargs(int n_args, machine_uint_t n_args_min, machine_uint_t n_args_max, int n_kw, bool is_kw);
-struct _mp_map_t *mp_locals_get(void);
-void mp_locals_set(struct _mp_map_t *m);
-struct _mp_map_t *mp_globals_get(void);
-void mp_globals_set(struct _mp_map_t *m);
+mp_map_t *mp_locals_get(void);
+void mp_locals_set(mp_map_t *m);
+mp_map_t *mp_globals_get(void);
+void mp_globals_set(mp_map_t *m);
mp_obj_t mp_load_name(qstr qstr);
mp_obj_t mp_load_global(qstr qstr);
@@ -58,7 +58,7 @@ mp_obj_t mp_iternext(mp_obj_t o); // will always return MP_OBJ_NULL instead of r
mp_obj_t mp_make_raise_obj(mp_obj_t o);
extern mp_obj_t mp_sys_path;
-struct _mp_map_t *mp_loaded_modules_get(void);
+mp_map_t *mp_loaded_modules_get(void);
mp_obj_t mp_import_name(qstr name, mp_obj_t fromlist, mp_obj_t level);
mp_obj_t mp_import_from(mp_obj_t module, qstr name);
void mp_import_all(mp_obj_t module);
diff --git a/py/sequence.c b/py/sequence.c
index 8810a47d97..3aae4b9420 100644
--- a/py/sequence.c
+++ b/py/sequence.c
@@ -6,7 +6,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "runtime0.h"
#include "runtime.h"
diff --git a/stm/adc.c b/stm/adc.c
index acdaa97dae..c7cca0ec04 100644
--- a/stm/adc.c
+++ b/stm/adc.c
@@ -6,7 +6,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "adc.h"
/* ADC defintions */
diff --git a/stm/audio.c b/stm/audio.c
index 22f635a5b7..a4e42918cc 100644
--- a/stm/audio.c
+++ b/stm/audio.c
@@ -9,7 +9,6 @@
#include "qstr.h"
#include "parse.h"
#include "obj.h"
-#include "map.h"
#include "runtime.h"
#include "audio.h"
diff --git a/stm/exti.c b/stm/exti.c
index 33821cd18d..ab33481eb5 100644
--- a/stm/exti.c
+++ b/stm/exti.c
@@ -9,7 +9,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "runtime.h"
#include "nlr.h"
diff --git a/stm/file.c b/stm/file.c
index 208ce804b4..40ac3ff9ca 100644
--- a/stm/file.c
+++ b/stm/file.c
@@ -5,7 +5,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "file.h"
#include "ff.h"
diff --git a/stm/i2c.c b/stm/i2c.c
index b3d06df147..011362cb5b 100644
--- a/stm/i2c.c
+++ b/stm/i2c.c
@@ -7,7 +7,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
typedef enum {
PYB_I2C_1 = 0,
diff --git a/stm/led.c b/stm/led.c
index bfb98f9b58..17bb593f5a 100644
--- a/stm/led.c
+++ b/stm/led.c
@@ -6,7 +6,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "led.h"
#include "pin.h"
#include "build/pins.h"
diff --git a/stm/pin.c b/stm/pin.c
index 6b97d2f7c1..b201c41e18 100644
--- a/stm/pin.c
+++ b/stm/pin.c
@@ -7,7 +7,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "pin.h"
diff --git a/stm/pin_map.c b/stm/pin_map.c
index 187ed3e634..9082afe492 100644
--- a/stm/pin_map.c
+++ b/stm/pin_map.c
@@ -9,7 +9,6 @@
#include "obj.h"
#include "runtime.h"
#include "nlr.h"
-#include "map.h"
#include "pin.h"
diff --git a/stm/pybmodule.c b/stm/pybmodule.c
index fde61b513d..5ae65ad229 100644
--- a/stm/pybmodule.c
+++ b/stm/pybmodule.c
@@ -9,7 +9,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "gc.h"
#include "gccollect.h"
#include "systick.h"
diff --git a/stm/pybwlan.c b/stm/pybwlan.c
index 36a27c5255..8d8ce32437 100644
--- a/stm/pybwlan.c
+++ b/stm/pybwlan.c
@@ -21,7 +21,6 @@
#include "lexer.h"
#include "parse.h"
#include "obj.h"
-#include "map.h"
#include "runtime.h"
#include "cc3k/ccspi.h"
diff --git a/stm/sdcard.c b/stm/sdcard.c
index 59256292fd..ed79b855cc 100644
--- a/stm/sdcard.c
+++ b/stm/sdcard.c
@@ -9,7 +9,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "runtime.h"
#include "sdcard.h"
diff --git a/stm/servo.c b/stm/servo.c
index 176081e1ad..db38bb21cf 100644
--- a/stm/servo.c
+++ b/stm/servo.c
@@ -8,7 +8,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "servo.h"
// PWM
diff --git a/stm/usart.c b/stm/usart.c
index 27c40fd841..1dfbd433bb 100644
--- a/stm/usart.c
+++ b/stm/usart.c
@@ -7,7 +7,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "usart.h"
pyb_usart_t pyb_usart_global_debug = PYB_USART_NONE;
diff --git a/stmhal/accel.c b/stmhal/accel.c
index a564902c0c..ffccddc861 100644
--- a/stmhal/accel.c
+++ b/stmhal/accel.c
@@ -8,7 +8,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "runtime.h"
#include "i2c.h"
#include "accel.h"
diff --git a/stmhal/adc.c b/stmhal/adc.c
index c4e0b9e25e..0b4f3e23ee 100644
--- a/stmhal/adc.c
+++ b/stmhal/adc.c
@@ -7,7 +7,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "runtime.h"
#include "adc.h"
#include "pin.h"
diff --git a/stmhal/dac.c b/stmhal/dac.c
index b57e2c440f..4dbf700221 100644
--- a/stmhal/dac.c
+++ b/stmhal/dac.c
@@ -9,7 +9,6 @@
#include "qstr.h"
#include "parse.h"
#include "obj.h"
-#include "map.h"
#include "runtime.h"
#include "dac.h"
diff --git a/stmhal/exti.c b/stmhal/exti.c
index 99bcd07e89..a9b05644c3 100644
--- a/stmhal/exti.c
+++ b/stmhal/exti.c
@@ -8,7 +8,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "runtime.h"
#include "nlr.h"
diff --git a/stmhal/file.c b/stmhal/file.c
index 219d58ddb3..9575ffd7e0 100644
--- a/stmhal/file.c
+++ b/stmhal/file.c
@@ -4,7 +4,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "file.h"
#include "ff.h"
diff --git a/stmhal/help.c b/stmhal/help.c
index 3ab69ec622..66484576bc 100644
--- a/stmhal/help.c
+++ b/stmhal/help.c
@@ -5,7 +5,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
STATIC const char *help_text =
"Welcome to Micro Python!\n"
diff --git a/stmhal/i2c.c b/stmhal/i2c.c
index 0b76d35cb4..f35d00b54c 100644
--- a/stmhal/i2c.c
+++ b/stmhal/i2c.c
@@ -8,7 +8,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "runtime.h"
#include "i2c.h"
diff --git a/stmhal/led.c b/stmhal/led.c
index 995b518e25..ffbaf3ca9d 100644
--- a/stmhal/led.c
+++ b/stmhal/led.c
@@ -8,7 +8,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "runtime.h"
#include "led.h"
#include "pin.h"
diff --git a/stmhal/modos.c b/stmhal/modos.c
index 606dbe927c..5684d1105c 100644
--- a/stmhal/modos.c
+++ b/stmhal/modos.c
@@ -5,7 +5,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "systick.h"
#include "rng.h"
#include "storage.h"
diff --git a/stmhal/modpyb.c b/stmhal/modpyb.c
index 87fab706d7..6784081029 100644
--- a/stmhal/modpyb.c
+++ b/stmhal/modpyb.c
@@ -7,7 +7,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "gc.h"
#include "gccollect.h"
#include "systick.h"
diff --git a/stmhal/modtime.c b/stmhal/modtime.c
index 4786c85c72..9756ec3b5a 100644
--- a/stmhal/modtime.c
+++ b/stmhal/modtime.c
@@ -5,7 +5,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "modtime.h"
STATIC mp_obj_t time_sleep(mp_obj_t seconds_o) {
diff --git a/stmhal/pin_map.c b/stmhal/pin_map.c
index 8a0be1d52a..2313540a3e 100644
--- a/stmhal/pin_map.c
+++ b/stmhal/pin_map.c
@@ -9,7 +9,6 @@
#include "obj.h"
#include "runtime.h"
#include "nlr.h"
-#include "map.h"
#include "pin.h"
diff --git a/stmhal/sdcard.c b/stmhal/sdcard.c
index 84ee0b7b11..994eb26c2a 100644
--- a/stmhal/sdcard.c
+++ b/stmhal/sdcard.c
@@ -6,7 +6,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "runtime.h"
#include "sdcard.h"
#include "pin.h"
diff --git a/stmhal/servo.c b/stmhal/servo.c
index 4e8ff1543b..15ba35165c 100644
--- a/stmhal/servo.c
+++ b/stmhal/servo.c
@@ -7,7 +7,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "runtime.h"
#include "servo.h"
diff --git a/stmhal/usart.c b/stmhal/usart.c
index 14539c597c..9bcc6be280 100644
--- a/stmhal/usart.c
+++ b/stmhal/usart.c
@@ -8,7 +8,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "usart.h"
struct _pyb_usart_obj_t {
diff --git a/unix/ffi.c b/unix/ffi.c
index 71fb0b66ab..cb63869e09 100644
--- a/unix/ffi.c
+++ b/unix/ffi.c
@@ -9,7 +9,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "runtime.h"
#include "binary.h"
diff --git a/unix/file.c b/unix/file.c
index 948ec44051..bd54e7482c 100644
--- a/unix/file.c
+++ b/unix/file.c
@@ -9,7 +9,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "runtime.h"
#include "stream.h"
diff --git a/unix/main.c b/unix/main.c
index ffbdbb7e79..959499ac34 100644
--- a/unix/main.c
+++ b/unix/main.c
@@ -15,7 +15,6 @@
#include "lexerunix.h"
#include "parse.h"
#include "obj.h"
-#include "map.h"
#include "parsehelper.h"
#include "compile.h"
#include "runtime0.h"
diff --git a/unix/socket.c b/unix/socket.c
index ee74ea0845..113b657fff 100644
--- a/unix/socket.c
+++ b/unix/socket.c
@@ -15,7 +15,6 @@
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
-#include "map.h"
#include "objtuple.h"
#include "objarray.h"
#include "runtime.h"