vm_insnhelper.c File Reference

#include "insns.inc"
#include <math.h>
#include "constant.h"
#include "internal.h"
#include "probes.h"
#include "probes_helper.h"

Go to the source code of this file.

Defines

#define INLINE   inline
#define USE_IC_FOR_IVAR   1
#define CHECK_CMP_NAN(a, b)
#define SAVE_RESTORE_CI(expr, ci)
#define VM_PROFILE   0
#define VM_PROFILE_UP(x)
#define VM_PROFILE_ATEXIT()

Functions

static rb_control_frame_tvm_get_ruby_level_caller_cfp (rb_thread_t *th, rb_control_frame_t *cfp)
static void vm_stackoverflow (void)
static rb_control_frame_tvm_push_frame (rb_thread_t *th, const rb_iseq_t *iseq, VALUE type, VALUE self, VALUE klass, VALUE specval, const VALUE *pc, VALUE *sp, int local_size, const rb_method_entry_t *me, size_t stack_max)
static void vm_pop_frame (rb_thread_t *th)
static VALUE rb_arg_error_new (int argc, int min, int max)
 NORETURN (static void argument_error(const rb_iseq_t *iseq, int miss_argc, int min_argc, int max_argc))
static void argument_error (const rb_iseq_t *iseq, int miss_argc, int min_argc, int max_argc)
void rb_error_arity (int argc, int min, int max)
static NODElep_svar_place (rb_thread_t *th, VALUE *lep)
static VALUE lep_svar_get (rb_thread_t *th, VALUE *lep, rb_num_t key)
static void lep_svar_set (rb_thread_t *th, VALUE *lep, rb_num_t key, VALUE val)
static VALUE vm_getspecial (rb_thread_t *th, VALUE *lep, rb_num_t key, rb_num_t type)
static NODEvm_get_cref0 (const rb_iseq_t *iseq, const VALUE *ep)
NODErb_vm_get_cref (const rb_iseq_t *iseq, const VALUE *ep)
static NODEvm_cref_push (rb_thread_t *th, VALUE klass, int noex, rb_block_t *blockptr)
static VALUE vm_get_cbase (const rb_iseq_t *iseq, const VALUE *ep)
static VALUE vm_get_const_base (const rb_iseq_t *iseq, const VALUE *ep)
static void vm_check_if_namespace (VALUE klass)
static VALUE vm_get_iclass (rb_control_frame_t *cfp, VALUE klass)
static VALUE vm_get_ev_const (rb_thread_t *th, const rb_iseq_t *iseq, VALUE orig_klass, ID id, int is_defined)
static VALUE vm_get_cvar_base (NODE *cref, rb_control_frame_t *cfp)
static VALUE vm_search_const_defined_class (const VALUE cbase, ID id)
static VALUE vm_getivar (VALUE obj, ID id, IC ic, rb_call_info_t *ci, int is_attr)
static VALUE vm_setivar (VALUE obj, ID id, VALUE val, IC ic, rb_call_info_t *ci, int is_attr)
static VALUE vm_getinstancevariable (VALUE obj, ID id, IC ic)
static void vm_setinstancevariable (VALUE obj, ID id, VALUE val, IC ic)
static VALUE vm_throw (rb_thread_t *th, rb_control_frame_t *reg_cfp, rb_num_t throw_state, VALUE throwobj)
static void vm_expandarray (rb_control_frame_t *cfp, VALUE ary, rb_num_t num, int flag)
static VALUE vm_call_general (rb_thread_t *th, rb_control_frame_t *reg_cfp, rb_call_info_t *ci)
static void vm_search_method (rb_call_info_t *ci, VALUE recv)
static int check_cfunc (const rb_method_entry_t *me, VALUE(*func)())
static VALUE opt_eq_func (VALUE recv, VALUE obj, CALL_INFO ci)
VALUE rb_equal_opt (VALUE obj1, VALUE obj2)
static VALUE vm_call0 (rb_thread_t *, VALUE, ID, int, const VALUE *, const rb_method_entry_t *, VALUE)
static VALUE check_match (VALUE pattern, VALUE target, enum vm_check_match_type type)
static VALUE double_cmp_lt (double a, double b)
static VALUE double_cmp_le (double a, double b)
static VALUE double_cmp_gt (double a, double b)
static VALUE double_cmp_ge (double a, double b)
static VALUE * vm_base_ptr (rb_control_frame_t *cfp)
static void vm_caller_setup_args (const rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci)
static int vm_callee_setup_keyword_arg (rb_thread_t *th, const rb_iseq_t *iseq, int argc, int m, VALUE *orig_argv, VALUE *kwd)
static int vm_callee_setup_arg_complex (rb_thread_t *th, rb_call_info_t *ci, const rb_iseq_t *iseq, VALUE *orig_argv)
static VALUE vm_call_iseq_setup_2 (rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci)
static VALUE vm_call_iseq_setup_normal (rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci)
static VALUE vm_call_iseq_setup_tailcall (rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci)
static void vm_callee_setup_arg (rb_thread_t *th, rb_call_info_t *ci, const rb_iseq_t *iseq, VALUE *argv, int is_lambda)
static VALUE vm_call_iseq_setup (rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci)
static VALUE call_cfunc_m2 (VALUE(*func)(ANYARGS), VALUE recv, int argc, const VALUE *argv)
static VALUE call_cfunc_m1 (VALUE(*func)(ANYARGS), VALUE recv, int argc, const VALUE *argv)
static VALUE call_cfunc_0 (VALUE(*func)(ANYARGS), VALUE recv, int argc, const VALUE *argv)
static VALUE call_cfunc_1 (VALUE(*func)(ANYARGS), VALUE recv, int argc, const VALUE *argv)
static VALUE call_cfunc_2 (VALUE(*func)(ANYARGS), VALUE recv, int argc, const VALUE *argv)
static VALUE call_cfunc_3 (VALUE(*func)(ANYARGS), VALUE recv, int argc, const VALUE *argv)
static VALUE call_cfunc_4 (VALUE(*func)(ANYARGS), VALUE recv, int argc, const VALUE *argv)
static VALUE call_cfunc_5 (VALUE(*func)(ANYARGS), VALUE recv, int argc, const VALUE *argv)
static VALUE call_cfunc_6 (VALUE(*func)(ANYARGS), VALUE recv, int argc, const VALUE *argv)
static VALUE call_cfunc_7 (VALUE(*func)(ANYARGS), VALUE recv, int argc, const VALUE *argv)
static VALUE call_cfunc_8 (VALUE(*func)(ANYARGS), VALUE recv, int argc, const VALUE *argv)
static VALUE call_cfunc_9 (VALUE(*func)(ANYARGS), VALUE recv, int argc, const VALUE *argv)
static VALUE call_cfunc_10 (VALUE(*func)(ANYARGS), VALUE recv, int argc, const VALUE *argv)
static VALUE call_cfunc_11 (VALUE(*func)(ANYARGS), VALUE recv, int argc, const VALUE *argv)
static VALUE call_cfunc_12 (VALUE(*func)(ANYARGS), VALUE recv, int argc, const VALUE *argv)
static VALUE call_cfunc_13 (VALUE(*func)(ANYARGS), VALUE recv, int argc, const VALUE *argv)
static VALUE call_cfunc_14 (VALUE(*func)(ANYARGS), VALUE recv, int argc, const VALUE *argv)
static VALUE call_cfunc_15 (VALUE(*func)(ANYARGS), VALUE recv, int argc, const VALUE *argv)
static const rb_method_cfunc_tvm_method_cfunc_entry (const rb_method_entry_t *me)
static VALUE vm_call_cfunc_with_frame (rb_thread_t *th, rb_control_frame_t *reg_cfp, rb_call_info_t *ci)
static VALUE vm_call_cfunc (rb_thread_t *th, rb_control_frame_t *reg_cfp, rb_call_info_t *ci)
static VALUE vm_call_ivar (rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci)
static VALUE vm_call_attrset (rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci)
static VALUE vm_call_bmethod_body (rb_thread_t *th, rb_call_info_t *ci, const VALUE *argv)
static VALUE vm_call_bmethod (rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci)
static VALUE vm_call_method (rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci)
static VALUE vm_call_opt_send (rb_thread_t *th, rb_control_frame_t *reg_cfp, rb_call_info_t *ci)
static VALUE vm_call_opt_call (rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci)
static VALUE vm_call_method_missing (rb_thread_t *th, rb_control_frame_t *reg_cfp, rb_call_info_t *ci)
static VALUE find_refinement (VALUE refinements, VALUE klass)
static int rb_method_definition_eq (const rb_method_definition_t *d1, const rb_method_definition_t *d2)
static VALUE vm_call_super_method (rb_thread_t *th, rb_control_frame_t *reg_cfp, rb_call_info_t *ci)
static rb_control_frame_tcurrent_method_entry (rb_thread_t *th, rb_control_frame_t *cfp)
static VALUE vm_search_normal_superclass (VALUE klass)
static void vm_super_outside (void)
static int vm_search_superclass (rb_control_frame_t *reg_cfp, rb_iseq_t *iseq, VALUE sigval, rb_call_info_t *ci)
static void vm_search_super_method (rb_thread_t *th, rb_control_frame_t *reg_cfp, rb_call_info_t *ci)
static int block_proc_is_lambda (const VALUE procval)
static VALUE vm_yield_with_cfunc (rb_thread_t *th, const rb_block_t *block, VALUE self, int argc, const VALUE *argv, const rb_block_t *blockargptr)
static int vm_yield_setup_block_args_complex (rb_thread_t *th, const rb_iseq_t *iseq, int argc, VALUE *argv)
static int vm_yield_setup_block_args (rb_thread_t *th, const rb_iseq_t *iseq, int orig_argc, VALUE *argv, const rb_block_t *blockptr)
static int vm_yield_setup_args (rb_thread_t *const th, const rb_iseq_t *iseq, int argc, VALUE *argv, const rb_block_t *blockptr, int lambda)
static VALUE vm_invoke_block (rb_thread_t *th, rb_control_frame_t *reg_cfp, rb_call_info_t *ci)
static VALUE vm_make_proc_with_iseq (rb_iseq_t *blockiseq)
static VALUE vm_once_exec (rb_iseq_t *iseq)
static VALUE vm_once_clear (VALUE data)


Define Documentation

#define CHECK_CMP_NAN ( a,
 ) 

Definition at line 946 of file vm_insnhelper.c.

Referenced by double_cmp_ge(), double_cmp_gt(), double_cmp_le(), and double_cmp_lt().

#define INLINE   inline

Definition at line 22 of file vm_insnhelper.c.

#define SAVE_RESTORE_CI ( expr,
ci   ) 

Value:

do { \
    int saved_argc = (ci)->argc; rb_block_t *saved_blockptr = (ci)->blockptr; /* save */ \
    expr; \
    (ci)->argc = saved_argc; (ci)->blockptr = saved_blockptr; /* restore */ \
} while (0)

Referenced by vm_caller_setup_args().

#define USE_IC_FOR_IVAR   1

Definition at line 481 of file vm_insnhelper.c.

#define VM_PROFILE   0

Definition at line 1417 of file vm_insnhelper.c.

 
#define VM_PROFILE_ATEXIT (  ) 

Definition at line 1435 of file vm_insnhelper.c.

Referenced by Init_VM().

#define VM_PROFILE_UP (  ) 

Definition at line 1434 of file vm_insnhelper.c.

Referenced by vm_call0_cfunc_with_frame(), and vm_call_cfunc_with_frame().


Function Documentation

static void argument_error ( const rb_iseq_t iseq,
int  miss_argc,
int  min_argc,
int  max_argc 
) [static]

Definition at line 127 of file vm_insnhelper.c.

References GET_THREAD(), rb_iseq_struct::iseq_encoded, Qnil, rb_arg_error_new(), rb_exc_raise(), rb_funcall(), rb_intern, rb_iv_set(), rb_vm_backtrace_object(), VALUE, VM_FRAME_MAGIC_METHOD, vm_pop_frame(), and vm_push_frame().

Referenced by vm_callee_setup_arg(), and vm_callee_setup_arg_complex().

static int block_proc_is_lambda ( const VALUE  procval  )  [inline, static]

Definition at line 2067 of file vm_insnhelper.c.

References GetProcPtr, and rb_proc_t::is_lambda.

Referenced by invoke_block_from_c(), vm_invoke_block(), and vm_yield_with_cfunc().

static VALUE call_cfunc_0 ( VALUE(*)(ANYARGS)  func,
VALUE  recv,
int  argc,
const VALUE *  argv 
) [static]

Definition at line 1321 of file vm_insnhelper.c.

Referenced by call_cfunc_invoker_func().

static VALUE call_cfunc_1 ( VALUE(*)(ANYARGS)  func,
VALUE  recv,
int  argc,
const VALUE *  argv 
) [static]

Definition at line 1327 of file vm_insnhelper.c.

Referenced by call_cfunc_invoker_func().

static VALUE call_cfunc_10 ( VALUE(*)(ANYARGS)  func,
VALUE  recv,
int  argc,
const VALUE *  argv 
) [static]

Definition at line 1381 of file vm_insnhelper.c.

Referenced by call_cfunc_invoker_func().

static VALUE call_cfunc_11 ( VALUE(*)(ANYARGS)  func,
VALUE  recv,
int  argc,
const VALUE *  argv 
) [static]

Definition at line 1387 of file vm_insnhelper.c.

Referenced by call_cfunc_invoker_func().

static VALUE call_cfunc_12 ( VALUE(*)(ANYARGS)  func,
VALUE  recv,
int  argc,
const VALUE *  argv 
) [static]

Definition at line 1393 of file vm_insnhelper.c.

Referenced by call_cfunc_invoker_func().

static VALUE call_cfunc_13 ( VALUE(*)(ANYARGS)  func,
VALUE  recv,
int  argc,
const VALUE *  argv 
) [static]

Definition at line 1399 of file vm_insnhelper.c.

Referenced by call_cfunc_invoker_func().

static VALUE call_cfunc_14 ( VALUE(*)(ANYARGS)  func,
VALUE  recv,
int  argc,
const VALUE *  argv 
) [static]

Definition at line 1405 of file vm_insnhelper.c.

Referenced by call_cfunc_invoker_func().

static VALUE call_cfunc_15 ( VALUE(*)(ANYARGS)  func,
VALUE  recv,
int  argc,
const VALUE *  argv 
) [static]

Definition at line 1411 of file vm_insnhelper.c.

Referenced by call_cfunc_invoker_func().

static VALUE call_cfunc_2 ( VALUE(*)(ANYARGS)  func,
VALUE  recv,
int  argc,
const VALUE *  argv 
) [static]

Definition at line 1333 of file vm_insnhelper.c.

Referenced by call_cfunc_invoker_func().

static VALUE call_cfunc_3 ( VALUE(*)(ANYARGS)  func,
VALUE  recv,
int  argc,
const VALUE *  argv 
) [static]

Definition at line 1339 of file vm_insnhelper.c.

Referenced by call_cfunc_invoker_func().

static VALUE call_cfunc_4 ( VALUE(*)(ANYARGS)  func,
VALUE  recv,
int  argc,
const VALUE *  argv 
) [static]

Definition at line 1345 of file vm_insnhelper.c.

Referenced by call_cfunc_invoker_func().

static VALUE call_cfunc_5 ( VALUE(*)(ANYARGS)  func,
VALUE  recv,
int  argc,
const VALUE *  argv 
) [static]

Definition at line 1351 of file vm_insnhelper.c.

Referenced by call_cfunc_invoker_func().

static VALUE call_cfunc_6 ( VALUE(*)(ANYARGS)  func,
VALUE  recv,
int  argc,
const VALUE *  argv 
) [static]

Definition at line 1357 of file vm_insnhelper.c.

Referenced by call_cfunc_invoker_func().

static VALUE call_cfunc_7 ( VALUE(*)(ANYARGS)  func,
VALUE  recv,
int  argc,
const VALUE *  argv 
) [static]

Definition at line 1363 of file vm_insnhelper.c.

Referenced by call_cfunc_invoker_func().

static VALUE call_cfunc_8 ( VALUE(*)(ANYARGS)  func,
VALUE  recv,
int  argc,
const VALUE *  argv 
) [static]

Definition at line 1369 of file vm_insnhelper.c.

Referenced by call_cfunc_invoker_func().

static VALUE call_cfunc_9 ( VALUE(*)(ANYARGS)  func,
VALUE  recv,
int  argc,
const VALUE *  argv 
) [static]

Definition at line 1375 of file vm_insnhelper.c.

Referenced by call_cfunc_invoker_func().

static VALUE call_cfunc_m1 ( VALUE(*)(ANYARGS)  func,
VALUE  recv,
int  argc,
const VALUE *  argv 
) [static]

Definition at line 1315 of file vm_insnhelper.c.

Referenced by call_cfunc_invoker_func().

static VALUE call_cfunc_m2 ( VALUE(*)(ANYARGS)  func,
VALUE  recv,
int  argc,
const VALUE *  argv 
) [static]

Definition at line 1309 of file vm_insnhelper.c.

References rb_ary_new4.

Referenced by call_cfunc_invoker_func().

static int check_cfunc ( const rb_method_entry_t me,
VALUE(*)()  func 
) [inline, static]

Definition at line 844 of file vm_insnhelper.c.

References rb_method_definition_struct::body, rb_method_definition_struct::cfunc, rb_method_entry_struct::def, rb_method_cfunc_struct::func, rb_method_definition_struct::type, and VM_METHOD_TYPE_CFUNC.

Referenced by opt_eq_func().

static VALUE check_match ( VALUE  pattern,
VALUE  target,
enum vm_check_match_type  type 
) [static]

Definition at line 916 of file vm_insnhelper.c.

References CLASS_OF, GET_THREAD(), idEqq, rb_bug(), rb_cModule, rb_eTypeError, rb_funcall2, rb_method_entry_with_refinements(), rb_obj_is_kind_of(), rb_raise(), VALUE, vm_call0(), VM_CHECKMATCH_TYPE_CASE, VM_CHECKMATCH_TYPE_RESCUE, and VM_CHECKMATCH_TYPE_WHEN.

static rb_control_frame_t* current_method_entry ( rb_thread_t th,
rb_control_frame_t cfp 
) [static]

Definition at line 1724 of file vm_insnhelper.c.

References rb_control_frame_struct::iseq, rb_iseq_struct::local_iseq, RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P, RUBY_VM_PREVIOUS_CONTROL_FRAME, and rb_iseq_struct::type.

Referenced by vm_call_method().

static VALUE double_cmp_ge ( double  a,
double  b 
) [inline, static]

Definition at line 971 of file vm_insnhelper.c.

References CHECK_CMP_NAN, Qfalse, and Qtrue.

static VALUE double_cmp_gt ( double  a,
double  b 
) [inline, static]

Definition at line 964 of file vm_insnhelper.c.

References CHECK_CMP_NAN, Qfalse, and Qtrue.

static VALUE double_cmp_le ( double  a,
double  b 
) [inline, static]

Definition at line 957 of file vm_insnhelper.c.

References CHECK_CMP_NAN, Qfalse, and Qtrue.

static VALUE double_cmp_lt ( double  a,
double  b 
) [inline, static]

Definition at line 950 of file vm_insnhelper.c.

References CHECK_CMP_NAN, Qfalse, and Qtrue.

static VALUE find_refinement ( VALUE  refinements,
VALUE  klass 
) [inline, static]

Definition at line 1712 of file vm_insnhelper.c.

References NIL_P, Qnil, and rb_hash_lookup.

Referenced by rb_resolve_refined_method(), and vm_call_method().

static VALUE lep_svar_get ( rb_thread_t th,
VALUE *  lep,
rb_num_t  key 
) [static]

Definition at line 174 of file vm_insnhelper.c.

References DEFAULT_SPECIAL_VAR_COUNT, lep_svar_place(), NIL_P, Qnil, rb_ary_entry(), RNode::u1, RNode::u2, RNode::u3, VALUE, and RNode::value.

Referenced by vm_cfp_svar_get(), and vm_getspecial().

static NODE* lep_svar_place ( rb_thread_t th,
VALUE *  lep 
) [inline, static]

Definition at line 157 of file vm_insnhelper.c.

References NEW_IF, NIL_P, Qnil, rb_thread_struct::root_lep, rb_thread_struct::root_svar, and VALUE.

Referenced by lep_svar_get(), and lep_svar_set().

static void lep_svar_set ( rb_thread_t th,
VALUE *  lep,
rb_num_t  key,
VALUE  val 
) [static]

Definition at line 197 of file vm_insnhelper.c.

References DEFAULT_SPECIAL_VAR_COUNT, lep_svar_place(), NIL_P, rb_ary_new(), rb_ary_store(), RNode::u1, RNode::u2, RNode::u3, VALUE, and RNode::value.

Referenced by vm_cfp_svar_set().

NORETURN ( static void   argument_error(const rb_iseq_t *iseq, int miss_argc, int min_argc, int max_argc)  ) 

static VALUE opt_eq_func ( VALUE  recv,
VALUE  obj,
CALL_INFO  ci 
) [inline, static]

Definition at line 860 of file vm_insnhelper.c.

References BASIC_OP_UNREDEFINED_P, BOP_EQ, check_cfunc(), FIXNUM_2_P, FIXNUM_REDEFINED_OP_FLAG, FLOAT_REDEFINED_OP_FLAG, FLONUM_2_P, isnan, rb_call_info_struct::me, Qfalse, Qtrue, Qundef, rb_cFloat, rb_cString, rb_obj_equal(), rb_str_equal(), RBASIC_CLASS, RFLOAT_VALUE, SPECIAL_CONST_P, STRING_REDEFINED_OP_FLAG, and vm_search_method().

Referenced by rb_equal_opt().

static VALUE rb_arg_error_new ( int  argc,
int  min,
int  max 
) [inline, static]

Definition at line 110 of file vm_insnhelper.c.

References rb_eArgError, rb_exc_new3, rb_sprintf(), UNLIMITED_ARGUMENTS, and VALUE.

Referenced by argument_error(), and rb_error_arity().

VALUE rb_equal_opt ( VALUE  obj1,
VALUE  obj2 
)

Definition at line 901 of file vm_insnhelper.c.

References rb_call_info_struct::defined_class, idEq, rb_call_info_struct::klass, rb_call_info_struct::me, rb_call_info_struct::method_state, rb_call_info_struct::mid, NULL, and opt_eq_func().

Referenced by rb_ary_index(), and rb_ary_rindex().

void rb_error_arity ( int  argc,
int  min,
int  max 
)

Definition at line 149 of file vm_insnhelper.c.

References rb_arg_error_new(), and rb_exc_raise().

Referenced by econv_args(), econv_primitive_convert(), rb_check_arity(), rb_io_s_popen(), and rb_scan_args().

static int rb_method_definition_eq ( const rb_method_definition_t d1,
const rb_method_definition_t d2 
) [static]

Referenced by rb_method_entry_eq(), rb_method_entry_make(), and vm_call_method().

NODE* rb_vm_get_cref ( const rb_iseq_t iseq,
const VALUE *  ep 
)

Definition at line 271 of file vm_insnhelper.c.

References rb_bug(), and vm_get_cref0().

Referenced by eval_string_with_cref(), rb_vm_cref(), rb_vm_cref_in_context(), vm_call_method(), vm_get_cbase(), vm_get_const_base(), and vm_get_ev_const().

static VALUE* vm_base_ptr ( rb_control_frame_t cfp  )  [static]

Definition at line 978 of file vm_insnhelper.c.

References bp, GET_THREAD(), rb_control_frame_struct::iseq, rb_iseq_struct::local_size, rb_bug(), RUBY_VM_PREVIOUS_CONTROL_FRAME, rb_control_frame_struct::sp, rb_iseq_struct::type, and VALUE.

static VALUE vm_call0 ( rb_thread_t ,
VALUE  ,
ID  ,
int  ,
const VALUE *  ,
const rb_method_entry_t ,
VALUE   
) [static]

static VALUE vm_call_attrset ( rb_thread_t th,
rb_control_frame_t cfp,
rb_call_info_t ci 
) [static]

Definition at line 1592 of file vm_insnhelper.c.

References rb_method_definition_struct::attr, rb_method_definition_struct::body, rb_method_entry_struct::def, rb_method_attr_struct::id, rb_call_info_struct::me, rb_call_info_struct::recv, rb_control_frame_struct::sp, VALUE, and vm_setivar().

Referenced by vm_call_method().

static VALUE vm_call_bmethod ( rb_thread_t th,
rb_control_frame_t cfp,
rb_call_info_t ci 
) [static]

Definition at line 1614 of file vm_insnhelper.c.

References ALLOCA_N, rb_call_info_struct::argc, MEMCPY, rb_control_frame_struct::sp, VALUE, and vm_call_bmethod_body().

Referenced by vm_call_method().

static VALUE vm_call_bmethod_body ( rb_thread_t th,
rb_call_info_t ci,
const VALUE *  argv 
) [inline, static]

Definition at line 1600 of file vm_insnhelper.c.

References rb_call_info_struct::argc, rb_call_info_struct::blockptr, rb_method_definition_struct::body, rb_method_entry_struct::def, rb_call_info_struct::defined_class, GetProcPtr, rb_call_info_struct::me, rb_thread_struct::passed_bmethod_me, rb_method_definition_struct::proc, rb_call_info_struct::recv, VALUE, and vm_invoke_proc().

Referenced by vm_call0_body(), and vm_call_bmethod().

static VALUE vm_call_cfunc ( rb_thread_t th,
rb_control_frame_t reg_cfp,
rb_call_info_t ci 
) [static]

Definition at line 1577 of file vm_insnhelper.c.

References vm_call_cfunc_with_frame().

Referenced by vm_call_method().

static VALUE vm_call_cfunc_with_frame ( rb_thread_t th,
rb_control_frame_t reg_cfp,
rb_call_info_t ci 
) [static]

Definition at line 1466 of file vm_insnhelper.c.

References rb_call_info_struct::argc, argc, rb_method_cfunc_struct::argc, rb_call_info_struct::blockptr, rb_method_entry_struct::called_id, rb_thread_struct::cfp, rb_call_info_struct::defined_class, EXEC_EVENT_HOOK, rb_method_cfunc_struct::func, rb_method_cfunc_struct::invoker, rb_method_entry_struct::klass, len, rb_call_info_struct::me, Qundef, rb_bug(), rb_check_arity, rb_call_info_struct::recv, RUBY_DTRACE_CMETHOD_ENTRY_HOOK, RUBY_DTRACE_CMETHOD_RETURN_HOOK, RUBY_EVENT_C_CALL, RUBY_EVENT_C_RETURN, rb_control_frame_struct::sp, val, VALUE, VM_ENVVAL_BLOCK_PTR, VM_FRAME_MAGIC_CFUNC, vm_method_cfunc_entry(), vm_pop_frame(), VM_PROFILE_UP, and vm_push_frame().

Referenced by vm_call_cfunc().

static VALUE vm_call_general ( rb_thread_t th,
rb_control_frame_t reg_cfp,
rb_call_info_t ci 
) [static]

Definition at line 1924 of file vm_insnhelper.c.

References vm_call_method().

Referenced by vm_search_method().

static VALUE vm_call_iseq_setup ( rb_thread_t th,
rb_control_frame_t cfp,
rb_call_info_t ci 
) [static]

Definition at line 1232 of file vm_insnhelper.c.

References rb_call_info_struct::argc, rb_method_definition_struct::body, rb_method_entry_struct::def, rb_method_definition_struct::iseq, rb_call_info_struct::me, rb_control_frame_struct::sp, vm_call_iseq_setup_2(), and vm_callee_setup_arg().

Referenced by vm_call0_body(), and vm_call_method().

static VALUE vm_call_iseq_setup_2 ( rb_thread_t th,
rb_control_frame_t cfp,
rb_call_info_t ci 
) [static]

Definition at line 1239 of file vm_insnhelper.c.

References rb_call_info_struct::flag, LIKELY, vm_call_iseq_setup_normal(), vm_call_iseq_setup_tailcall(), and VM_CALL_TAILCALL.

Referenced by vm_call_iseq_setup().

static VALUE vm_call_iseq_setup_normal ( rb_thread_t th,
rb_control_frame_t cfp,
rb_call_info_t ci 
) [inline, static]

Definition at line 1250 of file vm_insnhelper.c.

References rb_iseq_struct::arg_size, rb_call_info_struct::argc, argv, rb_call_info_struct::aux, rb_call_info_struct::blockptr, rb_method_definition_struct::body, rb_method_entry_struct::def, rb_call_info_struct::defined_class, rb_method_definition_struct::iseq, rb_iseq_struct::iseq_encoded, rb_iseq_struct::local_size, rb_call_info_struct::me, rb_call_info_struct::opt_pc, Qnil, Qundef, rb_call_info_struct::recv, rb_control_frame_struct::sp, rb_iseq_struct::stack_max, VALUE, VM_ENVVAL_BLOCK_PTR, VM_FRAME_MAGIC_METHOD, and vm_push_frame().

Referenced by vm_call_iseq_setup_2(), and vm_callee_setup_arg().

static VALUE vm_call_iseq_setup_tailcall ( rb_thread_t th,
rb_control_frame_t cfp,
rb_call_info_t ci 
) [inline, static]

Definition at line 1271 of file vm_insnhelper.c.

References rb_iseq_struct::arg_size, rb_call_info_struct::argc, argv, rb_call_info_struct::aux, rb_call_info_struct::blockptr, rb_method_definition_struct::body, rb_thread_struct::cfp, rb_method_entry_struct::def, rb_call_info_struct::defined_class, rb_method_definition_struct::iseq, rb_iseq_struct::iseq_encoded, rb_iseq_struct::local_size, rb_call_info_struct::me, rb_call_info_struct::opt_pc, Qnil, Qundef, rb_call_info_struct::recv, RUBY_VM_CHECK_INTS, RUBY_VM_PREVIOUS_CONTROL_FRAME, rb_control_frame_struct::sp, rb_iseq_struct::stack_max, VALUE, VM_ENVVAL_BLOCK_PTR, VM_FRAME_FLAG_FINISH, VM_FRAME_MAGIC_METHOD, VM_FRAME_TYPE_FINISH_P, and vm_push_frame().

Referenced by vm_call_iseq_setup_2(), and vm_callee_setup_arg().

static VALUE vm_call_ivar ( rb_thread_t th,
rb_control_frame_t cfp,
rb_call_info_t ci 
) [static]

Definition at line 1584 of file vm_insnhelper.c.

References rb_method_definition_struct::attr, rb_method_definition_struct::body, rb_method_entry_struct::def, rb_method_attr_struct::id, rb_call_info_struct::me, rb_call_info_struct::recv, rb_control_frame_struct::sp, VALUE, and vm_getivar().

Referenced by vm_call_method().

static VALUE vm_call_method ( rb_thread_t th,
rb_control_frame_t cfp,
rb_call_info_t ci 
) [inline, static]

Definition at line 1748 of file vm_insnhelper.c.

References rb_call_info_struct::argc, rb_call_info_struct::aux, rb_method_definition_struct::body, rb_call_info_struct::call, CI_SET_FASTPATH, current_method_entry(), rb_method_entry_struct::def, rb_call_info_struct::defined_class, rb_control_frame_struct::ep, find_refinement(), rb_call_info_struct::flag, rb_method_entry_struct::flag, rb_call_info_struct::index, rb_control_frame_struct::iseq, rb_method_entry_struct::klass, rb_control_frame_struct::me, rb_call_info_struct::me, rb_call_info_struct::mid, rb_call_info_struct::missing_reason, NIL_P, NOEX_MASK, NOEX_PRIVATE, NOEX_PROTECTED, NOEX_SAFE, NOEX_SUPER, NOEX_VCALL, rb_method_definition_struct::optimize_type, rb_method_definition_struct::orig_me, Qnil, rb_bug(), rb_check_arity, rb_eSecurityError, rb_id2name(), rb_method_definition_eq(), rb_method_entry(), rb_obj_is_kind_of(), rb_raise(), rb_raise_method_missing(), rb_vm_get_cref(), RCLASS_ORIGIN, RCLASS_SUPER, rb_call_info_struct::recv, rb_thread_struct::safe_level, rb_control_frame_struct::self, STACK_ADDR_FROM_TOP, stat, rb_method_definition_struct::type, UNDEFINED_METHOD_ENTRY_P, VALUE, VM_CALL_ARGS_SPLAT, vm_call_attrset(), vm_call_bmethod(), vm_call_cfunc(), VM_CALL_FCALL, vm_call_iseq_setup(), vm_call_ivar(), vm_call_method_missing(), vm_call_opt_call(), VM_CALL_OPT_SEND, vm_call_opt_send(), VM_CALL_SUPER, vm_call_super_method(), VM_CALL_VCALL, VM_METHOD_TYPE_ATTRSET, VM_METHOD_TYPE_BMETHOD, VM_METHOD_TYPE_CFUNC, VM_METHOD_TYPE_ISEQ, VM_METHOD_TYPE_IVAR, VM_METHOD_TYPE_MISSING, VM_METHOD_TYPE_NOTIMPLEMENTED, VM_METHOD_TYPE_OPTIMIZED, VM_METHOD_TYPE_REFINED, VM_METHOD_TYPE_UNDEF, and VM_METHOD_TYPE_ZSUPER.

Referenced by vm_call_general(), vm_call_method_missing(), vm_call_opt_send(), and vm_call_super_method().

static VALUE vm_call_method_missing ( rb_thread_t th,
rb_control_frame_t reg_cfp,
rb_call_info_t ci 
) [static]

Definition at line 1687 of file vm_insnhelper.c.

References rb_call_info_struct::argc, rb_call_info_struct::aux, rb_call_info_struct::blockptr, CHECK_VM_STACK_OVERFLOW, CLASS_OF, rb_call_info_struct::defined_class, rb_call_info_struct::flag, ID2SYM, INC_SP, rb_call_info_struct::me, MEMMOVE, rb_thread_struct::method_missing_reason, rb_call_info_struct::mid, rb_call_info_struct::missing_reason, rb_method_entry(), rb_call_info_struct::recv, STACK_ADDR_FROM_TOP, VALUE, VM_CALL_FCALL, vm_call_method(), and VM_CALL_OPT_SEND.

Referenced by vm_call_method(), and vm_search_super_method().

static VALUE vm_call_opt_call ( rb_thread_t th,
rb_control_frame_t cfp,
rb_call_info_t ci 
) [static]

Definition at line 1674 of file vm_insnhelper.c.

References ALLOCA_N, rb_call_info_struct::argc, rb_call_info_struct::blockptr, GetProcPtr, MEMCPY, rb_vm_invoke_proc(), rb_call_info_struct::recv, rb_control_frame_struct::sp, and VALUE.

Referenced by vm_call_method().

static VALUE vm_call_opt_send ( rb_thread_t th,
rb_control_frame_t reg_cfp,
rb_call_info_t ci 
) [static]

Definition at line 1632 of file vm_insnhelper.c.

References rb_call_info_struct::argc, CLASS_OF, DEC_SP, rb_call_info_struct::defined_class, rb_call_info_struct::flag, make_no_method_exception(), rb_call_info_struct::me, MEMMOVE, rb_call_info_struct::mid, NULL, rb_check_id(), rb_eArgError, rb_eNoMethodError, rb_exc_raise(), rb_long2int, rb_method_basic_definition_p(), rb_method_entry_without_refinements(), rb_raise(), rb_to_id(), rb_call_info_struct::recv, sym, SYM2ID, SYMBOL_P, TOPN, VALUE, VM_CALL_FCALL, vm_call_method(), and VM_CALL_OPT_SEND.

Referenced by vm_call_method().

static VALUE vm_call_super_method ( rb_thread_t th,
rb_control_frame_t reg_cfp,
rb_call_info_t ci 
) [static]

Definition at line 1930 of file vm_insnhelper.c.

References vm_call_method().

Referenced by vm_call_method(), and vm_search_super_method().

static void vm_callee_setup_arg ( rb_thread_t th,
rb_call_info_t ci,
const rb_iseq_t iseq,
VALUE *  argv,
int  is_lambda 
) [inline, static]

Definition at line 1209 of file vm_insnhelper.c.

References rb_iseq_struct::arg_simple, rb_iseq_struct::argc, rb_call_info_struct::argc, argument_error(), rb_call_info_struct::aux, CI_SET_FASTPATH, rb_method_entry_struct::flag, rb_call_info_struct::flag, LIKELY, rb_call_info_struct::me, NOEX_PROTECTED, rb_call_info_struct::opt_pc, UNLIKELY, VM_CALL_ARGS_SPLAT, vm_call_iseq_setup_normal(), vm_call_iseq_setup_tailcall(), VM_CALL_TAILCALL, and vm_callee_setup_arg_complex().

Referenced by vm_call_iseq_setup(), and vm_yield_setup_args().

static int vm_callee_setup_arg_complex ( rb_thread_t th,
rb_call_info_t ci,
const rb_iseq_t iseq,
VALUE *  orig_argv 
) [inline, static]

Definition at line 1107 of file vm_insnhelper.c.

References ALLOCA_N, rb_iseq_struct::arg_keyword, rb_iseq_struct::arg_opt_table, rb_iseq_struct::arg_opts, rb_iseq_struct::arg_post_len, rb_iseq_struct::arg_post_start, rb_iseq_struct::arg_rest, rb_iseq_struct::arg_size, argc, rb_call_info_struct::argc, rb_iseq_struct::argc, argument_error(), argv, if(), rb_thread_struct::mark_stack_len, max(), MEMCPY, Qnil, rb_ary_new4, UNLIMITED_ARGUMENTS, VALUE, and vm_callee_setup_keyword_arg().

Referenced by vm_callee_setup_arg().

static int vm_callee_setup_keyword_arg ( rb_thread_t th,
const rb_iseq_t iseq,
int  argc,
int  m,
VALUE *  orig_argv,
VALUE *  kwd 
) [inline, static]

Definition at line 1070 of file vm_insnhelper.c.

References rb_iseq_struct::arg_keyword_check, rb_iseq_struct::arg_keyword_required, rb_iseq_struct::arg_keyword_table, rb_iseq_struct::arg_keywords, rb_thread_struct::cfp, rb_thread_struct::mark_stack_len, NIL_P, NULL, rb_check_hash_type(), rb_extract_keywords(), rb_get_kwargs(), rb_hash_new(), rb_control_frame_struct::sp, and VALUE.

Referenced by vm_callee_setup_arg_complex(), and vm_yield_setup_block_args().

static void vm_caller_setup_args ( const rb_thread_t th,
rb_control_frame_t cfp,
rb_call_info_t ci 
) [static]

Definition at line 1003 of file vm_insnhelper.c.

References rb_call_info_struct::argc, rb_proc_t::block, rb_call_info_struct::blockiseq, rb_call_info_struct::blockptr, CHECK_VM_STACK_OVERFLOW, rb_call_info_struct::flag, GetProcPtr, rb_block_struct::iseq, len, NIL_P, rb_block_struct::proc, Qnil, RARRAY_CONST_PTR, RARRAY_LEN, rb_check_convert_type(), rb_eTypeError, rb_obj_classname(), rb_obj_is_proc(), rb_raise(), RUBY_VM_GET_BLOCK_PTR_IN_CFP, SAVE_RESTORE_CI, rb_control_frame_struct::sp, T_ARRAY, T_DATA, UNLIKELY, VALUE, VM_CALL_ARGS_BLOCKARG, and VM_CALL_ARGS_SPLAT.

Referenced by vm_invoke_block().

static void vm_check_if_namespace ( VALUE  klass  )  [inline, static]

Definition at line 338 of file vm_insnhelper.c.

References rb_eTypeError, rb_inspect(), rb_raise(), RB_TYPE_P, StringValuePtr, T_CLASS, T_MODULE, and VALUE.

Referenced by vm_get_ev_const().

static NODE* vm_cref_push ( rb_thread_t th,
VALUE  klass,
int  noex,
rb_block_t blockptr 
) [static]

Definition at line 282 of file vm_insnhelper.c.

References rb_thread_struct::cfp, COPY_CREF_OMOD, rb_control_frame_struct::ep, rb_block_struct::ep, rb_control_frame_struct::iseq, rb_block_struct::iseq, NEW_CREF, NIL_P, Qnil, RB_OBJ_WRITE, vm_get_cref0(), and vm_get_ruby_level_caller_cfp().

static void vm_expandarray ( rb_control_frame_t cfp,
VALUE  ary,
rb_num_t  num,
int  flag 
) [inline, static]

Definition at line 760 of file vm_insnhelper.c.

References len, Qnil, RARRAY_CONST_PTR, RARRAY_LEN, rb_ary_new(), rb_ary_new4, rb_ary_to_ary(), RB_GC_GUARD, RB_TYPE_P, rb_control_frame_struct::sp, T_ARRAY, and VALUE.

static VALUE vm_get_cbase ( const rb_iseq_t iseq,
const VALUE *  ep 
) [inline, static]

Definition at line 305 of file vm_insnhelper.c.

References Qundef, rb_vm_get_cref(), and VALUE.

Referenced by rb_vm_cbase().

static VALUE vm_get_const_base ( const rb_iseq_t iseq,
const VALUE *  ep 
) [inline, static]

Definition at line 321 of file vm_insnhelper.c.

References RNode::flags, NODE_FL_CREF_PUSHED_BY_EVAL, Qundef, rb_vm_get_cref(), and VALUE.

static NODE* vm_get_cref0 ( const rb_iseq_t iseq,
const VALUE *  ep 
) [static]

Definition at line 256 of file vm_insnhelper.c.

References rb_iseq_struct::cref_stack, NULL, Qnil, RUBY_VM_NORMAL_ISEQ_P, VM_EP_LEP_P, and VM_EP_PREV_EP.

Referenced by rb_vm_get_cref(), and vm_cref_push().

static VALUE vm_get_cvar_base ( NODE cref,
rb_control_frame_t cfp 
) [inline, static]

Definition at line 441 of file vm_insnhelper.c.

References FL_SINGLETON, FL_TEST, RNode::flags, NIL_P, NODE_FL_CREF_PUSHED_BY_EVAL, rb_bug(), rb_eTypeError, rb_raise(), rb_warn(), VALUE, and vm_get_iclass().

static VALUE vm_get_ev_const ( rb_thread_t th,
const rb_iseq_t iseq,
VALUE  orig_klass,
ID  id,
int  is_defined 
) [inline, static]

Definition at line 363 of file vm_insnhelper.c.

References rb_thread_struct::cfp, CLASS_OF, rb_control_frame_struct::ep, RNode::flags, NIL_P, NODE_FL_CREF_PUSHED_BY_EVAL, Qnil, Qundef, rb_autoload_load(), rb_autoloading_value(), rb_const_defined(), rb_const_get(), rb_public_const_defined_from(), rb_public_const_get_from(), rb_vm_get_cref(), RCLASS_CONST_TBL, rb_control_frame_struct::self, st_data_t, st_lookup(), val, VALUE, vm_check_if_namespace(), and vm_get_iclass().

static VALUE vm_get_iclass ( rb_control_frame_t cfp,
VALUE  klass 
) [inline, static]

Definition at line 349 of file vm_insnhelper.c.

References FL_TEST, rb_control_frame_struct::klass, RB_TYPE_P, RBASIC, RMODULE_IS_OVERLAID, T_ICLASS, and T_MODULE.

Referenced by vm_get_cvar_base(), and vm_get_ev_const().

static rb_control_frame_t* vm_get_ruby_level_caller_cfp ( rb_thread_t th,
rb_control_frame_t cfp 
) [static]

static VALUE vm_getinstancevariable ( VALUE  obj,
ID  id,
IC  ic 
) [static]

Definition at line 578 of file vm_insnhelper.c.

References vm_getivar().

static VALUE vm_getivar ( VALUE  obj,
ID  id,
IC  ic,
rb_call_info_t ci,
int  is_attr 
) [inline, static]

Definition at line 485 of file vm_insnhelper.c.

References rb_call_info_struct::aux, iseq_inline_cache_entry::ic_serial, iseq_inline_cache_entry::ic_value, iseq_inline_cache_entry::index, rb_call_info_struct::index, len, LIKELY, long, Qnil, Qundef, rb_attr_get(), rb_id2name(), rb_ivar_get(), RB_TYPE_P, rb_warning(), RBASIC, RCLASS_SERIAL, ROBJECT_IV_INDEX_TBL, ROBJECT_IVPTR, ROBJECT_NUMIV, st_data_t, st_lookup(), T_OBJECT, UNLIKELY, val, and VALUE.

Referenced by vm_call_ivar(), and vm_getinstancevariable().

static VALUE vm_getspecial ( rb_thread_t th,
VALUE *  lep,
rb_num_t  key,
rb_num_t  type 
) [inline, static]

Definition at line 220 of file vm_insnhelper.c.

References lep_svar_get(), rb_bug(), rb_reg_last_match(), rb_reg_match_last(), rb_reg_match_post(), rb_reg_match_pre(), rb_reg_nth_match(), val, and VALUE.

static VALUE vm_invoke_block ( rb_thread_t th,
rb_control_frame_t reg_cfp,
rb_call_info_t ci 
) [static]

Definition at line 2329 of file vm_insnhelper.c.

References rb_iseq_struct::arg_size, rb_call_info_struct::argc, block_proc_is_lambda(), BUILTIN_TYPE, rb_block_struct::ep, rb_call_info_struct::flag, GET_CFP, GET_ISEQ, GET_SP, rb_block_struct::iseq, rb_iseq_struct::iseq_encoded, rb_block_struct::klass, rb_iseq_struct::local_size, POPN, rb_block_struct::proc, Qnil, Qundef, rb_vm_localjump_error(), rb_block_struct::self, SET_SP, STACK_ADDR_FROM_TOP, rb_iseq_struct::stack_max, T_NODE, type, UNLIKELY, VALUE, VM_CALL_ARGS_SPLAT, vm_caller_setup_args(), VM_CF_BLOCK_PTR(), VM_ENVVAL_PREV_EP_PTR, VM_FRAME_MAGIC_BLOCK, VM_FRAME_MAGIC_LAMBDA, vm_push_frame(), vm_yield_setup_args(), and vm_yield_with_cfunc().

static VALUE vm_make_proc_with_iseq ( rb_iseq_t blockiseq  )  [static]

Definition at line 2372 of file vm_insnhelper.c.

References rb_thread_struct::cfp, GET_THREAD(), rb_block_struct::iseq, rb_block_struct::proc, rb_bug(), rb_cProc, rb_vm_get_ruby_level_next_cfp(), rb_vm_make_proc(), and RUBY_VM_GET_BLOCK_PTR_IN_CFP.

Referenced by vm_once_exec().

static const rb_method_cfunc_t* vm_method_cfunc_entry ( const rb_method_entry_t me  )  [inline, static]

Definition at line 1440 of file vm_insnhelper.c.

References rb_method_definition_struct::body, rb_method_definition_struct::cfunc, rb_method_entry_struct::def, rb_bug(), rb_method_definition_struct::type, UNDEF, VM_METHOD_TYPE_CFUNC, and VM_METHOD_TYPE_NOTIMPLEMENTED.

Referenced by vm_call_cfunc_with_frame().

static VALUE vm_once_clear ( VALUE  data  )  [static]

Definition at line 2397 of file vm_insnhelper.c.

References NULL, iseq_inline_storage_entry::once, Qnil, and iseq_inline_storage_entry::running_thread.

static VALUE vm_once_exec ( rb_iseq_t iseq  )  [static]

Definition at line 2390 of file vm_insnhelper.c.

References Qnil, rb_proc_call_with_block(), VALUE, and vm_make_proc_with_iseq().

static void vm_pop_frame ( rb_thread_t th  )  [inline, static]

Definition at line 99 of file vm_insnhelper.c.

References rb_thread_struct::cfp, RUBY_VM_PREVIOUS_CONTROL_FRAME, SDR, and VMDEBUG.

Referenced by argument_error(), rb_binding_add_dynavars(), rb_frame_pop(), rb_vm_call_cfunc(), rb_vm_pop_cfunc_frame(), rb_vm_rewind_cfp(), vm_call0_cfunc_with_frame(), vm_call_cfunc_with_frame(), and vm_exec().

static rb_control_frame_t* vm_push_frame ( rb_thread_t th,
const rb_iseq_t iseq,
VALUE  type,
VALUE  self,
VALUE  klass,
VALUE  specval,
const VALUE *  pc,
VALUE *  sp,
int  local_size,
const rb_method_entry_t me,
size_t  stack_max 
) [inline, static]

Definition at line 34 of file vm_insnhelper.c.

References rb_control_frame_struct::block_iseq, rb_thread_struct::cfp, CHECK_VM_STACK_OVERFLOW0, rb_control_frame_struct::ep, rb_control_frame_struct::flag, rb_control_frame_struct::iseq, rb_control_frame_struct::klass, rb_control_frame_struct::me, rb_control_frame_struct::pc, rb_control_frame_struct::proc, Qnil, RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P, RUBY_VM_PREVIOUS_CONTROL_FRAME, SDR, rb_control_frame_struct::self, rb_control_frame_struct::sp, VALUE, and VMDEBUG.

Referenced by argument_error(), invoke_block_from_c(), rb_vm_call_cfunc(), th_init(), vm_call0_cfunc_with_frame(), vm_call_cfunc_with_frame(), vm_call_iseq_setup_normal(), vm_call_iseq_setup_tailcall(), vm_invoke_block(), vm_set_eval_stack(), vm_set_top_stack(), and vm_yield_with_cfunc().

static VALUE vm_search_const_defined_class ( const VALUE  cbase,
ID  id 
) [static]

Definition at line 467 of file vm_insnhelper.c.

References rb_cObject, rb_const_defined_at(), RCLASS_SUPER, and VALUE.

static void vm_search_method ( rb_call_info_t ci,
VALUE  recv 
) [static]

Definition at line 823 of file vm_insnhelper.c.

References rb_call_info_struct::call, CLASS_OF, rb_call_info_struct::class_serial, rb_call_info_struct::defined_class, GET_GLOBAL_METHOD_STATE, rb_call_info_struct::klass, LIKELY, rb_call_info_struct::me, rb_call_info_struct::method_state, rb_call_info_struct::mid, rb_method_entry(), RCLASS_SERIAL, VALUE, and vm_call_general().

Referenced by opt_eq_func().

static VALUE vm_search_normal_superclass ( VALUE  klass  )  [inline, static]

Definition at line 1938 of file vm_insnhelper.c.

References BUILTIN_TYPE, FL_TEST, RBASIC, RCLASS_ORIGIN, RCLASS_SUPER, RMODULE_IS_REFINEMENT, and T_ICLASS.

Referenced by vm_search_superclass().

static void vm_search_super_method ( rb_thread_t th,
rb_control_frame_t reg_cfp,
rb_call_info_t ci 
) [static]

Definition at line 2006 of file vm_insnhelper.c.

References rb_call_info_struct::argc, rb_call_info_struct::aux, rb_method_definition_struct::body, BUILTIN_TYPE, rb_call_info_struct::call, CI_SET_FASTPATH, rb_method_entry_struct::def, rb_call_info_struct::defined_class, FL_TEST, GET_CFP, GET_ISEQ, rb_method_definition_struct::iseq, rb_iseq_struct::klass, rb_call_info_struct::klass, rb_call_info_struct::me, rb_call_info_struct::mid, rb_call_info_struct::missing_reason, NIL_P, NOEX_SUPER, rb_iseq_struct::parent_iseq, PRIsVALUE, rb_eRuntimeError, rb_eTypeError, rb_method_entry(), rb_obj_class(), rb_obj_is_kind_of(), rb_raise(), RB_TYPE_P, RBASIC, RCLASS_REFINED_CLASS, RCLASS_SUPER, rb_call_info_struct::recv, RMODULE_INCLUDED_INTO_REFINEMENT, T_ICLASS, T_MODULE, TOPN, rb_method_definition_struct::type, VALUE, vm_call_method_missing(), vm_call_super_method(), VM_METHOD_TYPE_ISEQ, vm_search_superclass(), and vm_super_outside().

static int vm_search_superclass ( rb_control_frame_t reg_cfp,
rb_iseq_t iseq,
VALUE  sigval,
rb_call_info_t ci 
) [static]

Definition at line 1955 of file vm_insnhelper.c.

References rb_method_entry_struct::def, rb_iseq_struct::defined_method_id, rb_control_frame_struct::ep, GET_CFP, GET_THREAD(), rb_control_frame_struct::iseq, rb_control_frame_struct::klass, rb_call_info_struct::klass, rb_iseq_struct::klass, rb_iseq_struct::local_iseq, rb_control_frame_struct::me, rb_call_info_struct::mid, rb_method_definition_struct::original_id, rb_iseq_struct::parent_iseq, RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P, RUBY_VM_PREVIOUS_CONTROL_FRAME, VALUE, VM_EP_PREV_EP, and vm_search_normal_superclass().

Referenced by vm_search_super_method().

static void vm_setinstancevariable ( VALUE  obj,
ID  id,
VALUE  val,
IC  ic 
) [static]

Definition at line 584 of file vm_insnhelper.c.

References vm_setivar().

static VALUE vm_setivar ( VALUE  obj,
ID  id,
VALUE  val,
IC  ic,
rb_call_info_t ci,
int  is_attr 
) [inline, static]

Definition at line 537 of file vm_insnhelper.c.

References rb_call_info_struct::aux, iseq_inline_cache_entry::ic_serial, iseq_inline_cache_entry::ic_value, iseq_inline_cache_entry::index, rb_call_info_struct::index, len, LIKELY, long, rb_check_frozen, rb_ivar_set(), RB_OBJ_WRITE, RB_TYPE_P, RBASIC, RCLASS_SERIAL, ROBJECT_IV_INDEX_TBL, ROBJECT_IVPTR, ROBJECT_NUMIV, st_data_t, st_lookup(), T_OBJECT, and VALUE.

Referenced by vm_call_attrset(), and vm_setinstancevariable().

static void vm_stackoverflow ( void   )  [static]

Definition at line 28 of file vm_insnhelper.c.

References rb_exc_raise(), and sysstack_error.

static void vm_super_outside ( void   )  [static]

Definition at line 1949 of file vm_insnhelper.c.

References rb_eNoMethodError, and rb_raise().

Referenced by vm_search_super_method().

static VALUE vm_throw ( rb_thread_t th,
rb_control_frame_t reg_cfp,
rb_num_t  throw_state,
VALUE  throwobj 
) [static]

Definition at line 590 of file vm_insnhelper.c.

References rb_iseq_struct::catch_table, rb_iseq_struct::catch_table_size, rb_control_frame_struct::ep, GC_GUARDED_PTR_REF, GET_CFP, GET_EP, GET_ISEQ, if(), rb_control_frame_struct::iseq, rb_iseq_struct::iseq_encoded, level, rb_iseq_struct::parent_iseq, rb_control_frame_struct::pc, rb_bug(), rb_vm_localjump_error(), RUBY_VM_PREVIOUS_CONTROL_FRAME, rb_thread_struct::stack_size, TAG_BREAK, TAG_RETRY, TAG_RETURN, rb_iseq_struct::type, VALUE, VM_CF_LEP(), VM_EP_PREV_EP, VM_FRAME_MAGIC_LAMBDA, and VM_FRAME_TYPE.

static int vm_yield_setup_args ( rb_thread_t *const   th,
const rb_iseq_t iseq,
int  argc,
VALUE *  argv,
const rb_block_t blockptr,
int  lambda 
) [inline, static]

Definition at line 2300 of file vm_insnhelper.c.

References rb_iseq_struct::arg_block, rb_iseq_struct::arg_opts, rb_iseq_struct::arg_post_len, rb_iseq_struct::arg_rest, rb_iseq_struct::arg_simple, rb_call_info_struct::argc, rb_iseq_struct::argc, rb_call_info_struct::aux, rb_call_info_struct::blockptr, rb_call_info_struct::flag, rb_call_info_struct::opt_pc, vm_callee_setup_arg(), and vm_yield_setup_block_args().

Referenced by invoke_block_from_c(), and vm_invoke_block().

static int vm_yield_setup_block_args ( rb_thread_t th,
const rb_iseq_t iseq,
int  orig_argc,
VALUE *  argv,
const rb_block_t blockptr 
) [inline, static]

Definition at line 2184 of file vm_insnhelper.c.

References rb_iseq_struct::arg_keyword, rb_iseq_struct::arg_opts, rb_iseq_struct::arg_post_len, rb_iseq_struct::arg_rest, rb_iseq_struct::arg_simple, rb_iseq_struct::arg_size, rb_iseq_struct::argc, rb_thread_struct::cfp, CHECK_VM_STACK_OVERFLOW, if(), rb_thread_struct::mark_stack_len, MEMCPY, NIL_P, Qnil, RARRAY_CONST_PTR, RARRAY_LENINT, rb_check_array_type(), VALUE, and vm_callee_setup_keyword_arg().

Referenced by vm_yield_setup_args().

static int vm_yield_setup_block_args_complex ( rb_thread_t th,
const rb_iseq_t iseq,
int  argc,
VALUE *  argv 
) [inline, static]

Definition at line 2127 of file vm_insnhelper.c.

References rb_iseq_struct::arg_opt_table, rb_iseq_struct::arg_opts, rb_iseq_struct::arg_post_len, rb_iseq_struct::arg_post_start, rb_iseq_struct::arg_rest, rb_iseq_struct::argc, MEMMOVE, Qnil, rb_ary_new4, and VALUE.

static VALUE vm_yield_with_cfunc ( rb_thread_t th,
const rb_block_t block,
VALUE  self,
int  argc,
const VALUE *  argv,
const rb_block_t blockargptr 
) [inline, static]

Definition at line 2081 of file vm_insnhelper.c.

References block_proc_is_lambda(), rb_thread_struct::cfp, rb_block_struct::ep, rb_block_struct::iseq, rb_block_struct::proc, Qnil, rb_ary_new4, rb_cProc, rb_vm_make_proc(), rb_control_frame_struct::sp, VALUE, VM_ENVVAL_PREV_EP_PTR, VM_FRAME_MAGIC_IFUNC, and vm_push_frame().

Referenced by invoke_block_from_c(), and vm_invoke_block().


Generated on 19 Jul 2016 for Ruby by  doxygen 1.4.7