Ruby
2.4.2p198(2017-09-14revision59899)
|
#include "internal.h"
#include "ruby/util.h"
#include "ruby/st.h"
#include "probes.h"
#include "id.h"
#include "ruby_assert.h"
Go to the source code of this file.
Data Structures | |
struct | ary_sort_data |
struct | select_bang_arg |
Enumerations | |
enum | ary_take_pos_flags { ARY_TAKE_FIRST = 0, ARY_TAKE_LAST = 1 } |
Variables | |
VALUE | rb_cArray |
static ID | id_cmp |
static ID | id_div |
static ID | id_power |
VALUE | rb_output_fs |
static ID | id_random |
#define ARY_CAPA | ( | ary | ) |
Definition at line 100 of file array.c.
Referenced by ary_double_capa(), ary_ensure_room_for_push(), ary_ensure_room_for_unshift(), ary_make_shared(), ary_resize_smaller(), rb_ary_clear(), rb_ary_fill(), rb_ary_pop(), rb_ary_resize(), rb_ary_set_len(), rb_ary_splice(), and rb_ary_store().
#define ARY_DEFAULT_SIZE 16 |
Definition at line 29 of file array.c.
Referenced by ary_double_capa(), ary_ensure_room_for_unshift(), ary_resize_smaller(), flatten(), rb_ary_clear(), rb_ary_pop(), rb_ary_resize(), rb_ary_shift(), and rb_ary_shift_m().
#define ARY_EMBED_LEN | ( | a | ) |
Definition at line 42 of file array.c.
Referenced by ary_resize_capa(), and rb_ary_sort_bang().
#define ARY_EMBED_P | ( | ary | ) |
Definition at line 35 of file array.c.
Referenced by ary_make_shared(), ary_resize_capa(), rb_ary_clear(), rb_ary_flatten_bang(), rb_ary_resize(), rb_ary_shared_with_p(), rb_ary_shift(), rb_ary_sort_bang(), rb_ary_uniq_bang(), and rb_ary_unshare_safe().
#define ARY_EMBED_PTR | ( | a | ) | (assert(ARY_EMBED_P(a)), RARRAY(a)->as.ary) |
Definition at line 41 of file array.c.
Referenced by ary_resize_capa(), rb_ary_modify(), rb_ary_resize(), and rb_ary_sort_bang().
#define ARY_HEAP_LEN | ( | a | ) | (assert(!ARY_EMBED_P(a)), RARRAY(a)->as.heap.len) |
Definition at line 40 of file array.c.
Referenced by ary_shrink_capa().
#define ARY_HEAP_PTR | ( | a | ) | (assert(!ARY_EMBED_P(a)), RARRAY(a)->as.heap.ptr) |
Definition at line 39 of file array.c.
Referenced by rb_ary_free(), rb_ary_modify(), rb_ary_resize(), and rb_ary_sort_bang().
#define ARY_HEAP_SIZE | ( | a | ) | (assert(!ARY_EMBED_P(a)), assert(ARY_OWNS_HEAP_P(a)), RARRAY(a)->as.heap.aux.capa * sizeof(VALUE)) |
Definition at line 46 of file array.c.
Referenced by rb_ary_free(), rb_ary_initialize(), rb_ary_replace(), and rb_ary_sort_bang().
#define ARY_INCREASE_LEN | ( | ary, | |
n | |||
) |
Definition at line 90 of file array.c.
Referenced by rb_ary_delete_at(), rb_ary_pop_m(), rb_ary_shift(), and rb_ary_shift_m().
#define ARY_INCREASE_PTR | ( | ary, | |
n | |||
) |
Definition at line 85 of file array.c.
Referenced by ary_make_partial(), rb_ary_shift(), and rb_ary_shift_m().
Definition at line 30 of file array.c.
Referenced by ary_double_capa(), ary_ensure_room_for_push(), ary_ensure_room_for_unshift(), ary_new(), rb_ary_fill(), rb_ary_initialize(), rb_ary_resize(), rb_ary_splice(), rb_ary_store(), and rb_ary_times().
#define ARY_OWNS_HEAP_P | ( | a | ) | (!FL_TEST((a), ELTS_SHARED|RARRAY_EMBED_FLAG)) |
Definition at line 48 of file array.c.
Referenced by rb_ary_free(), rb_ary_initialize(), rb_ary_memsize(), rb_ary_pop(), and rb_ary_replace().
#define ARY_SET | ( | a, | |
i, | |||
v | |||
) | RARRAY_ASET((assert(!ARY_SHARED_P(a)), (a)), (i), (v)) |
Definition at line 132 of file array.c.
Referenced by rb_ary_fill(), rb_ary_new_from_args(), rb_ary_shift(), and rb_ary_store().
#define ARY_SET_CAPA | ( | ary, | |
n | |||
) |
Definition at line 102 of file array.c.
Referenced by ary_new(), ary_resize_capa(), rb_ary_modify(), rb_ary_resize(), and rb_ary_sort_bang().
#define ARY_SET_EMBED_LEN | ( | ary, | |
n | |||
) |
Definition at line 65 of file array.c.
Referenced by ary_make_partial(), ary_make_substitution(), rb_ary_flatten_bang(), rb_ary_initialize(), rb_ary_modify(), rb_ary_resize(), and rb_ary_sort_bang().
#define ARY_SET_HEAP_LEN | ( | ary, | |
n | |||
) |
Definition at line 72 of file array.c.
Referenced by ary_new(), ary_resize_capa(), rb_ary_resize(), and rb_ary_sort_bang().
#define ARY_SET_LEN | ( | ary, | |
n | |||
) |
Definition at line 76 of file array.c.
Referenced by ary_make_partial(), ary_make_shared(), ary_resize_capa(), ary_resize_smaller(), rb_ary_cat(), rb_ary_clear(), rb_ary_dup(), rb_ary_fill(), rb_ary_initialize(), rb_ary_new_from_args(), rb_ary_new_from_values(), rb_ary_plus(), rb_ary_pop(), rb_ary_product(), rb_ary_push(), rb_ary_replace(), rb_ary_resize(), rb_ary_reverse_m(), rb_ary_rotate_m(), rb_ary_s_create(), rb_ary_sample(), rb_ary_set_len(), rb_ary_sort_bang(), rb_ary_splice(), rb_ary_store(), rb_ary_times(), rb_ary_tmp_new_fill(), rb_ary_uniq_bang(), rb_ary_unshift_m(), select_bang_ensure(), and yield_indexed_values().
#define ARY_SET_PTR | ( | ary, | |
p | |||
) |
Definition at line 60 of file array.c.
Referenced by ary_ensure_room_for_unshift(), ary_make_partial(), ary_make_shared(), ary_new(), ary_resize_capa(), rb_ary_modify(), rb_ary_replace(), and rb_ary_sort_bang().
#define ARY_SET_SHARED | ( | ary, | |
value | |||
) |
Definition at line 110 of file array.c.
Referenced by ary_make_shared(), and rb_ary_set_shared().
#define ARY_SET_SHARED_NUM | ( | ary, | |
value | |||
) |
Definition at line 123 of file array.c.
Referenced by ary_make_shared(), rb_ary_decrement_share(), and rb_ary_increment_share().
#define ARY_SHARED | ( | ary | ) | (assert(ARY_SHARED_P(ary)), RARRAY(ary)->as.heap.aux.shared) |
Definition at line 109 of file array.c.
Referenced by ary_ensure_room_for_push(), ary_ensure_room_for_unshift(), ary_make_shared(), rb_ary_modify(), rb_ary_replace(), rb_ary_shift(), and rb_ary_shift_m().
#define ARY_SHARED_NUM | ( | ary | ) | (assert(ARY_SHARED_ROOT_P(ary)), RARRAY(ary)->as.heap.aux.capa) |
Definition at line 120 of file array.c.
Referenced by rb_ary_decrement_share(), and rb_ary_increment_share().
#define ARY_SHARED_OCCUPIED | ( | ary | ) | (ARY_SHARED_NUM(ary) == 1) |
Definition at line 122 of file array.c.
Referenced by ary_ensure_room_for_push(), ary_ensure_room_for_unshift(), rb_ary_modify(), rb_ary_shift(), and rb_ary_shift_m().
#define ARY_SHARED_P | ( | ary | ) |
Definition at line 32 of file array.c.
Referenced by ary_ensure_room_for_push(), ary_ensure_room_for_unshift(), ary_make_shared(), ary_memcpy0(), ary_resize_capa(), ary_shrink_capa(), rb_ary_clear(), rb_ary_modify(), rb_ary_replace(), rb_ary_set_len(), rb_ary_shared_with_p(), rb_ary_shift(), rb_ary_shift_m(), rb_ary_sort_bang(), rb_ary_uniq_bang(), and rb_ary_unshare_safe().
#define ARY_SHARED_ROOT_P | ( | ary | ) | (FL_TEST((ary), RARRAY_SHARED_ROOT_FLAG)) |
Definition at line 119 of file array.c.
Referenced by ary_make_shared().
#define FL_SET_EMBED | ( | a | ) |
Definition at line 49 of file array.c.
Referenced by ary_resize_capa(), rb_ary_clear(), rb_ary_initialize(), rb_ary_modify(), rb_ary_replace(), rb_ary_sort_bang(), and rb_ary_uniq_bang().
#define FL_SET_SHARED | ( | ary | ) |
Definition at line 54 of file array.c.
Referenced by ary_make_shared(), and rb_ary_set_shared().
#define FL_SET_SHARED_ROOT | ( | ary | ) |
Definition at line 127 of file array.c.
Referenced by ary_make_shared().
#define FL_UNSET_EMBED | ( | ary | ) | FL_UNSET((ary), RARRAY_EMBED_FLAG|RARRAY_EMBED_LEN_MASK) |
Definition at line 53 of file array.c.
Referenced by ary_make_partial(), ary_make_shared(), ary_new(), ary_resize_capa(), rb_ary_replace(), and rb_ary_sort_bang().
#define FL_UNSET_SHARED | ( | ary | ) | FL_UNSET((ary), ELTS_SHARED) |
Definition at line 58 of file array.c.
Referenced by rb_ary_modify(), rb_ary_replace(), rb_ary_sort_bang(), and rb_ary_unshare().
#define OPTHASH_GIVEN_P | ( | opts | ) | (argc > 0 && !NIL_P((opts) = rb_check_hash_type(argv[argc-1])) && (--argc, 1)) |
Definition at line 4683 of file array.c.
Referenced by rb_ary_sample(), and rb_ary_shuffle_bang().
#define RAND_UPTO | ( | max | ) | (long)rb_random_ulong_limited((randgen), (max)-1) |
Definition at line 4687 of file array.c.
Referenced by rb_ary_sample(), and rb_ary_shuffle_bang().
#define rb_intern | ( | str | ) | rb_intern_const(str) |
Referenced by asn1time_to_time(), autoload_require(), big_op(), BigDecimal_div2(), BigDecimal_divmod(), BigDecimal_divremain(), BigDecimal_to_i(), BigDecimal_to_r(), BigDecimalCmp(), boot_defclass(), bsock_setsockopt(), call_verify_cb_proc(), cleanup_iseq_build(), count_imemo_objects(), count_objects(), count_objects_size(), count_symbols(), create_win32ole_param(), create_win32ole_variable(), cto_i(), cv_intern(), default_inspect(), dir_inspect(), dir_open_dir(), dump_output(), DupConfigPtr(), ecerr_destination_encoding(), ecerr_destination_encoding_name(), ecerr_error_bytes(), ecerr_error_char(), ecerr_incomplete_input(), ecerr_readagain_bytes(), ecerr_source_encoding(), ecerr_source_encoding_name(), echild_status(), etc_systmpdir(), EVENTSINK_Invoke(), fdbm_replace(), fdbm_update(), fev_get_handler(), fev_set_handler(), fgdbm_replace(), fgdbm_update(), fole_s_show_help(), folemethod_event(), folemethod_name(), foleparam_name(), folerecord_to_h(), folerecord_typename(), foletype_name(), foletype_s_ole_classes(), folevariable_name(), folevariant_value(), fsdbm_replace(), fsdbm_update(), function_call(), gc_profile_record_get(), gc_start_internal(), generic_to_value(), global_id(), if(), Init_Array(), Init_bubblebabble(), Init_console(), Init_digest(), Init_Enumerator(), Init_fiddle_pointer(), Init_GC(), Init_generator(), Init_objspace(), Init_objspace_dump(), Init_openssl(), Init_ossl_asn1(), Init_ossl_pkcs12(), Init_ossl_pkcs7(), Init_ossl_pkey(), Init_ossl_x509ext(), Init_ossl_x509name(), Init_ossl_x509store(), Init_parser(), Init_pathname(), Init_Proc(), Init_psych_emitter(), Init_psych_parser(), Init_Random(), Init_readline(), Init_socket(), Init_stringio(), Init_strscan(), Init_Struct(), Init_syslog(), Init_thread_sync(), Init_transcode(), Init_vm_eval(), Init_win32ole_event(), Init_win32ole_variant(), Init_zlib(), io_getch(), iseq_data_to_ary(), iseq_translate(), iseq_type_from_sym(), make_econv_exception(), make_exception(), mark(), ole_const_load(), ole_search_handler_method(), olemethod_set_member(), oleparam_ole_param_from_index(), olerecord_ivar_get(), olerecord_ivar_set(), olerecord_set_ivar(), oletype_set_member(), ossl_obj2bio(), ossl_pkcs7_get_type(), ossl_pkcs7_set_certificates(), ossl_pkcs7_set_crls(), ossl_ssl_session_get_time(), ossl_ssl_session_set_time(), ossl_x509attr_get_value(), ossl_x509attr_initialize(), ossl_x509attr_set_value(), ossl_x509ext_initialize(), ossl_x509name_initialize(), ossl_x509store_verify(), parse_keyword_arg_i(), parser_compile_error(), parser_set_compile_option_flag(), path_atime(), path_basename(), path_binread(), path_binwrite(), path_blockdev_p(), path_chardev_p(), path_chmod(), path_chown(), path_ctime(), path_directory_p(), path_dirname(), path_each_entry(), path_each_line(), path_empty_p(), path_entries(), path_executable_p(), path_executable_real_p(), path_exist_p(), path_expand_path(), path_extname(), path_file_p(), path_fnmatch(), path_ftype(), path_grpowned_p(), path_lchmod(), path_lchown(), path_lstat(), path_make_link(), path_make_symlink(), path_mkdir(), path_mtime(), path_open(), path_opendir(), path_owned_p(), path_pipe_p(), path_read(), path_readable_p(), path_readable_real_p(), path_readlines(), path_readlink(), path_realdirpath(), path_realpath(), path_rename(), path_rmdir(), path_s_getwd(), path_s_glob(), path_setgid_p(), path_setuid_p(), path_size(), path_size_p(), path_socket_p(), path_split(), path_stat(), path_sticky_p(), path_sub(), path_symlink_p(), path_sysopen(), path_truncate(), path_unlink(), path_utime(), path_world_readable_p(), path_world_writable_p(), path_writable_p(), path_writable_real_p(), path_write(), path_zero_p(), private_iv_get(), process_options(), range_op(), rb_ary_sort_by_bang(), rb_big_cmp(), rb_big_divmod(), rb_big_fdiv_double(), rb_big_idiv(), rb_big_pow(), rb_big_remainder(), rb_const_missing(), rb_define_alias(), rb_define_attr(), rb_define_class(), rb_define_class_under(), rb_define_const(), rb_define_method(), rb_define_module(), rb_define_module_under(), rb_define_private_method(), rb_define_protected_method(), rb_during_gc(), rb_f_chomp(), rb_f_chop(), rb_f_gsub(), rb_f_sub(), rb_gzreader_bytes(), rb_gzreader_lines(), rb_iseq_load_iseq(), rb_iv_get(), rb_iv_set(), rb_mod_s_used_modules(), rb_obj_basic_to_s_p(), rb_parser_append_print(), rb_parser_while_loop(), rb_rational_den(), rb_rational_num(), rb_strftime_with_timespec(), rb_threadptr_error_print(), rb_undef_method(), rb_vm_fstring_table(), rbtime2vtdate(), rescue_callback(), rsock_init_ancdata(), rsock_init_socket_init(), ruby_thread_init(), set_argv(), set_backtrace(), set_option_encoding_once(), should_be_callable(), sock_initialize(), sockopt_data(), sockopt_family_m(), sockopt_initialize(), sockopt_level(), sockopt_optname(), sockopt_unpack(), strio_bytes(), strio_chars(), strio_codepoints(), strio_lines(), strio_readbyte(), strio_readchar(), strio_readline(), strio_sysread(), transcode_io(), unknown_keyword_error(), unlink_body(), unlink_rescue(), vm_set_main_stack(), vtdate2rbtime(), wait_mode_sym(), with_gvl_callback(), and wmap_allocate().
#define tmpary | ( | n | ) | rb_ary_tmp_new(n) |
Definition at line 4956 of file array.c.
Referenced by rb_ary_product().
#define tmpary_discard | ( | a | ) | (ary_discard(a), RBASIC_SET_CLASS_RAW(a, rb_cArray)) |
Definition at line 4957 of file array.c.
Referenced by rb_ary_product().
#define tmpbuf | ( | n, | |
size | |||
) | rb_str_tmp_new((n)*(size)) |
Definition at line 4954 of file array.c.
Referenced by rb_ary_product(), rb_execarg_parent_start1(), and rb_execarg_run_options().
#define tmpbuf_discard | ( | s | ) | (rb_str_resize((s), 0L), RBASIC_SET_CLASS_RAW(s, rb_cString)) |
Definition at line 4955 of file array.c.
Referenced by rb_ary_product().
enum ary_take_pos_flags |
Definition at line 4045 of file array.c.
References hash(), RARRAY_AREF, RARRAY_LEN, and rb_hash_add_new_element().
Referenced by ary_make_hash().
Definition at line 4073 of file array.c.
References hash(), RARRAY_LEN, rb_ary_elt(), rb_hash_add_new_element(), and rb_yield().
Referenced by ary_make_hash_by().
Definition at line 443 of file array.c.
References FL_WB_PROTECTED, NEWOBJ_OF, RARRAY_EMBED_FLAG, RGENGC_WB_PROTECTED_ARRAY, and T_ARRAY.
Referenced by ary_make_partial(), ary_new(), and empty_ary_alloc().
Definition at line 3639 of file array.c.
References RARRAY_CONST_PTR, RARRAY_LEN, and rb_ary_splice().
Referenced by rb_ary_concat(), and rb_ary_concat_multi().
|
inlinestatic |
Definition at line 566 of file array.c.
References RARRAY_EMBED_FLAG, RARRAY_EMBED_LEN_MASK, rb_ary_free(), and RBASIC.
Referenced by rb_ary_flatten_bang(), and rb_ary_resize().
|
static |
Definition at line 246 of file array.c.
References ARY_CAPA, ARY_DEFAULT_SIZE, ARY_MAX_SIZE, and ary_resize_capa().
Referenced by ary_ensure_room_for_push(), ary_ensure_room_for_unshift(), rb_ary_resize(), rb_ary_splice(), and rb_ary_store().
Definition at line 354 of file array.c.
References ARY_CAPA, ary_double_capa(), ARY_MAX_SIZE, ARY_SHARED, ARY_SHARED_OCCUPIED, ARY_SHARED_P, RARRAY_CONST_PTR, RARRAY_EMBED_LEN_MAX, RARRAY_LEN, rb_ary_modify(), rb_ary_modify_check(), rb_eIndexError, and rb_raise().
Referenced by rb_ary_cat(), rb_ary_push(), and rb_ary_splice().
Definition at line 1090 of file array.c.
References argc, ARY_CAPA, ARY_DEFAULT_SIZE, ary_double_capa(), ary_make_shared(), ARY_MAX_SIZE, ARY_SET_PTR, ARY_SHARED, ARY_SHARED_OCCUPIED, ARY_SHARED_P, assert, len, MEMMOVE, RARRAY_CONST_PTR, RARRAY_LEN, RARRAY_PTR_USE, rb_ary_modify(), rb_eIndexError, and rb_raise().
Referenced by rb_ary_unshift_m().
Definition at line 1794 of file array.c.
References rb_ary_length().
Referenced by rb_ary_collect(), rb_ary_collect_bang(), rb_ary_delete_if(), rb_ary_each(), rb_ary_each_index(), rb_ary_keep_if(), rb_ary_reject(), rb_ary_reject_bang(), rb_ary_reverse_each(), rb_ary_select(), rb_ary_select_bang(), and rb_ary_sort_by_bang().
|
static |
Definition at line 4180 of file array.c.
References ST_CONTINUE, and ST_STOP.
Referenced by rb_ary_or().
Definition at line 1965 of file array.c.
References max(), NIL_P, OBJ_TAINT, OBJ_TAINTED, RARRAY_AREF, rb_enc_copy(), rb_str_buf_append(), and val.
Referenced by rb_ary_join().
|
static |
Definition at line 1981 of file array.c.
References FALSE, NIL_P, RARRAY_AREF, RARRAY_LEN, rb_check_convert_type(), rb_check_string_type(), rb_eArgError, rb_enc_copy(), rb_exec_recursive(), rb_obj_as_string(), rb_raise(), rb_str_buf_append(), RB_TYPE_P, recursive_join(), result, T_ARRAY, T_STRING, and val.
Referenced by rb_ary_join(), rb_ary_resurrect(), and recursive_join().
Definition at line 4066 of file array.c.
References ary_add_hash(), ary_tmp_hash_new(), and hash().
Referenced by rb_ary_and(), rb_ary_diff(), rb_ary_or(), rb_ary_uniq(), and rb_ary_uniq_bang().
Definition at line 4085 of file array.c.
References ary_add_hash_by(), ary_tmp_hash_new(), and hash().
Referenced by rb_ary_uniq(), and rb_ary_uniq_bang().
Definition at line 829 of file array.c.
References ary_alloc(), ARY_INCREASE_PTR, ary_make_shared(), ary_memcpy(), ARY_SET_EMBED_LEN, ARY_SET_LEN, ARY_SET_PTR, assert, FL_UNSET_EMBED, RARRAY_CONST_PTR, RARRAY_EMBED_LEN_MAX, RARRAY_LEN, rb_ary_set_shared(), and result.
Referenced by ary_make_shared_copy(), ary_take_first_or_last(), and rb_ary_subseq().
Definition at line 574 of file array.c.
References ARY_CAPA, ARY_EMBED_P, ary_mem_clear(), ARY_SET_LEN, ARY_SET_PTR, ARY_SET_SHARED, ARY_SET_SHARED_NUM, ARY_SHARED, ARY_SHARED_P, ARY_SHARED_ROOT_P, ary_shrink_capa(), assert, FL_SET_SHARED, FL_SET_SHARED_ROOT, FL_UNSET_EMBED, FL_WB_PROTECTED, len, NEWOBJ_OF, OBJ_FREEZE, OBJ_FROZEN, RARRAY_CONST_PTR, RARRAY_LEN, RGENGC_WB_PROTECTED_ARRAY, and T_ARRAY.
Referenced by ary_ensure_room_for_unshift(), ary_make_partial(), ary_make_substitution(), rb_ary_replace(), rb_ary_shift(), and rb_ary_shift_m().
Definition at line 857 of file array.c.
References ary_make_partial(), RARRAY_LEN, and rb_obj_class().
Referenced by rb_ary_combination(), rb_ary_flatten(), rb_ary_permutation(), rb_ary_product(), rb_ary_repeated_combination(), and rb_ary_repeated_permutation().
Definition at line 607 of file array.c.
References ary_make_shared(), ary_memcpy(), ARY_SET_EMBED_LEN, len, RARRAY_CONST_PTR, RARRAY_EMBED_LEN_MAX, RARRAY_LEN, rb_ary_increment_share(), and rb_ary_new2.
Referenced by rb_ary_sort_bang().
|
static |
Definition at line 143 of file array.c.
References RARRAY_PTR_USE, and rb_mem_clear().
Referenced by ary_make_shared(), rb_ary_fill(), rb_ary_resize(), rb_ary_shift_m(), rb_ary_splice(), and rb_ary_store().
Definition at line 195 of file array.c.
References ary_memcpy0().
Referenced by ary_make_partial(), ary_make_substitution(), rb_ary_dup(), rb_ary_new_from_values(), rb_ary_plus(), rb_ary_replace(), rb_ary_rotate_m(), rb_ary_s_create(), rb_ary_sort_bang(), and rb_ary_times().
|
static |
Definition at line 168 of file array.c.
References argc, ARY_SHARED_P, assert, MEMCPY, RARRAY_PTR, RARRAY_PTR_USE, rb_gc_writebarrier_remember(), and RB_OBJ_WRITE.
Referenced by ary_memcpy(), rb_ary_cat(), rb_ary_splice(), and rb_ary_unshift_m().
Definition at line 159 of file array.c.
References memfill(), Qundef, RARRAY_PTR_USE, and RB_OBJ_WRITTEN.
Referenced by rb_ary_fill(), rb_ary_initialize(), and rb_ary_tmp_new_fill().
Definition at line 461 of file array.c.
References ALLOC_N, ary_alloc(), ARY_MAX_SIZE, ARY_SET_CAPA, ARY_SET_HEAP_LEN, ARY_SET_PTR, FL_UNSET_EMBED, RARRAY_EMBED_LEN_MAX, rb_eArgError, rb_raise(), and RUBY_DTRACE_CREATE_HOOK.
Referenced by flatten(), rb_ary_new_capa(), rb_ary_s_create(), rb_ary_subseq(), rb_ary_times(), rb_ary_tmp_new(), and rb_ary_tmp_new_fill().
|
inlinestatic |
Definition at line 4092 of file array.c.
References RB_GC_GUARD, RHASH, and st_free_table.
Referenced by rb_ary_and(), rb_ary_diff(), rb_ary_or(), rb_ary_uniq(), and rb_ary_uniq_bang().
Definition at line 3160 of file array.c.
References RARRAY_AREF, RARRAY_LEN, rb_ary_push(), rb_yield(), result, and RTEST.
Referenced by rb_ary_reject().
Definition at line 3192 of file array.c.
References ary_sort_data::ary, select_bang_arg::ary, select_bang_arg::len, rb_ary_modify_check(), rb_ensure(), reject_bang_i(), and select_bang_ensure().
Referenced by rb_ary_delete_if(), and rb_ary_reject_bang().
|
static |
Definition at line 201 of file array.c.
References ALLOC_N, ARY_EMBED_LEN, ARY_EMBED_P, ARY_EMBED_PTR, ARY_SET_CAPA, ARY_SET_HEAP_LEN, ARY_SET_LEN, ARY_SET_PTR, ARY_SHARED_P, assert, FL_SET_EMBED, FL_UNSET_EMBED, len, MEMCPY, OBJ_FROZEN, RARRAY, RARRAY_CONST_PTR, RARRAY_EMBED_LEN_MAX, RARRAY_LEN, ruby_xfree(), and SIZED_REALLOC_N.
Referenced by ary_double_capa(), ary_resize_smaller(), rb_ary_clear(), rb_ary_fill(), rb_ary_initialize(), rb_ary_pop(), and rb_ary_uniq_bang().
|
static |
Definition at line 2959 of file array.c.
References ARY_CAPA, ARY_DEFAULT_SIZE, ary_resize_capa(), ARY_SET_LEN, RARRAY_LEN, and rb_ary_modify().
Referenced by rb_ary_compact_bang(), rb_ary_delete(), and rb_ary_delete_same().
Definition at line 2206 of file array.c.
Referenced by rb_ary_reverse(), and rb_ary_rotate().
|
inlinestatic |
Definition at line 235 of file array.c.
References ARY_HEAP_LEN, ARY_SHARED_P, assert, RARRAY, and REALLOC_N.
Referenced by ary_make_shared().
|
static |
Definition at line 869 of file array.c.
References ary_make_partial(), len, NUM2LONG, RARRAY_LEN, rb_cArray, rb_eArgError, rb_raise(), and rb_scan_args().
Referenced by rb_ary_first(), rb_ary_last(), rb_ary_pop_m(), and rb_ary_shift_m().
|
inlinestatic |
Definition at line 4057 of file array.c.
References hash(), rb_hash_new(), and RBASIC_CLEAR_CLASS.
Referenced by ary_make_hash(), and ary_make_hash_by().
|
static |
Definition at line 5041 of file array.c.
References descending_factorial(), id_div, LONG2FIX, and rb_funcallv.
Referenced by rb_ary_combination_size(), and rb_ary_repeated_combination_size().
|
static |
Definition at line 5131 of file array.c.
References MEMZERO, rb_eRuntimeError, rb_raise(), and yield_indexed_values().
Referenced by rb_ary_combination().
|
static |
Definition at line 5030 of file array.c.
References cnt, LONG2FIX, and rb_funcallv.
Referenced by binomial_coefficient(), and rb_ary_permutation_size().
Definition at line 454 of file array.c.
References ary_alloc(), and RUBY_DTRACE_CREATE_HOOK.
Referenced by Init_Array().
Definition at line 4545 of file array.c.
References ARY_DEFAULT_SIZE, ary_new(), id, LONG2NUM, NIL_P, NUM2LONG, Qtrue, RARRAY_AREF, RARRAY_LEN, rb_ary_pop(), rb_ary_push(), rb_check_array_type(), rb_eArgError, rb_eRuntimeError, rb_obj_class(), rb_raise(), RBASIC, RBASIC_SET_CLASS, result, st_data_t, st_delete, st_free_table, st_init_numtable, st_insert, and st_lookup.
Referenced by rb_ary_flatten(), and rb_ary_flatten_bang().
void Init_Array | ( | void | ) |
Definition at line 6092 of file array.c.
References empty_ary_alloc(), id_cmp, id_div, id_power, rb_ary_and(), rb_ary_any_p(), rb_ary_aref(), rb_ary_aset(), rb_ary_assoc(), rb_ary_at(), rb_ary_bsearch(), rb_ary_clear(), rb_ary_cmp(), rb_ary_collect(), rb_ary_collect_bang(), rb_ary_combination(), rb_ary_compact(), rb_ary_compact_bang(), rb_ary_concat_multi(), rb_ary_count(), rb_ary_cycle(), rb_ary_delete(), rb_ary_delete_at_m(), rb_ary_delete_if(), rb_ary_diff(), rb_ary_dig(), rb_ary_drop(), rb_ary_drop_while(), rb_ary_each(), rb_ary_each_index(), rb_ary_empty_p(), rb_ary_eql(), rb_ary_equal(), rb_ary_fetch(), rb_ary_fill(), rb_ary_first(), rb_ary_flatten(), rb_ary_flatten_bang(), rb_ary_frozen_p(), rb_ary_hash(), rb_ary_includes(), rb_ary_index(), rb_ary_initialize(), rb_ary_insert(), rb_ary_inspect(), rb_ary_join_m(), rb_ary_keep_if(), rb_ary_last(), rb_ary_max(), rb_ary_min(), rb_ary_or(), rb_ary_permutation(), rb_ary_plus(), rb_ary_pop_m(), rb_ary_product(), rb_ary_push(), rb_ary_push_m(), rb_ary_rassoc(), rb_ary_reject(), rb_ary_reject_bang(), rb_ary_repeated_combination(), rb_ary_repeated_permutation(), rb_ary_replace(), rb_ary_reverse_bang(), rb_ary_reverse_each(), rb_ary_reverse_m(), rb_ary_rindex(), rb_ary_rotate_bang(), rb_ary_rotate_m(), rb_ary_s_create(), rb_ary_s_try_convert(), rb_ary_sample(), rb_ary_select(), rb_ary_select_bang(), rb_ary_shift_m(), rb_ary_shuffle(), rb_ary_shuffle_bang(), rb_ary_slice_bang(), rb_ary_sort(), rb_ary_sort_bang(), rb_ary_sort_by_bang(), rb_ary_sum(), rb_ary_take(), rb_ary_take_while(), rb_ary_times(), rb_ary_to_a(), rb_ary_to_ary_m(), rb_ary_to_h(), rb_ary_transpose(), rb_ary_uniq(), rb_ary_uniq_bang(), rb_ary_unshift_m(), rb_ary_values_at(), rb_ary_zip(), rb_cArray, rb_cObject, rb_define_alias(), rb_define_alloc_func(), rb_define_class(), rb_define_method(), rb_define_singleton_method(), rb_include_module(), rb_intern, and rb_mEnumerable.
Definition at line 2097 of file array.c.
References OBJ_TAINT, OBJ_TAINTED, RARRAY_AREF, RARRAY_LEN, rb_enc_copy(), rb_inspect(), rb_str_buf_append(), rb_str_buf_cat2(), rb_str_buf_new2(), rb_usascii_str_new_cstr(), and TRUE.
Referenced by rb_ary_inspect().
|
static |
Definition at line 4991 of file array.c.
References rb_eRuntimeError, rb_raise(), and yield_indexed_values().
Referenced by rb_ary_permutation().
Definition at line 4333 of file array.c.
References rb_ary_push(), and ST_CONTINUE.
Referenced by rb_ary_uniq_bang().
Definition at line 4154 of file array.c.
References ary_make_hash(), ary_recycle_hash(), hash(), RARRAY_AREF, RARRAY_LEN, rb_ary_new(), rb_ary_push(), rb_hash_tbl_raw(), st_data_t, st_delete, and to_ary().
Referenced by Init_Array().
Definition at line 5651 of file array.c.
References len, Qfalse, Qtrue, RARRAY_AREF, RARRAY_CONST_PTR, RARRAY_LEN, rb_block_given_p(), rb_yield(), and RTEST.
Referenced by Init_Array().
Definition at line 1266 of file array.c.
References FIX2LONG, FIXNUM_P, len, NULL, NUM2LONG, Qfalse, Qnil, RARRAY_LEN, rb_ary_entry(), rb_ary_subseq(), rb_range_beg_len(), and rb_scan_args().
Referenced by Init_Array().
Definition at line 1723 of file array.c.
References FIX2LONG, FIXNUM_P, len, NUM2LONG, range, RARRAY_CONST_PTR, RARRAY_LEN, rb_ary_modify_check(), rb_ary_splice(), rb_ary_store(), rb_ary_to_ary(), rb_check_arity, RB_GC_GUARD, and rb_range_beg_len().
Referenced by Init_Array().
Definition at line 3775 of file array.c.
References NIL_P, Qnil, RARRAY_AREF, RARRAY_LEN, rb_check_array_type(), and rb_equal().
Referenced by Init_Array().
Definition at line 1313 of file array.c.
References NUM2LONG, and rb_ary_entry().
Referenced by Init_Array(), rb_ary_dig(), and rb_obj_dig().
Definition at line 2598 of file array.c.
References FIX2LONG, FIXNUM_P, rb_ary_bsearch_index(), and rb_ary_entry().
Referenced by Init_Array().
Definition at line 2622 of file array.c.
References FIXNUM_P, id_cmp, INT2FIX, PRIsVALUE, Qfalse, Qnil, Qtrue, RARRAY_LEN, rb_ary_entry(), rb_cmpint(), rb_cNumeric, rb_eTypeError, rb_funcallv, rb_obj_class(), rb_obj_is_kind_of(), rb_raise(), rb_yield(), RETURN_ENUMERATOR, SIGNED_VALUE, val, and zero().
Referenced by rb_ary_bsearch(), and rb_ary_sort().
Definition at line 917 of file array.c.
References ary_ensure_room_for_push(), ary_memcpy0(), ARY_SET_LEN, and RARRAY_LEN.
Referenced by compile_array_(), enumerator_each(), features_index_add_single(), flatten_i(), generator_each(), rb_ary_push_m(), and rb_obj_info_dump().
Definition at line 3487 of file array.c.
References ary_sort_data::ary, ARY_CAPA, ARY_DEFAULT_SIZE, ARY_EMBED_P, ary_resize_capa(), ARY_SET_LEN, ARY_SHARED_P, FL_SET_EMBED, rb_ary_modify_check(), and rb_ary_unshare().
Referenced by each_slice_i(), fdbm_delete_if(), fgdbm_delete_if(), Init_Array(), iseq_set_arguments(), open_key_args(), r_object0(), rb_queue_clear(), rb_szqueue_clear(), rb_threadptr_pending_interrupt_clear(), reset_coverage_i(), ruby_set_argv(), set_argv(), and wakeup_all_threads().
Definition at line 4028 of file array.c.
References INT2FIX, len, NIL_P, Qnil, Qundef, RARRAY_LEN, rb_check_array_type(), rb_exec_recursive_paired(), and recursive_cmp().
Referenced by Init_Array().
Definition at line 2726 of file array.c.
References ary_enum_length(), RARRAY_AREF, RARRAY_LEN, rb_ary_new2, rb_ary_push(), rb_yield(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Array().
Definition at line 2762 of file array.c.
References ary_sort_data::ary, ary_enum_length(), RARRAY_AREF, RARRAY_LEN, rb_ary_modify(), rb_ary_store(), rb_yield(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Array().
Definition at line 5186 of file array.c.
References ALLOCV_END, ALLOCV_N, ary_sort_data::ary, ary_make_shared_copy(), combinate0(), len, NUM2LONG, RARRAY_AREF, RARRAY_LEN, rb_ary_combination_size(), rb_ary_new2, rb_ary_new3, rb_cArray, rb_yield(), RBASIC_CLEAR_CLASS, RBASIC_SET_CLASS_RAW, and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Array().
Definition at line 5152 of file array.c.
References binomial_coefficient(), NUM2LONG, RARRAY_AREF, and RARRAY_LEN.
Referenced by rb_ary_combination().
Definition at line 4485 of file array.c.
References ary_sort_data::ary, rb_ary_compact_bang(), and rb_ary_dup().
Referenced by Init_Array().
Definition at line 4452 of file array.c.
References ary_sort_data::ary, ary_resize_smaller(), NIL_P, Qnil, RARRAY_CONST_PTR, RARRAY_LEN, and rb_ary_modify().
Referenced by Init_Array(), and rb_ary_compact().
Definition at line 3686 of file array.c.
References ary_append(), and to_ary().
Referenced by argf_readlines(), enum_sort_by(), flat_map_i(), ole_methods(), open_key_args(), rb_ary_concat_multi(), and sort_by_i().
Definition at line 3669 of file array.c.
References argc, ary_sort_data::ary, ary_append(), rb_ary_concat(), rb_ary_modify_check(), and rb_ary_tmp_new().
Referenced by Init_Array().
Definition at line 4514 of file array.c.
References LONG2NUM, RARRAY_AREF, RARRAY_LEN, rb_block_given_p(), rb_equal(), rb_scan_args(), rb_warn(), rb_yield(), and RTEST.
Referenced by Init_Array().
Definition at line 4930 of file array.c.
References NIL_P, NUM2LONG, Qnil, RARRAY_AREF, RARRAY_LEN, rb_ary_cycle_size(), rb_scan_args(), rb_yield(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Array().
Definition at line 4894 of file array.c.
References DBL2NUM, INFINITY, INT2FIX, LONG2FIX, mul, NUM2LONG, Qnil, RARRAY_AREF, RARRAY_LEN, rb_ary_length(), and rb_funcallv.
Referenced by rb_ary_cycle().
|
static |
Definition at line 261 of file array.c.
References ARY_SET_SHARED_NUM, ARY_SHARED_NUM, rb_ary_free(), and rb_gc_force_recycle().
Referenced by rb_ary_modify(), rb_ary_replace(), and rb_ary_unshare().
Definition at line 2992 of file array.c.
References ary_resize_smaller(), Qnil, RARRAY_AREF, RARRAY_LEN, rb_ary_store(), rb_block_given_p(), rb_equal(), and rb_yield().
Referenced by delete_current_thread(), env_replace_i(), Init_Array(), and queue_delete_from_waiting().
Definition at line 3045 of file array.c.
References ARY_INCREASE_LEN, len, MEMMOVE, Qnil, RARRAY_AREF, RARRAY_LEN, RARRAY_PTR_USE, and rb_ary_modify().
Referenced by ole_delete_event(), rb_ary_delete_at_m(), rb_ary_slice_bang(), and rb_threadptr_pending_interrupt_deque().
Definition at line 3082 of file array.c.
References NUM2LONG, and rb_ary_delete_at().
Referenced by Init_Array().
Definition at line 3267 of file array.c.
References ary_sort_data::ary, ary_enum_length(), ary_reject_bang(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Array().
Definition at line 3022 of file array.c.
References ary_resize_smaller(), RARRAY_AREF, RARRAY_LEN, and rb_ary_store().
Referenced by rb_obj_info_dump().
Definition at line 4120 of file array.c.
References ary_make_hash(), ary_recycle_hash(), hash(), RARRAY_AREF, RARRAY_LEN, rb_ary_elt(), rb_ary_new(), rb_ary_push(), rb_hash_tbl_raw(), st_lookup, and to_ary().
Referenced by Init_Array().
Definition at line 5685 of file array.c.
References argv, Qnil, rb_ary_at(), rb_check_arity, rb_obj_dig(), and UNLIMITED_ARGUMENTS.
Referenced by Init_Array().
Definition at line 5600 of file array.c.
References NUM2LONG, Qnil, RARRAY_LEN, rb_ary_new(), rb_ary_subseq(), rb_eArgError, rb_raise(), and result.
Referenced by Init_Array(), and rb_ary_drop_while().
Definition at line 5632 of file array.c.
References LONG2FIX, RARRAY_AREF, RARRAY_LEN, rb_ary_drop(), rb_yield(), RETURN_ENUMERATOR, and RTEST.
Referenced by Init_Array().
Definition at line 1927 of file array.c.
References ary_memcpy(), ARY_SET_LEN, len, RARRAY_CONST_PTR, RARRAY_LEN, and rb_ary_new2.
Referenced by args_copy(), args_extend(), args_pop_keyword_hash(), args_reduce(), args_stored_kw_argv_to_hash(), ary2sv(), coverage_peek_result_i(), each_cons_i(), enumerator_each(), enumerator_peek_values_m(), lazy_add_method(), method_def_location(), opobj_inspect(), rb_ary_compact(), rb_ary_sample(), rb_ary_shuffle(), rb_ary_sort(), rb_ary_transpose(), rb_ary_uniq(), rb_struct_s_members_m(), save_env_i(), and thread_create_core().
Definition at line 1818 of file array.c.
References ary_enum_length(), RARRAY_AREF, RARRAY_LEN, rb_yield(), and RETURN_SIZED_ENUMERATOR.
Referenced by dir_s_glob(), and Init_Array().
Definition at line 1848 of file array.c.
References ary_enum_length(), LONG2NUM, RARRAY_LEN, rb_yield(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Array().
Definition at line 1185 of file array.c.
References len, Qnil, RARRAY_AREF, and RARRAY_LEN.
Referenced by ary_add_hash_by(), rb_ary_diff(), rb_ary_sample(), rb_ary_select(), rb_ary_to_h(), rb_ary_transpose(), rb_ary_zip(), recursive_cmp(), and recursive_eql().
Definition at line 1919 of file array.c.
References Qfalse, Qtrue, and RARRAY_LEN.
Referenced by Init_Array().
Definition at line 1196 of file array.c.
References len, Qnil, RARRAY_CONST_PTR, and RARRAY_LEN.
Referenced by addrinfo_initialize(), addrinfo_ip_address(), addrinfo_ip_unpack(), addrinfo_mload(), ary2ptr_dispparams(), ary_len_of_dim(), ary_new_dim(), check_exec_redirect(), check_type_val2variant(), collect_caller_bindings(), dimension(), divmodv(), enc_register_at(), EVENTSINK_Invoke(), evs_entry(), foletypelib_initialize(), folevariant_initialize(), folevariant_s_array(), frame_get(), generate_json_array(), generate_json_object(), get_id_entry(), get_loaded_features_index(), ibf_dump_iseq_list(), ibf_load_iseq(), ibf_load_object(), initialize_params(), iseq_build_from_ary_body(), iseq_data_to_ary(), iseq_load(), JSON_parse_string(), lazy_drop_proc(), lazy_drop_while_proc(), lazy_take_proc(), lazy_zip_arrays_func(), lep_svar_get(), match_i(), ole_ary_m_entry(), ole_invoke(), ole_invoke2(), ole_search_event(), ole_search_event_at(), oletypelib_search_registry2(), ossl_asn1cons_to_der(), ossl_call_client_cert_cb(), ossl_call_session_get_cb(), ossl_call_session_new_cb(), ossl_call_session_remove_cb(), ossl_sslctx_add_extra_chain_cert_i(), ossl_sslctx_set_ciphers(), ossl_x509name_init_i(), parse_main(), path_split(), pty_close_pty(), rb_ary_aref(), rb_ary_at(), rb_ary_bsearch(), rb_ary_bsearch_index(), rb_ary_product(), rb_ary_values_at(), rb_debug_inspector_frame_binding_get(), rb_debug_inspector_frame_class_get(), rb_debug_inspector_frame_iseq_get(), rb_debug_inspector_frame_self_get(), rb_econv_init_by_convpath(), rb_enc_aliases_enc_i(), rb_enc_from_encoding_index(), rb_error_frozen_object(), rb_iseq_disasm(), rb_reg_s_union(), rb_reg_s_union_m(), rb_struct_each_pair(), rb_struct_to_h(), reduce0(), rescue_callback(), select_internal(), set_id_entry(), set_state_ivars(), sock_initialize(), start_document(), and time_timespec().
Definition at line 3907 of file array.c.
References Qfalse, Qtrue, RARRAY_CONST_PTR, RARRAY_LEN, rb_exec_recursive_paired(), RB_TYPE_P, recursive_eql(), and T_ARRAY.
Referenced by Init_Array().
Definition at line 3871 of file array.c.
References Qfalse, Qtrue, RARRAY_CONST_PTR, RARRAY_LEN, rb_equal(), rb_exec_recursive_paired(), rb_respond_to(), RB_TYPE_P, recursive_equal(), and T_ARRAY.
Referenced by Init_Array().
Definition at line 1398 of file array.c.
References NUM2LONG, RARRAY_AREF, RARRAY_LEN, rb_block_given_p(), rb_eIndexError, rb_raise(), rb_scan_args(), rb_warn(), and rb_yield().
Referenced by Init_Array().
Definition at line 3534 of file array.c.
References ary_sort_data::ary, ARY_CAPA, ARY_MAX_SIZE, ary_mem_clear(), ary_memfill(), ary_resize_capa(), ARY_SET, ARY_SET_LEN, len, LONG2NUM, NIL_P, NUM2LONG, Qundef, RARRAY_LEN, rb_ary_modify(), rb_block_given_p(), rb_eArgError, rb_raise(), rb_range_beg_len(), rb_scan_args(), and rb_yield().
Referenced by Init_Array().
Definition at line 1334 of file array.c.
References ARY_TAKE_FIRST, ary_take_first_or_last(), Qnil, RARRAY_AREF, and RARRAY_LEN.
Referenced by Init_Array().
Definition at line 4668 of file array.c.
References ary_make_shared_copy(), flatten(), level, mod, NIL_P, NUM2INT, OBJ_INFECT, rb_scan_args(), and result.
Referenced by Init_Array().
Definition at line 4623 of file array.c.
References ary_sort_data::ary, ary_discard(), ARY_EMBED_P, ARY_SET_EMBED_LEN, flatten(), level, mod, NIL_P, NUM2INT, Qnil, rb_ary_modify_check(), rb_ary_replace(), rb_obj_freeze(), rb_scan_args(), and result.
Referenced by Init_Array().
void rb_ary_free | ( | VALUE | ary | ) |
Definition at line 547 of file array.c.
References ARY_HEAP_PTR, ARY_HEAP_SIZE, ARY_OWNS_HEAP_P, RUBY_FUNC_EXPORTED, and ruby_sized_xfree().
Referenced by ary_discard(), loaded_features_index_clear_i(), obj_free(), and rb_ary_decrement_share().
Definition at line 403 of file array.c.
References rb_obj_freeze().
Referenced by coverage_peek_result_i(), curry(), make_curry_proc(), and method_definition_set().
Definition at line 417 of file array.c.
References OBJ_FROZEN, Qfalse, and Qtrue.
Referenced by Init_Array().
Definition at line 3929 of file array.c.
References NUM2LONG, RARRAY_AREF, RARRAY_LEN, rb_hash(), rb_hash_end(), rb_hash_start(), rb_hash_uint(), and ST2FIX.
Referenced by Init_Array().
Definition at line 3958 of file array.c.
References Qfalse, Qtrue, Qundef, RARRAY_AREF, RARRAY_LEN, rb_equal(), and rb_equal_opt().
Referenced by env_replace_i(), and Init_Array().
Definition at line 292 of file array.c.
References ARY_SET_SHARED_NUM, and ARY_SHARED_NUM.
Referenced by ary_make_substitution(), and rb_ary_set_shared().
Definition at line 1452 of file array.c.
References len, LONG2NUM, Qfalse, Qnil, Qtrue, Qundef, RARRAY_AREF, RARRAY_CONST_PTR, RARRAY_LEN, rb_block_given_p(), rb_check_arity, rb_equal(), rb_equal_opt(), rb_warn(), rb_yield(), RETURN_ENUMERATOR, RTEST, and val.
Referenced by Init_Array().
Definition at line 722 of file array.c.
References ARY_HEAP_SIZE, ARY_MAX_SIZE, ary_memfill(), ARY_OWNS_HEAP_P, ary_resize_capa(), ARY_SET_EMBED_LEN, ARY_SET_LEN, FIXNUM_P, FL_SET_EMBED, len, LONG2NUM, NIL_P, NUM2LONG, RARRAY_CONST_PTR, rb_ary_modify(), rb_ary_replace(), rb_ary_store(), rb_ary_unshare_safe(), rb_block_given_p(), rb_check_array_type(), rb_eArgError, rb_raise(), rb_scan_args(), rb_warn(), rb_warning(), rb_yield(), ruby_sized_xfree(), size, and val.
Referenced by Init_Array().
Definition at line 1772 of file array.c.
References NUM2LONG, RARRAY_LEN, rb_ary_length(), rb_ary_modify_check(), rb_ary_splice(), rb_check_arity, and UNLIMITED_ARGUMENTS.
Referenced by Init_Array().
Definition at line 2128 of file array.c.
References inspect_ary(), RARRAY_LEN, rb_exec_recursive(), and rb_usascii_str_new2.
Referenced by Init_Array(), and rb_ary_to_s().
Definition at line 2034 of file array.c.
References ary_join_0(), ary_join_1(), FALSE, len, NIL_P, OBJ_TAINT, OBJ_TAINTED, RARRAY_AREF, RARRAY_LEN, rb_check_string_type(), rb_enc_associate(), rb_str_buf_new(), rb_usascii_encoding(), rb_usascii_str_new(), result, RSTRING_LEN, StringValue, TRUE, and val.
Referenced by debug_deadlock_check(), rb_ary_join_m(), rb_ary_times(), rb_insn_operand_intern(), and rb_keyword_error_new().
Definition at line 2086 of file array.c.
References NIL_P, rb_ary_join(), rb_output_fs, and rb_scan_args().
Referenced by Init_Array().
Definition at line 2951 of file array.c.
References ary_sort_data::ary, ary_enum_length(), rb_ary_select_bang(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Array().
Definition at line 1361 of file array.c.
References ary_take_first_or_last(), ARY_TAKE_LAST, len, Qnil, RARRAY_AREF, and RARRAY_LEN.
Referenced by Init_Array(), range_last(), and rb_gc_register_mark_object().
Definition at line 1903 of file array.c.
References len, LONG2NUM, and RARRAY_LEN.
Referenced by ary_enum_length(), rb_ary_cycle_size(), and rb_ary_insert().
Definition at line 4245 of file array.c.
References NIL_P, OPTIMIZED_CMP, Qnil, Qundef, RARRAY_AREF, RARRAY_LEN, rb_block_given_p(), rb_cmpint(), rb_nmin_run(), rb_scan_args(), rb_yield_values(), and result.
Referenced by Init_Array().
RUBY_FUNC_EXPORTED size_t rb_ary_memsize | ( | VALUE | ary | ) |
Definition at line 555 of file array.c.
References ARY_OWNS_HEAP_P, and RARRAY.
Referenced by obj_memsize_of().
Definition at line 4300 of file array.c.
References NIL_P, OPTIMIZED_CMP, Qnil, Qundef, RARRAY_AREF, RARRAY_LEN, rb_block_given_p(), rb_cmpint(), rb_nmin_run(), rb_scan_args(), rb_yield_values(), and result.
Referenced by Init_Array().
void rb_ary_modify | ( | VALUE | ary | ) |
Definition at line 316 of file array.c.
References ALLOC_N, ARY_EMBED_PTR, ARY_HEAP_PTR, ARY_SET_CAPA, ARY_SET_EMBED_LEN, ARY_SET_PTR, ARY_SHARED, ARY_SHARED_OCCUPIED, ARY_SHARED_P, FL_SET_EMBED, FL_UNSET_SHARED, len, MEMCPY, MEMMOVE, RARRAY_CONST_PTR, RARRAY_EMBED_LEN_MAX, RARRAY_LEN, RARRAY_PTR_USE, rb_ary_decrement_share(), rb_ary_modify_check(), rb_ary_unshare(), rb_gc_writebarrier_remember(), and shift().
Referenced by ary_ensure_room_for_push(), ary_ensure_room_for_unshift(), ary_resize_smaller(), rb_ary_collect_bang(), rb_ary_compact_bang(), rb_ary_delete_at(), rb_ary_fill(), rb_ary_initialize(), rb_ary_resize(), rb_ary_reverse(), rb_ary_rotate(), rb_ary_select_bang(), rb_ary_shuffle_bang(), rb_ary_sort_bang(), rb_ary_sort_by_bang(), rb_ary_splice(), and rb_ary_store().
|
inlinestatic |
Definition at line 310 of file array.c.
References rb_check_frozen.
Referenced by ary_ensure_room_for_push(), ary_reject_bang(), rb_ary_aset(), rb_ary_clear(), rb_ary_concat_multi(), rb_ary_flatten_bang(), rb_ary_insert(), rb_ary_modify(), rb_ary_pop(), rb_ary_pop_m(), rb_ary_replace(), rb_ary_set_len(), rb_ary_shift(), rb_ary_shift_m(), rb_ary_slice_bang(), rb_ary_uniq_bang(), and rb_ary_unshift_m().
VALUE rb_ary_new | ( | void | ) |
Definition at line 493 of file array.c.
References RARRAY_EMBED_LEN_MAX, and rb_ary_new2.
Referenced by add_event_call_back(), add_modules(), addrinfo_list_new(), argf_readlines(), args_rest_array(), ary_new_dim(), backtrace_collect(), check_exec_redirect(), check_exec_redirect1(), class_instance_method_list(), collect_caller_bindings(), collect_values_of_values(), debug_lines(), dir_globs(), econv_convpath(), enum_collect(), enum_cycle(), enum_drop(), enum_drop_while(), enum_find_all(), enum_flat_map(), enum_grep(), enum_grep_v(), enum_partition(), enum_reject(), enum_sort_by(), enum_take_while(), enum_to_a(), enum_zip(), env_each_pair(), env_keys(), env_to_a(), env_values(), env_values_at(), etc_getpwent(), EVENTSINK_Invoke(), fdbm_keys(), fdbm_select(), fdbm_to_a(), fdbm_values(), fev_initialize(), fgdbm_keys(), fgdbm_select(), fgdbm_to_a(), fgdbm_values(), filename_completion_proc_call(), foletype_s_progids(), foletypelib_ole_types(), foletypelib_s_typelibs(), fsdbm_delete_if(), fsdbm_keys(), fsdbm_select(), fsdbm_to_a(), fsdbm_values(), gc_profile_record_get(), get_dns_server_list(), Init_GC(), Init_load(), Init_ossl_asn1(), Init_VM(), Init_win32ole(), Init_win32ole_event(), int_ossl_asn1_decode0_cons(), io_readlines(), iseq_data_to_ary(), JSON_parse_array(), lazy_add_method(), lep_svar_set(), make_addrinfo(), make_hostent_internal(), name_err_local_variables(), nsdr(), ole_method_params(), ole_method_return_type_detail(), ole_methods(), ole_methods_from_typeinfo(), ole_param_ole_type_detail(), ole_type_impl_ole_types(), ole_variable_ole_type_detail(), ole_variables(), ole_variant2val(), ossl_asn1_decode0(), ossl_asn1_decode_all(), ossl_engine_get_cmds(), ossl_engine_s_engines(), ossl_get_errors(), ossl_ocspbres_get_status(), ossl_ocspreq_get_certid(), ossl_pkcs7_get_recipient(), ossl_pkcs7_get_signer(), ossl_s_ciphers(), ossl_sslctx_get_ciphers(), ossl_x509_get_extensions(), ossl_x509crl_get_extensions(), ossl_x509crl_get_revoked(), ossl_x509name_to_a(), ossl_x509req_get_attributes(), ossl_x509revoked_get_extensions(), ossl_x509stctx_get_chain(), pack_pack(), pack_unpack_internal(), parse(), proc_curry(), proc_waitall(), rb_ary_and(), rb_ary_diff(), rb_ary_drop(), rb_ary_reject(), rb_call_end_proc(), rb_check_exec_env(), rb_enc_aliases(), rb_f_global_variables(), rb_f_untrace_var(), rb_fiddle_ptr_free_get(), rb_fix_digits(), rb_gzreader_readlines(), rb_insn_operand_intern(), rb_insns_name_array(), rb_int_digits_bigbase(), rb_iseqw_line_trace_all(), rb_mod_ancestors(), rb_mod_included_modules(), rb_mod_nesting(), rb_mod_s_used_modules(), rb_obj_instance_variables(), rb_obj_singleton_methods(), rb_push_glob(), rb_scan_args(), rb_str_enumerate_bytes(), rb_str_enumerate_lines(), rb_str_scan(), rb_str_split_m(), rb_struct_select(), rb_thread_keys(), rb_thread_list(), rb_thread_variables(), reachable_objects_from(), reduce0(), run_exec_dup2_child(), save_env(), save_redirect_fd(), search_convpath_i(), select_internal(), sock_s_gethostbyaddr(), sock_s_unpack_sockaddr_in(), ssl_renegotiation_cb(), strio_readlines(), thgroup_list(), username_completion_proc_call(), vm_backtrace_to_ary(), vm_expandarray(), wmap_keys(), and wmap_values().
VALUE rb_ary_new_capa | ( | long | capa | ) |
Definition at line 487 of file array.c.
References ary_new(), and rb_cArray.
Referenced by ibf_load_object_array(), match_ary_subseq(), match_names(), rb_ary_sample(), rb_ary_zip(), rb_hash_flatten(), rb_hash_keys(), rb_hash_to_a(), rb_hash_values(), rb_reg_names(), rb_str_enumerate_chars(), and rb_str_enumerate_codepoints().
VALUE() rb_ary_new_from_args | ( | long | n, |
... | |||
) |
Definition at line 499 of file array.c.
References ARY_SET, ARY_SET_LEN, and rb_ary_new2.
Referenced by iseq_compile_each(), iseq_data_to_ary(), rb_ary_sample(), rb_fix_digits(), and rb_int_digits_bigbase().
Definition at line 518 of file array.c.
References ary_memcpy(), ARY_SET_LEN, and rb_ary_new2.
Referenced by args_copy(), cycle_i(), lazy_zip_func(), rb_ary_sample(), and rb_insn_operand_intern().
Definition at line 4203 of file array.c.
References ary_hash_orset(), ary_make_hash(), ary_recycle_hash(), hash(), Qundef, RARRAY_AREF, RARRAY_LEN, rb_hash_values(), RB_OBJ_WRITTEN, RHASH_TBL_RAW, st_data_t, st_update(), and to_ary().
Referenced by Init_Array().
Definition at line 5093 of file array.c.
References ALLOCV_END, ALLOCV_N, ary_sort_data::ary, ary_make_shared_copy(), MEMZERO, NIL_P, NUM2LONG, permute0(), RARRAY_AREF, RARRAY_LEN, rb_ary_new2, rb_ary_new3, rb_ary_permutation_size(), rb_cArray, rb_scan_args(), rb_yield(), RBASIC_CLEAR_CLASS, RBASIC_SET_CLASS_RAW, RETURN_SIZED_ENUMERATOR, and roomof.
Referenced by Init_Array().
Definition at line 5056 of file array.c.
References descending_factorial(), NUM2LONG, RARRAY_AREF, and RARRAY_LEN.
Referenced by rb_ary_permutation().
Definition at line 3621 of file array.c.
References ary_memcpy(), ARY_SET_LEN, len, RARRAY_CONST_PTR, RARRAY_LEN, rb_ary_new2, and to_ary().
Referenced by curry(), and Init_Array().
Definition at line 949 of file array.c.
References ARY_CAPA, ARY_DEFAULT_SIZE, ARY_OWNS_HEAP_P, ary_resize_capa(), ARY_SET_LEN, Qnil, RARRAY_AREF, RARRAY_LEN, and rb_ary_modify_check().
Referenced by args_pop_keyword_hash(), cut_stack_tail(), flatten(), r_object0(), rb_ary_pop_m(), rb_str_split_m(), rb_thread_s_handle_interrupt(), and rb_uninterruptible().
Definition at line 985 of file array.c.
References ARY_INCREASE_LEN, ary_take_first_or_last(), ARY_TAKE_LAST, RARRAY_LEN, rb_ary_modify_check(), rb_ary_pop(), and result.
Referenced by Init_Array().
Definition at line 5441 of file array.c.
References ary_sort_data::ary, ary_make_shared_copy(), ARY_SET_LEN, FL_SET, FL_TEST, FL_UNSET, FL_USER5, MUL_OVERFLOW_LONG_P, NIL_P, Qnil, RARRAY_LEN, RARRAY_PTR, rb_ary_entry(), rb_ary_new2, rb_ary_push(), rb_block_given_p(), rb_eRangeError, rb_eRuntimeError, rb_raise(), rb_yield(), RBASIC_CLEAR_CLASS, result, RSTRING_PTR, tmpary, tmpary_discard, tmpbuf, tmpbuf_discard, and to_ary().
Referenced by Init_Array().
Definition at line 905 of file array.c.
References ary_ensure_room_for_push(), ARY_SET_LEN, RARRAY_LEN, RARRAY_PTR_USE, and RB_OBJ_WRITE.
Referenced by add_cipher_name_to_ary(), add_event_call_back(), add_modules(), addrinfo_list_new(), args_extend(), args_setup_kw_parameters(), args_stored_kw_argv_to_hash(), ary_reject(), backtrace_collect(), BigDecimal_split(), cdhash_each(), check_exec_env_i(), check_exec_redirect(), check_exec_redirect1(), chunk_ii(), collect_all(), collect_caller_bindings_cfunc(), collect_caller_bindings_iseq(), collect_i(), collect_trace(), collect_values(), compile_array_(), cv_list_i(), cycle_i(), define_final0(), drop_i(), drop_while_i(), each_cons_i(), each_slice_i(), econv_convpath(), enc_names_i(), env_each_pair(), env_keys(), env_to_a(), env_values(), env_values_at(), etc_getpwent(), EVENTSINK_Invoke(), evs_push(), fdbm_delete_if(), fdbm_keys(), fdbm_select(), fdbm_to_a(), fdbm_values(), fdbm_values_at(), features_index_add_single(), fgdbm_delete_if(), fgdbm_keys(), fgdbm_select(), fgdbm_to_a(), fgdbm_values(), fgdbm_values_at(), filename_completion_proc_call(), find_all_i(), first_i(), flat_map_i(), flatten(), foletype_s_progids(), foletypelib_s_typelibs(), fsdbm_delete_if(), fsdbm_keys(), fsdbm_select(), fsdbm_to_a(), fsdbm_values(), fsdbm_values_at(), gc_profile_record_get(), generator_each(), get_dns_server_list(), grep_i(), grep_iter_i(), group_by_i(), gvar_i(), ibf_dump_object(), ibf_dump_object_list(), ibf_dump_setup(), ibf_load_object_array(), Init_Array(), Init_Encoding(), Init_ossl_ssl(), Init_VM(), ins_methods_push(), int_ossl_asn1_decode0_cons(), io_readlines(), iseq_add_mark_object_compile_time(), iseq_data_to_ary(), iseq_mark_ary_create(), iseq_set_arguments(), iseq_set_arguments_keywords(), ivar_i(), JSON_parse_array(), JSON_parse_string(), keys_i(), lazy_add_method(), lazy_zip(), lazy_zip_arrays_func(), lazy_zip_func(), lex_getline(), list_i(), make_addrinfo(), make_hostent_internal(), make_unknown_kw_hash(), match_array(), match_ary_aref(), match_ary_subseq(), match_i(), match_values_at(), mk_ary_of_str(), nmin_i(), nsdr(), ole_method_params(), ole_methods_sub(), ole_type_impl_ole_types(), ole_typedesc2val(), ole_types_from_typelib(), ole_usertype2val(), ole_variables(), open_key_args(), ossl_asn1_decode0(), ossl_asn1_decode_all(), ossl_engine_get_cmds(), ossl_engine_s_engines(), ossl_get_errors(), ossl_ocspbres_get_responses(), ossl_ocspbres_get_status(), ossl_ocspreq_get_certid(), ossl_ocspsres_get_extensions(), ossl_pkcs7_get_recipient(), ossl_pkcs7_get_signer(), ossl_ssl_cipher_to_ary(), ossl_ssl_get_peer_cert_chain(), ossl_sslctx_add_extra_chain_cert_i(), ossl_sslctx_get_ciphers(), ossl_sslctx_session_get_cb(), ossl_sslctx_session_new_cb(), ossl_sslctx_session_remove_cb(), ossl_x509_get_extensions(), ossl_x509crl_get_extensions(), ossl_x509crl_get_revoked(), ossl_x509name_to_a(), ossl_x509req_get_attributes(), ossl_x509revoked_get_extensions(), ossl_x509stctx_get_chain(), pack_pack(), parse(), partition_i(), proc_waitall(), push_include(), push_pattern(), push_value(), queue_do_pop(), queue_do_push(), r_object0(), random_dump(), rb_ary_and(), rb_ary_collect(), rb_ary_diff(), rb_ary_product(), rb_ary_select(), rb_ary_zip(), rb_condvar_wait(), rb_construct_expanded_load_path(), rb_enc_name_list_i(), rb_f_global_variables(), rb_f_untrace_var(), rb_fiddle_ptr_free_get(), rb_fix_digits(), rb_gc_register_mark_object(), rb_get_kwargs(), rb_get_values_at(), rb_gzreader_readlines(), rb_hash_fetch_values(), rb_hash_values_at(), rb_insn_operand_intern(), rb_insns_name_array(), rb_int_digits_bigbase(), rb_iseq_add_mark_object(), rb_iseq_parameters(), rb_local_constants_i(), rb_mod_ancestors(), rb_mod_included_modules(), rb_mod_nesting(), rb_provide_feature(), rb_require_internal(), rb_scan_args(), rb_str_enumerate_bytes(), rb_str_enumerate_chars(), rb_str_enumerate_codepoints(), rb_str_enumerate_lines(), rb_str_scan(), rb_str_split_m(), rb_struct_select(), rb_szqueue_push(), rb_thread_list(), rb_thread_s_handle_interrupt(), rb_threadptr_pending_interrupt_enque(), rb_uninterruptible(), rb_zlib_crc_table(), reachable_object_from_i(), reg_names_iter(), reject_i(), ruby_init_loadpath_safe(), ruby_set_argv(), run_exec_dup2_child(), save_env_i(), save_redirect_fd(), scan_once(), select_internal(), set_argv(), sliceafter_ii(), slicebefore_ii(), slicewhen_ii(), sock_s_gethostbyaddr(), sock_s_unpack_sockaddr_in(), ssl_renegotiation_cb(), strio_readlines(), symbols_i(), take_i(), take_while_i(), thgroup_list(), thread_keys_i(), to_a_i(), unnamed_parameters(), used_modules_i(), username_completion_proc_call(), values_i(), with_gvl_callback(), wmap_keys_i(), wmap_values_i(), yycompile0(), yyparse(), zip_ary(), and zip_i().
Definition at line 3808 of file array.c.
References Qnil, RARRAY_AREF, RARRAY_LEN, rb_equal(), RB_TYPE_P, and T_ARRAY.
Referenced by Init_Array().
Definition at line 3238 of file array.c.
References ary_enum_length(), ary_reject(), rb_ary_new(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Array().
Definition at line 3218 of file array.c.
References ary_enum_length(), ary_reject_bang(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Array().
Definition at line 5385 of file array.c.
References ALLOCV_END, ALLOCV_N, ary_sort_data::ary, ary_make_shared_copy(), len, NUM2LONG, RARRAY_AREF, RARRAY_LEN, rb_ary_new2, rb_ary_new3, rb_ary_repeated_combination_size(), rb_cArray, rb_yield(), RBASIC_CLEAR_CLASS, RBASIC_SET_CLASS_RAW, rcombinate0(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Array().
Definition at line 5347 of file array.c.
References binomial_coefficient(), LONG2FIX, NUM2LONG, RARRAY_AREF, and RARRAY_LEN.
Referenced by rb_ary_repeated_combination().
Definition at line 5291 of file array.c.
References ALLOCV_END, ALLOCV_N, ary_sort_data::ary, ary_make_shared_copy(), NUM2LONG, RARRAY_AREF, RARRAY_LEN, rb_ary_new2, rb_ary_new3, rb_ary_repeated_permutation_size(), rb_cArray, rb_yield(), RBASIC_CLEAR_CLASS, RBASIC_SET_CLASS_RAW, RETURN_SIZED_ENUMERATOR, and rpermute0().
Referenced by Init_Array().
Definition at line 5253 of file array.c.
References id_power, LONG2FIX, LONG2NUM, NUM2LONG, RARRAY_AREF, RARRAY_LEN, and rb_funcallv.
Referenced by rb_ary_repeated_permutation().
Definition at line 3437 of file array.c.
References ARY_HEAP_SIZE, ary_make_shared(), ary_memcpy(), ARY_OWNS_HEAP_P, ARY_SET_LEN, ARY_SET_PTR, ARY_SHARED, ARY_SHARED_P, FL_SET_EMBED, FL_UNSET_EMBED, FL_UNSET_SHARED, RARRAY_CONST_PTR, RARRAY_EMBED_LEN_MAX, RARRAY_LEN, RARRAY_PTR_USE, rb_ary_decrement_share(), rb_ary_modify_check(), rb_ary_set_shared(), rb_ary_unshare_safe(), ruby_sized_xfree(), and to_ary().
Referenced by enc_list(), Init_Array(), rb_ary_flatten_bang(), rb_ary_initialize(), rb_ary_sort_by_bang(), rb_ary_to_a(), rb_construct_expanded_load_path(), and reset_loaded_features_snapshot().
expands or shrinks ary to len elements.
expanded region will be filled with Qnil.
ary | an array |
len | new size |
Definition at line 1650 of file array.c.
References ARY_CAPA, ARY_DEFAULT_SIZE, ary_discard(), ary_double_capa(), ARY_EMBED_P, ARY_EMBED_PTR, ARY_HEAP_PTR, ARY_MAX_SIZE, ary_mem_clear(), ARY_SET_CAPA, ARY_SET_EMBED_LEN, ARY_SET_HEAP_LEN, ARY_SET_LEN, MEMCPY, RARRAY, RARRAY_EMBED_LEN_MAX, RARRAY_LEN, rb_ary_modify(), rb_eIndexError, rb_raise(), and SIZED_REALLOC_N.
Referenced by args_reduce(), args_setup_post_parameters(), enum_sort_by(), match_ary_subseq(), nmin_filter(), rb_get_values_at(), and rb_nmin_run().
Definition at line 1937 of file array.c.
References ary_join_1(), RARRAY_CONST_PTR, RARRAY_LEN, rb_ary_new4, rb_output_fs, and result.
Referenced by obj_resurrect().
Definition at line 2216 of file array.c.
References ary_reverse(), len, RARRAY_LEN, RARRAY_PTR_USE, and rb_ary_modify().
Referenced by collect_caller_bindings(), rb_ary_reverse_bang(), and rb_nmin_run().
Definition at line 1875 of file array.c.
References ary_enum_length(), len, RARRAY_AREF, RARRAY_LEN, rb_yield(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Array().
Definition at line 2259 of file array.c.
References ARY_SET_LEN, len, RARRAY_CONST_PTR, RARRAY_LEN, and rb_ary_new2.
Referenced by Init_Array().
Definition at line 1514 of file array.c.
References len, LONG2NUM, Qfalse, Qnil, Qtrue, Qundef, RARRAY_AREF, RARRAY_CONST_PTR, RARRAY_LEN, rb_block_given_p(), rb_check_arity, rb_equal(), rb_equal_opt(), rb_warn(), rb_yield(), RETURN_ENUMERATOR, RTEST, and val.
Referenced by Init_Array().
Definition at line 2280 of file array.c.
References ary_reverse(), len, Qnil, RARRAY_LEN, RARRAY_PTR, rb_ary_modify(), and rotate_count().
Referenced by rb_ary_rotate_bang().
Definition at line 2318 of file array.c.
References NULL, NUM2LONG, rb_ary_rotate(), and rb_scan_args().
Referenced by Init_Array().
Definition at line 2349 of file array.c.
References ary_memcpy(), ARY_SET_LEN, cnt, len, NULL, NUM2LONG, RARRAY_CONST_PTR, RARRAY_LEN, rb_ary_new2, rb_scan_args(), and rotate_count().
Referenced by Init_Array().
Definition at line 787 of file array.c.
References ary_memcpy(), ary_new(), and ARY_SET_LEN.
Referenced by Init_Array().
Definition at line 660 of file array.c.
References rb_check_array_type().
Referenced by Init_Array().
Definition at line 4790 of file array.c.
References ARY_SET_LEN, id_random, len, memmove(), NUM2LONG, numberof, OPTHASH_GIVEN_P, Qundef, RAND_UPTO, RARRAY_AREF, RARRAY_LEN, RARRAY_PTR_USE, rb_ary_dup(), rb_ary_elt(), rb_ary_new_capa(), rb_ary_new_from_args(), rb_ary_new_from_values(), rb_cArray, rb_cRandom, rb_eArgError, RB_GC_GUARD, rb_get_kwargs(), rb_raise(), rb_scan_args(), RBASIC_CLEAR_CLASS, RBASIC_SET_CLASS_RAW, and result.
Referenced by Init_Array().
Definition at line 2844 of file array.c.
References ary_enum_length(), RARRAY_AREF, RARRAY_LEN, rb_ary_elt(), rb_ary_new2, rb_ary_push(), rb_yield(), result, RETURN_SIZED_ENUMERATOR, and RTEST.
Referenced by Init_Array().
Definition at line 2922 of file array.c.
References ary_sort_data::ary, select_bang_arg::ary, ary_enum_length(), select_bang_arg::len, rb_ary_modify(), rb_ensure(), RETURN_SIZED_ENUMERATOR, select_bang_ensure(), and select_bang_i().
Referenced by Init_Array(), and rb_ary_keep_if().
void rb_ary_set_len | ( | VALUE | ary, |
long | len | ||
) |
Definition at line 1627 of file array.c.
References ARY_CAPA, ARY_SET_LEN, ARY_SHARED_P, rb_ary_modify_check(), rb_bug(), rb_eRuntimeError, and rb_raise().
Referenced by rb_hash_keys(), and rb_hash_values().
Definition at line 302 of file array.c.
References ARY_SET_SHARED, FL_SET_SHARED, and rb_ary_increment_share().
Referenced by ary_make_partial(), and rb_ary_replace().
Definition at line 431 of file array.c.
References ARY_EMBED_P, ARY_SHARED_P, Qfalse, Qtrue, and RARRAY.
Referenced by get_loaded_features_index(), and rb_get_expanded_load_path().
Definition at line 1000 of file array.c.
References ARY_DEFAULT_SIZE, ARY_EMBED_P, ARY_INCREASE_LEN, ARY_INCREASE_PTR, ary_make_shared(), ARY_SET, ARY_SHARED, ARY_SHARED_OCCUPIED, ARY_SHARED_P, assert, len, MEMMOVE, Qnil, RARRAY_AREF, RARRAY_LEN, RARRAY_PTR_USE, rb_ary_modify_check(), and top.
Referenced by argf_next_argv(), each_cons_i(), filename_completion_proc_call(), process_sflag(), queue_do_pop(), rb_ary_shift_m(), rb_szqueue_max_set(), rb_threadptr_pending_interrupt_deque(), require_libraries(), username_completion_proc_call(), and wakeup_first_thread().
Definition at line 1054 of file array.c.
References ARY_DEFAULT_SIZE, ARY_INCREASE_LEN, ARY_INCREASE_PTR, ary_make_shared(), ary_mem_clear(), ARY_SHARED, ARY_SHARED_OCCUPIED, ARY_SHARED_P, ARY_TAKE_FIRST, ary_take_first_or_last(), MEMMOVE, RARRAY_LEN, RARRAY_PTR_USE, rb_ary_modify_check(), rb_ary_shift(), and result.
Referenced by Init_Array().
Definition at line 4757 of file array.c.
References ary_sort_data::ary, rb_ary_dup(), and rb_ary_shuffle_bang().
Referenced by Init_Array().
Definition at line 4706 of file array.c.
References ary_sort_data::ary, id_random, len, OPTHASH_GIVEN_P, Qundef, RAND_UPTO, RARRAY_CONST_PTR, RARRAY_LEN, RARRAY_PTR_USE, rb_ary_modify(), rb_check_arity, rb_cRandom, rb_eRuntimeError, rb_get_kwargs(), and rb_raise().
Referenced by Init_Array(), and rb_ary_shuffle().
Definition at line 3109 of file array.c.
References FIXNUM_P, len, NULL, NUM2LONG, Qnil, Qtrue, RARRAY_CONST_PTR, RARRAY_LEN, rb_ary_delete_at(), rb_ary_modify_check(), rb_ary_new2, rb_ary_new4, rb_ary_splice(), rb_obj_class(), rb_range_beg_len(), rb_scan_args(), and RBASIC_SET_CLASS.
Referenced by Init_Array().
Definition at line 2535 of file array.c.
References ary_sort_data::ary, rb_ary_bsearch_index(), rb_ary_dup(), and rb_ary_sort_bang().
Referenced by Init_Array().
Definition at line 2451 of file array.c.
References ary_sort_data::ary, ARY_EMBED_LEN, ARY_EMBED_P, ARY_EMBED_PTR, ARY_HEAP_PTR, ARY_HEAP_SIZE, ary_make_substitution(), ary_memcpy(), ARY_SET_CAPA, ARY_SET_EMBED_LEN, ARY_SET_HEAP_LEN, ARY_SET_LEN, ARY_SET_PTR, ARY_SHARED_P, assert, ary_sort_data::cmp_opt, FL_FREEZE, FL_SET, FL_SET_EMBED, FL_UNSET, FL_UNSET_EMBED, FL_UNSET_SHARED, len, cmp_opt_data::opt_inited, cmp_opt_data::opt_methods, RARRAY_CONST_PTR, RARRAY_LEN, RARRAY_PTR_USE, rb_ary_modify(), rb_ary_unshare(), rb_block_given_p(), rb_cArray, RBASIC_CLEAR_CLASS, RBASIC_SET_CLASS_RAW, ruby_qsort(), ruby_sized_xfree(), sort_1(), and sort_2().
Referenced by enum_sort(), Init_Array(), and rb_ary_sort().
Definition at line 2692 of file array.c.
References ary_sort_data::ary, ary_enum_length(), rb_ary_modify(), rb_ary_replace(), rb_block_call(), rb_intern, RETURN_SIZED_ENUMERATOR, and sort_by_i().
Referenced by Init_Array().
Definition at line 1564 of file array.c.
References ARY_CAPA, ary_double_capa(), ary_ensure_room_for_push(), ARY_MAX_SIZE, ary_mem_clear(), ary_memcpy0(), ARY_SET_LEN, len, MEMMOVE, RARRAY_CONST_PTR, RARRAY_LEN, RARRAY_PTR, RARRAY_PTR_USE, rb_ary_modify(), rb_eIndexError, and rb_raise().
Referenced by ary_append(), rb_ary_aset(), rb_ary_insert(), and rb_ary_slice_bang().
Definition at line 799 of file array.c.
References ARY_CAPA, ary_double_capa(), ARY_MAX_SIZE, ary_mem_clear(), ARY_SET, ARY_SET_LEN, len, RARRAY_LEN, rb_ary_modify(), rb_eIndexError, and rb_raise().
Referenced by addrinfo_ip_unpack(), ary_new_dim(), ary_store_dim(), check_exec_fds(), collect_caller_bindings(), collect_caller_bindings_cfunc(), collect_caller_bindings_iseq(), decorate_convpath(), econv_primitive_errinfo(), enc_register_at(), enum_sort_by(), evs_delete(), get_loaded_features_index(), ibf_dump_iseq(), ibf_load_iseq(), ibf_load_object(), Init_ossl_asn1(), initialize(), iseq_data_to_ary(), lazy_drop_proc(), lazy_drop_while_proc(), lazy_take_proc(), lep_svar_set(), ossl_generate_cb_2(), path_entries(), path_s_glob(), pty_getpty(), rb_ary_aset(), rb_ary_collect_bang(), rb_ary_delete(), rb_ary_delete_same(), rb_ary_initialize(), rb_ary_transpose(), rb_enc_aliases_enc_i(), rb_sym_to_proc(), reg_named_captures_iter(), reject_bang_i(), search_convpath_i(), select_bang_i(), set_id_entry(), struct_set_members(), unnamed_parameters(), zip_ary(), and zip_i().
Definition at line 1212 of file array.c.
References ary_make_partial(), ary_new(), Qnil, RARRAY_LEN, and rb_obj_class().
Referenced by args_rest_array(), get_stack_tail(), initialize(), rb_apply(), rb_ary_aref(), rb_ary_drop(), rb_ary_take(), and take_items().
Definition at line 5737 of file array.c.
References DBL2NUM, f, FIX2LONG, FIXABLE, FIXNUM_P, idPLUS, LONG2FIX, LONG2NUM, NUM2DBL, Qundef, RARRAY_AREF, RARRAY_LEN, rb_big2dbl(), rb_big_plus(), rb_block_given_p(), rb_fix_plus(), RB_FLOAT_TYPE_P, rb_funcall(), rb_num2dbl(), rb_rational_plus(), rb_scan_args(), RB_TYPE_P, rb_yield(), RFLOAT_VALUE, T_BIGNUM, and T_RATIONAL.
Referenced by Init_Array().
Definition at line 5545 of file array.c.
References len, NUM2LONG, rb_ary_subseq(), rb_eArgError, and rb_raise().
Referenced by Init_Array(), and rb_ary_take_while().
Definition at line 5572 of file array.c.
References LONG2FIX, RARRAY_AREF, RARRAY_LEN, rb_ary_take(), rb_yield(), RETURN_ENUMERATOR, and RTEST.
Referenced by Init_Array().
Definition at line 3709 of file array.c.
References ARY_MAX_SIZE, ary_memcpy(), ary_new(), ARY_SET_LEN, len, NIL_P, NUM2LONG, OBJ_INFECT, RARRAY_CONST_PTR, RARRAY_LEN, rb_ary_join(), rb_check_string_type(), rb_eArgError, rb_obj_class(), and rb_raise().
Referenced by Init_Array().
VALUE rb_ary_tmp_new | ( | long | capa | ) |
Definition at line 532 of file array.c.
References ary_new().
Referenced by args_setup_kw_parameters(), ary_buf_new(), compile_array_(), cont_capture(), coverage(), enum_sort_by(), fdbm_delete_if(), fgdbm_delete_if(), ibf_dump_object_list(), ibf_dump_setup(), ibf_load_setup(), Init_load(), Init_sym(), Init_Thread(), Init_vm_objects(), iseq_mark_ary_create(), iseq_set_arguments(), iseq_set_arguments_keywords(), make_unknown_kw_hash(), open_key_args(), prepare_iseq_build(), r_object0(), rb_ary_concat_multi(), rb_construct_expanded_load_path(), rb_gc_register_mark_object(), rb_get_kwargs(), rb_iseq_disasm(), rb_nmin_run(), rb_obj_info_dump(), rb_struct_new(), rb_sym_to_proc(), set_id_entry(), struct_set_members(), thread_create_core(), and with_gvl_callback().
VALUE rb_ary_tmp_new_fill | ( | long | capa | ) |
Definition at line 538 of file array.c.
References ary_memfill(), ary_new(), ARY_SET_LEN, and Qnil.
Referenced by coverage().
Definition at line 2150 of file array.c.
References RARRAY_LEN, rb_ary_new2, rb_ary_replace(), rb_cArray, and rb_obj_class().
Referenced by Init_Array().
Definition at line 1555 of file array.c.
References NIL_P, rb_ary_new3, and rb_check_array_type().
Referenced by rb_ary_aset(), and vm_expandarray().
Definition at line 2200 of file array.c.
Referenced by Init_Array().
Definition at line 2172 of file array.c.
References hash(), NIL_P, PRIsVALUE, RARRAY_AREF, RARRAY_LEN, rb_ary_elt(), rb_check_array_type(), rb_eArgError, rb_eTypeError, rb_hash_aset(), rb_hash_new(), rb_obj_class(), and rb_raise().
Referenced by Init_Array().
Definition at line 2135 of file array.c.
References rb_ary_inspect().
Definition at line 3396 of file array.c.
References RARRAY_LEN, rb_ary_dup(), rb_ary_elt(), rb_ary_new2, rb_ary_store(), rb_eIndexError, rb_raise(), result, and to_ary().
Referenced by Init_Array().
Definition at line 4419 of file array.c.
References ary_make_hash(), ary_make_hash_by(), ary_recycle_hash(), hash(), RARRAY_LEN, rb_ary_dup(), rb_block_given_p(), rb_hash_values(), rb_obj_class(), and RBASIC_SET_CLASS.
Referenced by Init_Array().
Definition at line 4367 of file array.c.
References ary_sort_data::ary, ARY_EMBED_P, ary_make_hash(), ary_make_hash_by(), ary_recycle_hash(), ary_resize_capa(), ARY_SET_LEN, ARY_SHARED_P, FL_SET_EMBED, hash(), push_value(), Qnil, RARRAY_LEN, rb_ary_modify_check(), rb_ary_unshare(), rb_block_given_p(), rb_hash_tbl_raw(), RHASH_SIZE, and st_foreach.
Referenced by Init_Array().
|
static |
Definition at line 276 of file array.c.
References FL_UNSET_SHARED, RARRAY, and rb_ary_decrement_share().
Referenced by rb_ary_clear(), rb_ary_modify(), rb_ary_sort_bang(), rb_ary_uniq_bang(), and rb_ary_unshare_safe().
|
inlinestatic |
Definition at line 284 of file array.c.
References ARY_EMBED_P, ARY_SHARED_P, and rb_ary_unshare().
Referenced by rb_ary_initialize(), and rb_ary_replace().
Definition at line 1178 of file array.c.
References rb_ary_unshift_m().
Referenced by args_copy(), ole_invoke(), and parser_set_encode().
Definition at line 1161 of file array.c.
References ary_ensure_room_for_unshift(), ary_memcpy0(), ARY_SET_LEN, len, RARRAY_LEN, and rb_ary_modify_check().
Referenced by Init_Array(), and rb_ary_unshift().
Definition at line 2819 of file array.c.
References RARRAY_LEN, rb_ary_entry(), and rb_get_values_at().
Referenced by Init_Array().
Definition at line 3325 of file array.c.
References ALLOCV_END, ALLOCV_N, argc, len, Qnil, RARRAY_AREF, RARRAY_LEN, rb_ary_elt(), rb_ary_new2, rb_ary_new_capa(), rb_ary_push(), rb_block_arity(), rb_block_given_p(), rb_yield(), rb_yield_values2(), result, and take_items().
Referenced by Init_Array().
Definition at line 623 of file array.c.
References rb_ary_new3.
Referenced by addrinfo_getnameinfo(), addrinfo_mdump(), any_p_i(), assoc_i(), BigDecimal_coerce(), BigDecimal_divmod(), BigDecimal_prec(), bsock_getpeername(), check_exec_env_i(), check_exec_redirect1(), chunk_i(), chunk_ii(), console_beep(), console_echo_p(), dump_output(), each_pair_i(), econv_convpath(), enum_minmax(), enum_minmax_by(), enum_partition(), env_assoc(), env_each_pair(), env_rassoc(), env_shift(), env_to_a(), fdbm_delete_if(), fdbm_each_pair(), fdbm_select(), fdbm_shift(), fdbm_to_a(), fgdbm_delete_if(), fgdbm_each_pair(), fgdbm_select(), fgdbm_shift(), fgdbm_to_a(), fix_divmod(), flo_coerce(), flo_divmod(), float_decode_internal(), fsdbm_delete_if(), fsdbm_each_pair(), fsdbm_select(), fsdbm_shift(), fsdbm_to_a(), hash_sum_i(), match_offset(), math_frexp(), math_lgamma(), nucomp_coerce(), nucomp_marshal_dump(), nucomp_polar(), nucomp_rect(), num_coerce(), num_divmod(), numeric_polar(), numeric_rect(), nurat_coerce(), nurat_marshal_dump(), ossl_bn_coerce(), proc_wait2(), proc_waitall(), pty_open(), rassoc_i(), rb_big_divmod(), rb_big_divrem_normal(), rb_file_s_split(), rb_gcdlcm(), rb_hash_assoc(), rb_hash_shift(), rb_int_coerce(), rb_io_s_pipe(), rb_struct_each_pair(), rsock_ipaddr(), rsock_s_recvfrom(), rsock_s_recvfrom_nonblock(), save_redirect_fd(), search_convpath_i(), sock_accept(), sock_accept_nonblock(), sock_initialize(), sock_s_getnameinfo(), sock_s_unpack_sockaddr_in(), sock_sysaccept(), sockopt_linger(), to_a_i(), and yyparse().
Definition at line 635 of file array.c.
References rb_check_convert_type(), and T_ARRAY.
Referenced by addrinfo_initialize(), args_check_block_arg0(), check_exec_redirect(), dir_s_glob(), divmodv(), econv_init(), enum_to_h_i(), enum_zip(), flat_map_i(), flatten(), io_puts_ary(), lazy_flat_map_to_ary(), lazy_zip(), ossl_ocspbres_add_status(), ossl_x509name_initialize(), path_split(), rb_Array(), rb_ary_assoc(), rb_ary_cmp(), rb_ary_initialize(), rb_ary_s_try_convert(), rb_ary_to_ary(), rb_ary_to_h(), rb_check_argv(), rb_econv_init_by_convpath(), rb_hash_s_create(), rb_io_s_popen(), rb_reg_s_union_m(), rb_str_format_m(), rb_yield_splat(), sock_s_getnameinfo(), take_items(), time_timespec(), and vm_callee_setup_block_arg_arg0_check().
VALUE rb_get_values_at | ( | VALUE | obj, |
long | olen, | ||
int | argc, | ||
const VALUE * | argv, | ||
VALUE(*)(VALUE, long) | func | ||
) |
Definition at line 2775 of file array.c.
References argc, FIX2LONG, FIXNUM_P, func, len, NUM2LONG, RARRAY_LEN, rb_ary_new2, rb_ary_push(), rb_ary_resize(), rb_range_beg_len(), and result.
Referenced by rb_ary_values_at(), and rb_struct_values_at().
void rb_mem_clear | ( | register VALUE * | mem, |
register long | size | ||
) |
Definition at line 135 of file array.c.
References Qnil.
Referenced by ary_mem_clear(), rb_struct_initialize_m(), and struct_alloc().
|
static |
Definition at line 5324 of file array.c.
References rb_eRuntimeError, rb_raise(), and yield_indexed_values().
Referenced by rb_ary_repeated_combination().
Definition at line 3978 of file array.c.
References id_cmp, INT2FIX, len, Qundef, RARRAY_LEN, rb_ary_elt(), and rb_funcallv.
Referenced by rb_ary_cmp().
Definition at line 3886 of file array.c.
References Qfalse, Qtrue, RARRAY_LEN, rb_ary_elt(), and rb_eql().
Referenced by rb_ary_eql().
Definition at line 3824 of file array.c.
References Qfalse, Qtrue, RARRAY_CONST_PTR, RARRAY_LEN, and rb_equal().
Referenced by rb_ary_equal().
Definition at line 1947 of file array.c.
References ary_join_1(), Qnil, rb_eArgError, and rb_raise().
Referenced by ary_join_1().
Definition at line 3174 of file array.c.
References ary_sort_data::ary, select_bang_arg::ary, select_bang_arg::len, Qnil, RARRAY_AREF, RARRAY_LEN, rb_ary_store(), rb_yield(), and RTEST.
Referenced by ary_reject_bang().
|
inlinestatic |
Definition at line 2274 of file array.c.
References len.
Referenced by rb_ary_rotate(), and rb_ary_rotate_m().
Definition at line 5230 of file array.c.
References rb_eRuntimeError, rb_raise(), and yield_indexed_values().
Referenced by rb_ary_repeated_permutation().
Definition at line 2883 of file array.c.
References ary_sort_data::ary, select_bang_arg::ary, ARY_SET_LEN, len, select_bang_arg::len, MEMMOVE, RARRAY_LEN, and RARRAY_PTR_USE.
Referenced by ary_reject_bang(), and rb_ary_select_bang().
Definition at line 2865 of file array.c.
References ary_sort_data::ary, select_bang_arg::ary, select_bang_arg::len, Qnil, RARRAY_AREF, RARRAY_LEN, rb_ary_store(), rb_yield(), and RTEST.
Referenced by rb_ary_select_bang().
Definition at line 2389 of file array.c.
References ary_sort_data::ary, bp, rb_cmpint(), rb_yield_values(), and sort_reentered().
Referenced by rb_ary_sort_bang().
Definition at line 2403 of file array.c.
References ary_sort_data::ary, bp, ary_sort_data::cmp_opt, CMP_OPTIMIZABLE, FIXNUM_P, id_cmp, rb_cmpint(), rb_funcallv, rb_str_cmp(), sort_reentered(), and STRING_P.
Referenced by rb_ary_sort_bang().
|
static |
Definition at line 2670 of file array.c.
References rb_yield().
Referenced by rb_ary_sort_by_bang().
Definition at line 2380 of file array.c.
References Qnil, rb_eRuntimeError, rb_raise(), and RBASIC.
|
static |
Definition at line 3275 of file array.c.
References Qnil, rb_ary_new4, rb_ary_push(), rb_iter_break(), and val.
Referenced by take_items().
Definition at line 3285 of file array.c.
References NIL_P, PRIsVALUE, Qundef, rb_ary_new2, rb_ary_subseq(), rb_check_array_type(), rb_check_block_call(), rb_eTypeError, rb_obj_class(), rb_raise(), result, and take_i().
Referenced by rb_ary_zip().
Definition at line 629 of file array.c.
References rb_convert_type(), and T_ARRAY.
Referenced by rb_ary_and(), rb_ary_concat(), rb_ary_diff(), rb_ary_or(), rb_ary_plus(), rb_ary_product(), rb_ary_replace(), and rb_ary_transpose().
Definition at line 4965 of file array.c.
References ARY_SET_LEN, RARRAY_CONST_PTR, RARRAY_PTR, rb_ary_new2, rb_yield(), and RBASIC.
Referenced by combinate0(), permute0(), rcombinate0(), and rpermute0().
|
static |
Definition at line 27 of file array.c.
Referenced by Init_Array(), rb_ary_bsearch_index(), recursive_cmp(), and sort_2().
|
static |
Definition at line 27 of file array.c.
Referenced by binomial_coefficient(), and Init_Array().
|
static |
Definition at line 27 of file array.c.
Referenced by Init_Array(), and rb_ary_repeated_permutation_size().
|
static |
Definition at line 4685 of file array.c.
Referenced by rb_ary_sample(), and rb_ary_shuffle_bang().
VALUE rb_cArray |
Definition at line 25 of file array.c.
Referenced by ary_take_first_or_last(), enum_sort_by(), generate_json(), ibf_dump_object_class(), ibf_load_object_class(), Init_Array(), Init_pack(), Init_vm_backtrace(), iseq_compile_each(), ossl_asn1cons_to_der(), ossl_asn1data_to_der(), rb_ary_combination(), rb_ary_new_capa(), rb_ary_permutation(), rb_ary_repeated_combination(), rb_ary_repeated_permutation(), rb_ary_sample(), rb_ary_sort_bang(), rb_ary_to_a(), rb_nmin_run(), vm_redefinition_check_flag(), and w_object().
VALUE rb_output_fs |
Definition at line 535 of file intern.h.
Referenced by Init_IO(), rb_ary_join_m(), rb_ary_resurrect(), and rb_io_print().