py/parse: Handle check for target small-int size in parser.

This means that all constants for EMIT_ARG(load_const_obj, obj) are created
in the parser (rather than some in the compiler).

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2022-03-16 00:33:44 +11:00
parent 3c7cab4e98
commit 962ad8622e
3 changed files with 8 additions and 17 deletions

View File

@@ -536,7 +536,7 @@ STATIC void save_obj(mp_print_t *print, mp_obj_t o) {
// we save numbers using a simplistic text representation
// TODO could be improved
byte obj_type;
if (mp_obj_is_type(o, &mp_type_int)) {
if (mp_obj_is_int(o)) {
obj_type = 'i';
#if MICROPY_PY_BUILTINS_COMPLEX
} else if (mp_obj_is_type(o, &mp_type_complex)) {