Ruby: iseq.h File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Data Structures | Macros | Enumerations | Functions | Variables
iseq.h File Reference
`#include "internal/gc.h"`
`#include "vm_core.h"`

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

## Macros
#define | ISEQ_MAJOR_VERSION ((unsigned int)ruby_api_version[0])
#define | ISEQ_MINOR_VERSION ((unsigned int)ruby_api_version[1])
#define | ISEQ_COVERAGE(iseq) iseq->body->variable.coverage
#define | ISEQ_COVERAGE_SET(iseq, cov) RB_OBJ_WRITE(iseq, &iseq->body->variable.coverage, cov)
#define | ISEQ_LINE_COVERAGE(iseq) RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_LINES)
#define | ISEQ_BRANCH_COVERAGE(iseq) RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_BRANCHES)
#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_FLIP_CNT(iseq) (iseq)->body->variable.flip_count
#define | ISEQ_TRACE_EVENTS
#define | ISEQ_NOT_LOADED_YET IMEMO_FL_USER1
#define | ISEQ_USE_COMPILE_DATA IMEMO_FL_USER2
#define | ISEQ_TRANSLATED IMEMO_FL_USER3
#define | ISEQ_MARKABLE_ISEQ IMEMO_FL_USER4
#define | ISEQ_EXECUTABLE_P(iseq) (FL_TEST_RAW(((VALUE)iseq), ISEQ_NOT_LOADED_YET | ISEQ_USE_COMPILE_DATA) == 0)
#define | INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE (512)

## 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 }

## Functions
VALUE | rb_iseq_ibf_dump (const rb_iseq_t *iseq, VALUE opt)
void | rb_ibf_load_iseq_complete (rb_iseq_t *iseq)
const rb_iseq_t * | rb_iseq_ibf_load (VALUE str)
const rb_iseq_t * | rb_iseq_ibf_load_bytes (const char *cstr, size_t)
VALUE | rb_iseq_ibf_load_extra_data (VALUE str)
void | rb_iseq_init_trace (rb_iseq_t *iseq)
int | rb_iseq_add_local_tracepoint_recursively (const rb_iseq_t *iseq, rb_event_flag_t turnon_events, VALUE tpval, unsigned int target_line)
int | rb_iseq_remove_local_tracepoint_recursively (const rb_iseq_t *iseq, VALUE tpval)
const rb_iseq_t * | rb_iseq_load_iseq (VALUE fname)
VALUE | rb_iseq_compile_node (rb_iseq_t *iseq, const NODE *node)
VALUE | rb_iseq_compile_callback (rb_iseq_t *iseq, const struct rb_iseq_new_with_callback_callback_func *ifunc)
VALUE * | rb_iseq_original_iseq (const rb_iseq_t *iseq)
void | rb_iseq_build_from_ary (rb_iseq_t *iseq, VALUE misc, VALUE locals, VALUE args, VALUE exception, VALUE body)
void | rb_iseq_mark_insn_storage (struct iseq_compile_data_storage *arena)
VALUE | rb_iseq_load (VALUE data, VALUE parent, VALUE opt)
VALUE | rb_iseq_parameters (const rb_iseq_t *iseq, int is_proc)
unsigned int | rb_iseq_line_no (const rb_iseq_t *iseq, size_t pos)
void | rb_iseq_trace_set (const rb_iseq_t *iseq, rb_event_flag_t turnon_events)
void | rb_iseq_trace_set_all (rb_event_flag_t turnon_events)
void | rb_iseq_insns_info_encode_positions (const rb_iseq_t *iseq)
struct rb_iseq_constant_body * | rb_iseq_constant_body_alloc (void)
VALUE | rb_iseqw_new (const rb_iseq_t *iseq)
const rb_iseq_t * | rb_iseqw_to_iseq (VALUE iseqw)
VALUE | rb_iseq_absolute_path (const rb_iseq_t *iseq)
VALUE | rb_iseq_label (const rb_iseq_t *iseq)
VALUE | rb_iseq_base_label (const rb_iseq_t *iseq)
VALUE | rb_iseq_first_lineno (const rb_iseq_t *iseq)
VALUE | rb_iseq_method_name (const rb_iseq_t *iseq)
void | rb_iseq_code_location (const rb_iseq_t *iseq, int *first_lineno, int *first_column, int *last_lineno, int *last_column)
void | rb_iseq_remove_coverage_all (void)
const rb_iseq_t * | rb_method_iseq (VALUE body)
const rb_iseq_t * | rb_proc_get_iseq (VALUE proc, int *is_proc)
| PACKED_STRUCT_UNALIGNED (struct iseq_catch_table { unsigned int size;struct iseq_catch_table_entry entries[FLEX_ARY_LEN];})
VALUE | rb_iseq_defined_string (enum defined_type type)
VALUE | rb_iseq_local_variables (const rb_iseq_t *iseq)

## Variables
const int | ruby_api_version []
const ID | rb_iseq_shared_exc_local_tbl []

## Macro Definition Documentation

## ◆ INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE

#define INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE (512)

Definition at line 265 of file iseq.h.

## ◆ ISEQ_BRANCH_COVERAGE

#define ISEQ_BRANCH_COVERAGE | ( |  | iseq | ) | RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_BRANCHES)

Definition at line 30 of file iseq.h.

## ◆ ISEQ_COVERAGE

#define ISEQ_COVERAGE | ( |  | iseq | ) | iseq->body->variable.coverage

Definition at line 27 of file iseq.h.

## ◆ ISEQ_COVERAGE_SET

#define ISEQ_COVERAGE_SET | ( |  | iseq,
|  |  | cov
| ) |  | RB_OBJ_WRITE(iseq, &iseq->body->variable.coverage, cov)

Definition at line 28 of file iseq.h.

## ◆ ISEQ_EXECUTABLE_P

#define ISEQ_EXECUTABLE_P | ( |  | iseq | ) | (FL_TEST_RAW(((VALUE)iseq), ISEQ_NOT_LOADED_YET | ISEQ_USE_COMPILE_DATA) == 0)

Definition at line 83 of file iseq.h.

## ◆ ISEQ_FLIP_CNT

#define ISEQ_FLIP_CNT | ( |  | iseq | ) | (iseq)->body->variable.flip_count

Definition at line 35 of file iseq.h.

## ◆ ISEQ_LINE_COVERAGE

#define ISEQ_LINE_COVERAGE | ( |  | iseq | ) | RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_LINES)

Definition at line 29 of file iseq.h.

## ◆ ISEQ_MAJOR_VERSION

#define ISEQ_MAJOR_VERSION ((unsigned int)ruby_api_version[0])

Definition at line 17 of file iseq.h.

## ◆ ISEQ_MARKABLE_ISEQ

#define ISEQ_MARKABLE_ISEQ IMEMO_FL_USER4

Definition at line 81 of file iseq.h.

## ◆ ISEQ_MINOR_VERSION

#define ISEQ_MINOR_VERSION ((unsigned int)ruby_api_version[1])

Definition at line 18 of file iseq.h.

## ◆ ISEQ_NOT_LOADED_YET

#define ISEQ_NOT_LOADED_YET IMEMO_FL_USER1

Definition at line 78 of file iseq.h.

## ◆ ISEQ_PC2BRANCHINDEX

#define ISEQ_PC2BRANCHINDEX | ( |  | iseq | ) | iseq->body->variable.pc2branchindex

Definition at line 32 of file iseq.h.

## ◆ ISEQ_PC2BRANCHINDEX_SET

#define ISEQ_PC2BRANCHINDEX_SET | ( |  | iseq,
|  |  | h
| ) |  | RB_OBJ_WRITE(iseq, &iseq->body->variable.pc2branchindex, h)

Definition at line 33 of file iseq.h.

## ◆ ISEQ_TRACE_EVENTS

#define ISEQ_TRACE_EVENTS

Value:
(RUBY_EVENT_LINE | \
RUBY_EVENT_CLASS | \
RUBY_EVENT_END | \
RUBY_EVENT_CALL | \
RUBY_EVENT_RETURN| \
RUBY_EVENT_B_CALL| \
RUBY_EVENT_B_RETURN| \
RUBY_EVENT_COVERAGE_LINE| \
RUBY_EVENT_COVERAGE_BRANCH)
RUBY_EVENT_END
#define RUBY_EVENT_END
Definition: event.h:32
RUBY_EVENT_B_RETURN
#define RUBY_EVENT_B_RETURN
Definition: event.h:42
RUBY_EVENT_CLASS
#define RUBY_EVENT_CLASS
Definition: event.h:31
RUBY_EVENT_LINE
#define RUBY_EVENT_LINE
Definition: event.h:30
RUBY_EVENT_RETURN
#define RUBY_EVENT_RETURN
Definition: event.h:34
RUBY_EVENT_B_CALL
#define RUBY_EVENT_B_CALL
Definition: event.h:41
RUBY_EVENT_CALL
#define RUBY_EVENT_CALL
Definition: event.h:33
RUBY_EVENT_COVERAGE_LINE
#define RUBY_EVENT_COVERAGE_LINE
Definition: vm_core.h:2022
RUBY_EVENT_COVERAGE_BRANCH
#define RUBY_EVENT_COVERAGE_BRANCH
Definition: vm_core.h:2023

Definition at line 68 of file iseq.h.

## ◆ ISEQ_TRANSLATED

#define ISEQ_TRANSLATED IMEMO_FL_USER3

Definition at line 80 of file iseq.h.

## ◆ ISEQ_USE_COMPILE_DATA

#define ISEQ_USE_COMPILE_DATA IMEMO_FL_USER2

Definition at line 79 of file iseq.h.

## Enumeration Type Documentation

## ◆ defined_type

enum defined_type

Enumerator
DEFINED_NOT_DEFINED |
DEFINED_NIL |
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 |

Definition at line 276 of file iseq.h.

## Function Documentation

## ◆ PACKED_STRUCT_UNALIGNED()

PACKED_STRUCT_UNALIGNED | ( | struct iseq_catch_table { unsigned int size;struct iseq_catch_table_entry entries[FLEX_ARY_LEN];} |  | ) |

References FLEX_ARY_LEN.

## ◆ rb_ibf_load_iseq_complete()

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.

## ◆ rb_iseq_absolute_path()

VALUE rb_iseq_absolute_path | ( | const rb_iseq_t * | iseq | ) |

Definition at line 1099 of file iseq.c.

References rb_iseq_realpath().

## ◆ rb_iseq_add_local_tracepoint_recursively()

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.

## ◆ rb_iseq_base_label()

VALUE rb_iseq_base_label | ( | const rb_iseq_t * | iseq | ) |

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().

## ◆ rb_iseq_build_from_ary()

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.

## ◆ rb_iseq_code_location()

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.

## ◆ rb_iseq_compile_callback()

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().

## ◆ rb_iseq_compile_node()

VALUE rb_iseq_compile_node | ( | rb_iseq_t * | iseq,
|  | const NODE * | node
| ) |  |

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().

## ◆ rb_iseq_constant_body_alloc()

struct rb_iseq_constant_body * rb_iseq_constant_body_alloc | ( | void |  | ) |

Definition at line 486 of file iseq.c.

References ZALLOC.

## ◆ rb_iseq_defined_string()

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().

## ◆ rb_iseq_first_lineno()

VALUE rb_iseq_first_lineno | ( | const rb_iseq_t * | iseq | ) |

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().

## ◆ rb_iseq_ibf_dump()

VALUE rb_iseq_ibf_dump | ( | const rb_iseq_t * | iseq,
|  | VALUE | opt
| ) |  |

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.

## ◆ rb_iseq_ibf_load()

const rb_iseq_t * rb_iseq_ibf_load | ( | VALUE | str | ) |

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.

## ◆ rb_iseq_ibf_load_bytes()

const rb_iseq_t * rb_iseq_ibf_load_bytes | ( | const char * | cstr,
|  | size_t | size
| ) |  |

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().

## ◆ rb_iseq_ibf_load_extra_data()

VALUE rb_iseq_ibf_load_extra_data | ( | VALUE | str | ) |

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.

## ◆ rb_iseq_init_trace()

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().

## ◆ rb_iseq_insns_info_encode_positions()

void rb_iseq_insns_info_encode_positions | ( | const rb_iseq_t * | iseq | ) |

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.

## ◆ rb_iseq_label()

VALUE rb_iseq_label | ( | const rb_iseq_t * | iseq | ) |

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().

## ◆ rb_iseq_line_no()

unsigned int rb_iseq_line_no | ( | const rb_iseq_t * | iseq,
|  | size_t | pos
| ) |  |

Definition at line 1821 of file iseq.c.

References iseq_insn_info_entry::line_no.

Referenced by rb_iseq_disasm_insn().

## ◆ rb_iseq_load()

VALUE rb_iseq_load | ( | VALUE | data,
|  | VALUE | parent,
|  | VALUE | opt
| ) |  |

Definition at line 1032 of file iseq.c.

References NULL, and RTEST.

## ◆ rb_iseq_load_iseq()

const rb_iseq_t * rb_iseq_load_iseq | ( | VALUE | fname | ) |

Definition at line 907 of file iseq.c.

References NULL, rb_check_funcall(), rb_cISeq, rb_intern(), RBASIC_CLASS, and SPECIAL_CONST_P.

## ◆ rb_iseq_local_variables()

VALUE rb_iseq_local_variables | ( | const rb_iseq_t * | iseq | ) |

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().

## ◆ rb_iseq_mark_insn_storage()

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().

## ◆ rb_iseq_method_name()

VALUE rb_iseq_method_name | ( | const rb_iseq_t * | iseq | ) |

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().

## ◆ rb_iseq_original_iseq()

VALUE * rb_iseq_original_iseq | ( | const rb_iseq_t * | iseq | ) |

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().

## ◆ rb_iseq_parameters()

VALUE rb_iseq_parameters | ( | const rb_iseq_t * | iseq,
|  | int | is_proc
| ) |  |

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().

## ◆ rb_iseq_remove_coverage_all()

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().

## ◆ rb_iseq_remove_local_tracepoint_recursively()

int rb_iseq_remove_local_tracepoint_recursively | ( | const rb_iseq_t * | iseq,
|  | VALUE | tpval
| ) |  |

Definition at line 3322 of file iseq.c.

References trace_clear_local_events_struct::n, and trace_clear_local_events_struct::tpval.

## ◆ rb_iseq_trace_set()

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().

## ◆ rb_iseq_trace_set_all()

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().

## ◆ rb_iseqw_to_iseq()

const rb_iseq_t * rb_iseqw_to_iseq | ( | VALUE | iseqw | ) |

Definition at line 1410 of file iseq.c.

## ◆ rb_method_iseq()

const rb_iseq_t * rb_method_iseq | ( | VALUE | body | ) |

Definition at line 2835 of file proc.c.

References rb_method_def().

Referenced by rb_proc_get_iseq().

## ◆ rb_proc_get_iseq()

const rb_iseq_t * rb_proc_get_iseq | ( | VALUE | proc,
|  | int * | is_proc
| ) |  |

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().

## Variable Documentation

## ◆ rb_iseq_shared_exc_local_tbl

const ID rb_iseq_shared_exc_local_tbl[]
| extern

Definition at line 125 of file compile.c.

Referenced by rb_iseq_free().

## ◆ ruby_api_version

const int ruby_api_version[]
| extern

Definition at line 26 of file version.c.