Lines Matching refs:mp_obj_t
49 STATIC mp_obj_t mp_builtin___build_class__(size_t n_args, const mp_obj_t *args) { in mp_builtin___build_class__()
54 mp_obj_t class_locals = mp_obj_new_dict(0); in mp_builtin___build_class__()
58 mp_obj_t cell = mp_call_function_0(args[0]); in mp_builtin___build_class__()
64 mp_obj_t meta; in mp_builtin___build_class__()
76 mp_obj_t meta_args[3]; in mp_builtin___build_class__()
80 mp_obj_t new_class = mp_call_function_n_kw(meta, 3, 0, meta_args); in mp_builtin___build_class__()
91 STATIC mp_obj_t mp_builtin_abs(mp_obj_t o_in) { in mp_builtin_abs()
96 STATIC mp_obj_t mp_builtin_all(mp_obj_t o_in) { in mp_builtin_all()
98 mp_obj_t iterable = mp_getiter(o_in, &iter_buf); in mp_builtin_all()
99 mp_obj_t item; in mp_builtin_all()
109 STATIC mp_obj_t mp_builtin_any(mp_obj_t o_in) { in mp_builtin_any()
111 mp_obj_t iterable = mp_getiter(o_in, &iter_buf); in mp_builtin_any()
112 mp_obj_t item; in mp_builtin_any()
122 STATIC mp_obj_t mp_builtin_bin(mp_obj_t o_in) { in mp_builtin_bin()
123 mp_obj_t args[] = { MP_OBJ_NEW_QSTR(MP_QSTR__brace_open__colon__hash_b_brace_close_), o_in }; in mp_builtin_bin()
128 STATIC mp_obj_t mp_builtin_callable(mp_obj_t o_in) { in mp_builtin_callable()
137 STATIC mp_obj_t mp_builtin_chr(mp_obj_t o_in) { in mp_builtin_chr()
176 STATIC mp_obj_t mp_builtin_dir(size_t n_args, const mp_obj_t *args) { in mp_builtin_dir()
177 mp_obj_t dir = mp_obj_new_list(0, NULL); in mp_builtin_dir()
191 mp_obj_t dest[2]; in mp_builtin_dir()
209 STATIC mp_obj_t mp_builtin_divmod(mp_obj_t o1_in, mp_obj_t o2_in) { in mp_builtin_divmod()
214 STATIC mp_obj_t mp_builtin_hash(mp_obj_t o_in) { in mp_builtin_hash()
220 STATIC mp_obj_t mp_builtin_hex(mp_obj_t o_in) { in mp_builtin_hex()
224 mp_obj_t args[] = { MP_OBJ_NEW_QSTR(MP_QSTR__brace_open__colon__hash_x_brace_close_), o_in }; in mp_builtin_hex()
240 STATIC mp_obj_t mp_builtin_input(size_t n_args, const mp_obj_t *args) { in mp_builtin_input()
259 STATIC mp_obj_t mp_builtin_iter(mp_obj_t o_in) { in mp_builtin_iter()
266 STATIC mp_obj_t mp_builtin_min_max(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs, mp_uint_t… in mp_builtin_min_max()
269 mp_obj_t key_fn = key_elem == NULL ? MP_OBJ_NULL : key_elem->value; in mp_builtin_min_max()
273 mp_obj_t iterable = mp_getiter(args[0], &iter_buf); in mp_builtin_min_max()
274 mp_obj_t best_key = MP_OBJ_NULL; in mp_builtin_min_max()
275 mp_obj_t best_obj = MP_OBJ_NULL; in mp_builtin_min_max()
276 mp_obj_t item; in mp_builtin_min_max()
278 mp_obj_t key = key_fn == MP_OBJ_NULL ? item : mp_call_function_1(key_fn, item); in mp_builtin_min_max()
295 mp_obj_t best_key = MP_OBJ_NULL; in mp_builtin_min_max()
296 mp_obj_t best_obj = MP_OBJ_NULL; in mp_builtin_min_max()
298 mp_obj_t key = key_fn == MP_OBJ_NULL ? args[i] : mp_call_function_1(key_fn, args[i]); in mp_builtin_min_max()
308 STATIC mp_obj_t mp_builtin_max(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs) { in mp_builtin_max()
313 STATIC mp_obj_t mp_builtin_min(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs) { in mp_builtin_min()
321 STATIC mp_obj_t mp_builtin_next(size_t n_args, const mp_obj_t *args) { in mp_builtin_next()
323 mp_obj_t ret = mp_iternext_allow_raise(args[0]); in mp_builtin_next()
330 mp_obj_t ret = mp_iternext(args[0]); in mp_builtin_next()
336 STATIC mp_obj_t mp_builtin_next(mp_obj_t o) { in mp_builtin_next()
337 mp_obj_t ret = mp_iternext_allow_raise(o); in mp_builtin_next()
347 STATIC mp_obj_t mp_builtin_oct(mp_obj_t o_in) { in mp_builtin_oct()
351 mp_obj_t args[] = { MP_OBJ_NEW_QSTR(MP_QSTR__brace_open__colon__hash_o_brace_close_), o_in }; in mp_builtin_oct()
357 STATIC mp_obj_t mp_builtin_ord(mp_obj_t o_in) { in mp_builtin_ord()
384 STATIC mp_obj_t mp_builtin_pow(size_t n_args, const mp_obj_t *args) { in mp_builtin_pow()
400 STATIC mp_obj_t mp_builtin_print(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { in mp_builtin_print()
423 mp_obj_t sep = u.args[ARG_sep].u_obj; in mp_builtin_print()
424 mp_obj_t end = u.args[ARG_end].u_obj; in mp_builtin_print()
451 STATIC mp_obj_t mp_builtin___repl_print__(mp_obj_t o) { in mp_builtin___repl_print__()
457 mp_obj_t dest[2] = {MP_OBJ_SENTINEL, o}; in mp_builtin___repl_print__()
465 STATIC mp_obj_t mp_builtin_repr(mp_obj_t o_in) { in mp_builtin_repr()
474 STATIC mp_obj_t mp_builtin_round(size_t n_args, const mp_obj_t *args) { in mp_builtin_round()
475 mp_obj_t o_in = args[0]; in mp_builtin_round()
489 …mp_obj_t mult = mp_binary_op(MP_BINARY_OP_POWER, MP_OBJ_NEW_SMALL_INT(10), MP_OBJ_NEW_SMALL_INT(-n… in mp_builtin_round()
490 mp_obj_t half_mult = mp_binary_op(MP_BINARY_OP_FLOOR_DIVIDE, mult, MP_OBJ_NEW_SMALL_INT(2)); in mp_builtin_round()
491 mp_obj_t modulo = mp_binary_op(MP_BINARY_OP_MODULO, o_in, mult); in mp_builtin_round()
492 mp_obj_t rounded = mp_binary_op(MP_BINARY_OP_SUBTRACT, o_in, modulo); in mp_builtin_round()
499 mp_obj_t floor = mp_binary_op(MP_BINARY_OP_FLOOR_DIVIDE, o_in, mult); in mp_builtin_round()
526 STATIC mp_obj_t mp_builtin_sum(size_t n_args, const mp_obj_t *args) { in mp_builtin_sum()
527 mp_obj_t value; in mp_builtin_sum()
537 mp_obj_t iterable = mp_getiter(args[0], &iter_buf); in mp_builtin_sum()
538 mp_obj_t item; in mp_builtin_sum()
546 STATIC mp_obj_t mp_builtin_sorted(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs) { in mp_builtin_sorted()
550 mp_obj_t self = mp_type_list.make_new(&mp_type_list, 1, 0, args); in mp_builtin_sorted()
558 static inline mp_obj_t mp_load_attr_default(mp_obj_t base, qstr attr, mp_obj_t defval) { in mp_load_attr_default()
559 mp_obj_t dest[2]; in mp_load_attr_default()
577 STATIC mp_obj_t mp_builtin_getattr(size_t n_args, const mp_obj_t *args) { in mp_builtin_getattr()
578 mp_obj_t defval = MP_OBJ_NULL; in mp_builtin_getattr()
586 STATIC mp_obj_t mp_builtin_setattr(mp_obj_t base, mp_obj_t attr, mp_obj_t value) { in mp_builtin_setattr()
593 STATIC mp_obj_t mp_builtin_delattr(mp_obj_t base, mp_obj_t attr) { in mp_builtin_delattr()
599 STATIC mp_obj_t mp_builtin_hasattr(mp_obj_t object_in, mp_obj_t attr_in) { in mp_builtin_hasattr()
601 mp_obj_t dest[2]; in mp_builtin_hasattr()
607 STATIC mp_obj_t mp_builtin_globals(void) { in mp_builtin_globals()
612 STATIC mp_obj_t mp_builtin_locals(void) { in mp_builtin_locals()