73 .
name = MP_QSTR_generator,
97 if (self->code_state.ip == 0) {
102 if (self->code_state.sp == self->code_state.state - 1) {
107 *
self->code_state.sp = send_value;
110 mp_globals_set(self->globals);
112 mp_globals_set(old_globals);
122 self->code_state.ip = 0;
123 *ret_val = *
self->code_state.sp;
127 *ret_val = *
self->code_state.sp;
129 self->code_state.ip = 0;
135 self->code_state.ip = 0;
136 *ret_val =
self->code_state.state[n_state - 1];
235 .
name = MP_QSTR_generator,
const mp_obj_type_t mp_type_fun_bc
NORETURN void mp_raise_msg(const mp_obj_type_t *exc_type, const char *msg)
const mp_obj_type_t mp_type_gen_wrap
mp_vm_return_kind_t mp_execute_bytecode(mp_code_state_t *code_state, volatile mp_obj_t inject_exc)
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(gen_instance_throw_obj, 2, 4, gen_instance_throw)
#define MP_OBJ_IS_TYPE(o, t)
mp_obj_t mp_obj_new_exception(const mp_obj_type_t *exc_type)
mp_obj_t mp_generic_unary_op(mp_unary_op_t op, mp_obj_t o_in)
STATIC mp_obj_t gen_wrap_call(mp_obj_t self_in, size_t n_args, size_t n_kw, const mp_obj_t *args)
STATIC mp_obj_t gen_instance_iternext(mp_obj_t self_in)
const mp_obj_type_t mp_type_StopIteration
mp_obj_type_t * mp_obj_get_type(mp_const_obj_t o_in)
STATIC mp_obj_t gen_instance_throw(size_t n_args, const mp_obj_t *args)
#define MP_OBJ_FROM_PTR(p)
STATIC mp_obj_t gen_resume_and_raise(mp_obj_t self_in, mp_obj_t send_value, mp_obj_t throw_value)
mp_vm_return_kind_t mp_obj_gen_resume(mp_obj_t self_in, mp_obj_t send_value, mp_obj_t throw_value, mp_obj_t *ret_val)
mp_obj_t mp_obj_new_exception_args(const mp_obj_type_t *exc_type, size_t n_args, const mp_obj_t *args)
STATIC mp_obj_t gen_instance_close(mp_obj_t self_in)
struct _mp_obj_gen_wrap_t mp_obj_gen_wrap_t
bool mp_obj_is_subclass_fast(mp_const_obj_t object, mp_const_obj_t classinfo)
STATIC mp_obj_t gen_instance_send(mp_obj_t self_in, mp_obj_t send_value)
#define m_new_obj_var(obj_type, var_type, var_num)
STATIC void gen_instance_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind)
qstr mp_obj_fun_get_name(mp_const_obj_t fun)
#define mp_check_self(pred)
mp_uint_t mp_decode_uint_value(const byte *ptr)
const mp_obj_type_t mp_type_GeneratorExit
void mp_setup_code_state(mp_code_state_t *code_state, size_t n_args, size_t n_kw, const mp_obj_t *args)
STATIC MP_DEFINE_CONST_DICT(gen_instance_locals_dict, gen_instance_locals_dict_table)
const mp_obj_type_t mp_type_type
STATIC const mp_rom_map_elem_t gen_instance_locals_dict_table[]
mp_obj_t mp_obj_new_gen_wrap(mp_obj_t fun)
mp_obj_t mp_identity_getiter(mp_obj_t self, mp_obj_iter_buf_t *iter_buf)
mp_code_state_t code_state
mp_obj_t mp_obj_exception_get_value(mp_obj_t self_in)
STATIC MP_DEFINE_CONST_FUN_OBJ_2(gen_instance_send_obj, gen_instance_send)
#define MP_OBJ_STOP_ITERATION
STATIC MP_DEFINE_CONST_FUN_OBJ_1(gen_instance_close_obj, gen_instance_close)
const byte * mp_decode_uint_skip(const byte *ptr)
int mp_printf(const mp_print_t *print, const char *fmt,...)
NORETURN void mp_raise_TypeError(const char *msg)
struct _mp_obj_gen_instance_t mp_obj_gen_instance_t
const mp_obj_type_t mp_type_gen_instance
const mp_obj_type_t mp_type_RuntimeError
const struct _mp_obj_exception_t mp_const_GeneratorExit_obj