Ruby
2.4.2p198(2017-09-14revision59899)
|
Go to the source code of this file.
Data Structures | |
struct | rb_compile_option_struct |
struct | iseq_line_info_entry |
struct | iseq_catch_table_entry |
struct | iseq_compile_data_storage |
struct | iseq_compile_data |
Macros | |
#define | ISEQ_MAJOR_VERSION 2 |
#define | ISEQ_MINOR_VERSION 3 |
#define | rb_iseq_t rb_iseq_t |
#define | ISEQ_MARK_ARY(iseq) (iseq)->body->mark_ary |
#define | ISEQ_COVERAGE(iseq) RARRAY_AREF(ISEQ_MARK_ARY(iseq), ISEQ_MARK_ARY_COVERAGE) |
#define | ISEQ_COVERAGE_SET(iseq, cov) RARRAY_ASET(ISEQ_MARK_ARY(iseq), ISEQ_MARK_ARY_COVERAGE, cov) |
#define | ISEQ_FLIP_CNT(iseq) FIX2INT(RARRAY_AREF(ISEQ_MARK_ARY(iseq), ISEQ_MARK_ARY_FLIP_CNT)) |
#define | ISEQ_COMPILE_DATA(iseq) (iseq)->aux.compile_data |
#define | ISEQ_NOT_LOADED_YET IMEMO_FL_USER1 |
#define | INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE (512) |
#define | SIZEOF_ISEQ_COMPILE_DATA_STORAGE (sizeof(struct iseq_compile_data_storage) - 1) |
Typedefs | |
typedef struct rb_iseq_struct | rb_iseq_t |
#define INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE (512) |
Definition at line 178 of file iseq.h.
Referenced by prepare_iseq_build().
#define ISEQ_COMPILE_DATA | ( | iseq | ) | (iseq)->aux.compile_data |
Definition at line 77 of file iseq.h.
Referenced by add_ensure_iseq(), append_compile_error(), cleanup_iseq_build(), compile_data_alloc(), get_ivar_ic_value(), ibf_load_iseq_complete(), iseq_add_mark_object_compile_time(), iseq_compile_each(), iseq_memsize(), iseq_optimize(), iseq_set_exception_table(), iseq_set_sequence(), iseq_setup(), new_child_iseq(), new_label_body(), prepare_iseq_build(), push_ensure_entry(), rb_iseq_compile_node(), rb_iseq_free(), and rb_iseq_mark().
#define ISEQ_COVERAGE | ( | iseq | ) | RARRAY_AREF(ISEQ_MARK_ARY(iseq), ISEQ_MARK_ARY_COVERAGE) |
Definition at line 48 of file iseq.h.
Referenced by iseq_ibf_dump(), and rb_iseq_coverage().
#define ISEQ_COVERAGE_SET | ( | iseq, | |
cov | |||
) | RARRAY_ASET(ISEQ_MARK_ARY(iseq), ISEQ_MARK_ARY_COVERAGE, cov) |
Definition at line 49 of file iseq.h.
Referenced by prepare_iseq_build().
#define ISEQ_FLIP_CNT | ( | iseq | ) | FIX2INT(RARRAY_AREF(ISEQ_MARK_ARY(iseq), ISEQ_MARK_ARY_FLIP_CNT)) |
Definition at line 51 of file iseq.h.
Referenced by ibf_dump_iseq_each(), and ISEQ_FLIP_CNT_INCREMENT().
#define ISEQ_MAJOR_VERSION 2 |
Definition at line 15 of file iseq.h.
Referenced by ibf_load_setup(), iseq_data_to_ary(), and iseq_ibf_dump().
#define ISEQ_MARK_ARY | ( | iseq | ) | (iseq)->body->mark_ary |
Definition at line 46 of file iseq.h.
Referenced by ISEQ_FLIP_CNT_INCREMENT(), ISEQ_ORIGINAL_ISEQ(), ISEQ_ORIGINAL_ISEQ_ALLOC(), and rb_iseq_add_mark_object().
#define ISEQ_MINOR_VERSION 3 |
Definition at line 16 of file iseq.h.
Referenced by ibf_load_setup(), iseq_data_to_ary(), and iseq_ibf_dump().
#define ISEQ_NOT_LOADED_YET IMEMO_FL_USER1 |
Definition at line 85 of file iseq.h.
Referenced by ibf_load_iseq(), ibf_load_iseq_complete(), and rb_iseq_mark().
#define SIZEOF_ISEQ_COMPILE_DATA_STORAGE (sizeof(struct iseq_compile_data_storage) - 1) |
Definition at line 188 of file iseq.h.
Referenced by compile_data_alloc(), iseq_memsize(), and prepare_iseq_build().
typedef struct rb_iseq_struct rb_iseq_t |
enum defined_type |
enum iseq_mark_ary_index |
void ibf_load_iseq_complete | ( | rb_iseq_t * | iseq | ) |
Definition at line 8509 of file compile.c.
References rb_iseq_struct::aux, FL_UNSET, ibf_iseq_list(), ibf_load_iseq_complete(), ibf_load_iseq_each(), ibf_load::iseq, ISEQ_COMPILE_DATA, ISEQ_NOT_LOADED_YET, rb_iseq_struct::loader, NULL, and RTYPEDDATA_DATA.
Referenced by ibf_load_iseq(), ibf_load_iseq_complete(), and iseqw_check().
|
inlinestatic |
Definition at line 168 of file iseq.h.
References rb_fatal().
Referenced by ibf_dump_catch_table(), ibf_load_catch_table(), iseq_memsize(), and iseq_set_exception_table().
Definition at line 54 of file iseq.h.
References cnt, INT2FIX, ISEQ_FLIP_CNT, ISEQ_MARK_ARY, ISEQ_MARK_ARY_FLIP_CNT, and RARRAY_ASET.
Referenced by compile_flip_flop().
Definition at line 8450 of file compile.c.
References rb_iseq_struct::body, DATA_PTR, ibf_header::extra_size, ibf_dump_free(), ibf_dump_id_list(), ibf_dump_iseq(), ibf_dump_iseq_list(), ibf_dump_object_list(), ibf_dump_overwrite(), ibf_dump_pos(), ibf_dump_setup(), ibf_dump_write(), ISEQ_COVERAGE, ISEQ_MAJOR_VERSION, ISEQ_MINOR_VERSION, rb_iseq_constant_body::local_iseq, ibf_header::magic, ibf_header::major_version, ibf_header::minor_version, NULL, rb_iseq_constant_body::parent_iseq, rb_eRuntimeError, RB_GC_GUARD, rb_raise(), RSTRING_LENINT, RTEST, RUBY_PLATFORM, ibf_header::size, ibf_dump::str, StringValuePtr, strlen(), and TypedData_Make_Struct.
Referenced by iseqw_to_binary().
Definition at line 8630 of file compile.c.
References ibf_load_iseq(), ibf_load_setup(), ibf_load::iseq, ibf_load::loader_obj, RB_GC_GUARD, and TypedData_Make_Struct.
Referenced by iseqw_s_load_from_binary().
Definition at line 8644 of file compile.c.
References ibf_load::buff, ibf_header::extra_size, ibf_load::header, ibf_load_setup(), ibf_load::loader_obj, RB_GC_GUARD, rb_str_new(), ibf_header::size, and TypedData_Make_Struct.
Referenced by iseqw_s_load_from_binary_extra_data().
|
inlinestatic |
Definition at line 80 of file iseq.h.
References imemo_iseq, and rb_imemo_new().
Referenced by ibf_load_iseq(), and iseq_alloc().
|
inlinestatic |
Definition at line 37 of file iseq.h.
References INT2FIX, ISEQ_MARK_ARY_INITIAL_SIZE, Qnil, rb_ary_push(), and rb_ary_tmp_new().
Referenced by ibf_load_iseq_each(), and prepare_iseq_build().
Definition at line 62 of file iseq.h.
References ISEQ_MARK_ARY, ISEQ_MARK_ARY_ORIGINAL_ISEQ, NULL, RARRAY_AREF, RSTRING_PTR, and RTEST.
Referenced by rb_iseq_original_iseq().
Definition at line 70 of file iseq.h.
References ISEQ_MARK_ARY, ISEQ_MARK_ARY_ORIGINAL_ISEQ, RARRAY_ASET, rb_str_tmp_new(), and RSTRING_PTR.
Referenced by rb_iseq_original_iseq().
PACKED_STRUCT_UNALIGNED | ( | struct iseq_catch_table { unsigned int size;struct iseq_catch_table_entry entries[1];} | ) |
|
inlinestatic |
Definition at line 24 of file iseq.h.
Referenced by iseq_build_callinfo_from_hash(), and iseq_memsize().
Definition at line 676 of file iseq.c.
References rb_iseq_location_struct::absolute_path, rb_iseq_struct::body, and rb_iseq_constant_body::location.
Referenced by iseqw_absolute_path(), and rb_profile_frame_absolute_path().
Definition at line 262 of file iseq.c.
References ISEQ_MARK_ARY, and rb_ary_push().
Referenced by iseq_add_mark_object(), and iseq_build_from_ary_body().
Definition at line 688 of file iseq.c.
References rb_iseq_location_struct::base_label, rb_iseq_struct::body, and rb_iseq_constant_body::location.
Referenced by iseqw_base_label(), and rb_profile_frame_base_label().
void rb_iseq_build_from_ary | ( | rb_iseq_t * | iseq, |
VALUE | misc, | ||
VALUE | locals, | ||
VALUE | args, | ||
VALUE | exception, | ||
VALUE | body | ||
) |
Definition at line 6921 of file compile.c.
References ALLOC_N, rb_iseq_struct::body, CHECK_SYMBOL, Data_Wrap_Struct, DECL_ANCHOR, FIX2LONG, FIXNUM_P, rb_iseq_constant_body::flags, ID2SYM, if(), INIT_ANCHOR, int_param(), INT_PARAM, iseq_build_from_ary_body(), iseq_build_from_ary_exception(), iseq_build_kw(), iseq_calc_param_size(), rb_iseq_constant_body::keyword, len, rb_iseq_constant_body::local_table, rb_iseq_constant_body::local_table_size, NULL, rb_iseq_constant_body::opt_num, rb_iseq_constant_body::opt_table, rb_iseq_constant_body::param, PRIsVALUE, Qtrue, RARRAY_AREF, RARRAY_LENINT, rb_eTypeError, rb_hash_aref(), rb_intern, rb_raise(), register_label(), st_free_table, st_init_numtable, SYM, SYM2ID, T_ARRAY, T_NIL, TRUE, TYPE, and ZALLOC.
Referenced by iseq_load().
RUBY_SYMBOL_EXPORT_BEGIN VALUE rb_iseq_compile_node | ( | rb_iseq_t * | iseq, |
NODE * | node | ||
) |
Definition at line 576 of file compile.c.
References ADD_CATCH_ENTRY, ADD_GETLOCAL, ADD_INSN, ADD_INSN1, ADD_LABEL, ADD_TRACE, rb_iseq_struct::body, CHECK, COMPILE, compile_bug(), COMPILE_ERROR, COMPILE_NG, COMPILE_POPPED, vm_ifunc::data, DECL_ANCHOR, ensure_range::end, ERROR_ARGS, rb_iseq_location_struct::first_lineno, FIX2INT, vm_ifunc::func, INIT_ANCHOR, INT2FIX, ISEQ_COMPILE_DATA, iseq_set_arguments(), iseq_set_exception_local_table(), iseq_set_local_table(), iseq_setup(), LABEL_RESCUE_BEG, LABEL_RESCUE_END, rb_iseq_constant_body::location, LVAR_ERRINFO, nd_line, nd_type, NEW_LABEL, NODE_SCOPE, RB_TYPE_P, iseq_label_data::rescued, RUBY_EVENT_B_CALL, RUBY_EVENT_B_RETURN, RUBY_EVENT_CALL, RUBY_EVENT_CLASS, RUBY_EVENT_END, RUBY_EVENT_RETURN, T_IMEMO, rb_iseq_constant_body::type, and validate_labels().
Referenced by rb_iseq_new_with_opt().
VALUE rb_iseq_defined_string | ( | enum defined_type | type | ) |
Definition at line 2183 of file iseq.c.
References GET_VM, numberof, OBJ_FREEZE, rb_gc_register_mark_object(), rb_str_new_cstr(), and ruby_xcalloc().
Referenced by defined_expr(), iseq_compile_each(), and vm_defined().
Definition at line 694 of file iseq.c.
References rb_iseq_struct::body, rb_iseq_location_struct::first_lineno, and rb_iseq_constant_body::location.
Referenced by iseqw_first_lineno(), proc_binding(), and rb_profile_frame_first_lineno().
Definition at line 682 of file iseq.c.
References rb_iseq_struct::body, rb_iseq_location_struct::label, and rb_iseq_constant_body::location.
Referenced by iseqw_label(), and rb_profile_frame_label().
Definition at line 604 of file iseq.c.
References iseq_load(), NULL, and RTEST.
Referenced by iseq_build_from_ary_exception(), and iseq_build_load_iseq().
Definition at line 792 of file vm.c.
References rb_iseq_struct::body, collect_local_variables_in_iseq(), local_var_list_finish(), local_var_list_init(), and rb_iseq_constant_body::parent_iseq.
Referenced by rb_iseqw_local_variables().
void rb_iseq_make_compile_option | ( | struct rb_compile_option_struct * | option, |
VALUE | opt | ||
) |
Definition at line 379 of file iseq.c.
References Check_Type, set_compile_option_from_hash(), and T_HASH.
Referenced by iseq_compile_each().
Definition at line 700 of file iseq.c.
References rb_iseq_location_struct::base_label, rb_iseq_struct::body, rb_iseq_constant_body::local_iseq, rb_iseq_constant_body::location, Qnil, and rb_iseq_constant_body::type.
Referenced by rb_profile_frame_method_name().
Definition at line 716 of file compile.c.
References rb_iseq_struct::body, rb_iseq_constant_body::iseq_encoded, ISEQ_ORIGINAL_ISEQ(), ISEQ_ORIGINAL_ISEQ_ALLOC(), rb_iseq_constant_body::iseq_size, and MEMCPY.
Referenced by ibf_dump_code(), iseq_data_to_ary(), rb_iseq_disasm(), rb_iseqw_line_trace_each(), and rb_vmdebug_debug_print_pre().
Definition at line 2097 of file iseq.c.
References rb_iseq_constant_body::block_start, rb_iseq_struct::body, CONST_ID, rb_iseq_constant_body::flags, ID2SYM, key, rb_iseq_constant_body::keyword, rb_iseq_constant_body::lead_num, rb_iseq_constant_body::opt_num, rb_iseq_constant_body::param, PARAM, PARAM_ID, PARAM_TYPE, rb_iseq_constant_body::post_num, rb_iseq_constant_body::post_start, Qnil, rb_ary_new2, rb_ary_push(), rb_id2str, rb_iseq_constant_body::rest_start, and rb_iseq_constant_body::size.
Referenced by rb_method_parameters(), and rb_proc_parameters().
Definition at line 670 of file iseq.c.
References rb_iseq_struct::body, rb_iseq_constant_body::location, and rb_iseq_location_struct::path.
Referenced by iseqw_path(), and rb_profile_frame_path().
int rb_iseq_translate_threaded_code | ( | rb_iseq_t * | iseq | ) |
Definition at line 682 of file compile.c.
References rb_iseq_struct::body, COMPILE_OK, rb_iseq_constant_body::iseq_encoded, rb_iseq_constant_body::iseq_size, len, rb_bug(), and rb_vm_get_insns_address_table().
Referenced by ibf_load_iseq_each(), and iseq_setup().
Definition at line 2279 of file iseq.c.
References collect_trace(), rb_ary_new(), rb_iseqw_line_trace_each(), and result.
Referenced by Init_ISeq().
int rb_iseqw_line_trace_each | ( | VALUE | iseqval, |
int(*)(int line, rb_event_flag_t *events_ptr, void *d) | func, | ||
void * | data | ||
) |
Definition at line 2227 of file iseq.c.
References rb_iseq_struct::body, iseq_catch_table_entry::cont, find_line_no(), func, rb_iseq_constant_body::iseq_encoded, rb_iseq_constant_body::iseq_size, iseqw_check(), rb_iseq_original_iseq(), RUBY_EVENT_LINE, and RUBY_EVENT_SPECIFIED_LINE.
Referenced by rb_iseqw_line_trace_all(), and rb_iseqw_line_trace_specify().
Definition at line 2326 of file iseq.c.
References line_trace_specify(), NUM2INT, set_specifc_data::pos, set_specifc_data::prev, Qfalse, Qtrue, rb_eTypeError, rb_iseqw_line_trace_each(), rb_raise(), and set_specifc_data::set.
Referenced by Init_ISeq().
Definition at line 754 of file iseq.c.
References iseqw_new().
Definition at line 930 of file iseq.c.
References iseqw_check().
Referenced by iseq_build_from_ary_exception(), and iseq_build_load_iseq().
Definition at line 2467 of file proc.c.
References method_def(), and method_def_iseq().
Referenced by iseqw_s_of(), proc_binding(), rb_method_parameters(), and rb_proc_get_iseq().
Definition at line 1091 of file proc.c.
References rb_block::as, rb_proc_t::block, block_type_ifunc, block_type_iseq, block_type_proc, block_type_symbol, rb_block::captured, rb_captured_block::code, vm_ifunc::data, GetProcPtr, rb_captured_block::ifunc, rb_proc_t::is_lambda, IS_METHOD_PROC_IFUNC, rb_captured_block::iseq, NULL, rb_block::proc, rb_iseq_check(), rb_method_iseq(), vm_block_type(), and VM_UNREACHABLE.
Referenced by method_def_iseq(), rb_method_entry_make(), rb_proc_location(), and rb_proc_parameters().
struct st_table* ruby_insn_make_insn_table | ( | void | ) |