Ruby
2.4.2p198(2017-09-14revision59899)
|
#include "internal.h"
Go to the source code of this file.
Data Structures | |
struct | enumerator |
struct | generator |
struct | yielder |
struct | lazyenum_funcs |
struct | proc_entry |
Macros | |
#define | enumerator_free RUBY_TYPED_DEFAULT_FREE |
#define | proc_entry_free RUBY_TYPED_DEFAULT_FREE |
#define | yielder_free RUBY_TYPED_DEFAULT_FREE |
#define | generator_free RUBY_TYPED_DEFAULT_FREE |
#define | memo_value v2 |
#define | memo_flags u3.state |
#define | LAZY_MEMO_BREAK 1 |
#define | LAZY_MEMO_PACKED 2 |
#define | LAZY_MEMO_BREAK_P(memo) ((memo)->memo_flags & LAZY_MEMO_BREAK) |
#define | LAZY_MEMO_PACKED_P(memo) ((memo)->memo_flags & LAZY_MEMO_PACKED) |
#define | LAZY_MEMO_SET_BREAK(memo) ((memo)->memo_flags |= LAZY_MEMO_BREAK) |
#define | LAZY_MEMO_SET_VALUE(memo, value) MEMO_V2_SET(memo, value) |
#define | LAZY_MEMO_SET_PACKED(memo) ((memo)->memo_flags |= LAZY_MEMO_PACKED) |
#define | LAZY_MEMO_RESET_PACKED(memo) ((memo)->memo_flags &= ~LAZY_MEMO_PACKED) |
Typedefs | |
typedef struct MEMO * | lazyenum_proc_func(VALUE, struct MEMO *, VALUE, long) |
typedef VALUE | lazyenum_size_func(VALUE, VALUE) |
#define enumerator_free RUBY_TYPED_DEFAULT_FREE |
Definition at line 170 of file enumerator.c.
#define generator_free RUBY_TYPED_DEFAULT_FREE |
Definition at line 1261 of file enumerator.c.
#define LAZY_MEMO_BREAK 1 |
Definition at line 1445 of file enumerator.c.
#define LAZY_MEMO_BREAK_P | ( | memo | ) | ((memo)->memo_flags & LAZY_MEMO_BREAK) |
Definition at line 1447 of file enumerator.c.
Referenced by lazy_init_yielder().
#define LAZY_MEMO_PACKED 2 |
Definition at line 1446 of file enumerator.c.
Referenced by lazy_init_yielder().
#define LAZY_MEMO_PACKED_P | ( | memo | ) | ((memo)->memo_flags & LAZY_MEMO_PACKED) |
Definition at line 1448 of file enumerator.c.
Referenced by lazyenum_yield_values().
#define LAZY_MEMO_RESET_PACKED | ( | memo | ) | ((memo)->memo_flags &= ~LAZY_MEMO_PACKED) |
Definition at line 1452 of file enumerator.c.
Referenced by lazy_grep_iter_proc(), and lazy_map_proc().
#define LAZY_MEMO_SET_BREAK | ( | memo | ) | ((memo)->memo_flags |= LAZY_MEMO_BREAK) |
Definition at line 1449 of file enumerator.c.
Referenced by lazy_take_proc(), and lazy_take_while_proc().
#define LAZY_MEMO_SET_PACKED | ( | memo | ) | ((memo)->memo_flags |= LAZY_MEMO_PACKED) |
Definition at line 1451 of file enumerator.c.
#define LAZY_MEMO_SET_VALUE | ( | memo, | |
value | |||
) | MEMO_V2_SET(memo, value) |
Definition at line 1450 of file enumerator.c.
Referenced by lazy_grep_iter_proc(), and lazy_map_proc().
#define memo_flags u3.state |
Definition at line 1444 of file enumerator.c.
#define memo_value v2 |
Definition at line 1443 of file enumerator.c.
#define proc_entry_free RUBY_TYPED_DEFAULT_FREE |
Definition at line 208 of file enumerator.c.
#define yielder_free RUBY_TYPED_DEFAULT_FREE |
Definition at line 1153 of file enumerator.c.
Definition at line 136 of file enumerator.c.
Definition at line 137 of file enumerator.c.
Definition at line 1041 of file enumerator.c.
References Check_Type, id_arguments, id_method, NIL_P, OBJ_INFECT, Qfalse, RARRAY_CONST_PTR, RARRAY_LEN, rb_attr_get(), rb_id2str, rb_inspect(), rb_str_append(), rb_str_buf_append(), rb_str_buf_cat2(), rb_sym2str, and T_SYMBOL.
Referenced by enumerator_rewind(), and inspect_enumerator().
Definition at line 779 of file enumerator.c.
References enumerator::args, Qnil, RARRAY_AREF, RARRAY_LEN, rb_ary_dup(), RB_TYPE_P, and T_ARRAY.
Referenced by enumerator_next(), and enumerator_peek().
Definition at line 1975 of file enumerator.c.
References id_next, and rb_funcall().
Referenced by lazy_zip_func().
Definition at line 1386 of file enumerator.c.
References id_size, Qnil, Qundef, and rb_check_funcall().
Referenced by lazy_size(), and lazyenum_size().
Definition at line 1668 of file enumerator.c.
References id_method, lazy_to_enum_i(), lazyenum_size(), Qfalse, rb_ivar_set(), result, and sym_each.
Referenced by InitVM_Enumerator(), and lazy_super().
Definition at line 307 of file enumerator.c.
References enumerator::obj, Qundef, and TypedData_Make_Struct.
Referenced by InitVM_Enumerator(), lazy_add_method(), lazy_to_enum_i(), and rb_enumeratorize_with_size().
|
static |
Definition at line 471 of file enumerator.c.
References enumerator::args, enumerator_ptr(), enumerator::meth, enumerator::obj, RARRAY_CONST_PTR, RARRAY_LENINT, and rb_block_call().
Referenced by enumerator_each(), enumerator_with_index(), and enumerator_with_object().
Definition at line 522 of file enumerator.c.
References enumerator::args, enumerator_block_call(), enumerator_ptr(), enumerator::obj, RARRAY_LEN, rb_ary_cat(), rb_ary_dup(), rb_ary_new4, rb_block_given_p(), rb_long2int, and rb_obj_dup().
Referenced by InitVM_Enumerator().
Definition at line 603 of file enumerator.c.
References enumerator_with_index(), and NULL.
Referenced by InitVM_Enumerator().
Definition at line 561 of file enumerator.c.
References enumerator_size().
Referenced by enumerator_with_index(), and enumerator_with_object().
Definition at line 948 of file enumerator.c.
References enumerator_ptr(), enumerator::feedvalue, Qnil, Qundef, rb_eTypeError, and rb_raise().
Referenced by InitVM_Enumerator().
|
static |
Definition at line 319 of file enumerator.c.
References enumerator::args, enumerator::dst, enumerator::feedvalue, enumerator::fib, enumerator::lookahead, enumerator::meth, enumerator::obj, Qfalse, Qnil, Qundef, rb_ary_new4, rb_check_frozen, rb_eArgError, rb_raise(), rb_to_id(), 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().
Definition at line 417 of file enumerator.c.
References enumerator::args, 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(), and lazy_add_method().
Definition at line 383 of file enumerator.c.
References argc, enumerator_init(), generator_allocate(), generator_init(), id_call, INFINITY, enumerator::meth, NIL_P, Qnil, rb_block_given_p(), rb_block_proc(), rb_cGenerator, rb_check_arity, rb_respond_to(), rb_to_int(), RB_TYPE_P, rb_warn(), RFLOAT_VALUE, enumerator::size, sym_each, T_FLOAT, and UNLIMITED_ARGUMENTS.
Referenced by InitVM_Enumerator().
Definition at line 1090 of file enumerator.c.
References inspect_enumerator(), and rb_exec_recursive().
Referenced by InitVM_Enumerator().
|
static |
Definition at line 156 of file enumerator.c.
References enumerator::args, enumerator::dst, enumerator::feedvalue, enumerator::fib, enumerator::lookahead, enumerator::obj, enumerator::procs, rb_gc_mark(), enumerator::size, and enumerator::stop_exc.
|
static |
Definition at line 173 of file enumerator.c.
Definition at line 821 of file enumerator.c.
References ary2sv(), and enumerator_next_values().
Referenced by InitVM_Enumerator().
Definition at line 764 of file enumerator.c.
References enumerator_ptr(), get_next_values(), enumerator::lookahead, and Qundef.
Referenced by enumerator_next(), and InitVM_Enumerator().
Definition at line 895 of file enumerator.c.
References ary2sv(), and enumerator_peek_values().
Referenced by InitVM_Enumerator().
Definition at line 828 of file enumerator.c.
References enumerator_ptr(), get_next_values(), enumerator::lookahead, and Qundef.
Referenced by enumerator_peek(), and enumerator_peek_values_m().
Definition at line 867 of file enumerator.c.
References enumerator_peek_values(), and rb_ary_dup().
Referenced by InitVM_Enumerator().
|
static |
Definition at line 189 of file enumerator.c.
References 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_add_method(), lazy_generator_init(), lazy_set_method(), lazy_to_enum(), next_i(), next_ii(), and obj_to_enum().
Definition at line 970 of file enumerator.c.
References append_method(), enumerator::dst, enumerator_ptr(), enumerator::feedvalue, enumerator::fib, generator_ptr(), id_rewind, enumerator::lookahead, enumerator::obj, Qfalse, Qnil, Qundef, rb_check_funcall(), and enumerator::stop_exc.
Referenced by InitVM_Enumerator().
Definition at line 1107 of file enumerator.c.
References enumerator::args, enumerator_ptr(), proc_entry::fn, generator_ptr(), id_call, id_size, NULL, enumerator::obj, generator::obj, generator::proc, proc_entry::proc, proc_entry_ptr(), enumerator::procs, Qnil, Qundef, RARRAY_AREF, RARRAY_CONST_PTR, RARRAY_LEN, rb_check_funcall(), enumerator::size, lazyenum_funcs::size, and enumerator::size_fn.
Referenced by enumerator_enum_size(), and enumerator_with_index_i().
Definition at line 579 of file enumerator.c.
References enumerator_block_call(), enumerator_enum_size(), enumerator_with_index_i(), INT2FIX, MEMO_NEW, NIL_P, rb_scan_args(), rb_to_int(), and RETURN_SIZED_ENUMERATOR.
Referenced by enumerator_each_with_index(), and InitVM_Enumerator().
|
static |
Definition at line 545 of file enumerator.c.
References enumerator_size(), MEMO_V1_SET, enumerator::obj, rb_ary_new4, rb_int_succ(), rb_yield_values(), MEMO::v1, and val.
Referenced by enumerator_with_index().
Definition at line 647 of file enumerator.c.
References enumerator_block_call(), enumerator_enum_size(), enumerator_with_object_i(), and RETURN_SIZED_ENUMERATOR.
Referenced by InitVM_Enumerator().
|
static |
Definition at line 609 of file enumerator.c.
References rb_ary_new4, rb_yield_values(), and val.
Referenced by enumerator_with_object().
Definition at line 1293 of file enumerator.c.
References enumerator::obj, generator::proc, Qundef, and TypedData_Make_Struct.
Referenced by enumerator_initialize(), InitVM_Enumerator(), lazy_generator_init(), and lazy_initialize().
Definition at line 1371 of file enumerator.c.
References enumerator::args, generator_ptr(), generator::proc, rb_ary_cat(), rb_ary_new2, rb_ary_push(), rb_proc_call(), and yielder_new().
Referenced by InitVM_Enumerator().
Definition at line 1305 of file enumerator.c.
References enumerator::obj, generator::proc, rb_check_frozen, rb_eArgError, rb_raise(), and TypedData_Get_Struct.
Referenced by enumerator_initialize(), and generator_initialize().
Definition at line 1350 of file enumerator.c.
References generator_ptr(), enumerator::obj, OBJ_INIT_COPY, generator::proc, rb_eArgError, rb_raise(), and TypedData_Get_Struct.
Referenced by InitVM_Enumerator().
Definition at line 1323 of file enumerator.c.
References generator_init(), PRIsVALUE, generator::proc, rb_block_given_p(), rb_block_proc(), rb_eTypeError, rb_need_block(), rb_obj_class(), rb_obj_is_proc(), rb_raise(), rb_scan_args(), and rb_warn().
Referenced by InitVM_Enumerator().
|
static |
Definition at line 1254 of file enumerator.c.
References generator::obj, generator::proc, and rb_gc_mark().
|
static |
Definition at line 1264 of file enumerator.c.
Definition at line 1280 of file enumerator.c.
References generator::proc, Qundef, rb_eArgError, rb_raise(), and TypedData_Get_Struct.
Referenced by enumerator_rewind(), enumerator_size(), generator_each(), generator_init_copy(), inspect_enumerator(), and lazy_generator_init().
|
static |
Definition at line 692 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 2414 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 2336 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_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_grep_v(), lazy_initialize(), lazy_lazy(), lazy_map(), lazy_reject(), lazy_select(), lazy_super(), lazy_take(), lazy_take_while(), lazy_to_enum(), lazy_uniq(), 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().
Definition at line 988 of file enumerator.c.
References append_method(), enumerator::args, generator_ptr(), id_receiver, enumerator::meth, NIL_P, enumerator::obj, generator::obj, OBJ_TAINT, PRIsVALUE, enumerator::procs, Qundef, RARRAY_AREF, RARRAY_LEN, rb_attr_get(), rb_class_path(), rb_inspect(), rb_obj_class(), rb_sprintf(), rb_str_buf_cat2(), and TypedData_Get_Struct.
Referenced by enumerator_inspect().
|
static |
Definition at line 1597 of file enumerator.c.
References argc, enumerator::args, DATA_PTR, enumerator_allocate(), enumerator_init_copy(), enumerator_ptr(), proc_entry::fn, id_each, lazy_generator_init(), lazy_set_args(), proc_entry::memo, enumerator::meth, enumerator::obj, proc_entry::proc, proc_entry_data_type, enumerator::procs, rb_ary_dup(), rb_ary_new(), rb_ary_new4, rb_ary_push(), rb_block_given_p(), rb_block_proc(), rb_cLazy, rb_cObject, rb_to_id(), RTEST, and TypedData_Make_Struct.
Referenced by lazy_drop(), lazy_drop_while(), lazy_grep(), lazy_map(), lazy_reject(), lazy_select(), lazy_take(), and lazy_take_while().
Definition at line 2189 of file enumerator.c.
References lazy_add_method(), len, NUM2LONG, rb_ary_new3, rb_eArgError, rb_raise(), and sym_each.
Referenced by InitVM_Enumerator().
|
static |
Definition at line 2165 of file enumerator.c.
References LONG2NUM, proc_entry::memo, NIL_P, NUM2LONG, proc_entry_ptr(), rb_ary_entry(), rb_ary_store(), and result.
Definition at line 2152 of file enumerator.c.
References FIX2LONG, FIXNUM_P, id_arguments, len, LONG2FIX, LONG2NUM, NIL_P, NUM2LONG, RARRAY_AREF, rb_funcall(), and rb_ivar_get().
Definition at line 2226 of file enumerator.c.
References lazy_add_method(), Qfalse, Qnil, rb_block_given_p(), rb_eArgError, and rb_raise().
Referenced by InitVM_Enumerator().
|
static |
Definition at line 2204 of file enumerator.c.
References lazyenum_yield_values(), proc_entry::memo, NIL_P, proc_entry_ptr(), Qtrue, rb_ary_entry(), rb_ary_store(), result, and RTEST.
Definition at line 1846 of file enumerator.c.
References id_new, lazy_flat_map_proc(), lazy_set_method(), Qnil, rb_block_call(), rb_block_given_p(), rb_cLazy, rb_eArgError, and rb_raise().
Referenced by InitVM_Enumerator().
Definition at line 1779 of file enumerator.c.
References id_each, lazy_flat_map_i(), Qnil, and rb_block_call().
Referenced by lazy_flat_map_proc().
|
static |
Definition at line 1773 of file enumerator.c.
References id_yield, and rb_funcallv.
Referenced by lazy_flat_map_each().
|
static |
Definition at line 1802 of file enumerator.c.
References id_each, id_force, id_yield, lazy_flat_map_each(), lazy_flat_map_to_ary(), Qnil, RARRAY_AREF, RARRAY_LEN, rb_funcall(), rb_respond_to(), RB_TYPE_P, rb_yield_values2(), result, and T_ARRAY.
Referenced by lazy_flat_map().
Definition at line 1786 of file enumerator.c.
References id_yield, NIL_P, Qnil, RARRAY_AREF, RARRAY_LEN, rb_check_array_type(), and rb_funcall().
Referenced by lazy_flat_map_proc().
Definition at line 1497 of file enumerator.c.
References enumerator_ptr(), generator_allocate(), generator_ptr(), id_initialize, lazy_init_block(), enumerator::obj, generator::obj, RARRAY_LEN, rb_ary_new3, rb_block_call(), and rb_cGenerator.
Referenced by lazy_add_method().
Definition at line 1933 of file enumerator.c.
References lazy_add_method(), lazy_grep_funcs, lazy_grep_iter_funcs, rb_ary_new3, and rb_block_given_p().
Referenced by InitVM_Enumerator().
|
static |
Definition at line 1911 of file enumerator.c.
References id_eqq, LAZY_MEMO_RESET_PACKED, LAZY_MEMO_SET_VALUE, proc_entry::memo, proc_entry::proc, proc_entry_ptr(), Qnil, rb_funcall(), rb_proc_call_with_block(), result, and RTEST.
|
static |
Definition at line 1902 of file enumerator.c.
References id_eqq, proc_entry::memo, proc_entry_ptr(), rb_funcall(), result, and RTEST.
Definition at line 1965 of file enumerator.c.
References id_new, lazy_grep_v_func(), lazy_grep_v_iter(), lazy_set_method(), rb_ary_new3, rb_block_call(), rb_block_given_p(), and rb_cLazy.
Referenced by InitVM_Enumerator().
|
static |
Definition at line 1941 of file enumerator.c.
References id_eqq, id_yield, Qnil, rb_enum_values_pack(), rb_funcall(), result, and RTEST.
Referenced by lazy_grep_v().
|
static |
Definition at line 1953 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_v().
Definition at line 1486 of file enumerator.c.
References id_each, id_memo, lazy_init_yielder(), enumerator::procs, Qnil, RARRAY_AREF, RARRAY_LEN, rb_ary_new2, rb_ary_new3, rb_block_call(), and rb_ivar_set().
Referenced by lazy_generator_init().
|
static |
Definition at line 1437 of file enumerator.c.
References id_each, lazy_init_iterator(), Qnil, rb_block_call(), and val.
Referenced by lazy_initialize().
|
static |
Definition at line 1411 of file enumerator.c.
References ALLOCV_END, ALLOCV_N, enumerator::args, len, MEMCPY, Qnil, Qundef, rb_iter_break(), rb_long2int, rb_yield_values2(), result, and val.
Referenced by lazy_init_block_i().
Definition at line 1455 of file enumerator.c.
References proc_entry::fn, id_memo, id_yield, LAZY_MEMO_BREAK_P, LAZY_MEMO_PACKED, MEMO_NEW, lazyenum_funcs::proc, proc_entry_ptr(), Qnil, RARRAY_AREF, RARRAY_LEN, rb_attr_get(), rb_enum_values_pack(), rb_funcall2, rb_iter_break(), and result.
Referenced by lazy_init_block().
Definition at line 1552 of file enumerator.c.
References enumerator_init(), generator_allocate(), id_initialize, id_receiver, lazy_init_block_i(), enumerator::obj, Qnil, rb_block_call(), rb_block_given_p(), rb_cGenerator, rb_check_arity, rb_eArgError, rb_ivar_set(), rb_raise(), enumerator::size, and sym_each.
Referenced by InitVM_Enumerator().
Definition at line 2277 of file enumerator.c.
References enumerator::obj.
Referenced by InitVM_Enumerator().
Definition at line 1763 of file enumerator.c.
References lazy_add_method(), Qnil, rb_block_given_p(), rb_eArgError, and rb_raise().
Referenced by InitVM_Enumerator().
|
static |
Definition at line 1744 of file enumerator.c.
References LAZY_MEMO_RESET_PACKED, LAZY_MEMO_SET_VALUE, lazyenum_yield_values(), result, and MEMO::value.
Definition at line 1753 of file enumerator.c.
Definition at line 1892 of file enumerator.c.
References lazy_add_method(), Qnil, rb_block_given_p(), rb_eArgError, and rb_raise().
Referenced by InitVM_Enumerator().
|
static |
Definition at line 1880 of file enumerator.c.
References lazyenum_yield(), result, and RTEST.
Definition at line 1870 of file enumerator.c.
References lazy_add_method(), Qnil, rb_block_given_p(), rb_eArgError, and rb_raise().
Referenced by InitVM_Enumerator().
|
static |
Definition at line 1858 of file enumerator.c.
References lazyenum_yield(), result, and RTEST.
Definition at line 1574 of file enumerator.c.
References ID2SYM, id_arguments, id_method, NIL_P, Qfalse, rb_frame_this_func(), and rb_ivar_set().
Referenced by lazy_add_method(), and lazy_set_method().
|
static |
Definition at line 1588 of file enumerator.c.
References enumerator_ptr(), lazy_set_args(), and enumerator::size_fn.
Referenced by lazy_flat_map(), lazy_grep_v(), lazy_uniq(), and lazy_zip().
Definition at line 1399 of file enumerator.c.
References enum_size(), id_receiver, and rb_ivar_get().
Referenced by lazy_receiver_size().
Definition at line 2271 of file enumerator.c.
References enumerable_lazy(), and rb_call_super().
Referenced by InitVM_Enumerator().
Definition at line 2107 of file enumerator.c.
References INT2NUM, lazy_add_method(), len, NUM2LONG, rb_ary_new3, rb_eArgError, rb_raise(), and sym_cycle.
Referenced by InitVM_Enumerator().
|
static |
Definition at line 2072 of file enumerator.c.
References LAZY_MEMO_SET_BREAK, LONG2NUM, proc_entry::memo, NIL_P, NUM2LONG, proc_entry_ptr(), rb_ary_entry(), rb_ary_store(), and result.
Definition at line 2094 of file enumerator.c.
References FIX2LONG, FIXNUM_P, id_arguments, len, LONG2NUM, NIL_P, NUM2LONG, RARRAY_AREF, and rb_ivar_get().
Definition at line 2142 of file enumerator.c.
References lazy_add_method(), Qnil, rb_block_given_p(), rb_eArgError, and rb_raise().
Referenced by InitVM_Enumerator().
|
static |
Definition at line 2127 of file enumerator.c.
References LAZY_MEMO_SET_BREAK, lazyenum_yield_values(), result, and RTEST.
Definition at line 1707 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 |
Definition at line 1677 of file enumerator.c.
References enumerator_allocate(), enumerator_init(), Qnil, and rb_cLazy.
Referenced by enumerable_lazy(), lazy_to_enum(), rb_enumeratorize(), and rb_enumeratorize_with_size().
Definition at line 2260 of file enumerator.c.
References func, hash(), id_new, lazy_set_method(), lazy_uniq_func(), lazy_uniq_iter(), rb_block_call(), rb_block_given_p(), rb_cLazy, rb_hash_new(), and rb_obj_hide().
Referenced by InitVM_Enumerator().
|
static |
Definition at line 2244 of file enumerator.c.
References argc, hash(), lazy_uniq_i(), and rb_enum_values_pack().
Referenced by lazy_uniq().
|
static |
Definition at line 2236 of file enumerator.c.
References id_yield, Qfalse, Qnil, rb_funcallv, and rb_hash_add_new_element().
Referenced by lazy_uniq_func(), and lazy_uniq_iter().
|
static |
Definition at line 2252 of file enumerator.c.
References argc, hash(), lazy_uniq_i(), and rb_yield_values2().
Referenced by lazy_uniq().
Definition at line 2039 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, PRIsVALUE, 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_class(), rb_raise(), and rb_respond_to().
Referenced by InitVM_Enumerator().
|
static |
Definition at line 1987 of file enumerator.c.
References count, id_memo, id_yield, LONG2NUM, proc_entry::memo, NIL_P, NUM2LONG, Qnil, RARRAY_AREF, RARRAY_LEN, rb_ary_entry(), rb_ary_new2, rb_ary_push(), rb_attr_get(), rb_funcall(), and rb_ivar_set().
Referenced by lazy_zip().
|
static |
Definition at line 2007 of file enumerator.c.
References argv, call_next(), id_memo, id_to_enum, id_yield, next_stopped(), NIL_P, Qnil, RARRAY_AREF, RARRAY_LEN, rb_ary_new2, rb_ary_new_from_values(), rb_ary_push(), rb_attr_get(), rb_eStopIteration, rb_funcall(), rb_ivar_set(), and rb_rescue2().
Referenced by lazy_zip().
Definition at line 1393 of file enumerator.c.
References enum_size().
Referenced by enumerable_lazy().
Definition at line 1723 of file enumerator.c.
References proc_entry::proc, proc_entry_ptr(), Qnil, and rb_proc_call_with_block().
Referenced by lazy_reject_proc(), and lazy_select_proc().
Definition at line 1730 of file enumerator.c.
References enumerator::args, argv, LAZY_MEMO_PACKED_P, proc_entry::proc, proc_entry_ptr(), Qnil, RARRAY_CONST_PTR, RARRAY_LENINT, and rb_proc_call_with_block().
Referenced by lazy_drop_while_proc(), lazy_map_proc(), and lazy_take_while_proc().
Definition at line 670 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().
|
static |
Definition at line 656 of file enumerator.c.
References enumerator::args, enumerator_ptr(), enumerator::feedvalue, Qnil, Qundef, rb_ary_new4, and rb_fiber_yield().
Referenced by next_i().
|
static |
Definition at line 683 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().
Definition at line 291 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().
|
static |
Definition at line 201 of file enumerator.c.
References proc_entry::memo, proc_entry::proc, and rb_gc_mark().
|
static |
Definition at line 211 of file enumerator.c.
|
static |
Definition at line 226 of file enumerator.c.
References proc_entry_data_type, and TypedData_Get_Struct.
Referenced by enumerator_size(), lazy_drop_proc(), lazy_drop_while_proc(), lazy_grep_iter_proc(), lazy_grep_proc(), lazy_init_yielder(), lazy_take_proc(), lazyenum_yield(), and lazyenum_yield_values().
Definition at line 450 of file enumerator.c.
References argc, argv, lazy_to_enum_i(), enumerator::meth, rb_enumeratorize_with_size(), and enumerator::size_fn.
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, | ||
const VALUE * | argv, | ||
rb_enumerator_size_func * | size_fn | ||
) |
Definition at line 459 of file enumerator.c.
References enumerator_allocate(), enumerator_init(), lazy_to_enum_i(), Qnil, rb_cEnumerator, rb_cLazy, rb_obj_is_kind_of(), and RTEST.
Referenced by obj_to_enum(), and rb_enumeratorize().
Definition at line 2330 of file enumerator.c.
References id_result, and rb_attr_get().
Referenced by InitVM_Enumerator().
Definition at line 1185 of file enumerator.c.
References enumerator::obj, yielder::proc, Qundef, and TypedData_Make_Struct.
Referenced by InitVM_Enumerator(), and yielder_new().
Definition at line 1197 of file enumerator.c.
References enumerator::obj, yielder::proc, rb_eArgError, rb_raise(), and TypedData_Get_Struct.
Referenced by yielder_initialize(), and yielder_new().
Definition at line 1214 of file enumerator.c.
References rb_block_proc(), rb_need_block(), and yielder_init().
Referenced by InitVM_Enumerator().
|
static |
Definition at line 1147 of file enumerator.c.
References yielder::proc, and rb_gc_mark().
|
static |
Definition at line 1156 of file enumerator.c.
|
static |
Definition at line 1245 of file enumerator.c.
References rb_cYielder, rb_proc_new(), yielder_allocate(), yielder_init(), and yielder_yield_i().
Referenced by generator_each().
Definition at line 1172 of file enumerator.c.
References yielder::proc, Qundef, rb_eArgError, rb_raise(), and TypedData_Get_Struct.
Referenced by yielder_yield().
Definition at line 1223 of file enumerator.c.
References yielder::proc, rb_proc_call(), and yielder_ptr().
Referenced by InitVM_Enumerator(), and yielder_yield_push().
|
static |
Definition at line 1239 of file enumerator.c.
References rb_yield_values2().
Referenced by yielder_new().
Definition at line 1232 of file enumerator.c.
References enumerator::obj, and yielder_yield().
Referenced by InitVM_Enumerator().
|
static |
Definition at line 178 of file enumerator.c.
|
static |
Definition at line 1269 of file enumerator.c.
|
static |
Definition at line 106 of file enumerator.c.
Referenced by append_method(), Init_Enumerator(), lazy_drop_size(), lazy_set_args(), and lazy_take_size().
|
static |
Definition at line 105 of file enumerator.c.
Referenced by enumerator_initialize(), enumerator_size(), and Init_Enumerator().
|
static |
Definition at line 105 of file enumerator.c.
Referenced by Init_Enumerator(), lazy_add_method(), lazy_flat_map_each(), lazy_flat_map_proc(), lazy_init_block(), lazy_init_block_i(), lazy_zip(), and next_i().
|
static |
Definition at line 106 of file enumerator.c.
Referenced by Init_Enumerator(), lazy_grep_iter_proc(), lazy_grep_proc(), lazy_grep_v_func(), and lazy_grep_v_iter().
|
static |
Definition at line 106 of file enumerator.c.
Referenced by Init_Enumerator(), and lazy_flat_map_proc().
|
static |
Definition at line 105 of file enumerator.c.
Referenced by Init_Enumerator(), lazy_generator_init(), and lazy_initialize().
|
static |
Definition at line 106 of file enumerator.c.
Referenced by Init_Enumerator().
|
static |
Definition at line 106 of file enumerator.c.
Referenced by Init_Enumerator(), lazy_init_block(), lazy_init_yielder(), lazy_zip_arrays_func(), and lazy_zip_func().
|
static |
Definition at line 106 of file enumerator.c.
Referenced by append_method(), enumerable_lazy(), Init_Enumerator(), iseq_type_from_sym(), and lazy_set_args().
|
static |
Definition at line 105 of file enumerator.c.
Referenced by Init_Enumerator(), lazy_flat_map(), lazy_grep_v(), lazy_uniq(), lazy_zip(), and ossl_ocspreq_add_certid().
|
static |
Definition at line 106 of file enumerator.c.
Referenced by call_next(), and Init_Enumerator().
|
static |
Definition at line 106 of file enumerator.c.
Referenced by Init_Enumerator(), inspect_enumerator(), lazy_initialize(), and lazy_size().
|
static |
Definition at line 106 of file enumerator.c.
Referenced by Init_Enumerator(), next_i(), and stop_result().
|
static |
Definition at line 105 of file enumerator.c.
Referenced by enumerator_rewind(), and Init_Enumerator().
|
static |
Definition at line 105 of file enumerator.c.
Referenced by enum_size(), enumerator_size(), and Init_Enumerator().
|
static |
Definition at line 105 of file enumerator.c.
Referenced by Init_Enumerator(), and lazy_zip_func().
|
static |
Definition at line 105 of file enumerator.c.
Referenced by Init_Enumerator(), lazy_flat_map_i(), lazy_flat_map_proc(), lazy_flat_map_to_ary(), lazy_grep_v_func(), lazy_grep_v_iter(), lazy_init_yielder(), lazy_uniq_i(), lazy_zip_arrays_func(), and lazy_zip_func().
|
static |
Definition at line 2184 of file enumerator.c.
|
static |
Definition at line 2221 of file enumerator.c.
|
static |
Definition at line 1928 of file enumerator.c.
Referenced by lazy_grep().
|
static |
Definition at line 1924 of file enumerator.c.
Referenced by lazy_grep().
|
static |
Definition at line 1758 of file enumerator.c.
|
static |
Definition at line 1887 of file enumerator.c.
|
static |
Definition at line 1865 of file enumerator.c.
|
static |
Definition at line 2102 of file enumerator.c.
|
static |
Definition at line 2137 of file enumerator.c.
|
static |
Definition at line 216 of file enumerator.c.
Referenced by lazy_add_method(), and proc_entry_ptr().
VALUE rb_cEnumerator |
Definition at line 103 of file enumerator.c.
Referenced by enum_chunk(), enum_chunk_while(), enum_slice_after(), enum_slice_before(), enum_slice_when(), InitVM_Enumerator(), and rb_enumeratorize_with_size().
|
static |
Definition at line 125 of file enumerator.c.
Referenced by enumerator_initialize(), InitVM_Enumerator(), lazy_generator_init(), and lazy_initialize().
VALUE rb_cLazy |
Definition at line 104 of file enumerator.c.
Referenced by InitVM_Enumerator(), lazy_add_method(), lazy_flat_map(), lazy_grep_v(), lazy_to_enum_i(), lazy_uniq(), lazy_zip(), and rb_enumeratorize_with_size().
|
static |
Definition at line 125 of file enumerator.c.
Referenced by InitVM_Enumerator(), and yielder_new().
VALUE rb_eStopIteration |
Definition at line 109 of file enumerator.c.
Referenced by Init_thread_sync(), InitVM_Enumerator(), lazy_zip_func(), next_i(), rb_f_loop(), and zip_i().
|
static |
Definition at line 107 of file enumerator.c.
Referenced by Init_Enumerator(), and lazy_take().
|
static |
Definition at line 107 of file enumerator.c.
Referenced by enumerable_lazy(), enumerator_initialize(), Init_Enumerator(), lazy_drop(), lazy_initialize(), lazy_to_enum(), and obj_to_enum().
|
static |
Definition at line 1161 of file enumerator.c.