Ruby
2.0.0p247(2013-06-27revision41674)
|
Go to the source code of this file.
Definition at line 156 of file enumerator.c.
Definition at line 1103 of file enumerator.c.
#define yielder_free RUBY_TYPED_DEFAULT_FREE |
Definition at line 998 of file enumerator.c.
Definition at line 686 of file enumerator.c.
References args, Qnil, RARRAY_LEN, RARRAY_PTR, rb_ary_dup(), RB_TYPE_P, and T_ARRAY.
Referenced by enumerator_next(), and enumerator_peek().
Definition at line 1616 of file enumerator.c.
References id_next, and rb_funcall().
Referenced by lazy_zip_func().
Definition at line 1226 of file enumerator.c.
References id_size, Qnil, Qundef, and rb_check_funcall().
Referenced by enumerable_lazy(), and lazy_size().
static VALUE enumerable_lazy | ( | VALUE | obj | ) | [static] |
Definition at line 1376 of file enumerator.c.
References enum_size(), id_method, lazy_to_enum_i(), Qfalse, rb_ivar_set(), result, and sym_each.
Referenced by InitVM_Enumerator(), and lazy_super().
static VALUE enumerator_allocate | ( | VALUE | klass | ) | [static] |
Definition at line 257 of file enumerator.c.
References enumerator_data_type, enumerator::obj, Qundef, and TypedData_Make_Struct.
Referenced by InitVM_Enumerator(), lazy_to_enum_i(), and rb_enumeratorize_with_size().
static VALUE enumerator_block_call | ( | VALUE | obj, |
rb_block_call_func * | func, | ||
VALUE | arg | ||
) | [static] |
Definition at line 419 of file enumerator.c.
References enumerator::args, enumerator_ptr(), enumerator::meth, enumerator::obj, RARRAY_LENINT, RARRAY_PTR, and rb_block_call().
Referenced by enumerator_each(), enumerator_with_index(), and enumerator_with_object().
static VALUE enumerator_each | ( | int | argc, |
VALUE * | argv, | ||
VALUE | obj | ||
) | [static] |
Definition at line 442 of file enumerator.c.
References enumerator::args, args, enumerator_block_call(), enumerator_ptr(), enumerator::obj, rb_ary_cat(), rb_ary_dup(), rb_ary_new4(), rb_block_given_p(), and rb_obj_dup().
Referenced by InitVM_Enumerator().
static VALUE enumerator_each_with_index | ( | VALUE | obj | ) | [static] |
Definition at line 512 of file enumerator.c.
References enumerator_with_index(), and NULL.
Referenced by InitVM_Enumerator().
static VALUE enumerator_feed | ( | VALUE | obj, |
VALUE | v | ||
) | [static] |
Definition at line 837 of file enumerator.c.
References enumerator_ptr(), enumerator::feedvalue, Qnil, Qundef, rb_eTypeError, and rb_raise().
Referenced by InitVM_Enumerator().
static VALUE enumerator_init | ( | VALUE | enum_obj, |
VALUE | obj, | ||
VALUE | meth, | ||
int | argc, | ||
VALUE * | argv, | ||
VALUE(*)(ANYARGS) | size_fn, | ||
VALUE | size | ||
) | [static] |
Definition at line 269 of file enumerator.c.
References enumerator::args, enumerator::dst, enumerator_data_type, enumerator::feedvalue, enumerator::fib, enumerator::lookahead, enumerator::meth, enumerator::obj, Qfalse, Qnil, Qundef, rb_ary_new4(), rb_eArgError, rb_raise(), rb_to_id(), size, enumerator::size, enumerator::size_fn, enumerator::stop_exc, and TypedData_Get_Struct.
Referenced by enumerator_initialize(), lazy_initialize(), lazy_to_enum_i(), and rb_enumeratorize_with_size().
static VALUE enumerator_init_copy | ( | VALUE | obj, |
VALUE | orig | ||
) | [static] |
Definition at line 365 of file enumerator.c.
References enumerator::args, enumerator_data_type, enumerator_ptr(), enumerator::feedvalue, enumerator::fib, enumerator::lookahead, enumerator::meth, enumerator::obj, OBJ_INIT_COPY, Qundef, rb_eArgError, rb_eTypeError, rb_raise(), enumerator::size, enumerator::size_fn, and TypedData_Get_Struct.
Referenced by InitVM_Enumerator().
static VALUE enumerator_initialize | ( | int | argc, |
VALUE * | argv, | ||
VALUE | obj | ||
) | [static] |
Definition at line 332 of file enumerator.c.
References argc, enumerator_init(), generator_allocate(), generator_init(), INFINITY, NIL_P, Qnil, rb_block_given_p(), rb_block_proc(), rb_cGenerator, rb_check_arity, rb_obj_is_proc(), rb_to_int(), RB_TYPE_P, rb_warn(), RFLOAT_VALUE, size, sym_each, T_FLOAT, and UNLIMITED_ARGUMENTS.
Referenced by InitVM_Enumerator().
static VALUE enumerator_inspect | ( | VALUE | obj | ) | [static] |
Definition at line 955 of file enumerator.c.
References inspect_enumerator(), and rb_exec_recursive().
Referenced by InitVM_Enumerator().
static void enumerator_mark | ( | void * | p | ) | [static] |
Definition at line 143 of file enumerator.c.
References enumerator::args, enumerator::dst, enumerator::feedvalue, enumerator::fib, enumerator::lookahead, enumerator::obj, rb_gc_mark(), enumerator::size, and enumerator::stop_exc.
static size_t enumerator_memsize | ( | const void * | p | ) | [static] |
Definition at line 159 of file enumerator.c.
static VALUE enumerator_next | ( | VALUE | obj | ) | [static] |
Definition at line 728 of file enumerator.c.
References ary2sv(), and enumerator_next_values().
Referenced by InitVM_Enumerator().
static VALUE enumerator_next_values | ( | VALUE | obj | ) | [static] |
Definition at line 671 of file enumerator.c.
References enumerator_ptr(), get_next_values(), enumerator::lookahead, and Qundef.
Referenced by enumerator_next(), and InitVM_Enumerator().
static VALUE enumerator_peek | ( | VALUE | obj | ) | [static] |
Definition at line 802 of file enumerator.c.
References ary2sv(), and enumerator_peek_values().
Referenced by InitVM_Enumerator().
static VALUE enumerator_peek_values | ( | VALUE | obj | ) | [static] |
Definition at line 735 of file enumerator.c.
References enumerator_ptr(), get_next_values(), enumerator::lookahead, and Qundef.
Referenced by enumerator_peek(), and enumerator_peek_values_m().
static VALUE enumerator_peek_values_m | ( | VALUE | obj | ) | [static] |
Definition at line 774 of file enumerator.c.
References enumerator_peek_values(), and rb_ary_dup().
Referenced by InitVM_Enumerator().
static struct enumerator* enumerator_ptr | ( | VALUE | obj | ) | [static, read] |
Definition at line 174 of file enumerator.c.
References enumerator_data_type, enumerator::obj, Qundef, rb_eArgError, rb_raise(), and TypedData_Get_Struct.
Referenced by enumerator_block_call(), enumerator_each(), enumerator_feed(), enumerator_init_copy(), enumerator_next_values(), enumerator_peek_values(), enumerator_rewind(), enumerator_size(), lazy_set_method(), lazy_to_enum(), next_i(), next_ii(), and obj_to_enum().
static VALUE enumerator_rewind | ( | VALUE | obj | ) | [static] |
Definition at line 859 of file enumerator.c.
References enumerator::dst, enumerator_ptr(), enumerator::feedvalue, enumerator::fib, id_rewind, enumerator::lookahead, enumerator::obj, Qfalse, Qnil, Qundef, rb_check_funcall(), and enumerator::stop_exc.
Referenced by InitVM_Enumerator().
static VALUE enumerator_size | ( | VALUE | obj | ) | [static] |
Definition at line 972 of file enumerator.c.
References enumerator::args, enumerator_ptr(), enumerator::obj, Qnil, rb_obj_is_proc(), rb_proc_call(), rb_proc_call_with_block(), enumerator::size, and enumerator::size_fn.
Referenced by enumerator_with_index(), enumerator_with_object(), and InitVM_Enumerator().
static VALUE enumerator_with_index | ( | int | argc, |
VALUE * | argv, | ||
VALUE | obj | ||
) | [static] |
Definition at line 491 of file enumerator.c.
References enumerator_block_call(), enumerator_size(), enumerator_with_index_i(), NIL_P, NUM2LONG, rb_scan_args(), and RETURN_SIZED_ENUMERATOR.
Referenced by enumerator_each_with_index(), and InitVM_Enumerator().
static VALUE enumerator_with_index_i | ( | VALUE | val, |
VALUE | m, | ||
int | argc, | ||
VALUE * | argv | ||
) | [static] |
Definition at line 461 of file enumerator.c.
References INT2FIX, rb_ary_new4(), and rb_yield_values().
Referenced by enumerator_with_index().
static VALUE enumerator_with_object | ( | VALUE | obj, |
VALUE | memo | ||
) | [static] |
Definition at line 554 of file enumerator.c.
References enumerator_block_call(), enumerator_size(), enumerator_with_object_i(), and RETURN_SIZED_ENUMERATOR.
Referenced by InitVM_Enumerator().
static VALUE enumerator_with_object_i | ( | VALUE | val, |
VALUE | memo, | ||
int | argc, | ||
VALUE * | argv | ||
) | [static] |
Definition at line 518 of file enumerator.c.
References rb_ary_new4(), and rb_yield_values().
Referenced by enumerator_with_object().
static VALUE generator_allocate | ( | VALUE | klass | ) | [static] |
Definition at line 1134 of file enumerator.c.
References generator_data_type, generator::proc, Qundef, and TypedData_Make_Struct.
Referenced by enumerator_initialize(), InitVM_Enumerator(), and lazy_initialize().
static VALUE generator_each | ( | int | argc, |
VALUE * | argv, | ||
VALUE | obj | ||
) | [static] |
Definition at line 1211 of file enumerator.c.
References args, generator_ptr(), generator::proc, rb_ary_cat(), rb_ary_new2(), rb_ary_push(), rb_proc_call(), and yielder_new().
Referenced by InitVM_Enumerator().
static VALUE generator_init | ( | VALUE | obj, |
VALUE | proc | ||
) | [static] |
Definition at line 1146 of file enumerator.c.
References generator_data_type, generator::proc, rb_eArgError, rb_raise(), and TypedData_Get_Struct.
Referenced by enumerator_initialize(), and generator_initialize().
static VALUE generator_init_copy | ( | VALUE | obj, |
VALUE | orig | ||
) | [static] |
Definition at line 1190 of file enumerator.c.
References generator_data_type, generator_ptr(), OBJ_INIT_COPY, generator::proc, rb_eArgError, rb_raise(), and TypedData_Get_Struct.
Referenced by InitVM_Enumerator().
static VALUE generator_initialize | ( | int | argc, |
VALUE * | argv, | ||
VALUE | obj | ||
) | [static] |
Definition at line 1163 of file enumerator.c.
References generator_init(), generator::proc, rb_block_given_p(), rb_block_proc(), rb_eTypeError, rb_need_block(), rb_obj_classname(), rb_obj_is_proc(), rb_raise(), rb_scan_args(), and rb_warn().
Referenced by InitVM_Enumerator().
static void generator_mark | ( | void * | p | ) | [static] |
Definition at line 1097 of file enumerator.c.
References generator::proc, and rb_gc_mark().
static size_t generator_memsize | ( | const void * | p | ) | [static] |
Definition at line 1106 of file enumerator.c.
static struct generator* generator_ptr | ( | VALUE | obj | ) | [static, read] |
Definition at line 1121 of file enumerator.c.
References generator_data_type, generator::proc, Qundef, rb_eArgError, rb_raise(), and TypedData_Get_Struct.
Referenced by generator_each(), and generator_init_copy().
static VALUE get_next_values | ( | VALUE | obj, |
struct enumerator * | e | ||
) | [static] |
Definition at line 599 of file enumerator.c.
References enumerator::dst, enumerator::feedvalue, enumerator::fib, enumerator::lookahead, next_init(), Qnil, Qundef, rb_exc_raise(), rb_fiber_alive_p(), rb_fiber_current(), rb_fiber_resume(), and enumerator::stop_exc.
Referenced by enumerator_next_values(), and enumerator_peek_values().
void Init_Enumerator | ( | void | ) |
Definition at line 1982 of file enumerator.c.
References ID2SYM, id_arguments, id_call, id_each, id_eqq, id_force, id_initialize, id_lazy, id_memo, id_method, id_new, id_next, id_receiver, id_result, id_rewind, id_size, id_to_enum, id_yield, InitVM, rb_intern, sym_cycle, and sym_each.
void InitVM_Enumerator | ( | void | ) |
Definition at line 1910 of file enumerator.c.
References enumerable_lazy(), enumerator_allocate(), enumerator_each(), enumerator_each_with_index(), enumerator_feed(), enumerator_init_copy(), enumerator_initialize(), enumerator_inspect(), enumerator_next(), enumerator_next_values(), enumerator_peek(), enumerator_peek_values_m(), enumerator_rewind(), enumerator_size(), enumerator_with_index(), enumerator_with_object(), generator_allocate(), generator_each(), generator_init_copy(), generator_initialize(), lazy_drop(), lazy_drop_while(), lazy_flat_map(), lazy_grep(), lazy_initialize(), lazy_lazy(), lazy_map(), lazy_reject(), lazy_select(), lazy_super(), lazy_take(), lazy_take_while(), lazy_to_enum(), lazy_zip(), obj_to_enum(), rb_cEnumerator, rb_cGenerator, rb_cLazy, rb_cObject, rb_cYielder, rb_define_alias(), rb_define_alloc_func(), rb_define_class(), rb_define_class_under(), rb_define_method(), rb_eIndexError, rb_eStopIteration, rb_include_module(), rb_mEnumerable, rb_mKernel, rb_provide(), stop_result(), yielder_allocate(), yielder_initialize(), yielder_yield(), and yielder_yield_push().
static VALUE inspect_enumerator | ( | VALUE | obj, |
VALUE | dummy, | ||
int | recur | ||
) | [static] |
Definition at line 874 of file enumerator.c.
References enumerator::args, Check_Type, enumerator_data_type, id_arguments, id_method, id_receiver, enumerator::meth, NIL_P, enumerator::obj, OBJ_TAINT, OBJ_TAINTED, OBJ_UNTRUST, OBJ_UNTRUSTED, Qfalse, Qundef, RARRAY_LEN, RARRAY_PTR, rb_attr_get(), rb_id2name(), rb_inspect(), rb_obj_classname(), rb_sprintf(), rb_str_buf_cat2(), rb_str_concat(), SYM2ID, T_SYMBOL, TRUE, and TypedData_Get_Struct.
Referenced by enumerator_inspect().
Definition at line 1808 of file enumerator.c.
References id_new, lazy_drop_func(), lazy_drop_size(), lazy_set_method(), NUM2LONG, rb_ary_new3(), rb_block_call(), rb_cLazy, rb_eArgError, and rb_raise().
Referenced by InitVM_Enumerator().
static VALUE lazy_drop_func | ( | VALUE | val, |
VALUE | args, | ||
int | argc, | ||
VALUE * | argv | ||
) | [static] |
Definition at line 1791 of file enumerator.c.
References args, id_memo, id_yield, LONG2NUM, NIL_P, NUM2LONG, Qnil, rb_attr_get(), rb_funcall2(), and rb_ivar_set().
Referenced by lazy_drop().
static VALUE lazy_drop_size | ( | VALUE | generator, |
VALUE | args, | ||
VALUE | lazy | ||
) | [static] |
Definition at line 1777 of file enumerator.c.
References FIX2LONG, FIXNUM_P, id_arguments, lazy_size(), LONG2FIX, LONG2NUM, NIL_P, NUM2LONG, RARRAY_PTR, rb_funcall(), and rb_ivar_get().
Referenced by lazy_drop().
static VALUE lazy_drop_while | ( | VALUE | obj | ) | [static] |
Definition at line 1834 of file enumerator.c.
References id_new, lazy_drop_while_func(), lazy_set_method(), Qnil, rb_block_call(), rb_block_given_p(), rb_cLazy, rb_eArgError, and rb_raise().
Referenced by InitVM_Enumerator().
static VALUE lazy_drop_while_func | ( | VALUE | val, |
VALUE | args, | ||
int | argc, | ||
VALUE * | argv | ||
) | [static] |
Definition at line 1821 of file enumerator.c.
References id_memo, id_yield, NIL_P, Qnil, Qtrue, rb_attr_get(), rb_funcall2(), rb_ivar_set(), rb_yield_values2(), and RTEST.
Referenced by lazy_drop_while().
static VALUE lazy_flat_map | ( | VALUE | obj | ) | [static] |
Definition at line 1524 of file enumerator.c.
References id_new, lazy_flat_map_func(), lazy_set_method(), Qnil, rb_block_call(), rb_block_given_p(), rb_cLazy, rb_eArgError, and rb_raise().
Referenced by InitVM_Enumerator().
static VALUE lazy_flat_map_each | ( | VALUE | obj, |
VALUE | yielder | ||
) | [static] |
Definition at line 1458 of file enumerator.c.
References id_each, lazy_flat_map_i(), Qnil, and rb_block_call().
Referenced by lazy_flat_map_func().
static VALUE lazy_flat_map_func | ( | VALUE | val, |
VALUE | m, | ||
int | argc, | ||
VALUE * | argv | ||
) | [static] |
Definition at line 1481 of file enumerator.c.
References id_each, id_force, id_yield, lazy_flat_map_each(), lazy_flat_map_to_ary(), Qnil, RARRAY_LEN, RARRAY_PTR, rb_funcall(), rb_respond_to(), RB_TYPE_P, rb_yield_values2(), result, and T_ARRAY.
Referenced by lazy_flat_map().
static VALUE lazy_flat_map_i | ( | VALUE | i, |
VALUE | yielder, | ||
int | argc, | ||
VALUE * | argv | ||
) | [static] |
Definition at line 1452 of file enumerator.c.
References id_yield, and rb_funcall2().
Referenced by lazy_flat_map_each().
static VALUE lazy_flat_map_to_ary | ( | VALUE | obj, |
VALUE | yielder | ||
) | [static] |
Definition at line 1465 of file enumerator.c.
References id_yield, NIL_P, Qnil, RARRAY_LEN, RARRAY_PTR, rb_check_array_type(), and rb_funcall().
Referenced by lazy_flat_map_func().
Definition at line 1606 of file enumerator.c.
References id_new, lazy_grep_func(), lazy_grep_iter(), lazy_set_method(), rb_ary_new3(), rb_block_call(), rb_block_given_p(), and rb_cLazy.
Referenced by InitVM_Enumerator().
static VALUE lazy_grep_func | ( | VALUE | val, |
VALUE | m, | ||
int | argc, | ||
VALUE * | argv | ||
) | [static] |
Definition at line 1582 of file enumerator.c.
References id_eqq, id_yield, Qnil, rb_enum_values_pack(), rb_funcall(), result, and RTEST.
Referenced by lazy_grep().
static VALUE lazy_grep_iter | ( | VALUE | val, |
VALUE | m, | ||
int | argc, | ||
VALUE * | argv | ||
) | [static] |
Definition at line 1594 of file enumerator.c.
References id_eqq, id_yield, Qnil, rb_enum_values_pack(), rb_funcall(), rb_yield(), result, and RTEST.
Referenced by lazy_grep().
static VALUE lazy_init_block_i | ( | VALUE | val, |
VALUE | m, | ||
int | argc, | ||
VALUE * | argv | ||
) | [static] |
Definition at line 1271 of file enumerator.c.
References id_each, lazy_init_iterator(), Qnil, and rb_block_call().
Referenced by lazy_initialize().
static VALUE lazy_init_iterator | ( | VALUE | val, |
VALUE | m, | ||
int | argc, | ||
VALUE * | argv | ||
) | [static] |
Definition at line 1245 of file enumerator.c.
References args, Qnil, Qundef, RARRAY_PTR, rb_ary_cat(), rb_ary_push(), rb_ary_tmp_new(), RB_GC_GUARD, rb_iter_break(), rb_long2int, rb_yield_values2(), and result.
Referenced by lazy_init_block_i().
static VALUE lazy_initialize | ( | int | argc, |
VALUE * | argv, | ||
VALUE | self | ||
) | [static] |
Definition at line 1306 of file enumerator.c.
References enumerator_init(), generator_allocate(), id_initialize, id_receiver, lazy_init_block_i(), Qnil, rb_block_call(), rb_block_given_p(), rb_cGenerator, rb_check_arity, rb_eArgError, rb_ivar_set(), rb_raise(), size, and sym_each.
Referenced by InitVM_Enumerator().
Definition at line 1851 of file enumerator.c.
References enumerator::obj.
Referenced by InitVM_Enumerator().
Definition at line 1440 of file enumerator.c.
References id_new, lazy_map_func(), lazy_receiver_size(), lazy_set_method(), Qnil, rb_block_call(), rb_block_given_p(), rb_cLazy, rb_eArgError, and rb_raise().
Referenced by InitVM_Enumerator().
static VALUE lazy_map_func | ( | VALUE | val, |
VALUE | m, | ||
int | argc, | ||
VALUE * | argv | ||
) | [static] |
Definition at line 1431 of file enumerator.c.
References id_yield, Qnil, rb_funcall(), rb_yield_values2(), and result.
Referenced by lazy_map().
static VALUE lazy_receiver_size | ( | VALUE | generator, |
VALUE | args, | ||
VALUE | lazy | ||
) | [static] |
Definition at line 1239 of file enumerator.c.
References lazy_size().
Referenced by lazy_map(), and lazy_zip().
static VALUE lazy_reject | ( | VALUE | obj | ) | [static] |
Definition at line 1570 of file enumerator.c.
References id_new, lazy_reject_func(), lazy_set_method(), Qnil, rb_block_call(), rb_block_given_p(), rb_cLazy, rb_eArgError, and rb_raise().
Referenced by InitVM_Enumerator().
static VALUE lazy_reject_func | ( | VALUE | val, |
VALUE | m, | ||
int | argc, | ||
VALUE * | argv | ||
) | [static] |
Definition at line 1559 of file enumerator.c.
References id_yield, Qnil, rb_enum_values_pack(), rb_funcall(), rb_yield(), and RTEST.
Referenced by lazy_reject().
static VALUE lazy_select | ( | VALUE | obj | ) | [static] |
Definition at line 1547 of file enumerator.c.
References id_new, lazy_select_func(), lazy_set_method(), Qnil, rb_block_call(), rb_block_given_p(), rb_cLazy, rb_eArgError, and rb_raise().
Referenced by InitVM_Enumerator().
static VALUE lazy_select_func | ( | VALUE | val, |
VALUE | m, | ||
int | argc, | ||
VALUE * | argv | ||
) | [static] |
Definition at line 1536 of file enumerator.c.
References id_yield, Qnil, rb_enum_values_pack(), rb_funcall(), rb_yield(), and RTEST.
Referenced by lazy_select().
Definition at line 1328 of file enumerator.c.
References enumerator_ptr(), ID2SYM, id_arguments, id_method, NIL_P, Qfalse, rb_frame_this_func(), rb_ivar_set(), and enumerator::size_fn.
Referenced by lazy_drop(), lazy_drop_while(), lazy_flat_map(), lazy_grep(), lazy_map(), lazy_reject(), lazy_select(), lazy_take(), lazy_take_while(), and lazy_zip().
Definition at line 1233 of file enumerator.c.
References enum_size(), id_receiver, and rb_ivar_get().
Referenced by lazy_drop_size(), lazy_receiver_size(), and lazy_take_size().
static VALUE lazy_super | ( | int | argc, |
VALUE * | argv, | ||
VALUE | lazy | ||
) | [static] |
Definition at line 1845 of file enumerator.c.
References enumerable_lazy(), and rb_call_super().
Referenced by InitVM_Enumerator().
Definition at line 1737 of file enumerator.c.
References id_new, INT2NUM, lazy_set_method(), lazy_take_func(), lazy_take_size(), lazy_to_enum_i(), NUM2LONG, rb_ary_new3(), rb_block_call(), rb_cLazy, rb_eArgError, rb_raise(), and sym_cycle.
Referenced by InitVM_Enumerator().
static VALUE lazy_take_func | ( | VALUE | val, |
VALUE | args, | ||
int | argc, | ||
VALUE * | argv | ||
) | [static] |
Definition at line 1708 of file enumerator.c.
References args, id_memo, id_yield, LONG2NUM, NIL_P, NUM2LONG, Qnil, Qundef, rb_attr_get(), rb_funcall2(), and rb_ivar_set().
Referenced by lazy_take().
static VALUE lazy_take_size | ( | VALUE | generator, |
VALUE | args, | ||
VALUE | lazy | ||
) | [static] |
Definition at line 1727 of file enumerator.c.
References FIX2LONG, FIXNUM_P, id_arguments, lazy_size(), LONG2NUM, NIL_P, NUM2LONG, RARRAY_PTR, and rb_ivar_get().
Referenced by lazy_take().
static VALUE lazy_take_while | ( | VALUE | obj | ) | [static] |
Definition at line 1766 of file enumerator.c.
References id_new, lazy_set_method(), lazy_take_while_func(), Qnil, rb_block_call(), rb_block_given_p(), rb_cLazy, rb_eArgError, and rb_raise().
Referenced by InitVM_Enumerator().
static VALUE lazy_take_while_func | ( | VALUE | val, |
VALUE | args, | ||
int | argc, | ||
VALUE * | argv | ||
) | [static] |
Definition at line 1757 of file enumerator.c.
References id_yield, Qnil, Qundef, rb_funcall2(), rb_yield_values2(), result, and RTEST.
Referenced by lazy_take_while().
static VALUE lazy_to_enum | ( | int | argc, |
VALUE * | argv, | ||
VALUE | self | ||
) | [static] |
Definition at line 1415 of file enumerator.c.
References argc, enumerator_ptr(), lazy_to_enum_i(), rb_block_given_p(), rb_block_proc(), enumerator::size, and sym_each.
Referenced by InitVM_Enumerator().
static VALUE lazy_to_enum_i | ( | VALUE | self, |
VALUE | meth, | ||
int | argc, | ||
VALUE * | argv, | ||
VALUE(*)(ANYARGS) | size_fn | ||
) | [static] |
Definition at line 1385 of file enumerator.c.
References enumerator_allocate(), enumerator_init(), Qnil, rb_cLazy, and enumerator::size_fn.
Referenced by enumerable_lazy(), lazy_take(), lazy_to_enum(), and rb_enumeratorize_with_size().
Definition at line 1675 of file enumerator.c.
References argc, func, id_each, id_new, lazy_receiver_size(), lazy_set_method(), lazy_zip_arrays_func(), lazy_zip_func(), NIL_P, rb_ary_new2(), rb_ary_new4(), rb_ary_push(), rb_block_call(), rb_block_given_p(), rb_call_super(), rb_check_array_type(), rb_cLazy, rb_eTypeError, rb_obj_classname(), rb_raise(), and rb_respond_to().
Referenced by InitVM_Enumerator().
static VALUE lazy_zip_arrays_func | ( | VALUE | val, |
VALUE | arrays, | ||
int | argc, | ||
VALUE * | argv | ||
) | [static] |
Definition at line 1628 of file enumerator.c.
References count, id_memo, id_yield, LONG2NUM, NIL_P, NUM2LONG, Qnil, RARRAY_LEN, RARRAY_PTR, rb_ary_entry(), rb_ary_new2(), rb_ary_push(), rb_attr_get(), rb_funcall(), and rb_ivar_set().
Referenced by lazy_zip().
static VALUE lazy_zip_func | ( | VALUE | val, |
VALUE | zip_args, | ||
int | argc, | ||
VALUE * | argv | ||
) | [static] |
Definition at line 1648 of file enumerator.c.
References call_next(), id_memo, id_to_enum, id_yield, next_stopped(), NIL_P, Qnil, RARRAY_LEN, RARRAY_PTR, rb_ary_new2(), rb_ary_push(), rb_attr_get(), rb_eStopIteration, rb_funcall(), rb_ivar_set(), and rb_rescue2().
Referenced by lazy_zip().
Definition at line 577 of file enumerator.c.
References enumerator_ptr(), id_each, id_result, next_ii(), Qnil, rb_block_call(), rb_eStopIteration, rb_exc_new2(), rb_fiber_yield(), rb_ivar_set(), result, and enumerator::stop_exc.
Referenced by next_init().
Definition at line 563 of file enumerator.c.
References args, enumerator_ptr(), enumerator::feedvalue, Qnil, Qundef, rb_ary_new4(), and rb_fiber_yield().
Referenced by next_i().
static void next_init | ( | VALUE | obj, |
struct enumerator * | e | ||
) | [static] |
Definition at line 590 of file enumerator.c.
References enumerator::dst, enumerator::fib, enumerator::lookahead, next_i(), Qundef, rb_fiber_current(), and rb_fiber_new().
Referenced by get_next_values().
static VALUE next_stopped | ( | VALUE | obj | ) | [static] |
static VALUE obj_to_enum | ( | int | argc, |
VALUE * | argv, | ||
VALUE | obj | ||
) | [static] |
Definition at line 241 of file enumerator.c.
References argc, enumerator_ptr(), enumerator::meth, rb_block_given_p(), rb_block_proc(), rb_enumeratorize_with_size(), enumerator::size, and sym_each.
Referenced by InitVM_Enumerator().
VALUE rb_enumeratorize | ( | VALUE | obj, |
VALUE | meth, | ||
int | argc, | ||
VALUE * | argv | ||
) |
Definition at line 398 of file enumerator.c.
References rb_enumeratorize_with_size().
Referenced by argf_bytes(), argf_chars(), argf_codepoints(), argf_lines(), rb_gzreader_bytes(), rb_gzreader_lines(), rb_io_bytes(), rb_io_chars(), rb_io_codepoints(), rb_io_lines(), strio_bytes(), strio_chars(), strio_codepoints(), and strio_lines().
VALUE rb_enumeratorize_with_size | ( | VALUE | obj, |
VALUE | meth, | ||
int | argc, | ||
VALUE * | argv, | ||
VALUE(*)(ANYARGS) | size_fn | ||
) |
Definition at line 407 of file enumerator.c.
References enumerator_allocate(), enumerator_init(), lazy_to_enum_i(), Qnil, rb_cEnumerator, rb_cLazy, rb_obj_is_kind_of(), RTEST, and enumerator::size_fn.
Referenced by obj_to_enum(), and rb_enumeratorize().
static VALUE stop_result | ( | VALUE | self | ) | [static] |
Definition at line 1904 of file enumerator.c.
References id_result, and rb_attr_get().
Referenced by InitVM_Enumerator().
static VALUE yielder_allocate | ( | VALUE | klass | ) | [static] |
Definition at line 1029 of file enumerator.c.
References yielder::proc, Qundef, TypedData_Make_Struct, and yielder_data_type.
Referenced by InitVM_Enumerator(), and yielder_new().
static VALUE yielder_init | ( | VALUE | obj, |
VALUE | proc | ||
) | [static] |
Definition at line 1041 of file enumerator.c.
References yielder::proc, rb_eArgError, rb_raise(), TypedData_Get_Struct, and yielder_data_type.
Referenced by yielder_initialize(), and yielder_new().
static VALUE yielder_initialize | ( | VALUE | obj | ) | [static] |
Definition at line 1058 of file enumerator.c.
References rb_block_proc(), rb_need_block(), and yielder_init().
Referenced by InitVM_Enumerator().
static void yielder_mark | ( | void * | p | ) | [static] |
Definition at line 992 of file enumerator.c.
References yielder::proc, and rb_gc_mark().
static size_t yielder_memsize | ( | const void * | p | ) | [static] |
Definition at line 1001 of file enumerator.c.
static VALUE yielder_new | ( | void | ) | [static] |
Definition at line 1088 of file enumerator.c.
References rb_cYielder, rb_proc_new(), yielder_allocate(), yielder_init(), and yielder_yield_i().
Referenced by generator_each().
static struct yielder* yielder_ptr | ( | VALUE | obj | ) | [static, read] |
Definition at line 1016 of file enumerator.c.
References yielder::proc, Qundef, rb_eArgError, rb_raise(), TypedData_Get_Struct, and yielder_data_type.
Referenced by yielder_yield().
static VALUE yielder_yield | ( | VALUE | obj, |
VALUE | args | ||
) | [static] |
Definition at line 1067 of file enumerator.c.
References yielder::proc, rb_proc_call(), and yielder_ptr().
Referenced by InitVM_Enumerator(), and yielder_yield_push().
static VALUE yielder_yield_i | ( | VALUE | obj, |
VALUE | memo, | ||
int | argc, | ||
VALUE * | argv | ||
) | [static] |
Definition at line 1082 of file enumerator.c.
References rb_yield_values2().
Referenced by yielder_new().
static VALUE yielder_yield_push | ( | VALUE | obj, |
VALUE | args | ||
) | [static] |
Definition at line 1075 of file enumerator.c.
References yielder_yield().
Referenced by InitVM_Enumerator().
const rb_data_type_t enumerator_data_type [static] |
{ "enumerator", { enumerator_mark, enumerator_free, enumerator_memsize, }, }
Definition at line 164 of file enumerator.c.
Referenced by enumerator_allocate(), enumerator_init(), enumerator_init_copy(), enumerator_ptr(), and inspect_enumerator().
const rb_data_type_t generator_data_type [static] |
{ "generator", { generator_mark, generator_free, generator_memsize, }, }
Definition at line 1111 of file enumerator.c.
Referenced by generator_allocate(), generator_init(), generator_init_copy(), and generator_ptr().
ID id_arguments [static] |
Definition at line 108 of file enumerator.c.
Referenced by Init_Enumerator(), inspect_enumerator(), lazy_drop_size(), lazy_set_method(), and lazy_take_size().
Definition at line 107 of file enumerator.c.
Referenced by Init_Enumerator().
Definition at line 107 of file enumerator.c.
Referenced by Init_Enumerator(), lazy_flat_map_each(), lazy_flat_map_func(), lazy_init_block_i(), lazy_zip(), and next_i().
Definition at line 108 of file enumerator.c.
Referenced by Init_Enumerator(), lazy_grep_func(), and lazy_grep_iter().
Definition at line 108 of file enumerator.c.
Referenced by Init_Enumerator(), and lazy_flat_map_func().
ID id_initialize [static] |
Definition at line 107 of file enumerator.c.
Referenced by Init_Enumerator(), and lazy_initialize().
Definition at line 108 of file enumerator.c.
Referenced by Init_Enumerator().
Definition at line 108 of file enumerator.c.
Referenced by Init_Enumerator(), lazy_drop_func(), lazy_drop_while_func(), lazy_take_func(), lazy_zip_arrays_func(), and lazy_zip_func().
Definition at line 108 of file enumerator.c.
Referenced by enumerable_lazy(), Init_Enumerator(), inspect_enumerator(), and lazy_set_method().
Definition at line 107 of file enumerator.c.
Referenced by Init_Enumerator(), lazy_drop(), lazy_drop_while(), lazy_flat_map(), lazy_grep(), lazy_map(), lazy_reject(), lazy_select(), lazy_take(), lazy_take_while(), and lazy_zip().
Definition at line 108 of file enumerator.c.
Referenced by call_next(), and Init_Enumerator().
ID id_receiver [static] |
Definition at line 108 of file enumerator.c.
Referenced by Init_Enumerator(), inspect_enumerator(), lazy_initialize(), and lazy_size().
Definition at line 108 of file enumerator.c.
Referenced by Init_Enumerator(), next_i(), and stop_result().
Definition at line 107 of file enumerator.c.
Referenced by enumerator_rewind(), and Init_Enumerator().
Definition at line 107 of file enumerator.c.
Referenced by enum_size(), and Init_Enumerator().
ID id_to_enum [static] |
Definition at line 107 of file enumerator.c.
Referenced by Init_Enumerator(), and lazy_zip_func().
Definition at line 107 of file enumerator.c.
Referenced by Init_Enumerator(), lazy_drop_func(), lazy_drop_while_func(), lazy_flat_map_func(), lazy_flat_map_i(), lazy_flat_map_to_ary(), lazy_grep_func(), lazy_grep_iter(), lazy_map_func(), lazy_reject_func(), lazy_select_func(), lazy_take_func(), lazy_take_while_func(), lazy_zip_arrays_func(), and lazy_zip_func().
Definition at line 105 of file enumerator.c.
Referenced by enum_chunk(), enum_slice_before(), InitVM_Enumerator(), and rb_enumeratorize_with_size().
VALUE rb_cGenerator [static] |
Definition at line 126 of file enumerator.c.
Referenced by enumerator_initialize(), InitVM_Enumerator(), and lazy_initialize().
Definition at line 106 of file enumerator.c.
Referenced by InitVM_Enumerator(), lazy_drop(), lazy_drop_while(), lazy_flat_map(), lazy_grep(), lazy_map(), lazy_reject(), lazy_select(), lazy_take(), lazy_take_while(), lazy_to_enum_i(), lazy_zip(), and rb_enumeratorize_with_size().
VALUE rb_cYielder [static] |
Definition at line 126 of file enumerator.c.
Referenced by InitVM_Enumerator(), and yielder_new().
Definition at line 111 of file enumerator.c.
Referenced by InitVM_Enumerator(), lazy_zip_func(), next_i(), rb_f_loop(), and zip_i().
Definition at line 109 of file enumerator.c.
Referenced by Init_Enumerator(), and lazy_take().
Definition at line 109 of file enumerator.c.
Referenced by enumerable_lazy(), enumerator_initialize(), Init_Enumerator(), lazy_initialize(), lazy_to_enum(), and obj_to_enum().
const rb_data_type_t yielder_data_type [static] |
{ "yielder", { yielder_mark, yielder_free, yielder_memsize, }, }
Definition at line 1006 of file enumerator.c.
Referenced by yielder_allocate(), yielder_init(), and yielder_ptr().