py/parse: Factor obj extract code to mp_parse_node_extract_const_object.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user