Ruby
2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)
|
Go to the documentation of this file.
16 #define ISEQ_MAJOR_VERSION ((unsigned int)ruby_api_version[0])
17 #define ISEQ_MINOR_VERSION ((unsigned int)ruby_api_version[1])
21 #define rb_iseq_t rb_iseq_t
27 rb_call_info_kw_arg_bytes(
int keyword_len)
34 #define ISEQ_COVERAGE(iseq) iseq->body->variable.coverage
35 #define ISEQ_COVERAGE_SET(iseq, cov) RB_OBJ_WRITE(iseq, &iseq->body->variable.coverage, cov)
36 #define ISEQ_LINE_COVERAGE(iseq) RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_LINES)
37 #define ISEQ_BRANCH_COVERAGE(iseq) RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_BRANCHES)
39 #define ISEQ_PC2BRANCHINDEX(iseq) iseq->body->variable.pc2branchindex
40 #define ISEQ_PC2BRANCHINDEX_SET(iseq, h) RB_OBJ_WRITE(iseq, &iseq->body->variable.pc2branchindex, h)
42 #define ISEQ_FLIP_CNT(iseq) (iseq)->body->variable.flip_count
75 #define ISEQ_TRACE_EVENTS (RUBY_EVENT_LINE | \
81 RUBY_EVENT_B_RETURN| \
82 RUBY_EVENT_COVERAGE_LINE| \
83 RUBY_EVENT_COVERAGE_BRANCH)
85 #define ISEQ_NOT_LOADED_YET IMEMO_FL_USER1
86 #define ISEQ_USE_COMPILE_DATA IMEMO_FL_USER2
87 #define ISEQ_TRANSLATED IMEMO_FL_USER3
88 #define ISEQ_MARKABLE_ISEQ IMEMO_FL_USER4
90 #define ISEQ_EXECUTABLE_P(iseq) (FL_TEST_RAW((iseq), ISEQ_NOT_LOADED_YET | ISEQ_USE_COMPILE_DATA) == 0)
151 iseq_imemo_alloc(
void)
166 #if VM_INSN_INFO_TABLE_IMPL == 2
261 iseq_catch_table_bytes(
int n)
267 if (
n > catch_table_entries_max)
rb_fatal(
"too large iseq_catch_table - %d",
n);
269 n * catch_table_entry_size);
272 #define INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE (512)
VALUE rb_iseq_ibf_load_extra_data(VALUE str)
#define RUBY_SYMBOL_EXPORT_END
VALUE rb_iseq_local_variables(const rb_iseq_t *iseq)
struct iseq_compile_data_storage * storage_current
int rb_iseq_add_local_tracepoint_recursively(const rb_iseq_t *iseq, rb_event_flag_t turnon_events, VALUE tpval, unsigned int target_line)
VALUE rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc)
struct iseq_compile_data_storage * storage_head
VALUE rb_iseq_method_name(const rb_iseq_t *iseq)
struct iseq_compile_data_ensure_node_stack * ensure_node_stack
#define offsetof(p_type, field)
VALUE rb_iseq_compile_callback(rb_iseq_t *iseq, const struct rb_iseq_new_with_callback_callback_func *ifunc)
struct iseq_compile_data * compile_data
void rb_iseq_init_trace(rb_iseq_t *iseq)
const ID rb_iseq_shared_exc_local_tbl[]
void rb_iseq_trace_set_all(rb_event_flag_t turnon_events)
const rb_iseq_t * rb_iseqw_to_iseq(VALUE iseqw)
union rb_iseq_struct::@181 aux
struct rb_iseq_constant_body * rb_iseq_constant_body_alloc(void)
unsigned int coverage_enabled
void rb_iseq_code_location(const rb_iseq_t *iseq, int *first_lineno, int *first_column, int *last_lineno, int *last_column)
const rb_iseq_t * rb_iseq_ibf_load(VALUE str)
void rb_fatal(const char *fmt,...)
const rb_iseq_t * rb_iseq_load_iseq(VALUE fname)
int rb_iseq_remove_local_tracepoint_recursively(const rb_iseq_t *iseq, VALUE tpval)
VALUE rb_iseq_absolute_path(const rb_iseq_t *iseq)
struct iseq_compile_data::@117 insn
VALUE rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0)
unsigned int specialized_instruction
struct iseq_compile_data::@116 node
VALUE rb_iseq_ibf_dump(const rb_iseq_t *iseq, VALUE opt)
void rb_iseq_remove_coverage_all(void)
VALUE rb_iseqw_new(const rb_iseq_t *iseq)
unsigned int frozen_string_literal
struct rb_iseq_constant_body::@179 variable
unsigned int tailcall_optimization
RUBY_SYMBOL_EXPORT_BEGIN VALUE rb_iseq_compile_node(rb_iseq_t *iseq, const NODE *node)
struct iseq_label_data * redo_label
rb_atomic_t cnt[RUBY_NSIG]
void rb_iseq_trace_set(const rb_iseq_t *iseq, rb_event_flag_t turnon_events)
const rb_iseq_t * rb_iseq_ibf_load_bytes(const char *cstr, size_t)
unsigned int peephole_optimization
const rb_iseq_t * current_block
enum iseq_catch_table_entry::catch_type type
VALUE rb_iseq_label(const rb_iseq_t *iseq)
unsigned int inline_const_cache
PACKED_STRUCT_UNALIGNED(struct iseq_catch_table { unsigned int size;struct iseq_catch_table_entry entries[FLEX_ARY_LEN];})
const RUBY_EXTERN int ruby_api_version[]
#define ISEQ_USE_COMPILE_DATA
unsigned int debug_frozen_string_literal
unsigned int stack_caching
unsigned int instructions_unification
struct rb_id_table * ivar_cache_table
unsigned int rb_iseq_line_no(const rb_iseq_t *iseq, size_t pos)
#define RUBY_SYMBOL_EXPORT_BEGIN
void rb_iseq_mark_insn_storage(struct iseq_compile_data_storage *arena)
struct iseq_label_data * end_label
VALUE rb_iseq_defined_string(enum defined_type type)
char str[HTML_ESCAPE_MAX_LEN+1]
void rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE misc, VALUE locals, VALUE args, VALUE exception, VALUE body)
const rb_iseq_t * rb_proc_get_iseq(VALUE proc, int *is_proc)
const struct rb_builtin_function * builtin_function_table
size_t rb_size_mul_add_or_raise(size_t x, size_t y, size_t z, VALUE exc)
struct rb_iseq_constant_body * body
void rb_iseq_insns_info_encode_positions(const rb_iseq_t *iseq)
const VALUE catch_table_ary
const rb_iseq_t * rb_method_iseq(VALUE body)
VALUE rb_iseq_load(VALUE data, VALUE parent, VALUE opt)
VALUE rb_iseq_first_lineno(const rb_iseq_t *iseq)
VALUE * rb_iseq_original_iseq(const rb_iseq_t *iseq)
struct iseq_compile_data_storage * next
const rb_compile_option_t * option
unsigned int * rb_iseq_insns_info_decode_positions(const struct rb_iseq_constant_body *body)
struct iseq_label_data * start_label
VALUE type(ANYARGS)
ANYARGS-ed function type.
void rb_ibf_load_iseq_complete(rb_iseq_t *iseq)
VALUE rb_iseq_base_label(const rb_iseq_t *iseq)
unsigned int operands_unification