Ruby
2.4.2p198(2017-09-14revision59899)
|
Go to the source code of this file.
Data Structures | |
struct | sort_by_data |
struct | nmin_data |
struct | min_t |
struct | max_t |
struct | minmax_t |
struct | minmax_by_t |
struct | chunk_arg |
struct | slicebefore_arg |
struct | sliceafter_arg |
struct | slicewhen_arg |
struct | enum_sum_memo |
Macros | |
#define | id_each idEach |
#define | id_eqq idEqq |
#define | id_cmp idCmp |
#define | id_lshift idLTLT |
#define | ENUM_WANT_SVALUE() |
#define | SORT_BY_BUFSIZE 16 |
#define | ENUMFUNC(name) rb_block_given_p() ? name##_iter_i : name##_i |
#define | DEFINE_ENUMFUNCS(name) |
#define | GETPTR(i) (beg+(i)*eltsize) |
#define | SWAP(i, j) |
#define | dont_recycle_block_arg(arity) ((arity) == 1 || (arity) < 0) |
#define | UPDATE_MEMO ((void)(memo = MEMO_FOR(struct sliceafter_arg, _memo))) |
#define | UPDATE_MEMO ((void)(memo = MEMO_FOR(struct slicewhen_arg, _memo))) |
#define | rb_intern(str) rb_intern_const(str) |
Variables | |
VALUE | rb_mEnumerable |
static ID | id_next |
static ID | id_div |
static ID | id_call |
static ID | id_size |
#define DEFINE_ENUMFUNCS | ( | name | ) |
#define dont_recycle_block_arg | ( | arity | ) | ((arity) == 1 || (arity) < 0) |
Definition at line 2303 of file enum.c.
Referenced by enum_each_cons(), and enum_each_slice().
#define ENUM_WANT_SVALUE | ( | ) |
Definition at line 38 of file enum.c.
Referenced by chunk_ii(), count_i(), cycle_i(), drop_while_i(), each_cons_i(), each_slice_i(), each_val_i(), each_with_object_i(), enum_sum_i(), enum_to_h_i(), find_all_i(), find_i(), find_index_i(), first_i(), grep_i(), grep_iter_i(), group_by_i(), inject_i(), inject_op_i(), max_by_i(), max_i(), max_ii(), min_by_i(), min_i(), min_ii(), minmax_by_i(), minmax_i(), minmax_ii(), nmin_i(), partition_i(), reject_i(), sliceafter_ii(), slicebefore_ii(), slicewhen_ii(), sort_by_i(), uniq_func(), and uniq_iter().
#define ENUMFUNC | ( | name | ) | rb_block_given_p() ? name##_iter_i : name##_i |
Definition at line 1152 of file enum.c.
Referenced by enum_all(), enum_any(), enum_none(), and enum_one().
#define GETPTR | ( | i | ) | (beg+(i)*eltsize) |
Referenced by nmin_filter().
#define id_cmp idCmp |
Definition at line 27 of file enum.c.
Referenced by enum_each_cons_size(), max_by_i(), min_by_i(), minmax_by_i(), minmax_by_i_update(), nmin_cmp(), and sort_by_cmp().
#define id_each idEach |
Definition at line 25 of file enum.c.
Referenced by chunk_i(), enum_all(), enum_any(), enum_collect(), enum_count(), enum_cycle(), enum_drop(), enum_drop_while(), enum_each_cons(), enum_each_entry(), enum_each_slice(), enum_each_with_index(), enum_each_with_object(), enum_find(), enum_find_all(), enum_find_index(), enum_first(), enum_flat_map(), enum_grep(), enum_grep_v(), enum_group_by(), enum_inject(), enum_max(), enum_max_by(), enum_member(), enum_min(), enum_min_by(), enum_minmax(), enum_minmax_by(), enum_none(), enum_one(), enum_partition(), enum_reject(), enum_sort_by(), enum_sum(), enum_take(), enum_take_while(), enum_to_a(), enum_to_h(), enum_uniq(), enum_zip(), rb_nmin_run(), sliceafter_i(), slicebefore_i(), and slicewhen_i().
#define id_eqq idEqq |
Definition at line 26 of file enum.c.
Referenced by grep_i(), grep_iter_i(), sliceafter_ii(), and slicebefore_ii().
#define id_lshift idLTLT |
Definition at line 28 of file enum.c.
Referenced by chunk_i(), chunk_ii(), sliceafter_i(), sliceafter_ii(), slicebefore_i(), slicebefore_ii(), slicewhen_i(), and slicewhen_ii().
#define rb_intern | ( | str | ) | rb_intern_const(str) |
#define SORT_BY_BUFSIZE 16 |
Definition at line 976 of file enum.c.
Referenced by enum_sort_by(), and sort_by_i().
#define SWAP | ( | i, | |
j | |||
) |
#define UPDATE_MEMO ((void)(memo = MEMO_FOR(struct sliceafter_arg, _memo))) |
Referenced by sliceafter_ii(), and slicewhen_ii().
#define UPDATE_MEMO ((void)(memo = MEMO_FOR(struct slicewhen_arg, _memo))) |
Definition at line 661 of file enum.c.
References FIX2LONG, FIXABLE, FIXNUM_P, id, idPLUS, LONG2FIX, LONG2NUM, Qnil, Qundef, RARRAY_AREF, RARRAY_LEN, rb_big_plus(), rb_cInteger, rb_fix_plus(), rb_funcall(), rb_method_basic_definition_p(), RB_TYPE_P, SYM2ID, and T_BIGNUM.
Referenced by enum_inject().
|
static |
Definition at line 2934 of file enum.c.
References chunk_arg::categorize, chunk_ii(), id_each, id_lshift, MEMO_FOR, NEW_MEMO_FOR, NIL_P, chunk_arg::prev_elts, chunk_arg::prev_value, Qnil, rb_assoc_new(), rb_block_call(), rb_funcall(), rb_intern, rb_ivar_get(), and chunk_arg::yielder.
Referenced by enum_chunk().
|
static |
Definition at line 2887 of file enum.c.
References chunk_arg::categorize, ENUM_WANT_SVALUE, ID2SYM, id_call, id_lshift, MEMO_FOR, NIL_P, chunk_arg::prev_elts, chunk_arg::prev_value, Qnil, rb_ary_new3, rb_ary_push(), rb_assoc_new(), rb_equal(), rb_eRuntimeError, rb_funcall(), rb_intern, rb_raise(), rb_sym2str, RSTRING_PTR, separator, SYMBOL_P, and chunk_arg::yielder.
Referenced by chunk_i().
|
static |
Definition at line 470 of file enum.c.
References argc, argv, Qnil, rb_ary_push(), rb_enum_values_pack(), and rb_thread_check_ints().
Referenced by enum_to_a().
|
static |
Definition at line 462 of file enum.c.
References argc, argv, Qnil, rb_ary_push(), and rb_yield_values2().
Referenced by enum_collect().
|
static |
|
static |
Definition at line 144 of file enum.c.
References MEMO::cnt, ENUM_WANT_SVALUE, MEMO_CAST, Qnil, rb_equal(), MEMO::u3, and MEMO::v1.
Referenced by enum_count().
|
static |
|
static |
Definition at line 2801 of file enum.c.
References argc, argv, sort_by_data::ary, ENUM_WANT_SVALUE, enum_yield(), Qnil, rb_ary_new_from_values(), and rb_ary_push().
Referenced by enum_cycle().
DEFINE_ENUMFUNCS | ( | all | ) |
Definition at line 1172 of file enum.c.
References MEMO_V1_SET, Qfalse, Qnil, rb_iter_break(), result, and RTEST.
DEFINE_ENUMFUNCS | ( | any | ) |
Definition at line 1207 of file enum.c.
References MEMO_V1_SET, Qnil, Qtrue, rb_iter_break(), result, and RTEST.
DEFINE_ENUMFUNCS | ( | one | ) |
Definition at line 1242 of file enum.c.
References MEMO_V1_SET, Qfalse, Qnil, Qtrue, Qundef, rb_iter_break(), result, and RTEST.
DEFINE_ENUMFUNCS | ( | none | ) |
Definition at line 1499 of file enum.c.
References MEMO_V1_SET, Qfalse, Qnil, rb_iter_break(), result, and RTEST.
|
static |
Definition at line 2714 of file enum.c.
References argc, argv, MEMO::cnt, MEMO_CAST, Qnil, rb_ary_push(), rb_enum_values_pack(), MEMO::u3, and MEMO::v1.
Referenced by enum_drop().
|
static |
Definition at line 2757 of file enum.c.
References argc, ENUM_WANT_SVALUE, enum_yield(), MEMO_CAST, Qnil, rb_ary_push(), RTEST, MEMO::state, TRUE, MEMO::u3, and MEMO::v1.
Referenced by enum_drop_while().
|
static |
Definition at line 2382 of file enum.c.
References sort_by_data::ary, MEMO::cnt, ENUM_WANT_SVALUE, MEMO_CAST, Qnil, RARRAY_LEN, rb_ary_dup(), rb_ary_push(), rb_ary_shift(), rb_yield(), size, MEMO::u3, MEMO::v1, and MEMO::v2.
Referenced by enum_each_cons().
|
static |
Definition at line 2306 of file enum.c.
References sort_by_data::ary, MEMO::cnt, ENUM_WANT_SVALUE, MEMO_CAST, MEMO_V1_SET, Qnil, RARRAY_LEN, rb_ary_clear(), rb_ary_new2, rb_ary_push(), rb_yield(), size, MEMO::u3, MEMO::v1, and MEMO::v2.
Referenced by enum_each_slice().
|
static |
Definition at line 2259 of file enum.c.
References argc, ENUM_WANT_SVALUE, enum_yield(), and Qnil.
Referenced by enum_each_entry().
|
static |
Definition at line 2183 of file enum.c.
References argc, argv, INT2NUM, MEMO_CAST, rb_enum_values_pack(), and rb_yield_values().
Referenced by enum_each_with_index().
|
static |
Definition at line 2456 of file enum.c.
References ENUM_WANT_SVALUE, and rb_yield_values().
Referenced by enum_each_with_object().
Definition at line 1200 of file enum.c.
References ENUMFUNC, id_each, MEMO_NEW, Qtrue, and rb_block_call().
Referenced by Init_Enumerable().
Definition at line 1235 of file enum.c.
References ENUMFUNC, id_each, MEMO_NEW, Qfalse, and rb_block_call().
Referenced by Init_Enumerable().
Definition at line 3042 of file enum.c.
References chunk_i(), enum_size(), rb_block_call(), rb_block_proc(), rb_cEnumerator, rb_intern, rb_ivar_set(), rb_obj_alloc(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Enumerable().
Definition at line 3597 of file enum.c.
References slicewhen_arg::pred, Qtrue, rb_block_call(), rb_block_proc(), rb_cEnumerator, rb_intern, rb_ivar_set(), rb_obj_alloc(), and slicewhen_i().
Referenced by Init_Enumerable().
Definition at line 496 of file enum.c.
References collect_i(), enum_size(), id_each, rb_ary_new(), rb_block_min_max_arity(), rb_lambda_call(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Enumerable().
Definition at line 195 of file enum.c.
References count_all_i(), count_i(), count_iter_i(), func, id_each, INT2NUM, MEMO_NEW, Qnil, rb_block_call(), rb_block_given_p(), rb_scan_args(), and rb_warn().
Referenced by Init_Enumerable().
Definition at line 2850 of file enum.c.
References sort_by_data::ary, cycle_i(), enum_cycle_size(), enum_yield_array(), id_each, len, sort_by_data::n, NIL_P, NUM2LONG, Qnil, RARRAY_AREF, RARRAY_LEN, rb_ary_new(), rb_block_call(), rb_scan_args(), RBASIC_CLEAR_CLASS, and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Enumerable().
Definition at line 2811 of file enum.c.
References DBL2NUM, enum_size(), INFINITY, INT2FIX, LONG2FIX, mul, NUM2LONG, Qnil, RARRAY_AREF, RARRAY_LEN, rb_funcall(), and size.
Referenced by enum_cycle().
Definition at line 2739 of file enum.c.
References drop_i(), id_each, len, MEMO_NEW, NUM2LONG, rb_ary_new(), rb_block_call(), rb_eArgError, rb_raise(), and result.
Referenced by Init_Enumerable().
Definition at line 2788 of file enum.c.
References drop_while_i(), FALSE, id_each, MEMO_NEW, rb_ary_new(), rb_block_call(), result, and RETURN_ENUMERATOR.
Referenced by Init_Enumerable().
Definition at line 2439 of file enum.c.
References dont_recycle_block_arg, each_cons_i(), enum_each_cons_size(), enum_size_over_p(), id_each, MEMO_NEW, NUM2LONG, Qnil, rb_ary_new2, rb_block_arity(), rb_block_call(), rb_eArgError, rb_raise(), RETURN_SIZED_ENUMERATOR, and size.
Referenced by Init_Enumerable().
Definition at line 2404 of file enum.c.
References enum_size(), id_cmp, LONG2FIX, LONG2NUM, sort_by_data::n, NUM2LONG, Qnil, RARRAY_AREF, rb_cmpint(), rb_eArgError, rb_funcall(), rb_raise(), and size.
Referenced by enum_each_cons().
Definition at line 2296 of file enum.c.
References each_val_i(), enum_size(), id_each, rb_block_call(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Enumerable().
Definition at line 2361 of file enum.c.
References sort_by_data::ary, dont_recycle_block_arg, each_slice_i(), enum_each_slice_size(), id_each, limit_by_enum_size(), MEMO_NEW, NUM2LONG, Qnil, RARRAY_LEN, rb_ary_new2, rb_block_arity(), rb_block_call(), rb_eArgError, rb_raise(), rb_yield(), RETURN_SIZED_ENUMERATOR, and size.
Referenced by Init_Enumerable().
Definition at line 2331 of file enum.c.
References enum_size(), id_div, LONG2FIX, LONG2NUM, sort_by_data::n, NUM2LONG, Qnil, RARRAY_AREF, rb_eArgError, rb_funcall(), rb_raise(), and size.
Referenced by enum_each_slice().
Definition at line 2210 of file enum.c.
References each_with_index_i(), enum_size(), id_each, MEMO_NEW, rb_block_call(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Enumerable().
Definition at line 2477 of file enum.c.
References each_with_object_i(), enum_size(), id_each, rb_block_call(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Enumerable().
Definition at line 261 of file enum.c.
References find_i(), id_call, id_each, MEMO_NEW, NIL_P, Qnil, Qundef, rb_block_call(), rb_funcallv, rb_scan_args(), and RETURN_ENUMERATOR.
Referenced by Init_Enumerable().
Definition at line 408 of file enum.c.
References enum_size(), find_all_i(), id_each, rb_ary_new(), rb_block_call(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Enumerable().
Definition at line 327 of file enum.c.
References find_index_i(), find_index_iter_i(), func, id_each, MEMO_NEW, Qnil, rb_block_call(), rb_block_given_p(), rb_scan_args(), rb_warn(), and RETURN_ENUMERATOR.
Referenced by Init_Enumerable().
Definition at line 931 of file enum.c.
References enum_take(), first_i(), id_each, MEMO_NEW, Qnil, rb_block_call(), and rb_check_arity.
Referenced by Init_Enumerable().
Definition at line 545 of file enum.c.
References enum_size(), flat_map_i(), id_each, rb_ary_new(), rb_block_call(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Enumerable().
Definition at line 107 of file enum.c.
References grep_i(), grep_iter_i(), id_each, MEMO_NEW, Qtrue, rb_ary_new(), rb_block_call(), and rb_block_given_p().
Referenced by Init_Enumerable().
Definition at line 133 of file enum.c.
References grep_i(), grep_iter_i(), id_each, MEMO_NEW, Qfalse, rb_ary_new(), rb_block_call(), and rb_block_given_p().
Referenced by Init_Enumerable().
Definition at line 886 of file enum.c.
References enum_size(), group_by_i(), hash(), id_each, OBJ_INFECT, rb_block_call(), rb_hash_new(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Enumerable().
Definition at line 762 of file enum.c.
References ary_inject_op(), CLASS_OF, id, ID2SYM, id_each, inject_i(), inject_op_i(), MEMO_NEW, Qnil, Qundef, rb_block_call(), rb_block_given_p(), rb_check_id(), rb_method_basic_definition_p(), rb_scan_args(), RB_TYPE_P, rb_warning(), SYMBOL_P, and T_ARRAY.
Referenced by Init_Enumerable().
Definition at line 1695 of file enum.c.
References max_t::cmp_opt, id_each, max_t::max, max_i(), max_ii(), NEW_CMP_OPT_MEMO, NIL_P, cmp_opt_data::opt_inited, cmp_opt_data::opt_methods, Qnil, Qundef, rb_block_call(), rb_block_given_p(), rb_nmin_run(), rb_scan_args(), and result.
Referenced by Init_Enumerable().
Definition at line 2023 of file enum.c.
References enum_size(), id_each, max_by_i(), MEMO_NEW, NIL_P, Qnil, Qundef, rb_block_call(), rb_nmin_run(), rb_scan_args(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Enumerable().
Definition at line 2174 of file enum.c.
References id_each, member_i(), MEMO_NEW, Qfalse, and rb_block_call().
Referenced by Init_Enumerable().
Definition at line 1601 of file enum.c.
References min_t::cmp_opt, id_each, min_t::min, min_i(), min_ii(), NEW_CMP_OPT_MEMO, NIL_P, cmp_opt_data::opt_inited, cmp_opt_data::opt_methods, Qnil, Qundef, rb_block_call(), rb_block_given_p(), rb_nmin_run(), rb_scan_args(), and result.
Referenced by Init_Enumerable().
Definition at line 1917 of file enum.c.
References enum_size(), id_each, MEMO_NEW, min_by_i(), NIL_P, Qnil, Qundef, rb_block_call(), rb_nmin_run(), rb_scan_args(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Enumerable().
Definition at line 1848 of file enum.c.
References minmax_t::cmp_opt, id_each, minmax_t::last, minmax_t::max, minmax_t::min, minmax_i(), minmax_i_update(), minmax_ii(), minmax_ii_update(), NEW_CMP_OPT_MEMO, cmp_opt_data::opt_inited, cmp_opt_data::opt_methods, Qnil, Qundef, rb_assoc_new(), rb_block_call(), and rb_block_given_p().
Referenced by Init_Enumerable().
Definition at line 2126 of file enum.c.
References enum_size(), id_each, minmax_by_t::last, minmax_by_t::last_bv, minmax_by_t::max, minmax_by_t::max_bv, MEMO_FOR, minmax_by_t::min, minmax_by_t::min_bv, minmax_by_i(), minmax_by_i_update(), NEW_MEMO_FOR, Qnil, Qundef, rb_assoc_new(), rb_block_call(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Enumerable().
Definition at line 1525 of file enum.c.
References ENUMFUNC, id_each, MEMO_NEW, Qtrue, and rb_block_call().
Referenced by Init_Enumerable().
Definition at line 838 of file enum.c.
References enum_size(), id_each, MEMO_NEW, partition_i(), rb_ary_new(), rb_assoc_new(), rb_block_call(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Enumerable().
Definition at line 449 of file enum.c.
References enum_size(), id_each, rb_ary_new(), rb_block_call(), reject_i(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Enumerable().
Definition at line 2241 of file enum.c.
References sort_by_data::ary, enum_size(), enum_to_a(), RARRAY_AREF, RARRAY_LEN, rb_yield(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Enumerable().
Definition at line 362 of file enum.c.
References id_size, Qnil, Qundef, and rb_check_funcall().
Referenced by enum_chunk(), enum_collect(), enum_cycle_size(), enum_each_cons_size(), enum_each_entry(), enum_each_slice_size(), enum_each_with_index(), enum_each_with_object(), enum_find_all(), enum_flat_map(), enum_group_by(), enum_max_by(), enum_min_by(), enum_minmax_by(), enum_partition(), enum_reject(), enum_reverse_each(), and enum_sort_by().
|
static |
Definition at line 380 of file enum.c.
References FIX2ULONG, FIXNUM_P, id_size, rb_check_funcall(), and size.
Referenced by enum_each_cons().
Definition at line 3377 of file enum.c.
References sliceafter_arg::pat, sliceafter_arg::pred, Qnil, rb_block_call(), rb_block_given_p(), rb_block_proc(), rb_cEnumerator, rb_eArgError, rb_intern, rb_ivar_set(), rb_obj_alloc(), rb_raise(), rb_scan_args(), and sliceafter_i().
Referenced by Init_Enumerable().
Definition at line 3255 of file enum.c.
References rb_block_call(), rb_block_given_p(), rb_block_proc(), rb_cEnumerator, rb_error_arity(), rb_intern, rb_ivar_set(), rb_obj_alloc(), rb_scan_args(), slicebefore_arg::sep_pat, and slicebefore_i().
Referenced by Init_Enumerable().
Definition at line 3531 of file enum.c.
References slicewhen_arg::pred, Qfalse, rb_block_call(), rb_block_proc(), rb_cEnumerator, rb_intern, rb_ivar_set(), rb_obj_alloc(), and slicewhen_i().
Referenced by Init_Enumerable().
Definition at line 971 of file enum.c.
References enum_to_a(), and rb_ary_sort_bang().
Referenced by Init_Enumerable().
Definition at line 1103 of file enum.c.
References sort_by_data::ary, sort_by_data::buf, enum_size(), id_each, LONG_MAX, MEMO_NEW, sort_by_data::n, OBJ_INFECT, Qnil, RARRAY_AREF, RARRAY_ASET, RARRAY_LEN, RARRAY_PTR_USE, rb_ary_concat(), rb_ary_new(), rb_ary_new2, rb_ary_resize(), rb_ary_store(), rb_ary_tmp_new(), rb_block_call(), rb_cArray, rb_eRuntimeError, RB_OBJ_WRITE, rb_raise(), RB_TYPE_P, RBASIC, RBASIC_CLEAR_CLASS, RBASIC_SET_CLASS_RAW, RETURN_SIZED_ENUMERATOR, ruby_qsort(), SORT_BY_BUFSIZE, sort_by_cmp(), sort_by_i(), T_ARRAY, and MEMO::v1.
Referenced by Init_Enumerable().
Definition at line 3795 of file enum.c.
References enum_sum_memo::block_given, enum_sum_memo::c, CLASS_OF, DBL2NUM, enum_sum_i(), enum_sum_memo::f, FIXNUM_P, enum_sum_memo::float_value, hash_sum(), id_each, int_range_sum(), LONG2FIX, enum_sum_memo::n, Qundef, enum_sum_memo::r, rb_big_plus(), rb_block_call(), rb_block_given_p(), rb_fix_plus(), RB_FLOAT_TYPE_P, rb_method_basic_definition_p(), rb_range_values(), rb_rational_plus(), rb_scan_args(), RB_TYPE_P, RFLOAT_VALUE, RTEST, T_BIGNUM, T_HASH, and enum_sum_memo::v.
Referenced by Init_Enumerable().
|
static |
Definition at line 3722 of file enum.c.
References ENUM_WANT_SVALUE, Qnil, and sum_iter().
Referenced by enum_sum().
Definition at line 2661 of file enum.c.
References id_each, len, MEMO_NEW, NUM2LONG, rb_ary_new2, rb_block_call(), rb_eArgError, rb_raise(), result, and take_i().
Referenced by enum_first(), and first_i().
Definition at line 2703 of file enum.c.
References sort_by_data::ary, id_each, rb_ary_new(), rb_block_call(), RETURN_ENUMERATOR, and take_while_i().
Referenced by Init_Enumerable().
Definition at line 571 of file enum.c.
References collect_all(), id_each, OBJ_INFECT, rb_ary_new(), and rb_block_call().
Referenced by enum_reverse_each(), enum_sort(), and Init_Enumerable().
Definition at line 612 of file enum.c.
References enum_to_h_i(), hash(), id_each, OBJ_INFECT, rb_block_call(), and rb_hash_new().
Referenced by Init_Enumerable().
|
static |
Definition at line 582 of file enum.c.
References ENUM_WANT_SVALUE, hash(), NIL_P, Qnil, RARRAY_AREF, RARRAY_LEN, rb_builtin_class_name(), rb_check_array_type(), rb_eArgError, rb_eTypeError, rb_hash_aset(), rb_raise(), and rb_thread_check_ints().
Referenced by enum_to_h().
Definition at line 3874 of file enum.c.
References func, hash(), id_each, rb_block_call(), rb_block_given_p(), rb_hash_clear(), rb_hash_new(), rb_hash_values(), rb_obj_hide(), uniq_func(), and uniq_iter().
Referenced by Init_Enumerable().
Definition at line 43 of file enum.c.
References rb_yield(), rb_yield_lambda(), and rb_yield_values2().
Referenced by cycle_i(), drop_while_i(), each_val_i(), find_all_i(), find_i(), grep_iter_i(), group_by_i(), max_by_i(), min_by_i(), minmax_by_i(), nmin_i(), partition_i(), reject_i(), and sort_by_i().
Definition at line 53 of file enum.c.
References len, RARRAY_AREF, RARRAY_LEN, rb_yield(), rb_yield_lambda(), and rb_yield_values2().
Referenced by enum_cycle(), zip_ary(), and zip_i().
Definition at line 2600 of file enum.c.
References argc, sort_by_data::ary, CONST_ID, FALSE, ID2SYM, id_each, MEMO_NEW, NIL_P, PRIsVALUE, Qnil, RARRAY_PTR, rb_ary_new(), rb_ary_new4, rb_block_call(), rb_block_given_p(), rb_check_array_type(), rb_eTypeError, rb_funcall(), rb_obj_class(), rb_raise(), rb_respond_to(), result, TRUE, zip_ary(), and zip_i().
Referenced by Init_Enumerable().
|
static |
Definition at line 351 of file enum.c.
References argc, ENUM_WANT_SVALUE, enum_yield(), Qnil, rb_ary_push(), and RTEST.
Referenced by enum_find_all().
|
static |
Definition at line 223 of file enum.c.
References argc, MEMO::cnt, ENUM_WANT_SVALUE, enum_yield(), MEMO_CAST, MEMO_V1_SET, Qnil, rb_iter_break(), RTEST, and MEMO::u3.
Referenced by enum_find().
|
static |
Definition at line 280 of file enum.c.
References MEMO::cnt, ENUM_WANT_SVALUE, MEMO_CAST, MEMO_V1_SET, Qnil, rb_equal(), rb_iter_break(), MEMO::u3, UINT2NUM, and MEMO::v2.
Referenced by enum_find_index().
|
static |
Definition at line 295 of file enum.c.
References argc, argv, MEMO::cnt, MEMO_CAST, MEMO_V1_SET, Qnil, rb_iter_break(), rb_yield_values2(), RTEST, MEMO::u3, and UINT2NUM.
Referenced by enum_find_index().
|
static |
Definition at line 900 of file enum.c.
References enum_take(), ENUM_WANT_SVALUE, MEMO_CAST, MEMO_V1_SET, rb_iter_break(), and UNREACHABLE.
Referenced by enum_first().
|
static |
Definition at line 511 of file enum.c.
References argc, argv, NIL_P, Qnil, rb_ary_concat(), rb_ary_push(), rb_check_array_type(), and rb_yield_values2().
Referenced by enum_flat_map().
|
static |
Definition at line 65 of file enum.c.
References ENUM_WANT_SVALUE, id_eqq, MEMO_CAST, Qnil, rb_ary_push(), rb_funcall(), RTEST, MEMO::u3, MEMO::v1, MEMO::v2, and MEMO::value.
Referenced by enum_grep(), and enum_grep_v().
|
static |
Definition at line 77 of file enum.c.
References argc, ENUM_WANT_SVALUE, enum_yield(), id_eqq, MEMO_CAST, Qnil, rb_ary_push(), rb_funcall(), RTEST, MEMO::u3, MEMO::v1, MEMO::v2, and MEMO::value.
Referenced by enum_grep(), and enum_grep_v().
|
static |
Definition at line 851 of file enum.c.
References argc, ENUM_WANT_SVALUE, enum_yield(), hash(), Qnil, rb_ary_new3, rb_ary_push(), rb_hash_aref(), rb_hash_aset(), RB_TYPE_P, and T_ARRAY.
Referenced by enum_group_by().
|
static |
Definition at line 3737 of file enum.c.
References assert, hash_sum_i(), NULL, rb_hash_foreach(), RB_TYPE_P, and T_HASH.
Referenced by enum_sum().
Definition at line 3730 of file enum.c.
References rb_assoc_new(), ST_CONTINUE, and sum_iter().
Referenced by hash_sum().
void Init_Enumerable | ( | void | ) |
Definition at line 3899 of file enum.c.
References enum_all(), enum_any(), enum_chunk(), enum_chunk_while(), enum_collect(), enum_count(), enum_cycle(), enum_drop(), enum_drop_while(), enum_each_cons(), enum_each_entry(), enum_each_slice(), enum_each_with_index(), enum_each_with_object(), enum_find(), enum_find_all(), enum_find_index(), enum_first(), enum_flat_map(), enum_grep(), enum_grep_v(), enum_group_by(), enum_inject(), enum_max(), enum_max_by(), enum_member(), enum_min(), enum_min_by(), enum_minmax(), enum_minmax_by(), enum_none(), enum_one(), enum_partition(), enum_reject(), enum_reverse_each(), enum_slice_after(), enum_slice_before(), enum_slice_when(), enum_sort(), enum_sort_by(), enum_sum(), enum_take_while(), enum_to_a(), enum_to_h(), enum_uniq(), enum_zip(), id_call, id_div, id_next, id_size, rb_define_method(), rb_define_module(), rb_intern, and rb_mEnumerable.
|
static |
Definition at line 621 of file enum.c.
References ENUM_WANT_SVALUE, MEMO_CAST, MEMO_V1_SET, Qnil, Qundef, rb_yield_values(), and MEMO::v1.
Referenced by enum_inject().
|
static |
Definition at line 637 of file enum.c.
References ENUM_WANT_SVALUE, MEMO_CAST, MEMO_V1_SET, name, numberof, Qnil, Qundef, rb_f_send(), rb_funcall(), SYM2ID, SYMBOL_P, MEMO::u3, MEMO::v1, and MEMO::value.
Referenced by enum_inject().
Definition at line 3746 of file enum.c.
References FIX2LONG, FIXNUM_P, LONG2FIX, rb_big_minus(), rb_int_ge(), rb_int_idiv(), rb_int_minus(), rb_int_mul(), and rb_int_plus().
Referenced by enum_sum().
|
static |
Definition at line 370 of file enum.c.
References FIX2ULONG, FIXNUM_P, id_size, rb_check_funcall(), and size.
Referenced by enum_each_slice().
|
static |
Definition at line 1935 of file enum.c.
References argc, ENUM_WANT_SVALUE, enum_yield(), id_cmp, MEMO_CAST, MEMO_V1_SET, MEMO_V2_SET, Qnil, Qundef, rb_cmpint(), rb_funcall(), and MEMO::v1.
Referenced by enum_max_by().
|
static |
Definition at line 1633 of file enum.c.
References max_t::cmp_opt, ENUM_WANT_SVALUE, max_t::max, MEMO_FOR, OPTIMIZED_CMP, Qnil, and Qundef.
Referenced by enum_max().
|
static |
Definition at line 1651 of file enum.c.
References cmp(), ENUM_WANT_SVALUE, max_t::max, MEMO_FOR, Qnil, Qundef, rb_cmpint(), and rb_yield_values().
Referenced by enum_max().
|
static |
Definition at line 2147 of file enum.c.
References argc, argv, MEMO_CAST, MEMO_V2_SET, Qnil, Qtrue, rb_enum_values_pack(), rb_equal(), rb_iter_break(), and MEMO::v1.
Referenced by enum_member().
|
static |
Definition at line 1874 of file enum.c.
References argc, ENUM_WANT_SVALUE, enum_yield(), id_cmp, MEMO_CAST, MEMO_V1_SET, MEMO_V2_SET, Qnil, Qundef, rb_cmpint(), rb_funcall(), and MEMO::v1.
Referenced by enum_min_by().
|
static |
Definition at line 1538 of file enum.c.
References min_t::cmp_opt, ENUM_WANT_SVALUE, MEMO_FOR, min_t::min, OPTIMIZED_CMP, Qnil, and Qundef.
Referenced by enum_min().
|
static |
Definition at line 1556 of file enum.c.
References cmp(), ENUM_WANT_SVALUE, MEMO_FOR, min_t::min, Qnil, Qundef, rb_cmpint(), and rb_yield_values().
Referenced by enum_min().
|
static |
Definition at line 2071 of file enum.c.
References argc, ENUM_WANT_SVALUE, enum_yield(), id_cmp, minmax_by_t::last, minmax_by_t::last_bv, MEMO_FOR, minmax_by_i_update(), sort_by_data::n, Qnil, Qundef, rb_cmpint(), and rb_funcall().
Referenced by enum_minmax_by().
|
static |
Definition at line 2050 of file enum.c.
References id_cmp, minmax_by_t::max, minmax_by_t::max_bv, minmax_by_t::min, minmax_by_t::min_bv, Qundef, rb_cmpint(), and rb_funcall().
Referenced by enum_minmax_by(), and minmax_by_i().
|
static |
Definition at line 1750 of file enum.c.
References minmax_t::cmp_opt, ENUM_WANT_SVALUE, minmax_t::last, MEMO_FOR, minmax_i_update(), sort_by_data::n, OPTIMIZED_CMP, Qnil, and Qundef.
Referenced by enum_minmax().
Definition at line 1729 of file enum.c.
References minmax_t::cmp_opt, minmax_t::max, minmax_t::min, sort_by_data::n, OPTIMIZED_CMP, and Qundef.
Referenced by enum_minmax(), and minmax_i().
|
static |
Definition at line 1802 of file enum.c.
References ENUM_WANT_SVALUE, minmax_t::last, MEMO_FOR, minmax_ii_update(), sort_by_data::n, Qnil, Qundef, rb_cmpint(), and rb_yield_values().
Referenced by enum_minmax().
Definition at line 1781 of file enum.c.
References minmax_t::max, minmax_t::min, sort_by_data::n, Qundef, rb_cmpint(), and rb_yield_values().
Referenced by enum_minmax(), and minmax_ii().
Definition at line 1281 of file enum.c.
References bp, nmin_data::buf, cmp(), nmin_data::method, rb_cmpint(), rb_eRuntimeError, rb_raise(), rb_yield_values(), and RBASIC.
Referenced by rb_nmin_run().
Definition at line 1269 of file enum.c.
References bp, nmin_data::buf, cmp(), id_cmp, nmin_data::method, rb_cmpint(), rb_eRuntimeError, rb_funcall(), rb_raise(), and RBASIC.
Referenced by rb_nmin_run().
|
static |
Definition at line 1294 of file enum.c.
References nmin_data::buf, nmin_data::by, nmin_data::cmpfunc, nmin_data::curlen, GETPTR, nmin_data::limit, sort_by_data::n, nmin_data::n, RARRAY_PTR, rb_ary_resize(), nmin_data::rev, and SWAP.
Referenced by nmin_i(), and rb_nmin_run().
Definition at line 1377 of file enum.c.
References nmin_data::buf, nmin_data::bufmax, nmin_data::by, nmin_data::cmpfunc, nmin_data::curlen, ENUM_WANT_SVALUE, enum_yield(), nmin_data::limit, nmin_filter(), Qnil, Qundef, rb_ary_push(), and nmin_data::rev.
Referenced by rb_nmin_run().
|
static |
Definition at line 806 of file enum.c.
References argc, ENUM_WANT_SVALUE, enum_yield(), MEMO_CAST, Qnil, rb_ary_push(), RTEST, MEMO::v1, and MEMO::v2.
Referenced by enum_partition().
Definition at line 31 of file enum.c.
References Qnil, and rb_ary_new4.
Referenced by collect_all(), drop_i(), each_with_index_i(), lazy_grep_v_func(), lazy_grep_v_iter(), lazy_init_yielder(), lazy_uniq_func(), member_i(), take_i(), take_while_i(), zip_ary(), and zip_i().
Definition at line 1411 of file enum.c.
References nmin_data::buf, nmin_data::bufmax, nmin_data::by, nmin_data::cmpfunc, nmin_data::curlen, id_each, nmin_data::limit, LONG_MAX, nmin_data::method, nmin_data::n, nmin_block_cmp(), nmin_cmp(), nmin_filter(), nmin_i(), NUM2LONG, Qundef, RARRAY_AREF, RARRAY_LEN, RARRAY_PTR, rb_ary_new2, rb_ary_resize(), rb_ary_reverse(), rb_ary_tmp_new(), rb_block_call(), rb_block_given_p(), rb_cArray, rb_eArgError, rb_raise(), RBASIC_SET_CLASS, result, nmin_data::rev, and ruby_qsort().
Referenced by enum_max(), enum_max_by(), enum_min(), enum_min_by(), rb_ary_max(), and rb_ary_min().
|
static |
Definition at line 421 of file enum.c.
References argc, ENUM_WANT_SVALUE, enum_yield(), Qnil, rb_ary_push(), and RTEST.
Referenced by enum_reject().
|
static |
Definition at line 3321 of file enum.c.
References id_each, id_lshift, MEMO_FOR, NEW_MEMO_FOR, NIL_P, sliceafter_arg::pat, sliceafter_arg::pred, sliceafter_arg::prev_elts, Qnil, rb_attr_get(), rb_block_call(), rb_funcall(), rb_intern, rb_ivar_get(), sliceafter_ii(), and sliceafter_arg::yielder.
Referenced by enum_slice_after().
|
static |
Definition at line 3285 of file enum.c.
References ENUM_WANT_SVALUE, id_call, id_eqq, id_lshift, NIL_P, sliceafter_arg::pat, sliceafter_arg::pred, sliceafter_arg::prev_elts, Qnil, rb_ary_new3, rb_ary_push(), rb_funcall(), RTEST, UPDATE_MEMO, and sliceafter_arg::yielder.
Referenced by sliceafter_i().
|
static |
Definition at line 3091 of file enum.c.
References id_each, id_lshift, MEMO_FOR, NEW_MEMO_FOR, NIL_P, slicebefore_arg::prev_elts, Qnil, rb_attr_get(), rb_block_call(), rb_funcall(), rb_intern, rb_ivar_get(), slicebefore_arg::sep_pat, slicebefore_arg::sep_pred, slicebefore_ii(), and slicebefore_arg::yielder.
Referenced by enum_slice_before().
|
static |
Definition at line 3064 of file enum.c.
References ENUM_WANT_SVALUE, id_call, id_eqq, id_lshift, MEMO_FOR, NIL_P, slicebefore_arg::prev_elts, Qnil, rb_ary_new3, rb_ary_push(), rb_funcall(), RTEST, slicebefore_arg::sep_pat, slicebefore_arg::sep_pred, and slicebefore_arg::yielder.
Referenced by slicebefore_i().
|
static |
Definition at line 3447 of file enum.c.
References id_each, id_lshift, slicewhen_arg::inverted, MEMO_FOR, NEW_PARTIAL_MEMO_FOR, NIL_P, slicewhen_arg::pred, slicewhen_arg::prev_elt, slicewhen_arg::prev_elts, Qnil, Qundef, rb_attr_get(), rb_block_call(), rb_funcall(), rb_intern, rb_ivar_get(), RTEST, slicewhen_ii(), and slicewhen_arg::yielder.
Referenced by enum_chunk_while(), and enum_slice_when().
|
static |
Definition at line 3409 of file enum.c.
References ENUM_WANT_SVALUE, id_call, id_lshift, slicewhen_arg::inverted, slicewhen_arg::pred, slicewhen_arg::prev_elt, slicewhen_arg::prev_elts, Qnil, Qundef, rb_ary_new3, rb_ary_push(), rb_funcall(), RTEST, UPDATE_MEMO, and slicewhen_arg::yielder.
Referenced by slicewhen_i().
Definition at line 1012 of file enum.c.
References sort_by_data::ary, id_cmp, rb_cmpint(), rb_eRuntimeError, rb_funcall(), rb_raise(), and RBASIC.
Referenced by enum_sort_by().
|
static |
Definition at line 984 of file enum.c.
References argc, sort_by_data::ary, sort_by_data::buf, ENUM_WANT_SVALUE, enum_yield(), MEMO_CAST, sort_by_data::n, Qnil, RARRAY_ASET, RARRAY_LEN, rb_ary_concat(), rb_eRuntimeError, rb_raise(), RBASIC, and SORT_BY_BUFSIZE.
Referenced by enum_sort_by().
|
static |
Definition at line 3622 of file enum.c.
References assert, enum_sum_memo::block_given, enum_sum_memo::c, DBL2NUM, f, enum_sum_memo::f, FIX2LONG, FIXABLE, FIXNUM_P, float_value(), enum_sum_memo::float_value, idPLUS, LONG2FIX, LONG2NUM, sort_by_data::n, enum_sum_memo::n, NULL, NUM2DBL, Qundef, enum_sum_memo::r, rb_big2dbl(), rb_big_plus(), rb_fix_plus(), RB_FLOAT_TYPE_P, rb_funcall(), rb_num2dbl(), rb_rational_plus(), RB_TYPE_P, rb_yield(), RFLOAT_VALUE, T_BIGNUM, T_RATIONAL, and enum_sum_memo::v.
Referenced by enum_sum_i(), and hash_sum_i().
|
static |
Definition at line 2640 of file enum.c.
References argc, argv, MEMO::cnt, MEMO_CAST, Qnil, rb_ary_push(), rb_enum_values_pack(), rb_iter_break(), MEMO::u3, and MEMO::v1.
Referenced by enum_take().
|
static |
Definition at line 2680 of file enum.c.
References argc, argv, sort_by_data::ary, Qnil, rb_ary_push(), rb_enum_values_pack(), rb_iter_break(), rb_yield_values2(), and RTEST.
Referenced by enum_take_while().
|
static |
Definition at line 3848 of file enum.c.
References ENUM_WANT_SVALUE, hash(), Qnil, and rb_hash_add_new_element().
Referenced by enum_uniq().
|
static |
Definition at line 3856 of file enum.c.
References argc, argv, ENUM_WANT_SVALUE, hash(), Qnil, rb_hash_add_new_element(), and rb_yield_values2().
Referenced by enum_uniq().
|
static |
Definition at line 2487 of file enum.c.
References argc, argv, MEMO::cnt, enum_yield_array(), NIL_P, Qnil, RARRAY_AREF, RARRAY_LEN, rb_ary_new2, rb_ary_push(), rb_ary_store(), rb_enum_values_pack(), RB_GC_GUARD, result, MEMO::u3, MEMO::v1, and MEMO::v2.
Referenced by enum_zip().
|
static |
Definition at line 2533 of file enum.c.
References argc, argv, call_next(), call_stop(), enum_yield_array(), NIL_P, Qnil, Qundef, RARRAY_AREF, RARRAY_ASET, RARRAY_LEN, rb_ary_new2, rb_ary_push(), rb_ary_store(), rb_enum_values_pack(), rb_eStopIteration, RB_GC_GUARD, rb_rescue2(), result, MEMO::v1, and MEMO::v2.
Referenced by enum_zip().
|
static |
Definition at line 22 of file enum.c.
Referenced by chunk_ii(), enum_find(), Init_Enumerable(), sliceafter_ii(), slicebefore_ii(), and slicewhen_ii().
|
static |
Definition at line 21 of file enum.c.
Referenced by enum_each_slice_size(), and Init_Enumerable().
|
static |
Definition at line 20 of file enum.c.
Referenced by call_next(), and Init_Enumerable().
|
static |
Definition at line 23 of file enum.c.
Referenced by enum_size(), enum_size_over_p(), Init_Enumerable(), and limit_by_enum_size().
VALUE rb_mEnumerable |
Definition at line 18 of file enum.c.
Referenced by Init_Array(), Init_dbm(), Init_Dir(), Init_Enumerable(), Init_etc(), Init_GC(), Init_gdbm(), Init_Hash(), Init_IO(), Init_ossl_asn1(), Init_Range(), Init_readline(), Init_sdbm(), Init_stringio(), Init_zlib(), InitVM_Enumerator(), and InitVM_Struct().