py: Code clean-up in native emitter; improve thumb native calls.

This commit is contained in:
Damien George
2014-08-16 22:31:57 +01:00
parent 86de21b810
commit 7fe2191c9b
4 changed files with 74 additions and 71 deletions

View File

@@ -1192,13 +1192,14 @@ NORETURN void mp_native_raise(mp_obj_t o) {
nlr_raise(mp_make_raise_obj(o));
}
// these must correspond to the respective enum
// these must correspond to the respective enum in runtime0.h
void *const mp_fun_table[MP_F_NUMBER_OF] = {
mp_convert_obj_to_native,
mp_convert_native_to_obj,
mp_load_const_int,
mp_load_const_dec,
mp_load_const_str,
mp_load_const_bytes,
mp_load_name,
mp_load_global,
mp_load_build_class,
@@ -1225,6 +1226,8 @@ void *const mp_fun_table[MP_F_NUMBER_OF] = {
mp_call_method_n_kw,
mp_getiter,
mp_iternext,
nlr_push,
nlr_pop,
mp_native_raise,
mp_import_name,
mp_import_from,