Ruby
2.5.0dev(2017-10-22revision60238)
|
Go to the source code of this file.
Data Structures | |
struct | local_var_list |
struct | rescue_funcall_args |
struct | iter_method_arg |
struct | eval_string_from_file_arg |
Macros | |
#define | id_mesg idMesg |
#define | type_case(t) case t: return #t; |
Typedefs | |
typedef enum call_type | call_type |
Enumerations | |
enum | call_type { CALL_PUBLIC, CALL_FCALL, CALL_VCALL, CALL_TYPE_MAX } |
#define type_case | ( | t | ) | case t: return #t; |
enum call_type |
void Init_vm_eval | ( | void | ) |
Definition at line 2155 of file vm_eval.c.
References rb_define_global_function(), and rb_f_eval().
NORETURN | ( | static void | raise_method_missingrb_thread_t *th, int argc, const VALUE *argv, VALUE obj, enum method_missing_reason call_status | ) |
Calls a method.
recv | receiver of the method |
mid | an ID that represents the name of the method |
args | an Array object which contains method arguments |
Definition at line 744 of file vm_eval.c.
References argc, argv, OBJ_FREEZE, RARRAY_LENINT, rb_ary_subseq(), and RBASIC_CLEAR_CLASS.
VALUE rb_block_call | ( | VALUE | obj, |
ID | mid, | ||
int | argc, | ||
const VALUE * | argv, | ||
VALUE(*)(ANYARGS) | bl_proc, | ||
VALUE | data2 | ||
) |
Definition at line 1181 of file vm_eval.c.
References argc, iter_method_arg::argc, argv, iter_method_arg::argv, iter_method_arg::mid, iter_method_arg::obj, and rb_iterate().
Definition at line 238 of file vm_eval.c.
References GET_THREAD, and PASS_PASSED_BLOCK_HANDLER_TH.
Definition at line 1970 of file vm_eval.c.
References rb_catch_obj(), rb_cObject, rb_obj_alloc(), and rb_sym_intern_ascii_cstr().
Definition at line 2012 of file vm_eval.c.
References GET_THREAD, and rb_vm_tag::state.
Referenced by rb_catch().
VALUE rb_catch_protect | ( | VALUE | t, |
rb_block_call_func * | func, | ||
VALUE | data, | ||
enum ruby_tag_type * | stateptr | ||
) |
VALUE rb_check_block_call | ( | VALUE | obj, |
ID | mid, | ||
int | argc, | ||
const VALUE * | argv, | ||
VALUE(*)(ANYARGS) | bl_proc, | ||
VALUE | data2 | ||
) |
Definition at line 1220 of file vm_eval.c.
References argc, iter_method_arg::argc, argv, iter_method_arg::argv, iter_method_arg::mid, iter_method_arg::obj, and rb_iterate().
Definition at line 389 of file vm_eval.c.
References Qundef, and rb_check_funcall_default().
Referenced by rb_iseq_load_iseq(), and rb_threadptr_error_print().
Definition at line 395 of file vm_eval.c.
References CLASS_OF, GET_THREAD, and rescue_funcall_args::me.
Referenced by rb_check_funcall(), and rb_get_path_check_to_string().
VALUE rb_check_funcall_with_hook | ( | VALUE | recv, |
ID | mid, | ||
int | argc, | ||
const VALUE * | argv, | ||
rb_check_funcall_hook * | hook, | ||
VALUE | arg | ||
) |
Definition at line 417 of file vm_eval.c.
References CLASS_OF, GET_THREAD, and rescue_funcall_args::me.
VALUE rb_current_realfilepath | ( | void | ) |
Definition at line 2145 of file vm_eval.c.
References rb_execution_context_struct::cfp, rb_thread_struct::ec, and GET_THREAD.
Referenced by rb_f_require_relative().
VALUE rb_current_receiver | ( | void | ) |
Definition at line 246 of file vm_eval.c.
References rb_execution_context_struct::cfp, rb_thread_struct::ec, GET_THREAD, rb_eRuntimeError, rb_raise(), and rb_control_frame_struct::self.
Definition at line 1507 of file vm_eval.c.
References GET_THREAD, OBJ_TAINTED, Qnil, RARRAY_CONST_PTR, RARRAY_LENINT, rb_funcallv(), rb_safe_level(), rb_set_safe_level_force(), RB_TYPE_P, RUBY_SAFE_LEVEL_MAX, T_STRING, TAG_NONE, TH_EXEC_TAG, TH_PUSH_TAG, and VAR_NOCLOBBERED.
Evaluates the given string in an isolated binding.
Here "isolated" means the binding does not inherit any other binding. This behaves same as the binding for required libraries.
FILE will be "(eval)", and LINE starts from 1 in the evaluation.
str | Ruby code to evaluate. |
Exception | Raises an exception on error. |
Definition at line 1447 of file vm_eval.c.
References ruby_eval_string_from_file().
Referenced by rb_eval_string_protect().
Evaluates the given string in an isolated binding.
FILE will be "(eval)", and LINE starts from 1 in the evaluation.
str | Ruby code to evaluate. |
state | Being set to zero if succeeded. Nonzero if an error occurred. |
Definition at line 1463 of file vm_eval.c.
References rb_eval_string(), and rb_protect().
Referenced by rb_eval_string_wrap().
Evaluates the given string under a module binding in an isolated binding.
This is same as the binding for loaded libraries on "load('foo', true)".
FILE will be "(eval)", and LINE starts from 1 in the evaluation.
str | Ruby code to evaluate. |
state | Being set to zero if succeeded. Nonzero if an error occurred. |
Definition at line 1480 of file vm_eval.c.
References GET_THREAD, rb_eval_string_protect(), rb_extend_object(), rb_module_new(), rb_obj_clone(), rb_vm_top_self(), TAG_NONE, TH_JUMP_TAG, rb_thread_struct::top_self, rb_thread_struct::top_wrapper, and val.
VALUE rb_f_block_given_p | ( | void | ) |
Definition at line 2130 of file vm_eval.c.
References rb_execution_context_struct::cfp, rb_thread_struct::ec, and GET_THREAD.
Definition at line 1385 of file vm_eval.c.
References NIL_P, NUM2INT, Qundef, rb_scan_args(), SafeStringValue, and StringValue.
Referenced by Init_vm_eval().
Calls a method.
recv | receiver of the method |
mid | an ID that represents the name of the method |
n | the number of arguments |
... | arbitrary number of method arguments |
Definition at line 774 of file vm_eval.c.
References ALLOCA_N, argv, and va_init_list.
Referenced by default_inspect(), DupConfigPtr(), fun1(), generic_to_value(), ossl_time_split(), ossl_to_der(), rb_big_pow(), rb_class_inherited(), rb_cmpint(), rb_exc_new(), rb_exc_new_str(), rb_io_flush_raw(), rb_numeric_quo(), rb_obj_as_string(), and rb_obj_init_dup_clone().
Definition at line 826 of file vm_eval.c.
References PASS_PASSED_BLOCK_HANDLER.
VALUE rb_funcall_with_block | ( | VALUE | recv, |
ID | mid, | ||
int | argc, | ||
const VALUE * | argv, | ||
VALUE | passed_procval | ||
) |
Definition at line 833 of file vm_eval.c.
References GET_THREAD, and NIL_P.
Referenced by rb_sym_proc_call().
Calls a method.
recv | receiver of the method |
mid | an ID that represents the name of the method |
argc | the number of arguments |
argv | pointer to an array of method arguments |
Definition at line 805 of file vm_eval.c.
Referenced by rb_eval_cmd().
Definition at line 1156 of file vm_eval.c.
Referenced by rb_block_call(), rb_check_block_call(), and rb_proc_new().
VALUE rb_lambda_call | ( | VALUE | obj, |
ID | mid, | ||
int | argc, | ||
const VALUE * | argv, | ||
rb_block_call_func_t | bl_proc, | ||
int | min_argc, | ||
int | max_argc, | ||
VALUE | data2 | ||
) |
Definition at line 1194 of file vm_eval.c.
References argc, iter_method_arg::argc, argv, iter_method_arg::argv, iter_method_arg::mid, iter_method_arg::obj, rb_eArgError, rb_raise(), and rb_vm_ifunc_new().
void rb_raise_method_missing | ( | rb_thread_t * | th, |
int | argc, | ||
const VALUE * | argv, | ||
VALUE | obj, | ||
int | call_status | ||
) |
Definition at line 1893 of file vm_eval.c.
References rb_sym_intern_ascii_cstr(), and rb_throw_obj().
Definition at line 1868 of file vm_eval.c.
References rb_thread_struct::ec, GET_THREAD, numberof, rb_vm_tag::prev, rb_class_new_instance(), rb_exc_raise(), rb_str_new_cstr(), rb_vm_tag::retval, rb_vm_tag::tag, and rb_execution_context_struct::tag.
Referenced by rb_throw().
VALUE rb_vm_call | ( | rb_thread_t * | th, |
VALUE | recv, | ||
VALUE | id, | ||
int | argc, | ||
const VALUE * | argv, | ||
const rb_callable_method_entry_t * | me | ||
) |
Definition at line 973 of file vm_eval.c.
References Qundef.
Referenced by ossl_generate_cb_2(), and rb_ary_delete().
Definition at line 1584 of file vm_eval.c.
References GET_THREAD.
Definition at line 1013 of file vm_eval.c.
References NIL_P, rb_check_array_type(), rb_eArgError, and rb_raise().
Definition at line 1407 of file vm_eval.c.
References rb_str_new_cstr().
Referenced by rb_eval_string().
Definition at line 1426 of file vm_eval.c.
References eval_string_from_file_arg::filename, rb_protect(), rb_str_new_cstr(), and eval_string_from_file_arg::str.