Ruby
2.1.10p492(2016-04-01revision54464)
|
#include "ruby/ruby.h"
#include "ruby/vm.h"
#include "ruby/st.h"
#include "ruby/encoding.h"
#include "internal.h"
#include "gc.h"
#include "vm_core.h"
#include "iseq.h"
#include "eval_intern.h"
#include "probes.h"
#include "probes_helper.h"
#include "vm_insnhelper.h"
#include "vm_insnhelper.c"
#include "vm_exec.h"
#include "vm_exec.c"
#include "vm_method.c"
#include "vm_eval.c"
#include <assert.h>
Go to the source code of this file.
Macros | |
#define | BUFSIZE 0x100 |
#define | PROCDEBUG 0 |
#define | S(s) sym_##s = ID2SYM(rb_intern_const(#s)) |
#define | SET(name, attr) |
#define | ENV_IN_HEAP_P(th, env) (!((th)->stack <= (env) && (env) < ((th)->stack + (th)->stack_size))) |
#define | ENV_VAL(env) ((env)[1]) |
#define | OP(mid_, bop_) (mid = id##mid_, bop = BOP_##bop_, ruby_vm_redefined_flag[bop] = 0) |
#define | C(k) add_opt_method(rb_c##k, mid, bop) |
#define | vm_free 0 |
#define | SET(name) rb_hash_aset(result, ID2SYM(rb_intern(#name)), SIZET2NUM(vm->default_params.name)); |
#define | USE_THREAD_DATA_RECYCLE 1 |
#define | RECYCLE_MAX 64 |
#define | thread_data_type ruby_threadptr_data_type |
#define | REWIND_CFP(expr) |
Variables | |
static rb_serial_t | ruby_vm_global_method_state = 1 |
static rb_serial_t | ruby_vm_global_constant_state = 1 |
static rb_serial_t | ruby_vm_class_serial = 1 |
VALUE | rb_cRubyVM |
VALUE | rb_cThread |
VALUE | rb_cEnv |
VALUE | rb_mRubyVMFrozenCore |
VALUE | ruby_vm_const_missing_count = 0 |
short | ruby_vm_redefined_flag [BOP_LAST_] |
rb_thread_t * | ruby_current_thread = 0 |
rb_vm_t * | ruby_current_vm = 0 |
rb_event_flag_t | ruby_vm_event_flags |
static const rb_data_type_t | env_data_type |
static st_table * | vm_opt_method_table = 0 |
static const rb_data_type_t | vm_data_type |
static VALUE * | thread_recycle_stack_slot [RECYCLE_MAX] |
static int | thread_recycle_stack_count = 0 |
const rb_data_type_t | ruby_threadptr_data_type |
VALUE * | rb_gc_stack_start |
size_t | rb_gc_stack_maxsize |
void(* | ruby_vm_collect_usage_func_insn )(int insn) = NULL |
void(* | ruby_vm_collect_usage_func_operand )(int insn, int n, VALUE op) = NULL |
void(* | ruby_vm_collect_usage_func_register )(int reg, int isset) = NULL |
#define C | ( | k | ) | add_opt_method(rb_c##k, mid, bop) |
Referenced by vm_init_redefined_flag().
#define ENV_IN_HEAP_P | ( | th, | |
env | |||
) | (!((th)->stack <= (env) && (env) < ((th)->stack + (th)->stack_size))) |
Definition at line 345 of file vm.c.
Referenced by vm_collect_local_variables_in_heap(), vm_make_env_each(), and vm_rewrite_ep_in_errinfo().
Definition at line 347 of file vm.c.
Referenced by vm_collect_local_variables_in_heap(), and vm_make_env_each().
#define OP | ( | mid_, | |
bop_ | |||
) | (mid = id##mid_, bop = BOP_##bop_, ruby_vm_redefined_flag[bop] = 0) |
Referenced by vm_init_redefined_flag().
#define PROCDEBUG 0 |
Definition at line 89 of file vm.c.
Referenced by rb_vm_make_proc(), and vm_make_env_object().
#define RECYCLE_MAX 64 |
Definition at line 1975 of file vm.c.
Referenced by rb_thread_recycle_stack_release().
#define REWIND_CFP | ( | expr | ) |
Definition at line 2276 of file vm.c.
Referenced by m_core_define_method(), m_core_define_singleton_method(), m_core_hash_from_ary(), m_core_hash_merge_ary(), m_core_hash_merge_kwd(), m_core_hash_merge_ptr(), m_core_set_method_alias(), m_core_set_variable_alias(), and m_core_undef_method().
#define SET | ( | name, | |
attr | |||
) |
#define SET | ( | name | ) | rb_hash_aset(result, ID2SYM(rb_intern(#name)), SIZET2NUM(vm->default_params.name)); |
#define thread_data_type ruby_threadptr_data_type |
Definition at line 2147 of file vm.c.
Referenced by Init_VM(), rb_obj_is_thread(), and thread_alloc().
Definition at line 1219 of file vm.c.
References rb_method_entry_struct::def, rb_bug(), rb_id2name(), RCLASS_M_TBL, st_data_t, st_insert(), st_lookup(), rb_method_definition_struct::type, and VM_METHOD_TYPE_CFUNC.
|
inlinestatic |
Definition at line 833 of file vm.c.
References rb_thread_struct::cfp, Qnil, rb_vm_localjump_error(), and VM_CF_BLOCK_PTR().
Referenced by vm_yield(), vm_yield_with_block(), and vm_yield_with_cref().
Definition at line 426 of file vm.c.
References rb_env_t::block, check_env_value(), dp, rb_block_struct::ep, and rb_env_t::prev_envval.
Referenced by check_env_value().
Definition at line 442 of file vm.c.
References check_env(), env, GetEnvPtr, Qnil, and rb_bug().
Referenced by check_env(), rb_vm_make_proc(), and vm_make_env_object().
|
static |
Definition at line 1198 of file vm.c.
References rb_method_entry_struct::klass, klass, NULL, rb_method_entry(), rb_vm_check_redefinition_opt_method(), and ST_CONTINUE.
Referenced by rb_vm_check_redefinition_by_prepend().
Definition at line 548 of file vm.c.
References rb_env_t::block, collect_local_variables_in_iseq(), GetEnvPtr, rb_block_struct::iseq, and rb_env_t::prev_envval.
Referenced by vm_collect_local_variables_in_heap().
Definition at line 534 of file vm.c.
References i, ID2SYM, rb_iseq_struct::local_table, rb_iseq_struct::local_table_size, rb_ary_push(), and rb_is_local_id().
Referenced by collect_local_variables_in_env().
Definition at line 2363 of file vm.c.
References core_hash_merge_ary(), hash, RARRAY_LEN, rb_hash_new(), rb_sourcefile, rb_sourceline(), RUBY_DTRACE_HASH_CREATE, and RUBY_DTRACE_HASH_CREATE_ENABLED.
Referenced by m_core_hash_from_ary().
Definition at line 2343 of file vm.c.
References argc, assert, hash, i, and rb_hash_aset().
Referenced by core_hash_merge_ary(), and m_core_hash_merge_ptr().
Definition at line 2382 of file vm.c.
References core_hash_merge(), hash, RARRAY_CONST_PTR, and RARRAY_LEN.
Referenced by core_hash_from_ary(), and m_core_hash_merge_ary().
Definition at line 2432 of file vm.c.
References hash, kwcheck_i(), kwmerge_i(), rb_check_arity, rb_convert_type(), rb_hash_foreach(), and T_HASH.
Referenced by m_core_hash_merge_kwd().
Definition at line 412 of file vm.c.
References rb_env_t::block, env, rb_env_t::env, rb_block_struct::iseq, obj, rb_env_t::prev_envval, rb_cEnv, and TypedData_Make_Struct.
Referenced by vm_make_env_each().
Definition at line 380 of file vm.c.
References env, rb_env_t::env, ptr, RUBY_FREE_ENTER, RUBY_FREE_LEAVE, RUBY_FREE_UNLESS_NULL, and ruby_xfree().
Definition at line 350 of file vm.c.
References rb_env_t::block, BUILTIN_TYPE, env, rb_env_t::env, rb_env_t::env_size, rb_block_struct::iseq, rb_env_t::prev_envval, rb_block_struct::proc, ptr, rb_gc_mark_locations, RUBY_GC_INFO, RUBY_MARK_ENTER, RUBY_MARK_LEAVE, RUBY_MARK_UNLESS_NULL, rb_iseq_struct::self, rb_block_struct::self, and T_NODE.
Definition at line 392 of file vm.c.
References env, rb_env_t::env, rb_env_t::env_size, ptr, and size.
|
static |
Definition at line 1897 of file vm.c.
References getenv, PRIdSIZE, result, RUBY_VM_SIZE_ALIGN, and val.
Referenced by vm_default_params_setup().
|
static |
Definition at line 1289 of file vm.c.
References rb_method_entry_struct::called_id, rb_thread_struct::cfp, EXEC_EVENT_HOOK, EXEC_EVENT_HOOK_AND_POP_FRAME, rb_method_entry_struct::klass, rb_control_frame_struct::me, Qnil, RUBY_DTRACE_METHOD_RETURN_HOOK, RUBY_EVENT_B_RETURN, RUBY_EVENT_END, RUBY_EVENT_RETURN, rb_control_frame_struct::self, VM_FRAME_MAGIC_BLOCK, VM_FRAME_MAGIC_CLASS, VM_FRAME_MAGIC_LAMBDA, VM_FRAME_MAGIC_METHOD, VM_FRAME_TYPE, and VM_FRAME_TYPE_BMETHOD_P.
Referenced by vm_exec().
Definition at line 2800 of file vm.c.
References rb_vm_struct::defined_module_hash, EXIT_FAILURE, Init_native_thread(), MEMZERO, rb_vm_struct::objspace, rb_hash_new(), rb_objspace_alloc(), rb_thread_set_current_raw, ruby_mimmalloc(), ruby_thread_init_stack(), th, th_init(), rb_thread_struct::vm, and vm_init2().
Referenced by ruby_setup().
Definition at line 2840 of file vm.c.
References GET_VM, main_to_s(), rb_vm_struct::mark_object_ary, rb_ary_tmp_new(), rb_cObject, rb_define_alias(), rb_define_singleton_method(), rb_obj_alloc(), rb_singleton_class(), rb_vm_top_self(), and rb_vm_struct::top_self.
Definition at line 2492 of file vm.c.
References rb_thread_struct::cfp, CLASS_OF, GET_THREAD(), GetISeqPtr, id_core_define_method, id_core_define_singleton_method, id_core_hash_from_ary, id_core_hash_merge_ary, id_core_hash_merge_kwd, id_core_hash_merge_ptr, id_core_set_method_alias, id_core_set_postexe, id_core_set_variable_alias, id_core_undef_method, Init_vm_backtrace(), rb_control_frame_struct::iseq, rb_iseq_struct::iseq_encoded, rb_control_frame_struct::klass, klass, rb_vm_struct::living_threads, m_core_define_method(), m_core_define_singleton_method(), m_core_hash_from_ary(), m_core_hash_merge_ary(), m_core_hash_merge_kwd(), m_core_hash_merge_ptr(), m_core_set_method_alias(), m_core_set_postexe(), m_core_set_variable_alias(), m_core_undef_method(), rb_vm_struct::main_thread, nsdr(), opts, rb_control_frame_struct::pc, Qnil, rb_ary_new(), rb_ary_push(), rb_binding_new(), rb_block_lambda(), rb_block_proc(), rb_cBasicObject, rb_cEnv, rb_class_new(), rb_cObject, rb_cRubyVM, rb_cThread, rb_define_class(), rb_define_class_under(), rb_define_const(), rb_define_global_const(), rb_define_method_id(), rb_define_singleton_method(), rb_gc_register_mark_object(), rb_hash_new(), rb_insns_name_array(), rb_iseq_new(), rb_iv_set(), rb_mRubyVMFrozenCore, rb_obj_freeze(), rb_singleton_class(), rb_str_new2, rb_thread_set_current, rb_undef_alloc_func(), rb_undef_method(), rb_vm_top_self(), RBASIC, RBASIC_CLEAR_CLASS, RCLASS_SET_SUPER(), ruby_current_vm, rb_vm_struct::running_thread, sdr(), rb_vm_struct::self, rb_control_frame_struct::self, rb_thread_struct::self, st_data_t, st_init_numtable(), st_insert(), T_ICLASS, th, thread_data_type, rb_thread_struct::thread_id, rb_thread_struct::top_self, rb_thread_struct::top_wrapper, TypedData_Wrap_Struct, rb_thread_struct::vm, vm_default_params(), vm_init_redefined_flag(), VM_PROFILE_ATEXIT, vm_stat(), and void.
|
inlinestatic |
Definition at line 767 of file vm.c.
References rb_iseq_struct::arg_size, argc, block_proc_is_lambda(), BUILTIN_TYPE, rb_method_entry_struct::called_id, rb_thread_struct::cfp, rb_control_frame_struct::ep, rb_block_struct::ep, EXEC_EVENT_HOOK, i, rb_block_struct::iseq, rb_iseq_struct::iseq_encoded, rb_method_entry_struct::klass, rb_iseq_struct::local_size, rb_thread_struct::passed_bmethod_me, rb_block_struct::proc, Qnil, ret, RUBY_DTRACE_METHOD_ENTRY_HOOK, RUBY_DTRACE_METHOD_RETURN_HOOK, RUBY_EVENT_CALL, RUBY_EVENT_RETURN, rb_control_frame_struct::sp, SPECIAL_CONST_P, rb_iseq_struct::stack_max, T_NODE, type, VM_ENVVAL_PREV_EP_PTR, vm_exec(), VM_FRAME_FLAG_BMETHOD, VM_FRAME_FLAG_FINISH, VM_FRAME_MAGIC_BLOCK, VM_FRAME_MAGIC_LAMBDA, vm_push_frame(), vm_yield_setup_args(), and vm_yield_with_cfunc().
Referenced by vm_invoke_proc(), vm_yield(), vm_yield_with_block(), and vm_yield_with_cref().
Definition at line 2417 of file vm.c.
References Check_Type(), ST_CONTINUE, SYMBOL_P, and T_SYMBOL.
Referenced by core_hash_merge_kwd().
Definition at line 2407 of file vm.c.
References Check_Type(), kwmerge_ii(), Qundef, RB_OBJ_WRITTEN, RHASH_TBL_RAW, ST_CONTINUE, st_data_t, st_update(), SYMBOL_P, and T_SYMBOL.
Referenced by core_hash_merge_kwd().
Definition at line 2399 of file vm.c.
References arg, ST_CONTINUE, and ST_STOP.
Referenced by kwmerge_i().
Definition at line 2286 of file vm.c.
References GET_THREAD(), rb_vm_cref(), REWIND_CFP, sym, SYM2ID, and vm_define_method().
Referenced by Init_VM().
|
static |
Definition at line 2295 of file vm.c.
References GET_THREAD(), rb_vm_cref(), REWIND_CFP, sym, SYM2ID, and vm_define_method().
Referenced by Init_VM().
Definition at line 2355 of file vm.c.
References core_hash_from_ary(), hash, and REWIND_CFP.
Referenced by Init_VM().
Definition at line 2375 of file vm.c.
References core_hash_merge_ary(), hash, and REWIND_CFP.
Referenced by Init_VM().
Definition at line 2424 of file vm.c.
References core_hash_merge_kwd(), hash, and REWIND_CFP.
Referenced by Init_VM().
Definition at line 2389 of file vm.c.
References core_hash_merge(), hash, and REWIND_CFP.
Referenced by Init_VM().
Definition at line 2304 of file vm.c.
References Qnil, rb_alias(), REWIND_CFP, and SYM2ID.
Referenced by Init_VM().
Definition at line 2332 of file vm.c.
References Qnil, rb_block_proc(), rb_call_end_proc(), and rb_set_end_proc().
Referenced by Init_VM().
Definition at line 2313 of file vm.c.
References Qnil, rb_alias_variable(), REWIND_CFP, and SYM2ID.
Referenced by Init_VM().
Definition at line 2322 of file vm.c.
References Qnil, rb_clear_method_cache_by_class(), rb_undef(), REWIND_CFP, and SYM2ID.
Referenced by Init_VM().
Definition at line 1062 of file vm.c.
References CONST_ID, exc, id, ID2SYM, rb_eLocalJumpError, rb_exc_new2, rb_iv_set(), TAG_BREAK, TAG_NEXT, TAG_REDO, TAG_RETRY, and TAG_RETURN.
Referenced by rb_vm_localjump_error(), and rb_vm_make_jump_tag_but_local_jump().
NORETURN | ( | static void | vm_iter_breakrb_thread_t *th, VALUE val | ) |
Definition at line 2462 of file vm.c.
References ary, free, i, n, rb_ary_new(), rb_ary_push(), rb_memerror(), and rb_str_new2.
Referenced by Init_VM().
Definition at line 947 of file vm.c.
References vm_svar_get().
Referenced by date__httpdate(), date__iso8601(), date__jisx0301(), date__parse(), date__rfc2822(), date__rfc3339(), date__strptime_internal(), date__xmlschema(), last_match_getter(), last_paren_match_getter(), match_getter(), nucomp_s_convert(), nurat_s_convert(), postmatch_getter(), prematch_getter(), rb_reg_match_m(), rb_reg_s_last_match(), rb_reg_search(), rb_str_rpartition(), rb_str_split_m(), rb_str_sub_bang(), rb_str_subpat(), rb_str_subpat_set(), scan_once(), and str_gsub().
Definition at line 953 of file vm.c.
References vm_svar_set().
Referenced by date__httpdate(), date__iso8601(), date__jisx0301(), date__parse(), date__rfc2822(), date__rfc3339(), date__strptime_internal(), date__xmlschema(), match_setter(), nucomp_s_convert(), nurat_s_convert(), rb_reg_eqq(), rb_reg_match2(), rb_reg_match_m(), rb_reg_search(), rb_str_index_m(), rb_str_rindex_m(), and reg_match_pos().
VALUE* rb_binding_add_dynavars | ( | rb_binding_t * | bind, |
int | dyncount, | ||
const ID * | dynvars | ||
) |
Definition at line 725 of file vm.c.
References ALLOCV_END, ALLOCV_N, rb_env_t::block, rb_binding_t::blockprocval, rb_thread_struct::cfp, env, rb_env_t::env, rb_binding_t::env, GET_THREAD(), GetEnvPtr, rb_block_struct::iseq, rb_iseq_location_struct::label, rb_iseq_struct::location, MEMCPY, NEW_NODE, NODE_SCOPE, numberof, rb_binding_t::path, path, rb_iseq_new(), rb_iseq_struct::self, RNode::tbl, th, RNode::u1, vm_make_env_object(), vm_pop_frame(), and vm_set_eval_stack().
Referenced by bind_local_variable_set().
Definition at line 1706 of file vm.c.
References GET_THREAD(), and rb_thread_method_id_and_class().
Definition at line 309 of file vm.c.
References GET_THREAD(), th, and vm_pop_frame().
VALUE rb_insn_operand_intern | ( | rb_iseq_t * | iseq, |
VALUE | insn, | ||
int | op_no, | ||
VALUE | op, | ||
int | len, | ||
size_t | pos, | ||
VALUE * | pnop, | ||
VALUE | child | ||
) |
Definition at line 1159 of file iseq.c.
References ary, rb_call_info_struct::blockiseq, CLASS_OF, entry, rb_call_info_struct::flag, flags, i, rb_global_entry::id, ID2SYM, id_to_name(), INT2FIX, rb_iseq_struct::is_entries, rb_iseq_location_struct::label, level, rb_iseq_struct::local_size, rb_iseq_struct::local_table, rb_iseq_struct::location, rb_call_info_struct::mid, obj_resurrect(), rb_call_info_struct::orig_argc, rb_iseq_struct::parent_iseq, PRIdPTRDIFF, PRIdVALUE, PRIsVALUE, PRIuVALUE, rb_ary_join(), rb_ary_new(), rb_ary_push(), rb_bug(), rb_cISeq, rb_id2name(), rb_id2str(), rb_inspect(), rb_sprintf(), rb_str_dup(), rb_str_new2, ret, rb_iseq_struct::self, type, VM_CALL_ARGS_BLOCKARG, VM_CALL_ARGS_SKIP_SETUP, VM_CALL_ARGS_SPLAT, VM_CALL_FCALL, VM_CALL_OPT_SEND, VM_CALL_SUPER, VM_CALL_TAILCALL, and VM_CALL_VCALL.
Referenced by rb_iseq_disasm_insn().
Definition at line 1646 of file vm.c.
References GET_THREAD(), RB_GC_GUARD(), th, val, vm_exec(), and vm_set_top_stack().
Referenced by iseq_eval(), and rb_load_internal0().
Definition at line 1659 of file vm.c.
References GET_THREAD(), RB_GC_GUARD(), th, val, vm_exec(), and vm_set_main_stack().
Referenced by ruby_exec_internal().
Definition at line 1154 of file vm.c.
References GET_THREAD(), Qnil, and vm_iter_break().
Referenced by DEFINE_ENUMFUNCS(), and if().
Definition at line 1160 of file vm.c.
References GET_THREAD(), and vm_iter_break().
Referenced by if().
Definition at line 959 of file vm.c.
References vm_svar_get().
Referenced by Init_IO(), rb_io_print(), rb_reg_match2(), and uscore_get().
Definition at line 965 of file vm.c.
References vm_svar_set().
Referenced by argf_gets(), Init_IO(), rb_f_chomp(), rb_f_chop(), rb_f_gsub(), rb_f_sub(), rb_gets(), rb_gzreader_gets(), rb_io_gets_m(), and strio_gets().
rb_serial_t rb_next_class_serial | ( | void | ) |
Definition at line 92 of file vm.c.
References NEXT_CLASS_SERIAL.
Referenced by class_alloc(), and rb_class_clear_method_cache().
Definition at line 2159 of file vm.c.
References Qfalse, Qtrue, rb_typeddata_is_kind_of(), and thread_data_type.
Referenced by rb_objspace_call_finalizer().
struct rb_objspace* rb_objspace_alloc | ( | void | ) |
Definition at line 873 of file gc.c.
References malloc(), malloc_limit, ruby_gc_params_t::malloc_limit_min, memset(), ruby_gc_stress, and ruby_initial_gc_stress.
Referenced by Init_BareVM().
Definition at line 2871 of file vm.c.
References GET_VM, and ruby_vm_debug_ptr().
Definition at line 2865 of file vm.c.
References GET_VM, and ruby_vm_verbose_ptr().
Definition at line 987 of file vm.c.
References rb_thread_struct::cfp, GET_THREAD(), rb_control_frame_struct::iseq, rb_iseq_struct::location, rb_iseq_location_struct::path, rb_vm_get_ruby_level_next_cfp(), RSTRING_PTR, and th.
Definition at line 973 of file vm.c.
References rb_thread_struct::cfp, GET_THREAD(), rb_control_frame_struct::iseq, rb_iseq_struct::location, rb_iseq_location_struct::path, Qnil, rb_vm_get_ruby_level_next_cfp(), and th.
Referenced by eval_string_with_cref(), rb_const_set(), and warn_print().
Definition at line 1001 of file vm.c.
References rb_thread_struct::cfp, GET_THREAD(), rb_vm_get_ruby_level_next_cfp(), rb_vm_get_sourceline(), and th.
Referenced by ary_new(), call_trace_func(), core_hash_from_ary(), empty_ary_alloc(), empty_hash_alloc(), empty_str_alloc(), error_pos(), error_print(), eval_string_with_cref(), newobj_of(), rb_bug(), rb_clear_method_cache_by_class(), rb_const_set(), rb_exec(), rb_f_load(), rb_obj_alloc(), rb_require_safe(), rb_str_resurrect(), register_symid_str(), setup_exception(), str_new0(), update_coverage(), and warn_print().
Definition at line 2233 of file vm.c.
References ruby_thread_init(), and thread_alloc().
Referenced by rb_thread_create(), thread_s_new(), and thread_start().
VALUE rb_thread_current_status | ( | const rb_thread_t * | th | ) |
Definition at line 1712 of file vm.c.
References rb_thread_struct::cfp, rb_method_entry_struct::def, iseq_catch_table_entry::iseq, rb_control_frame_struct::iseq, rb_method_entry_struct::klass, rb_iseq_location_struct::label, rb_iseq_struct::location, rb_control_frame_struct::me, rb_method_definition_struct::original_id, rb_iseq_location_struct::path, rb_control_frame_struct::pc, Qnil, rb_class2name(), rb_id2name(), rb_sprintf(), rb_vm_get_sourceline(), RSTRING_PTR, and str.
Definition at line 2018 of file vm.c.
References rb_thread_struct::cfp, rb_thread_struct::errinfo, rb_thread_struct::event_hooks, rb_thread_struct::fiber, rb_thread_struct::first_args, rb_thread_struct::first_proc, GET_THREAD(), rb_control_frame_struct::iseq, rb_control_frame_struct::klass, rb_thread_struct::last_status, rb_thread_struct::local_storage, rb_thread_struct::locking_mutex, rb_thread_struct::machine, rb_thread_struct::mark_stack_len, rb_control_frame_struct::me, NULL, rb_thread_struct::pending_interrupt_mask_stack, rb_thread_struct::pending_interrupt_queue, rb_control_frame_struct::proc, ptr, rb_gc_mark(), rb_gc_mark_locations, rb_gc_mark_machine_stack(), rb_mark_method_entry(), rb_mark_tbl(), rb_vm_trace_mark_event_hooks(), rb_thread_struct::regs, rb_thread_struct::root_fiber, rb_thread_struct::root_svar, RUBY_MARK_ENTER, RUBY_MARK_LEAVE, RUBY_MARK_UNLESS_NULL, RUBY_VM_NORMAL_ISEQ_P, RUBY_VM_PREVIOUS_CONTROL_FRAME, rb_iseq_struct::self, rb_control_frame_struct::self, rb_control_frame_struct::sp, rb_thread_struct::stack, rb_thread_struct::stack_end, rb_thread_struct::stack_size, rb_thread_struct::stack_start, rb_thread_struct::stat_insn_usage, th, rb_thread_struct::thgroup, rb_thread_struct::top_self, rb_thread_struct::top_wrapper, and rb_thread_struct::value.
Referenced by cont_mark().
int rb_thread_method_id_and_class | ( | rb_thread_t * | th, |
ID * | idp, | ||
VALUE * | klassp | ||
) |
Definition at line 1700 of file vm.c.
References rb_thread_struct::cfp, and rb_vm_control_frame_id_and_class().
Referenced by call_trace_func(), and rb_frame_method_id_and_class().
Definition at line 1996 of file vm.c.
References RECYCLE_MAX, and ruby_xfree().
Referenced by thread_start_func_2().
VALUE rb_vm_call_cfunc | ( | VALUE | recv, |
VALUE(*)(VALUE) | func, | ||
VALUE | arg, | ||
const rb_block_t * | blockptr, | ||
VALUE | filename | ||
) |
Definition at line 1736 of file vm.c.
References arg, rb_thread_struct::cfp, CLASS_OF, DATA_PTR(), GET_THREAD(), Qnil, rb_iseq_new(), rb_control_frame_struct::sp, th, val, VM_ENVVAL_BLOCK_PTR, VM_FRAME_FLAG_FINISH, VM_FRAME_MAGIC_TOP, vm_pop_frame(), and vm_push_frame().
Referenced by rb_require_safe().
Definition at line 1048 of file vm.c.
References rb_thread_struct::cfp, rb_control_frame_struct::ep, GET_THREAD(), rb_control_frame_struct::iseq, rb_eRuntimeError, rb_raise(), rb_vm_get_ruby_level_next_cfp(), th, and vm_get_cbase().
Referenced by rb_f_autoload(), and rb_f_autoload_p().
Definition at line 1211 of file vm.c.
References check_redefined_method(), RCLASS_M_TBL, RCLASS_ORIGIN, st_data_t, st_foreach(), and vm_redefinition_check_flag().
Referenced by rb_prepend_module().
|
static |
Definition at line 1185 of file vm.c.
References rb_method_entry_struct::def, flag, ruby_vm_redefined_flag, st_data_t, st_lookup(), rb_method_definition_struct::type, VM_METHOD_TYPE_CFUNC, and vm_redefinition_check_flag().
Referenced by check_redefined_method().
rb_block_t* rb_vm_control_frame_block_ptr | ( | rb_control_frame_t * | cfp | ) |
Definition at line 59 of file vm.c.
References VM_CF_BLOCK_PTR().
Referenced by proc_new(), rb_block_arity(), rb_block_given_p(), and rb_mod_refine().
int rb_vm_control_frame_id_and_class | ( | const rb_control_frame_t * | cfp, |
ID * | idp, | ||
VALUE * | klassp | ||
) |
Definition at line 1672 of file vm.c.
References rb_method_entry_struct::def, rb_iseq_struct::defined_method_id, idIFUNC, iseq_catch_table_entry::iseq, rb_control_frame_struct::iseq, rb_method_entry_struct::klass, rb_iseq_struct::klass, rb_iseq_struct::local_iseq, rb_control_frame_struct::me, rb_method_definition_struct::original_id, rb_iseq_struct::parent_iseq, and RUBY_VM_IFUNC_P.
Referenced by fill_id_and_klass(), get_klass(), and rb_thread_method_id_and_class().
Definition at line 1015 of file vm.c.
References rb_thread_struct::cfp, rb_control_frame_struct::ep, GET_THREAD(), rb_control_frame_struct::iseq, NULL, rb_vm_get_cref(), rb_vm_get_ruby_level_next_cfp(), and th.
Referenced by m_core_define_method(), m_core_define_singleton_method(), mod_using(), rb_method_entry_with_refinements(), rb_mod_nesting(), rb_mod_s_constants(), and top_using().
Definition at line 1027 of file vm.c.
References rb_thread_struct::cfp, rb_control_frame_struct::ep, GET_THREAD(), rb_control_frame_struct::iseq, NULL, rb_vm_get_cref(), rb_vm_get_ruby_level_next_cfp(), rb_control_frame_struct::self, and th.
Referenced by rb_mod_define_method().
Definition at line 34 of file vm.c.
References VM_EP_LEP().
Referenced by rb_fiber_start(), and thread_start_func_2().
rb_control_frame_t* rb_vm_get_binding_creatable_next_cfp | ( | rb_thread_t * | th, |
const rb_control_frame_t * | cfp | ||
) |
Definition at line 235 of file vm.c.
References rb_control_frame_struct::iseq, RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P, and RUBY_VM_PREVIOUS_CONTROL_FRAME.
Referenced by rb_tracearg_binding(), rb_vm_make_binding(), and rb_vm_stack_to_heap().
rb_control_frame_t* rb_vm_get_ruby_level_next_cfp | ( | rb_thread_t * | th, |
const rb_control_frame_t * | cfp | ||
) |
Definition at line 247 of file vm.c.
References rb_control_frame_struct::iseq, RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P, RUBY_VM_NORMAL_ISEQ_P, and RUBY_VM_PREVIOUS_CONTROL_FRAME.
Referenced by eval_string_with_cref(), fill_path_and_lineno(), rb_add_method(), rb_sourcefile(), rb_sourcefilename(), rb_sourceline(), rb_vm_cbase(), rb_vm_cref(), rb_vm_cref_in_context(), rb_vm_make_binding(), and vm_make_proc_with_iseq().
Definition at line 111 of file vm.c.
References ruby_vm_const_missing_count.
Referenced by rb_const_get_0().
VALUE rb_vm_invoke_proc | ( | rb_thread_t * | th, |
rb_proc_t * | proc, | ||
int | argc, | ||
const VALUE * | argv, | ||
const rb_block_t * | blockptr | ||
) |
Definition at line 897 of file vm.c.
References rb_proc_t::block, rb_block_struct::klass, rb_block_struct::self, and vm_invoke_proc().
Referenced by proc_call(), rb_fiber_start(), rb_proc_call(), rb_proc_call_with_block(), thread_start_func_2(), vm_call0_body(), and vm_call_opt_call().
Definition at line 1133 of file vm.c.
References exc, JUMP_TAG, NIL_P(), Qundef, rb_exc_raise(), and rb_vm_make_jump_tag_but_local_jump().
Referenced by rb_load_internal0().
Definition at line 1094 of file vm.c.
References exc, make_localjump_error(), and rb_exc_raise().
Referenced by check_block(), rb_need_block(), vm_invoke_block(), and vm_throw().
VALUE rb_vm_make_binding | ( | rb_thread_t * | th, |
const rb_control_frame_t * | src_cfp | ||
) |
Definition at line 694 of file vm.c.
References rb_binding_t::blockprocval, rb_binding_t::env, rb_binding_t::first_lineno, GetBindingPtr, rb_control_frame_struct::iseq, rb_iseq_struct::location, rb_iseq_location_struct::path, rb_binding_t::path, rb_binding_alloc(), rb_cBinding, rb_eRuntimeError, rb_raise(), rb_vm_get_binding_creatable_next_cfp(), rb_vm_get_ruby_level_next_cfp(), rb_vm_get_sourceline(), RUBY_VM_PREVIOUS_CONTROL_FRAME, and vm_make_env_object().
Referenced by rb_binding_new_with_cfp().
VALUE rb_vm_make_env_object | ( | rb_thread_t * | th, |
rb_control_frame_t * | cfp | ||
) |
Definition at line 577 of file vm.c.
References vm_make_env_object().
Referenced by eval_string_with_cref(), rb_vm_stack_to_heap(), and vm_set_main_stack().
Definition at line 1101 of file vm.c.
References GET_THREAD(), make_localjump_error(), Qnil, Qundef, result, rb_vm_tag::retval, rb_thread_struct::tag, TAG_BREAK, TAG_NEXT, TAG_REDO, TAG_RETRY, and TAG_RETURN.
Referenced by rb_fiber_start(), rb_vm_jump_tag_but_local_jump(), and thread_join().
VALUE rb_vm_make_proc | ( | rb_thread_t * | th, |
const rb_block_t * | block, | ||
VALUE | klass | ||
) |
Definition at line 656 of file vm.c.
References rb_proc_t::block, rb_proc_t::blockprocval, check_env_value(), rb_proc_t::envval, rb_block_struct::ep, GetProcPtr, rb_block_struct::iseq, rb_block_struct::klass, rb_block_struct::proc, proc, PROCDEBUG, rb_bug(), rb_proc_alloc(), RUBY_VM_GET_CFP_FROM_BLOCK_PTR, rb_thread_struct::safe_level, rb_proc_t::safe_level, rb_block_struct::self, rb_thread_struct::stack, rb_thread_struct::stack_size, vm_make_env_object(), and VMDEBUG.
Referenced by proc_new(), vm_callee_setup_arg_complex(), vm_make_proc_from_block(), vm_make_proc_with_iseq(), vm_yield_setup_block_args(), and vm_yield_with_cfunc().
Definition at line 1766 of file vm.c.
References rb_vm_struct::cmd, rb_vm_struct::coverages, DEFINED_EXPR, rb_vm_struct::defined_module_hash, rb_vm_struct::defined_strings, rb_vm_struct::event_hooks, rb_vm_struct::expanded_load_path, i, rb_vm_struct::living_threads, rb_vm_struct::load_path, rb_vm_struct::load_path_check_cache, rb_vm_struct::load_path_snapshot, rb_vm_struct::loaded_features, rb_vm_struct::loaded_features_snapshot, rb_vm_struct::loading_table, rb_vm_struct::mark_object_ary, ptr, rb_gc_mark(), rb_gc_mark_locations, rb_mark_tbl(), rb_vm_trace_mark_event_hooks(), RUBY_GC_INFO, RUBY_MARK_ENTER, RUBY_MARK_LEAVE, RUBY_MARK_UNLESS_NULL, RUBY_NSIG, ruby_special_error_count, rb_vm_struct::special_exceptions, st_foreach(), rb_vm_struct::thgroup_default, rb_vm_struct::top_self, rb_vm_struct::trap_list, and vm_mark_each_thread_func().
Referenced by gc_mark_roots().
Definition at line 281 of file vm.c.
References rb_method_entry_struct::called_id, rb_thread_struct::cfp, EXEC_EVENT_HOOK, GET_THREAD(), rb_method_entry_struct::klass, rb_control_frame_struct::me, Qnil, RUBY_DTRACE_CMETHOD_RETURN_HOOK, RUBY_EVENT_C_RETURN, rb_control_frame_struct::self, th, and vm_pop_frame().
Referenced by raise_method_missing(), rb_mod_const_missing(), and rb_vm_rewind_cfp().
void rb_vm_rewind_cfp | ( | rb_thread_t * | th, |
rb_control_frame_t * | cfp | ||
) |
Definition at line 291 of file vm.c.
References rb_thread_struct::cfp, rb_vm_pop_cfunc_frame(), VM_FRAME_MAGIC_CFUNC, VM_FRAME_TYPE, and vm_pop_frame().
Referenced by rb_catch_protect(), rb_iterate(), rb_protect(), and rb_rescue2().
Definition at line 2787 of file vm.c.
References GET_VM, rb_control_frame_struct::iseq, rb_iseq_struct::location, rb_iseq_location_struct::path, RB_OBJ_WRITE, rb_iseq_struct::self, rb_thread_struct::stack, rb_thread_struct::stack_size, and th.
Referenced by ruby_script(), and ruby_set_script_name().
void rb_vm_stack_to_heap | ( | rb_thread_t * | th | ) |
Definition at line 635 of file vm.c.
References rb_thread_struct::cfp, rb_vm_get_binding_creatable_next_cfp(), rb_vm_make_env_object(), and RUBY_VM_PREVIOUS_CONTROL_FRAME.
Referenced by cont_capture().
Definition at line 2834 of file vm.c.
References GET_VM.
Referenced by eval_string_from_file_helper(), Init_eval(), Init_eval_method(), Init_Proc(), Init_top_self(), Init_VM(), rb_eval_cmd(), rb_eval_string_wrap(), rb_load_internal0(), rb_require_safe(), require_libraries(), ruby_eval_string_from_file(), and ruby_thread_init().
void rb_vm_trace_mark_event_hooks | ( | rb_hook_list_t * | hooks | ) |
Definition at line 51 of file vm_trace.c.
References rb_event_hook_struct::data, rb_hook_list_struct::hooks, rb_event_hook_struct::next, and rb_gc_mark().
Referenced by rb_thread_mark(), and rb_vm_mark().
Definition at line 2216 of file vm.c.
References GET_THREAD(), GetThreadPtr, Qnil, rb_hash_new(), rb_intern, rb_ivar_set(), rb_vm_top_self(), rb_thread_struct::root_svar, th, th_init(), rb_thread_struct::top_self, rb_thread_struct::top_wrapper, and rb_thread_struct::vm.
Referenced by rb_thread_alloc().
Definition at line 2859 of file vm.c.
References rb_vm_struct::debug.
Referenced by rb_ruby_debug_ptr().
Definition at line 1822 of file vm.c.
References rb_vm_struct::living_threads, rb_vm_struct::main_thread, rb_vm_struct::objspace, rb_fiber_reset_root_local_storage(), rb_gc_force_recycle(), rb_objspace_free(), rb_vm_gvl_destroy(), RUBY_FREE_ENTER, RUBY_FREE_LEAVE, ruby_mimfree(), ruby_vm_run_at_exit_hooks(), rb_vm_struct::self, rb_thread_struct::self, st_free_table(), th, and thread_free().
Definition at line 324 of file vm.c.
References rb_vm_struct::at_exit, func, RARRAY_LEN, rb_ary_free(), rb_ary_pop(), and while().
Referenced by ruby_vm_destruct().
Definition at line 2853 of file vm.c.
References rb_vm_struct::verbose.
Referenced by rb_ruby_verbose_ptr().
Definition at line 2454 of file vm.c.
References Qnil, and rb_vm_bugreport().
Referenced by Init_VM().
|
static |
Definition at line 2184 of file vm.c.
References rb_thread_struct::cfp, rb_vm_struct::default_params, rb_thread_struct::errinfo, rb_thread_struct::last_status, malloc(), Qnil, Qundef, rb_sigaltstack_size(), rb_thread_struct::root_svar, rb_thread_struct::self, rb_thread_struct::stack, rb_thread_struct::stack_size, rb_thread_struct::status, thread_recycle_stack(), THREAD_RUNNABLE, rb_vm_struct::thread_vm_stack_size, rb_thread_struct::vm, VM_ENVVAL_BLOCK_PTR, VM_FRAME_FLAG_FINISH, VM_FRAME_MAGIC_TOP, vm_push_frame(), and rb_thread_struct::waiting_fd.
Referenced by Init_BareVM(), and ruby_thread_init().
Definition at line 2170 of file vm.c.
References obj, th, thread_data_type, TypedData_Make_Struct, and TypedData_Wrap_Struct.
Referenced by rb_thread_alloc().
Definition at line 2087 of file vm.c.
References free, rb_thread_struct::keeping_mutexes, rb_thread_struct::local_storage, rb_thread_struct::locking_mutex, rb_vm_struct::main_thread, NULL, ptr, Qfalse, rb_bug(), rb_thread_struct::root_fiber, RUBY_FREE_ENTER, RUBY_FREE_LEAVE, RUBY_FREE_UNLESS_NULL, RUBY_GC_INFO, ruby_xfree(), st_free_table(), rb_thread_struct::stack, th, and rb_thread_struct::vm.
Referenced by ruby_vm_destruct().
Definition at line 2128 of file vm.c.
References rb_thread_struct::local_storage, ptr, rb_thread_struct::root_fiber, size, st_memsize(), rb_thread_struct::stack_size, and th.
|
static |
Definition at line 1980 of file vm.c.
References ALLOC_N, and thread_recycle_stack_count.
Referenced by th_init().
|
inlinestatic |
Definition at line 52 of file vm.c.
References VM_CF_LEP(), and VM_EP_BLOCK_PTR.
Referenced by check_block(), rb_f_block_given_p(), rb_iterate(), rb_vm_control_frame_block_ptr(), rb_yield_refine_block(), vm_invoke_block(), and yield_under().
|
inlinestatic |
Definition at line 40 of file vm.c.
References rb_control_frame_struct::ep, and VM_EP_LEP().
Referenced by rb_yield_refine_block(), VM_CF_BLOCK_PTR(), vm_cfp_svar_get(), vm_cfp_svar_set(), vm_make_env_object(), vm_throw(), and yield_under().
|
inlinestatic |
Definition at line 46 of file vm.c.
References VM_EP_PREV_EP.
Referenced by rb_f_local_variables(), and vm_iter_break().
|
static |
Definition at line 919 of file vm.c.
References lep_svar_get(), VM_CF_LEP(), and vm_normal_frame().
Referenced by vm_svar_get().
|
static |
Definition at line 926 of file vm.c.
References lep_svar_set(), VM_CF_LEP(), and vm_normal_frame().
Referenced by vm_svar_set().
|
static |
Definition at line 559 of file vm.c.
References collect_local_variables_in_env(), env, ENV_IN_HEAP_P, ENV_VAL, and GetEnvPtr.
Definition at line 1882 of file vm.c.
References GET_VM, rb_hash_new(), rb_obj_freeze(), result, and SET.
Referenced by Init_VM().
Definition at line 1932 of file vm.c.
References check_machine_stack_size(), rb_vm_struct::default_params, rb_vm_struct::fiber_machine_stack_size, rb_vm_struct::fiber_vm_stack_size, get_param(), RUBY_VM_FIBER_MACHINE_STACK_SIZE, RUBY_VM_FIBER_MACHINE_STACK_SIZE_MIN, RUBY_VM_FIBER_VM_STACK_SIZE, RUBY_VM_FIBER_VM_STACK_SIZE_MIN, RUBY_VM_THREAD_MACHINE_STACK_SIZE, RUBY_VM_THREAD_MACHINE_STACK_SIZE_MIN, RUBY_VM_THREAD_VM_STACK_SIZE, RUBY_VM_THREAD_VM_STACK_SIZE_MIN, rb_vm_struct::thread_machine_stack_size, and rb_vm_struct::thread_vm_stack_size.
Referenced by vm_init2().
|
static |
Definition at line 2241 of file vm.c.
References COPY_CREF, GetISeqPtr, id, int, klass, NIL_P(), NOEX_MODFUNC, NOEX_PUBLIC, rb_add_method(), rb_eTypeError, RB_GC_GUARD(), rb_iseq_clone(), RB_OBJ_WRITE, rb_raise(), rb_singleton_class(), and VM_METHOD_TYPE_ISEQ.
Referenced by m_core_define_method(), and m_core_define_singleton_method().
Definition at line 25 of file vm.c.
References VM_EP_LEP_P, and VM_EP_PREV_EP.
Referenced by rb_vm_ep_local_ep(), and VM_CF_LEP().
|
static |
Definition at line 1417 of file vm.c.
References rb_method_entry_struct::called_id, rb_iseq_struct::catch_table, rb_iseq_struct::catch_table_size, 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, rb_thread_struct::cfp, iseq_catch_table_entry::cont, iseq_catch_table_entry::end, entry, rb_control_frame_struct::ep, err, rb_thread_struct::errinfo, EXEC_EVENT_HOOK, EXEC_TAG, FALSE, GET_THROWOBJ_CATCH_POINT, GET_THROWOBJ_VAL, GetISeqPtr, hook_before_rewind(), i, iseq_catch_table_entry::iseq, rb_control_frame_struct::iseq, rb_iseq_struct::iseq_encoded, JUMP_TAG, rb_method_entry_struct::klass, rb_control_frame_struct::klass, rb_iseq_struct::local_size, rb_control_frame_struct::me, NULL, rb_control_frame_struct::pc, Qnil, result, RUBY_DTRACE_METHOD_RETURN_HOOK, RUBY_EVENT_C_RETURN, RUBY_VM_PREVIOUS_CONTROL_FRAME, rb_control_frame_struct::self, SET_THROWOBJ_CATCH_POINT, SET_THROWOBJ_STATE, iseq_catch_table_entry::sp, rb_control_frame_struct::sp, rb_iseq_struct::stack_max, iseq_catch_table_entry::start, rb_thread_struct::state, state, TAG_BREAK, TAG_NEXT, TAG_RAISE, TAG_REDO, TAG_RETRY, TAG_RETURN, TH_POP_TAG, TH_POP_TAG2, TH_PUSH_TAG, TRUE, iseq_catch_table_entry::type, type, UNLIKELY, vm_base_ptr(), VM_ENVVAL_PREV_EP_PTR, vm_exec_core(), VM_FRAME_MAGIC_CFUNC, VM_FRAME_MAGIC_RESCUE, VM_FRAME_TYPE, VM_FRAME_TYPE_FINISH_P, vm_pop_frame(), and vm_push_frame().
Referenced by invoke_block_from_c(), rb_iseq_eval(), and rb_iseq_eval_main().
|
static |
Definition at line 259 of file vm.c.
References rb_control_frame_struct::flag, rb_control_frame_struct::iseq, RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P, RUBY_VM_NORMAL_ISEQ_P, RUBY_VM_PREVIOUS_CONTROL_FRAME, and VM_FRAME_FLAG_PASSED.
Referenced by rb_current_realfilepath(), rb_f_block_given_p(), and rb_f_local_variables().
Definition at line 1960 of file vm.c.
References rb_vm_struct::at_exit, RArray::basic, RBasic::flags, MEMZERO, RARRAY_EMBED_FLAG, RARRAY_EMBED_LEN_MASK, rb_obj_hide(), rb_vm_struct::src_encoding_index, T_ARRAY, and vm_default_params_setup().
Referenced by Init_BareVM().
|
static |
Definition at line 869 of file vm.c.
References rb_proc_t::block, EXEC_TAG, invoke_block_from_c(), rb_proc_t::is_from_method, JUMP_TAG, Qundef, rb_thread_struct::safe_level, rb_proc_t::safe_level, state, TH_POP_TAG, TH_PUSH_TAG, and val.
Referenced by rb_vm_invoke_proc(), and vm_call_bmethod_body().
|
static |
Definition at line 1143 of file vm.c.
References rb_thread_struct::cfp, rb_thread_struct::errinfo, NEW_THROW_OBJECT, rb_thread_struct::state, TAG_BREAK, TH_JUMP_TAG, and VM_CF_PREV_EP().
Referenced by rb_iter_break(), and rb_iter_break_value().
|
static |
Definition at line 455 of file vm.c.
References ALLOC_N, rb_env_t::block, dp, env, rb_env_t::env, env_alloc(), ENV_IN_HEAP_P, rb_env_t::env_size, ENV_VAL, rb_control_frame_struct::ep, rb_block_struct::ep, GC_GUARDED_PTR_REF, GetEnvPtr, i, rb_control_frame_struct::iseq, rb_block_struct::iseq, rb_iseq_struct::local_size, rb_env_t::local_size, rb_env_t::prev_envval, rb_bug(), RUBY_VM_NORMAL_ISEQ_P, SDR, rb_control_frame_struct::self, rb_block_struct::self, rb_thread_struct::stack, and VM_ENVVAL_PREV_EP_PTR.
Referenced by vm_make_env_object().
|
static |
Definition at line 584 of file vm.c.
References rb_proc_t::block, check_env_value(), rb_control_frame_struct::ep, GetProcPtr, p, PROCDEBUG, VM_CF_LEP(), VM_ENVVAL_BLOCK_PTR, VM_EP_BLOCK_PTR, vm_make_env_each(), vm_make_proc_from_block(), and vm_rewrite_ep_in_errinfo().
Referenced by rb_binding_add_dynavars(), rb_vm_make_binding(), rb_vm_make_env_object(), and rb_vm_make_proc().
|
static |
Definition at line 647 of file vm.c.
References rb_block_struct::proc, rb_cProc, and rb_vm_make_proc().
Referenced by vm_make_env_object().
Definition at line 1756 of file vm.c.
References rb_gc_mark(), and ST_CONTINUE.
Referenced by rb_vm_mark().
Definition at line 1856 of file vm.c.
References DEFINED_EXPR, rb_vm_struct::defined_strings, rb_vm_struct::living_threads, ptr, size, and st_memsize().
|
static |
Definition at line 907 of file vm.c.
References rb_control_frame_struct::pc, RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P, and RUBY_VM_PREVIOUS_CONTROL_FRAME.
Referenced by vm_cfp_svar_get(), and vm_cfp_svar_set().
Definition at line 1170 of file vm.c.
References ARRAY_REDEFINED_OP_FLAG, BIGNUM_REDEFINED_OP_FLAG, FIXNUM_REDEFINED_OP_FLAG, FLOAT_REDEFINED_OP_FLAG, HASH_REDEFINED_OP_FLAG, rb_cArray, rb_cBignum, rb_cFixnum, rb_cFloat, rb_cHash, rb_cRegexp, rb_cString, rb_cSymbol, rb_cTime, REGEXP_REDEFINED_OP_FLAG, STRING_REDEFINED_OP_FLAG, SYMBOL_REDEFINED_OP_FLAG, and TIME_REDEFINED_OP_FLAG.
Referenced by rb_vm_check_redefinition_by_prepend(), and rb_vm_check_redefinition_opt_method().
|
static |
Definition at line 609 of file vm.c.
References rb_thread_struct::cfp, rb_env_t::env, ENV_IN_HEAP_P, rb_control_frame_struct::ep, GET_THROWOBJ_CATCH_POINT, GetEnvPtr, rb_control_frame_struct::iseq, klass, rb_env_t::local_size, rb_cEnv, RB_TYPE_P, RBASIC, RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P, RUBY_VM_NORMAL_ISEQ_P, RUBY_VM_PREVIOUS_CONTROL_FRAME, SET_THROWOBJ_CATCH_POINT, SPECIAL_CONST_P, T_NODE, and rb_iseq_struct::type.
Referenced by vm_make_env_object().
|
static |
Definition at line 200 of file vm.c.
References rb_thread_struct::cfp, rb_control_frame_struct::ep, rb_block_struct::ep, GetISeqPtr, rb_iseq_struct::iseq_encoded, rb_block_struct::klass, rb_iseq_struct::local_size, rb_block_struct::self, rb_control_frame_struct::sp, rb_iseq_struct::stack_max, VM_ENVVAL_PREV_EP_PTR, VM_FRAME_FLAG_FINISH, VM_FRAME_MAGIC_EVAL, and vm_push_frame().
Referenced by rb_binding_add_dynavars(), and vm_set_main_stack().
|
static |
Definition at line 216 of file vm.c.
References rb_env_t::block, rb_thread_struct::cfp, env, rb_binding_t::env, GetBindingPtr, GetEnvPtr, GetISeqPtr, rb_iseq_struct::local_size, rb_cObject, rb_const_get(), rb_intern, rb_vm_make_env_object(), and vm_set_eval_stack().
Referenced by rb_iseq_eval_main().
|
static |
Definition at line 184 of file vm.c.
References rb_thread_struct::cfp, GetISeqPtr, rb_iseq_struct::iseq_encoded, rb_iseq_struct::local_size, rb_cObject, rb_eTypeError, rb_raise(), rb_control_frame_struct::sp, rb_iseq_struct::stack_max, rb_thread_struct::top_self, rb_iseq_struct::type, VM_ENVVAL_BLOCK_PTR, VM_FRAME_FLAG_FINISH, VM_FRAME_MAGIC_TOP, and vm_push_frame().
Referenced by rb_iseq_eval().
Definition at line 139 of file vm.c.
References arg, hash, key, Qnil, rb_eArgError, rb_eTypeError, rb_hash_new(), rb_id2str(), rb_raise(), rb_scan_args(), RB_TYPE_P, RSTRING_PTR, ruby_vm_class_serial, ruby_vm_global_constant_state, ruby_vm_global_method_state, S, SET, SYM2ID, SYMBOL_P, and T_HASH.
Referenced by Init_VM().
Definition at line 933 of file vm.c.
References rb_thread_struct::cfp, GET_THREAD(), th, and vm_cfp_svar_get().
Referenced by rb_backref_get(), and rb_lastline_get().
Definition at line 940 of file vm.c.
References rb_thread_struct::cfp, GET_THREAD(), th, and vm_cfp_svar_set().
Referenced by rb_backref_set(), and rb_lastline_set().
|
inlinestatic |
Definition at line 853 of file vm.c.
References check_block(), invoke_block_from_c(), rb_block_struct::klass, and rb_block_struct::self.
|
inlinestatic |
Definition at line 861 of file vm.c.
References check_block(), invoke_block_from_c(), rb_block_struct::klass, and rb_block_struct::self.
|
inlinestatic |
Definition at line 845 of file vm.c.
References check_block(), invoke_block_from_c(), rb_block_struct::klass, and rb_block_struct::self.
|
static |
VALUE rb_cEnv |
Definition at line 99 of file vm.c.
Referenced by env_alloc(), Init_VM(), and vm_rewrite_ep_in_errinfo().
VALUE rb_cRubyVM |
Definition at line 97 of file vm.c.
Referenced by Init_ISeq(), and Init_VM().
size_t rb_gc_stack_maxsize |
VALUE* rb_gc_stack_start |
VALUE rb_mRubyVMFrozenCore |
rb_thread_t* ruby_current_thread = 0 |
Definition at line 104 of file vm.c.
Referenced by GET_THREAD().
const rb_data_type_t ruby_threadptr_data_type |
|
static |
VALUE ruby_vm_const_missing_count = 0 |
Definition at line 102 of file vm.c.
Referenced by rb_vm_inc_const_missing_count().
rb_event_flag_t ruby_vm_event_flags |
Definition at line 106 of file vm.c.
Referenced by recalc_add_ruby_vm_event_flags(), and recalc_remove_ruby_vm_event_flags().
|
static |
|
static |
short ruby_vm_redefined_flag[BOP_LAST_] |
Definition at line 103 of file vm.c.
Referenced by rb_vm_check_redefinition_opt_method().
|
static |
Definition at line 1977 of file vm.c.
Referenced by thread_recycle_stack().
|
static |
|
static |