Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
|
Go to the source code of this file.
Data Structures | |
struct | iseq_compile_data |
struct | rb_compile_option_struct |
struct | iseq_insn_info_entry |
struct | iseq_catch_table_entry |
struct | iseq_compile_data_storage |
Enumerations | |
enum | defined_type { DEFINED_NOT_DEFINED , DEFINED_NIL = 1 , DEFINED_IVAR , DEFINED_LVAR , DEFINED_GVAR , DEFINED_CVAR , DEFINED_CONST , DEFINED_METHOD , DEFINED_YIELD , DEFINED_ZSUPER , DEFINED_SELF , DEFINED_TRUE , DEFINED_FALSE , DEFINED_ASGN , DEFINED_EXPR , DEFINED_IVAR2 , DEFINED_REF , DEFINED_FUNC , DEFINED_CONST_FROM } |
Variables | |
const int | ruby_api_version [] |
const ID | rb_iseq_shared_exc_local_tbl [] |
#define ISEQ_BRANCH_COVERAGE | ( | iseq | ) | RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_BRANCHES) |
#define ISEQ_COVERAGE_SET | ( | iseq, | |
cov | |||
) | RB_OBJ_WRITE(iseq, &iseq->body->variable.coverage, cov) |
#define ISEQ_EXECUTABLE_P | ( | iseq | ) | (FL_TEST_RAW(((VALUE)iseq), ISEQ_NOT_LOADED_YET | ISEQ_USE_COMPILE_DATA) == 0) |
#define ISEQ_FLIP_CNT | ( | iseq | ) | (iseq)->body->variable.flip_count |
#define ISEQ_LINE_COVERAGE | ( | iseq | ) | RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_LINES) |
#define ISEQ_MAJOR_VERSION ((unsigned int)ruby_api_version[0]) |
#define ISEQ_MARKABLE_ISEQ IMEMO_FL_USER4 |
#define ISEQ_MINOR_VERSION ((unsigned int)ruby_api_version[1]) |
#define ISEQ_NOT_LOADED_YET IMEMO_FL_USER1 |
#define ISEQ_PC2BRANCHINDEX | ( | iseq | ) | iseq->body->variable.pc2branchindex |
#define ISEQ_PC2BRANCHINDEX_SET | ( | iseq, | |
h | |||
) | RB_OBJ_WRITE(iseq, &iseq->body->variable.pc2branchindex, h) |
#define ISEQ_TRACE_EVENTS |
#define ISEQ_TRANSLATED IMEMO_FL_USER3 |
#define ISEQ_USE_COMPILE_DATA IMEMO_FL_USER2 |
enum defined_type |
PACKED_STRUCT_UNALIGNED | ( | struct iseq_catch_table { unsigned int size;struct iseq_catch_table_entry entries[FLEX_ARY_LEN];} | ) |
References FLEX_ARY_LEN.
void rb_ibf_load_iseq_complete | ( | rb_iseq_t * | iseq | ) |
Definition at line 11971 of file compile.c.
References rb_iseq_struct::aux, FL_UNSET, rb_iseq_struct::index, ibf_load::iseq, ISEQ_NOT_LOADED_YET, load(), rb_iseq_struct::loader, rb_iseq_struct::obj, rb_iseq_init_trace(), and RTYPEDDATA_DATA.
Definition at line 1099 of file iseq.c.
References rb_iseq_realpath().
int rb_iseq_add_local_tracepoint_recursively | ( | const rb_iseq_t * | iseq, |
rb_event_flag_t | turnon_events, | ||
VALUE | tpval, | ||
unsigned int | target_line | ||
) |
Definition at line 3266 of file iseq.c.
References trace_set_local_events_struct::n, Qnil, rb_funcall(), rb_intern(), rb_iseq_disasm(), trace_set_local_events_struct::target_line, trace_set_local_events_struct::tpval, and trace_set_local_events_struct::turnon_events.
Definition at line 1111 of file iseq.c.
References rb_iseq_location_struct::base_label, rb_iseq_struct::body, and rb_iseq_constant_body::location.
Referenced by 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 9665 of file compile.c.
References ALLOC_N, rb_iseq_constant_body::ambiguous_param0, rb_iseq_struct::body, CHECK_SYMBOL, Data_Wrap_Struct, DECL_ANCHOR, FIX2LONG, FIXNUM_P, rb_iseq_constant_body::flags, rb_iseq_constant_body::has_block, rb_iseq_constant_body::has_kwrest, rb_iseq_constant_body::has_lead, rb_iseq_constant_body::has_opt, rb_iseq_constant_body::has_post, rb_iseq_constant_body::has_rest, ID2SYM, if(), INIT_ANCHOR, INT_PARAM, rb_iseq_constant_body::keyword, len, rb_iseq_constant_body::local_table, rb_iseq_constant_body::local_table_size, NIL_P, NULL, rb_iseq_constant_body::opt_num, rb_iseq_constant_body::opt_table, rb_iseq_constant_body::param, PRIsVALUE, Qtrue, RARRAY_AREF, rb_eTypeError, rb_hash_aref(), rb_mark_set(), rb_raise(), rb_iseq_constant_body::size, st_free_table, st_init_numtable, rb_iseq_constant_body::stack_max, SYM, SYM2ID, T_ARRAY, TRUE, and ZALLOC.
void rb_iseq_code_location | ( | const rb_iseq_t * | iseq, |
int * | first_lineno, | ||
int * | first_column, | ||
int * | last_lineno, | ||
int * | last_column | ||
) |
Definition at line 1136 of file iseq.c.
References rb_code_location_struct::beg_pos, rb_iseq_struct::body, rb_iseq_location_struct::code_location, rb_code_position_struct::column, rb_code_location_struct::end_pos, rb_code_position_struct::lineno, and rb_iseq_constant_body::location.
VALUE rb_iseq_compile_callback | ( | rb_iseq_t * | iseq, |
const struct rb_iseq_new_with_callback_callback_func * | ifunc | ||
) |
Definition at line 715 of file compile.c.
References ADD_INSN, CHECK, rb_iseq_new_with_callback_callback_func::data, DECL_ANCHOR, rb_iseq_new_with_callback_callback_func::func, and INIT_ANCHOR.
Referenced by rb_iseq_new_with_callback().
Definition at line 729 of file compile.c.
References ADD_CATCH_ENTRY, ADD_GETLOCAL, ADD_INSN, ADD_INSN1, ADD_LABEL, ADD_TRACE, rb_iseq_struct::body, CHECK, rb_iseq_location_struct::code_location, COMPILE, COMPILE_ERROR, COMPILE_NG, COMPILE_POPPED, DECL_ANCHOR, rb_code_location_struct::end_pos, ERROR_ARGS, rb_iseq_location_struct::first_lineno, FIX2INT, imemo_ifunc, IMEMO_TYPE_P, INIT_ANCHOR, INT2FIX, INVALID_ISEQ_TYPE, LABEL_RESCUE_BEG, LABEL_RESCUE_END, rb_code_position_struct::lineno, rb_iseq_constant_body::location, LVAR_ERRINFO, nd_line, nd_type, NEW_LABEL, NO_CHECK, NODE_SCOPE, NULL, rb_eArgError, rb_raise(), iseq_label_data::rescued, RUBY_EVENT_B_CALL, RUBY_EVENT_B_RETURN, RUBY_EVENT_CALL, RUBY_EVENT_CLASS, RUBY_EVENT_END, RUBY_EVENT_RETURN, and rb_iseq_constant_body::type.
Referenced by rb_iseq_new_with_opt().
struct rb_iseq_constant_body * rb_iseq_constant_body_alloc | ( | void | ) |
VALUE rb_iseq_defined_string | ( | enum defined_type | type | ) |
Definition at line 3087 of file iseq.c.
References numberof, OBJ_FREEZE, rb_gc_register_mark_object(), rb_str_new_cstr, ruby_xcalloc(), and str.
Referenced by rb_insn_operand_intern().
Definition at line 1117 of file iseq.c.
References rb_iseq_struct::body, rb_iseq_location_struct::first_lineno, and rb_iseq_constant_body::location.
Referenced by rb_profile_frame_first_lineno(), and rb_vm_get_sourceline().
Definition at line 11913 of file compile.c.
References rb_iseq_struct::body, DATA_PTR, ibf_header::extra_size, ibf_dump::global_buffer, ibf_header::global_object_list_offset, ibf_header::global_object_list_size, IBF_MAJOR_VERSION, IBF_MINOR_VERSION, ISEQ_COVERAGE, rb_iseq_constant_body::local_iseq, ibf_header::magic, ibf_header::major_version, ibf_header::minor_version, NULL, rb_iseq_constant_body::parent_iseq, ptr, rb_eRuntimeError, RB_GC_GUARD, rb_raise(), RTEST, RUBY_PLATFORM, ibf_header::size, ibf_dump_buffer::str, str, StringValuePtr, strlen(), and TypedData_Make_Struct.
Definition at line 12136 of file compile.c.
References ibf_load::iseq, load(), ibf_load::loader_obj, RB_GC_GUARD, str, and TypedData_Make_Struct.
Definition at line 12150 of file compile.c.
References ibf_load::iseq, load(), ibf_load::loader_obj, RB_GC_GUARD, and TypedData_Make_Struct.
Referenced by rb_load_with_builtin_functions().
Definition at line 12164 of file compile.c.
References load(), ibf_load::loader_obj, RB_GC_GUARD, rb_str_new, str, and TypedData_Make_Struct.
void rb_iseq_init_trace | ( | rb_iseq_t * | iseq | ) |
Definition at line 675 of file iseq.c.
References rb_iseq_struct::aux, rb_iseq_struct::exec, rb_iseq_struct::global_trace_events, ISEQ_TRACE_EVENTS, rb_iseq_trace_set(), and ruby_vm_event_enabled_global_flags.
Referenced by rb_ibf_load_iseq_complete().
Definition at line 646 of file iseq.c.
References rb_iseq_struct::body, if(), rb_iseq_constant_body::insns_info, rb_iseq_constant_body::iseq_size, NULL, rb_iseq_constant_body::iseq_insn_info::positions, ruby_xfree(), and rb_iseq_constant_body::iseq_insn_info::size.
Definition at line 1105 of file iseq.c.
References rb_iseq_struct::body, rb_iseq_location_struct::label, and rb_iseq_constant_body::location.
Referenced by rb_profile_frame_label().
Definition at line 1821 of file iseq.c.
References iseq_insn_info_entry::line_no.
Referenced by rb_iseq_disasm_insn().
Definition at line 907 of file iseq.c.
References NULL, rb_check_funcall(), rb_cISeq, rb_intern(), RBASIC_CLASS, and SPECIAL_CONST_P.
Definition at line 885 of file vm.c.
References rb_iseq_struct::body, and rb_iseq_constant_body::parent_iseq.
Referenced by rb_iseqw_local_variables().
void rb_iseq_mark_insn_storage | ( | struct iseq_compile_data_storage * | arena | ) |
Definition at line 9611 of file compile.c.
References iseq_compile_data_storage::buff, if(), iseq_insn_data::insn_id, int(), iseq_compile_data_storage::next, OPERAND_AT, iseq_insn_data::operands, iseq_compile_data_storage::pos, rb_gc_mark(), iseq_compile_data_storage::size, SPECIAL_CONST_P, and types.
Referenced by rb_iseq_mark().
Definition at line 1123 of file iseq.c.
References rb_iseq_location_struct::base_label, rb_iseq_struct::body, rb_iseq_constant_body::ISEQ_TYPE_METHOD, 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 863 of file compile.c.
References rb_iseq_struct::body, rb_iseq_constant_body::iseq_encoded, rb_iseq_constant_body::iseq_size, MEMCPY, and rb_vm_insn_addr2insn().
Referenced by rb_vmdebug_debug_print_pre().
Definition at line 2993 of file iseq.c.
References rb_iseq_constant_body::accepts_no_kwarg, rb_iseq_constant_body::block_start, rb_iseq_struct::body, CONST_ID, rb_iseq_constant_body::flags, rb_iseq_constant_body::has_block, rb_iseq_constant_body::has_kw, rb_iseq_constant_body::has_kwrest, rb_iseq_constant_body::has_rest, ID2SYM, key, rb_iseq_constant_body::keyword, rb_iseq_constant_body::lead_num, rb_iseq_constant_body::opt_num, PARAM, rb_iseq_constant_body::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_tracearg_parameters().
void rb_iseq_remove_coverage_all | ( | void | ) |
Definition at line 1170 of file iseq.c.
References NULL, and rb_objspace_each_objects().
Referenced by rb_reset_coverages().
Definition at line 3322 of file iseq.c.
References trace_clear_local_events_struct::n, and trace_clear_local_events_struct::tpval.
void rb_iseq_trace_set | ( | const rb_iseq_t * | iseq, |
rb_event_flag_t | turnon_events | ||
) |
Definition at line 3333 of file iseq.c.
References rb_iseq_struct::aux, rb_iseq_struct::body, rb_hook_list_struct::events, rb_iseq_struct::exec, rb_iseq_struct::global_trace_events, rb_iseq_constant_body::iseq_encoded, ISEQ_EXECUTABLE_P, rb_iseq_constant_body::iseq_size, rb_iseq_struct::local_hooks, and rb_iseq_event_flags().
Referenced by rb_iseq_init_trace().
void rb_iseq_trace_set_all | ( | rb_event_flag_t | turnon_events | ) |
Definition at line 3379 of file iseq.c.
References rb_objspace_each_objects().
Definition at line 2835 of file proc.c.
References rb_method_def().
Referenced by rb_proc_get_iseq().
Definition at line 1242 of file proc.c.
References rb_block::as, 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, IS_METHOD_PROC_IFUNC, rb_captured_block::iseq, NULL, rb_block::proc, rb_method_iseq(), rb_proc_get_iseq(), and VM_UNREACHABLE.
Referenced by rb_proc_get_iseq(), rb_proc_location(), and rb_resolve_me_location().
Definition at line 125 of file compile.c.
Referenced by rb_iseq_free().