diff options
author | Damien George <damien@micropython.org> | 2022-03-31 14:26:07 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2022-04-14 22:44:56 +1000 |
commit | e52f14d05772b670847c0692a635a5ec223c5e57 (patch) | |
tree | f98390653c2ef9374c076bf36168c7aa15d737f6 /py/compile.c | |
parent | 42d0bd2c17fd76860c3dc0ef5c62faa48efeb121 (diff) |
py/parse: Factor obj extract code to mp_parse_node_extract_const_object.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/compile.c')
-rw-r--r-- | py/compile.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/py/compile.c b/py/compile.c index e4ead7f1a..6bb601b92 100644 --- a/py/compile.c +++ b/py/compile.c @@ -2763,12 +2763,7 @@ STATIC void compile_atom_expr_await(compiler_t *comp, mp_parse_node_struct_t *pn #endif STATIC mp_obj_t get_const_object(mp_parse_node_struct_t *pns) { - #if MICROPY_OBJ_REPR == MICROPY_OBJ_REPR_D - // nodes are 32-bit pointers, but need to extract 64-bit object - return (uint64_t)pns->nodes[0] | ((uint64_t)pns->nodes[1] << 32); - #else - return (mp_obj_t)pns->nodes[0]; - #endif + return mp_parse_node_extract_const_object(pns); } STATIC void compile_const_object(compiler_t *comp, mp_parse_node_struct_t *pns) { |