Ruby
2.4.2p198(2017-09-14revision59899)
|
#include "internal.h"
#include "ruby/util.h"
#include "eval_intern.h"
#include "gc.h"
#include "vm_core.h"
#include "iseq.h"
#include "id_table.h"
#include "insns.inc"
#include "insns_info.inc"
#include "node_name.inc"
Go to the source code of this file.
Data Structures | |
struct | set_specifc_data |
Macros | |
#define | hidden_obj_p(obj) (!SPECIAL_CONST_P(obj) && !RBASIC(obj)->klass) |
#define | SET_COMPILE_OPTION(o, h, mem) |
#define | SET_COMPILE_OPTION_NUM(o, h, mem) |
#define | SET_COMPILE_OPTION(o, h, mem) rb_hash_aset((h), ID2SYM(rb_intern(#mem)), (o)->mem ? Qtrue : Qfalse) |
#define | SET_COMPILE_OPTION_NUM(o, h, mem) rb_hash_aset((h), ID2SYM(rb_intern(#mem)), INT2NUM((o)->mem)) |
#define | CHECK_ARRAY(v) rb_convert_type((v), T_ARRAY, "Array", "to_ary") |
#define | CHECK_HASH(v) rb_convert_type((v), T_HASH, "Hash", "to_hash") |
#define | CHECK_STRING(v) rb_convert_type((v), T_STRING, "String", "to_str") |
#define | CHECK_SYMBOL(v) rb_convert_type((v), T_SYMBOL, "Symbol", "to_sym") |
#define | INITIALIZED volatile /* suppress warnings by gcc 4.8 */ |
#define | DECL_SYMBOL(name) static VALUE sym_##name |
#define | INIT_SYMBOL(name) sym_##name = ID2SYM(rb_intern(#name)) |
#define | PARAM_TYPE(type) rb_ary_push(a = rb_ary_new2(2), ID2SYM(type)) |
#define | PARAM_ID(i) iseq->body->local_table[(i)] |
#define | PARAM(i, type) |
Variables | |
VALUE | rb_cISeq |
static rb_compile_option_t | COMPILE_OPTION_DEFAULT |
static const rb_compile_option_t | COMPILE_OPTION_FALSE = {0} |
static const rb_data_type_t | iseqw_data_type |
#define CHECK_ARRAY | ( | v | ) | rb_convert_type((v), T_ARRAY, "Array", "to_ary") |
Definition at line 501 of file iseq.c.
Referenced by iseq_load().
#define CHECK_HASH | ( | v | ) | rb_convert_type((v), T_HASH, "Hash", "to_hash") |
Definition at line 502 of file iseq.c.
Referenced by iseq_load().
#define CHECK_STRING | ( | v | ) | rb_convert_type((v), T_STRING, "String", "to_str") |
Definition at line 503 of file iseq.c.
Referenced by iseq_load().
#define CHECK_SYMBOL | ( | v | ) | rb_convert_type((v), T_SYMBOL, "Symbol", "to_sym") |
Definition at line 504 of file iseq.c.
Referenced by iseq_load().
Definition at line 1749 of file iseq.c.
Referenced by iseq_data_to_ary().
#define hidden_obj_p | ( | obj | ) | (!SPECIAL_CONST_P(obj) && !RBASIC(obj)->klass) |
Definition at line 33 of file iseq.c.
Referenced by obj_resurrect().
Definition at line 1752 of file iseq.c.
Referenced by iseq_data_to_ary().
#define INITIALIZED volatile /* suppress warnings by gcc 4.8 */ |
Referenced by rb_iseq_compile_with_option().
#define PARAM | ( | i, | |
type | |||
) |
Referenced by rb_iseq_parameters().
#define PARAM_ID | ( | i | ) | iseq->body->local_table[(i)] |
Referenced by rb_iseq_parameters().
#define PARAM_TYPE | ( | type | ) | rb_ary_push(a = rb_ary_new2(2), ID2SYM(type)) |
Referenced by rb_iseq_parameters().
#define SET_COMPILE_OPTION | ( | o, | |
h, | |||
mem | |||
) |
Referenced by make_compile_option_value(), and set_compile_option_from_hash().
#define SET_COMPILE_OPTION | ( | o, | |
h, | |||
mem | |||
) | rb_hash_aset((h), ID2SYM(rb_intern(#mem)), (o)->mem ? Qtrue : Qfalse) |
#define SET_COMPILE_OPTION_NUM | ( | o, | |
h, | |||
mem | |||
) |
Referenced by make_compile_option_value(), and set_compile_option_from_hash().
#define SET_COMPILE_OPTION_NUM | ( | o, | |
h, | |||
mem | |||
) | rb_hash_aset((h), ID2SYM(rb_intern(#mem)), INT2NUM((o)->mem)) |
|
static |
Definition at line 1454 of file iseq.c.
References rb_bug().
Referenced by iseq_set_exception_table(), and rb_iseq_disasm().
Definition at line 1781 of file iseq.c.
References obj_resurrect(), rb_ary_push(), and ST_CONTINUE.
Referenced by iseq_data_to_ary().
Definition at line 320 of file iseq.c.
References rb_iseq_struct::body, compile_data_free(), err, iseq_compile_data::err_info, ISEQ_COMPILE_DATA, rb_iseq_constant_body::location, rb_iseq_location_struct::path, Qtrue, rb_exc_raise(), rb_funcallv, rb_intern, and RTEST.
Referenced by iseq_load(), and rb_iseq_new_with_opt().
|
static |
Definition at line 2266 of file iseq.c.
References INT2NUM, rb_ary_push(), and result.
Referenced by rb_iseqw_line_trace_all().
|
static |
Definition at line 52 of file iseq.c.
References iseq_compile_data::ivar_cache_table, iseq_compile_data_storage::next, rb_id_table_free(), ruby_xfree(), and iseq_compile_data::storage_head.
Referenced by cleanup_iseq_build(), and rb_iseq_free().
Definition at line 1764 of file iseq.c.
References iseq_catch_table_entry::CATCH_TYPE_BREAK, iseq_catch_table_entry::CATCH_TYPE_ENSURE, iseq_catch_table_entry::CATCH_TYPE_NEXT, iseq_catch_table_entry::CATCH_TYPE_REDO, iseq_catch_table_entry::CATCH_TYPE_RESCUE, iseq_catch_table_entry::CATCH_TYPE_RETRY, CONST_ID, id, ID2SYM, and rb_bug().
Referenced by iseq_data_to_ary().
Definition at line 1221 of file iseq.c.
References get_line_info(), and iseq_line_info_entry::line_no.
Referenced by rb_iseq_disasm_insn(), rb_iseq_line_no(), and rb_iseqw_line_trace_each().
|
static |
Definition at line 1186 of file iseq.c.
References rb_iseq_struct::body, debug, rb_iseq_constant_body::line_info_size, rb_iseq_constant_body::line_info_table, iseq_line_info_entry::line_no, iseq_line_info_entry::position, PRIuSIZE, and size.
Referenced by find_line_no().
Definition at line 1245 of file iseq.c.
References rb_id2str, rb_str_inspect(), and rb_str_symname_p().
Referenced by rb_insn_operand_intern(), and rb_iseq_disasm().
void Init_ISeq | ( | void | ) |
Definition at line 2432 of file iseq.c.
References CLASS_OF, iseq_s_load(), iseqw_absolute_path(), iseqw_base_label(), iseqw_disasm(), iseqw_eval(), iseqw_first_lineno(), iseqw_inspect(), iseqw_label(), iseqw_path(), iseqw_s_compile(), iseqw_s_compile_file(), iseqw_s_compile_option_get(), iseqw_s_compile_option_set(), iseqw_s_disasm(), iseqw_s_load_from_binary(), iseqw_s_load_from_binary_extra_data(), iseqw_s_of(), iseqw_to_a(), iseqw_to_binary(), rb_cISeq, rb_cObject, rb_cRubyVM, rb_define_class_under(), rb_define_method(), rb_define_private_method(), rb_define_singleton_method(), rb_iseqw_line_trace_all(), rb_iseqw_line_trace_specify(), rb_undef_alloc_func(), and rb_undef_method().
|
static |
Definition at line 212 of file iseq.c.
References rb_iseq_struct::body, iseq_imemo_alloc(), and ZALLOC.
Referenced by iseq_load(), and rb_iseq_new_with_opt().
Definition at line 1789 of file iseq.c.
References rb_iseq_location_struct::absolute_path, rb_iseq_constant_body::block_start, rb_iseq_struct::body, rb_iseq_constant_body::catch_table, cdhash_each(), iseq_catch_table_entry::cont, DECL_SYMBOL, iseq_catch_table_entry::end, exception_type2symbol(), rb_iseq_location_struct::first_lineno, FIX2INT, rb_call_info::flag, rb_iseq_constant_body::flags, hash(), rb_global_entry::id, ID2SYM, INIT_SYMBOL, INT2FIX, rb_iseq_constant_body::is_entries, iseq_catch_table_entry::iseq, ISEQ_MAJOR_VERSION, ISEQ_MINOR_VERSION, rb_iseq_constant_body::iseq_size, key, rb_iseq_constant_body::keyword, rb_call_info_kw_arg::keyword_len, rb_call_info_kw_arg::keywords, rb_call_info_with_kwarg::kw_arg, rb_iseq_location_struct::label, rb_iseq_constant_body::lead_num, len, rb_iseq_constant_body::line_info_table, iseq_line_info_entry::line_no, rb_iseq_constant_body::local_table, rb_iseq_constant_body::local_table_size, rb_iseq_constant_body::location, LONG2NUM, main(), rb_call_info::mid, obj_resurrect(), rb_iseq_constant_body::opt_num, rb_iseq_constant_body::opt_table, rb_call_info::orig_argc, rb_iseq_constant_body::param, rb_iseq_location_struct::path, iseq_line_info_entry::position, rb_iseq_constant_body::post_num, rb_iseq_constant_body::post_start, Qfalse, Qnil, Qtrue, Qundef, RARRAY_AREF, RARRAY_LEN, RARRAY_LENINT, rb_ary_entry(), rb_ary_new(), rb_ary_new2, rb_ary_new_from_args(), rb_ary_push(), rb_ary_store(), rb_bug(), RB_GC_GUARD, rb_hash_aset(), rb_hash_foreach(), rb_hash_new(), rb_id2str, rb_intern, rb_iseq_check(), rb_iseq_original_iseq(), rb_str_new2, register_label(), rb_iseq_constant_body::rest_start, SIGNED_VALUE, rb_iseq_constant_body::size, iseq_catch_table_entry::sp, st_data_t, st_free_table, st_init_numtable, st_lookup, rb_iseq_constant_body::stack_max, iseq_catch_table_entry::start, top, iseq_catch_table_entry::type, rb_iseq_constant_body::type, UINT2NUM, ULONG2NUM, val, and VM_CALL_KWARG.
Referenced by iseqw_first_lineno(), and iseqw_to_a().
Definition at line 1476 of file iseq.c.
References rb_iseq_struct::body, rb_iseq_location_struct::label, rb_iseq_constant_body::location, rb_iseq_location_struct::path, rb_sprintf(), and RSTRING_PTR.
Referenced by rb_iseq_disasm().
Definition at line 535 of file iseq.c.
References rb_iseq_struct::body, CHECK_ARRAY, CHECK_HASH, CHECK_INTEGER(), CHECK_STRING, CHECK_SYMBOL, cleanup_iseq_build(), FALSE, iseq_alloc(), iseq_type_from_sym(), iseqw_new(), rb_iseq_constant_body::local_iseq, make_compile_option(), name, NIL_P, iseq_compile_data::option, rb_compile_option_struct::peephole_optimization, prepare_iseq_build(), PRIsVALUE, Qnil, rb_ary_entry(), rb_eTypeError, rb_iseq_build_from_ary(), rb_raise(), rb_sym2str, and st_data_t.
Referenced by iseq_s_load(), and rb_iseq_load().
|
static |
Definition at line 220 of file iseq.c.
References rb_iseq_location_struct::absolute_path, rb_iseq_location_struct::base_label, rb_iseq_struct::body, rb_iseq_location_struct::first_lineno, rb_iseq_location_struct::label, rb_iseq_constant_body::location, rb_iseq_location_struct::path, RB_OBJ_WRITE, rb_str_cmp(), and RTEST.
Referenced by prepare_iseq_build().
Definition at line 150 of file iseq.c.
References rb_iseq_struct::body, rb_iseq_constant_body::catch_table, rb_iseq_constant_body::ci_entries, rb_iseq_constant_body::ci_kw_size, rb_iseq_constant_body::ci_size, rb_iseq_constant_body::is_size, iseq_catch_table_bytes(), ISEQ_COMPILE_DATA, rb_iseq_constant_body::iseq_size, rb_iseq_constant_body::keyword, rb_call_info_kw_arg::keyword_len, rb_call_info_with_kwarg::kw_arg, rb_iseq_constant_body::line_info_size, rb_iseq_constant_body::local_table_size, iseq_compile_data_storage::next, rb_iseq_constant_body::opt_num, rb_iseq_constant_body::param, param_keyword_size(), rb_call_info_kw_arg_bytes(), size, iseq_compile_data_storage::size, SIZEOF_ISEQ_COMPILE_DATA_STORAGE, and iseq_compile_data::storage_head.
Referenced by iseqw_memsize().
Definition at line 596 of file iseq.c.
References iseq_load(), NULL, Qnil, and rb_scan_args().
Referenced by Init_ISeq().
Definition at line 459 of file iseq.c.
References CLASS_OF, iseqw_check(), iseqw_new(), rb_cISeq, rb_funcall(), rb_intern, and rb_respond_to().
Referenced by rb_iseq_new_with_opt().
|
static |
Definition at line 508 of file iseq.c.
References id_class, id_ensure, id_method, id_rescue, rb_check_id(), and rb_intern.
Referenced by iseq_load().
Definition at line 1015 of file iseq.c.
References iseqw_check(), and rb_iseq_absolute_path().
Referenced by Init_ISeq().
Definition at line 1070 of file iseq.c.
References iseqw_check(), and rb_iseq_base_label().
Referenced by Init_ISeq().
Definition at line 915 of file iseq.c.
References rb_iseq_struct::body, DATA_PTR, ibf_load_iseq_complete(), rb_iseq_location_struct::label, rb_iseq_constant_body::location, rb_eTypeError, and rb_raise().
Referenced by iseq_translate(), iseqw_absolute_path(), iseqw_base_label(), iseqw_disasm(), iseqw_eval(), iseqw_first_lineno(), iseqw_inspect(), iseqw_label(), iseqw_path(), iseqw_s_disasm(), iseqw_to_a(), iseqw_to_binary(), rb_iseq_load_iseq(), rb_iseqw_line_trace_each(), rb_iseqw_local_variables(), and rb_iseqw_to_iseq().
Definition at line 1618 of file iseq.c.
References iseqw_check(), and rb_iseq_disasm().
Referenced by Init_ISeq().
Definition at line 944 of file iseq.c.
References iseqw_check(), rb_iseq_eval(), and rb_secure().
Referenced by Init_ISeq().
Definition at line 1086 of file iseq.c.
References iseq_data_to_ary(), iseqw_check(), and rb_iseq_first_lineno().
Referenced by Init_ISeq().
Definition at line 955 of file iseq.c.
References rb_iseq_struct::body, iseqw_check(), rb_iseq_location_struct::label, rb_iseq_constant_body::location, rb_iseq_location_struct::path, rb_obj_classname(), rb_sprintf(), and RSTRING_PTR.
Referenced by Init_ISeq().
Definition at line 1044 of file iseq.c.
References iseqw_check(), and rb_iseq_label().
Referenced by Init_ISeq().
|
static |
Definition at line 723 of file iseq.c.
References rb_gc_mark().
|
static |
Definition at line 729 of file iseq.c.
References iseq_memsize().
Definition at line 741 of file iseq.c.
References Qundef, rb_cISeq, RB_OBJ_WRITTEN, and TypedData_Wrap_Struct.
Referenced by iseq_load(), iseq_translate(), iseqw_s_compile(), iseqw_s_compile_file(), iseqw_s_load_from_binary(), iseqw_s_of(), and rb_iseqw_new().
Definition at line 993 of file iseq.c.
References iseqw_check(), and rb_iseq_path().
Referenced by Init_ISeq().
Definition at line 781 of file iseq.c.
References INT2FIX, iseqw_new(), NIL_P, NULL, Qnil, rb_error_arity(), rb_fstring_cstr(), rb_iseq_compile_with_option(), rb_scan_args(), and rb_secure().
Referenced by Init_ISeq().
Definition at line 823 of file iseq.c.
References f, FALSE, FilePathValue, GET_THREAD, INT2FIX, iseqw_new(), make_compile_option(), NIL_P, NULL, NUM2INT, iseq_compile_data::option, Qnil, rb_error_arity(), rb_exc_raise(), rb_file_open_str(), rb_fstring(), rb_fstring_cstr(), rb_io_close(), rb_iseq_new_with_opt(), rb_parser_compile_file_path(), rb_parser_new(), rb_parser_set_context(), rb_realpath_internal(), rb_scan_args(), and rb_secure().
Referenced by Init_ISeq().
Definition at line 909 of file iseq.c.
References make_compile_option_value().
Referenced by Init_ISeq().
Definition at line 891 of file iseq.c.
References make_compile_option(), iseq_compile_data::option, and rb_secure().
Referenced by Init_ISeq().
Definition at line 1732 of file iseq.c.
References iseqw_check(), iseqw_s_of(), NIL_P, Qnil, and rb_iseq_disasm().
Referenced by Init_ISeq().
Definition at line 2394 of file iseq.c.
References iseq_ibf_load(), and iseqw_new().
Referenced by Init_ISeq().
Definition at line 2406 of file iseq.c.
References iseq_ibf_load_extra_data().
Referenced by Init_ISeq().
Definition at line 1659 of file iseq.c.
References iseqw_new(), NULL, Qnil, rb_method_iseq(), rb_obj_is_iseq(), rb_obj_is_proc(), rb_secure(), and vm_proc_iseq().
Referenced by Init_ISeq(), and iseqw_s_disasm().
Definition at line 1175 of file iseq.c.
References iseq_data_to_ary(), iseqw_check(), and rb_secure().
Referenced by Init_ISeq().
Definition at line 2373 of file iseq.c.
References iseq_ibf_dump(), iseqw_check(), and rb_scan_args().
Referenced by Init_ISeq().
|
static |
Definition at line 2293 of file iseq.c.
References set_specifc_data::pos, set_specifc_data::prev, RUBY_EVENT_SPECIFIED_LINE, and set_specifc_data::set.
Referenced by rb_iseqw_line_trace_specify().
|
static |
Definition at line 386 of file iseq.c.
References COMPILE_OPTION_DEFAULT, COMPILE_OPTION_FALSE, iseq_compile_data::option, Qfalse, Qnil, Qtrue, rb_eTypeError, rb_raise(), RB_TYPE_P, set_compile_option_from_hash(), and T_HASH.
Referenced by iseq_load(), iseqw_s_compile_file(), iseqw_s_compile_option_set(), and rb_iseq_compile_with_option().
|
static |
Definition at line 409 of file iseq.c.
References rb_hash_new(), SET_COMPILE_OPTION, and SET_COMPILE_OPTION_NUM.
Referenced by iseqw_s_compile_option_get().
Definition at line 36 of file iseq.c.
References BUILTIN_TYPE, hidden_obj_p, rb_ary_resurrect(), rb_str_resurrect(), T_ARRAY, and T_STRING.
Referenced by cdhash_each(), iseq_data_to_ary(), and rb_insn_operand_intern().
|
static |
|
static |
Definition at line 269 of file iseq.c.
References ALLOC_N, rb_iseq_location_struct::base_label, rb_iseq_struct::body, coverage(), rb_compile_option_struct::coverage_enabled, iseq_compile_data::err_info, INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE, ISEQ_COMPILE_DATA, ISEQ_COVERAGE_SET, iseq_location_setup(), iseq_mark_ary_create(), rb_iseq_location_struct::label, rb_iseq_constant_body::local_iseq, rb_iseq_constant_body::location, iseq_compile_data::mark_ary, rb_iseq_constant_body::mark_ary, NIL_P, NULL, Qfalse, Qnil, Qtrue, rb_ary_tmp_new(), rb_fstring(), rb_get_coverages(), rb_hash_lookup(), RB_OBJ_WRITE, RTEST, set_relation(), SIZEOF_ISEQ_COMPILE_DATA_STORAGE, rb_iseq_constant_body::type, and ZALLOC.
Referenced by iseq_load(), and rb_iseq_new_with_opt().
VALUE rb_insn_operand_intern | ( | const rb_iseq_t * | iseq, |
VALUE | insn, | ||
int | op_no, | ||
VALUE | op, | ||
int | len, | ||
size_t | pos, | ||
const VALUE * | pnop, | ||
VALUE | child | ||
) |
Definition at line 1258 of file iseq.c.
References rb_iseq_struct::body, CLASS_OF, rb_call_info::flag, rb_global_entry::id, ID2SYM, id_to_name(), INT2FIX, rb_iseq_constant_body::is_entries, rb_call_info_kw_arg::keyword_len, rb_call_info_kw_arg::keywords, rb_iseq_location_struct::label, level, rb_iseq_constant_body::local_table, rb_iseq_constant_body::local_table_size, rb_iseq_constant_body::location, rb_call_info::mid, obj_resurrect(), rb_call_info::orig_argc, rb_iseq_constant_body::parent_iseq, PRIdPTRDIFF, PRIdVALUE, PRIsVALUE, PRIuVALUE, Qundef, rb_ary_join(), rb_ary_new(), rb_ary_new_from_values(), rb_ary_push(), rb_bug(), rb_cISeq, rb_id2str, rb_inspect(), rb_iseq_check(), rb_sprintf(), rb_str_dup(), rb_str_new2, rb_str_new_cstr(), VM_CALL_ARGS_BLOCKARG, VM_CALL_ARGS_SIMPLE, VM_CALL_ARGS_SPLAT, VM_CALL_FCALL, VM_CALL_KWARG, VM_CALL_OPT_SEND, VM_CALL_SUPER, VM_CALL_TAILCALL, VM_CALL_VCALL, and VM_ENV_DATA_SIZE.
Referenced by rb_iseq_disasm_insn().
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().
Definition at line 658 of file iseq.c.
References Qnil, and rb_iseq_compile_with_option().
rb_iseq_t* rb_iseq_compile_on_base | ( | VALUE | src, |
VALUE | file, | ||
VALUE | line, | ||
const struct rb_block * | base_block | ||
) |
Definition at line 664 of file iseq.c.
References Qnil, and rb_iseq_compile_with_option().
rb_iseq_t* rb_iseq_compile_with_option | ( | VALUE | src, |
VALUE | file, | ||
VALUE | absolute_path, | ||
VALUE | line, | ||
const struct rb_block * | base_block, | ||
VALUE | opt | ||
) |
Definition at line 610 of file iseq.c.
References rb_iseq_struct::body, rb_thread_struct::errinfo, FALSE, GET_THREAD, INITIALIZED, rb_iseq_location_struct::label, rb_iseq_constant_body::location, make_compile_option(), NULL, NUM2INT, iseq_compile_data::option, parse(), rb_exc_raise(), rb_fstring_cstr(), rb_iseq_new_with_opt(), rb_parser_compile_file_path(), rb_parser_compile_string_path(), rb_parser_new(), rb_parser_set_context(), RB_TYPE_P, StringValue, StringValueCStr, T_FILE, and vm_block_iseq().
Referenced by eval_string_with_cref(), iseqw_s_compile(), rb_iseq_compile(), and rb_iseq_compile_on_base().
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 1487 of file iseq.c.
References argc, rb_iseq_constant_body::block_start, rb_iseq_struct::body, rb_iseq_constant_body::catch_table, catch_type(), iseq_catch_table_entry::cont, iseq_catch_table_entry::end, rb_iseq_constant_body::flags, id_to_name(), iseq_catch_table_entry::iseq, iseq_inspect(), rb_iseq_constant_body::iseq_size, rb_iseq_constant_body::keyword, rb_iseq_constant_body::lead_num, rb_iseq_constant_body::local_table, rb_iseq_constant_body::local_table_size, name, rb_iseq_constant_body::opt_num, rb_iseq_constant_body::opt_table, rb_iseq_constant_body::param, rb_iseq_constant_body::post_num, rb_iseq_constant_body::post_start, PRIdVALUE, RARRAY_LEN, rb_ary_entry(), rb_ary_tmp_new(), rb_iseq_check(), rb_iseq_disasm(), rb_iseq_disasm_insn(), rb_iseq_original_iseq(), rb_secure(), rb_str_append(), rb_str_cat2(), rb_str_catf(), rb_str_concat(), rb_str_new(), rb_str_resize(), rb_iseq_constant_body::rest_start, RSTRING_LEN, RSTRING_PTR, size, snprintf, iseq_catch_table_entry::sp, iseq_catch_table_entry::start, and iseq_catch_table_entry::type.
Referenced by eval_string_with_cref(), iseq_setup(), iseqw_disasm(), iseqw_s_disasm(), process_options(), and rb_iseq_disasm().
int rb_iseq_disasm_insn | ( | VALUE | ret, |
const VALUE * | code, | ||
size_t | pos, | ||
const rb_iseq_t * | iseq, | ||
VALUE | child | ||
) |
Disassemble a instruction Iseq -> Iseq inspect object.
Definition at line 1402 of file iseq.c.
References find_line_no(), len, PRIuSIZE, rb_insn_operand_intern(), rb_str_cat2(), rb_str_catf(), rb_str_concat(), rb_str_new(), RSTRING_LEN, and RSTRING_PTR.
Referenced by rb_iseq_disasm(), and rb_vmdebug_debug_print_pre().
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 70 of file iseq.c.
References rb_iseq_struct::body, rb_iseq_constant_body::catch_table, rb_iseq_constant_body::cc_entries, rb_iseq_constant_body::ci_entries, rb_iseq_constant_body::ci_kw_size, rb_iseq_constant_body::ci_size, compile_data_free(), rb_iseq_constant_body::is_entries, ISEQ_COMPILE_DATA, rb_iseq_constant_body::iseq_encoded, rb_iseq_constant_body::keyword, rb_call_info_with_kwarg::kw_arg, rb_iseq_constant_body::line_info_table, rb_iseq_constant_body::local_table, NULL, rb_iseq_constant_body::opt_table, rb_iseq_constant_body::param, RUBY_FREE_ENTER, RUBY_FREE_LEAVE, and ruby_xfree().
Referenced by obj_free().
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 490 of file iseq.c.
References iseqw_check(), NULL, rb_check_funcall(), rb_cISeq, rb_intern, RBASIC_CLASS, and SPECIAL_CONST_P.
Referenced by rb_load_internal0(), and rb_provide().
void rb_iseq_make_compile_option | ( | rb_compile_option_t * | 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 106 of file iseq.c.
References rb_iseq_location_struct::absolute_path, rb_iseq_struct::aux, rb_iseq_location_struct::base_label, rb_iseq_struct::body, iseq_compile_data::catch_table_ary, iseq_compile_data::err_info, FL_TEST, ISEQ_COMPILE_DATA, ISEQ_NOT_LOADED_YET, rb_iseq_location_struct::label, rb_iseq_struct::loader, rb_iseq_constant_body::location, iseq_compile_data::mark_ary, rb_iseq_constant_body::mark_ary, rb_iseq_constant_body::parent_iseq, rb_iseq_location_struct::path, rb_gc_mark(), RSTRING_PTR, RUBY_GC_INFO, RUBY_MARK_ENTER, RUBY_MARK_LEAVE, and RUBY_MARK_UNLESS_NULL.
Referenced by gc_mark_imemo().
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().
rb_iseq_t* rb_iseq_new | ( | NODE * | node, |
VALUE | name, | ||
VALUE | path, | ||
VALUE | absolute_path, | ||
const rb_iseq_t * | parent, | ||
enum iseq_type | type | ||
) |
Definition at line 436 of file iseq.c.
References INT2FIX, and rb_iseq_new_with_opt().
Referenced by Init_VM(), proc_binding(), rb_binding_add_dynavars(), and rb_vm_call_cfunc().
rb_iseq_t* rb_iseq_new_main | ( | NODE * | node, |
VALUE | path, | ||
VALUE | absolute_path, | ||
const rb_iseq_t * | parent | ||
) |
Definition at line 451 of file iseq.c.
References INT2FIX, rb_fstring_cstr(), and rb_iseq_new_with_opt().
Referenced by process_options().
rb_iseq_t* rb_iseq_new_top | ( | NODE * | node, |
VALUE | name, | ||
VALUE | path, | ||
VALUE | absolute_path, | ||
const rb_iseq_t * | parent | ||
) |
Definition at line 444 of file iseq.c.
References INT2FIX, and rb_iseq_new_with_opt().
Referenced by rb_binding_add_dynavars(), and rb_load_internal0().
rb_iseq_t* rb_iseq_new_with_opt | ( | NODE * | node, |
VALUE | name, | ||
VALUE | path, | ||
VALUE | absolute_path, | ||
VALUE | first_lineno, | ||
const rb_iseq_t * | parent, | ||
enum iseq_type | type, | ||
const rb_compile_option_t * | option | ||
) |
Definition at line 473 of file iseq.c.
References cleanup_iseq_build(), COMPILE_OPTION_DEFAULT, iseq_alloc(), iseq_translate(), prepare_iseq_build(), and rb_iseq_compile_node().
Referenced by iseqw_s_compile_file(), method_for_self(), new_child_iseq(), rb_iseq_compile_with_option(), rb_iseq_new(), rb_iseq_new_main(), and rb_iseq_new_top().
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().
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 | iseqw, |
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 2350 of file iseq.c.
References iseqw_check(), and rb_iseq_local_variables().
Referenced by name_err_local_variables().
Definition at line 754 of file iseq.c.
References iseqw_new().
Referenced by iseq_compile_each(), name_err_initialize(), and rb_debug_inspector_frame_iseq_get().
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 1756 of file iseq.c.
References rb_sprintf(), rb_str_intern(), st_insert, and sym.
Referenced by iseq_data_to_ary().
const char* ruby_node_name | ( | int | node | ) |
Definition at line 1739 of file iseq.c.
References rb_bug().
Referenced by dump_node(), dump_object(), iseq_compile_each(), rb_raw_obj_info(), and ruby_debug_print_node().
|
static |
Definition at line 351 of file iseq.c.
References SET_COMPILE_OPTION, and SET_COMPILE_OPTION_NUM.
Referenced by make_compile_option(), and rb_iseq_make_compile_option().
Definition at line 237 of file iseq.c.
References rb_iseq_struct::body, rb_iseq_constant_body::local_iseq, rb_iseq_constant_body::parent_iseq, and rb_iseq_constant_body::type.
Referenced by prepare_iseq_build().
|
static |
Definition at line 334 of file iseq.c.
Referenced by make_compile_option(), and rb_iseq_new_with_opt().
|
static |
Definition at line 348 of file iseq.c.
Referenced by make_compile_option().
|
static |
VALUE rb_cISeq |
Definition at line 29 of file iseq.c.
Referenced by Init_ISeq(), iseq_build_load_iseq(), iseq_translate(), iseqw_new(), process_options(), rb_insn_operand_intern(), and rb_iseq_load_iseq().