52 #if OPT_CALL_CFUNC_WITHOUT_FRAME
64 int len = cfunc->
argc;
73 if (reg_cfp == th->
cfp) {
75 rb_bug(
"vm_call0_cfunc: passed_ci error (ci: %p, passed_ci: %p)", ci, th->
passed_ci);
80 if (reg_cfp != th->
cfp + 1) {
81 rb_bug(
"vm_call0_cfunc: cfp consistency error");
99 int len = cfunc->
argc;
117 val = (*cfunc->
invoker)(cfunc->
func, recv, argc, argv);
120 rb_bug(
"vm_call0_cfunc_with_frame: cfp consistency error");
163 *reg_cfp->
sp++ = ci->
recv;
164 for (i = 0; i < ci->
argc; i++) {
165 *reg_cfp->
sp++ = argv[
i];
217 case OPTIMIZED_METHOD_TYPE_SEND:
220 case OPTIMIZED_METHOD_TYPE_CALL:
246 return vm_call0(th, recv,
id, argc, argv, me, defined_class);
259 rb_bug(
"vm_call_super: should not be reached");
269 return vm_call0(th, recv,
id, argc, argv, me, klass);
293 #define NOEX_OK NOEX_NOSUPER
324 return vm_call0(th, recv, mid, argc, argv, me, defined_class);
368 if (arity < 1) arity = 2;
374 if (!
RTEST(result)) {
423 return vm_call0(th, recv, mid, argc, argv, me, defined_class);
445 return vm_call0(th, recv, mid, argc, argv, me, defined_class);
451 #define type_case(t) case t: return #t;
478 default:
return NULL;
492 "method `%s' called on unexpected immediate object (%p)",
495 flags =
RBASIC(recv)->flags;
496 klass =
RBASIC(recv)->klass;
499 "method `%s' called on terminated object"
508 "method `%s' called on hidden %s object"
510 rb_id2name(mid), typestr, (
void *)recv, flags, klass);
513 "method `%s' called on unexpected %s object"
514 " (%p flags=0x%"PRIxVALUE
" klass=0x%"PRIxVALUE
")",
515 rb_id2name(mid), typestr, (
void *)recv, flags, klass);
518 "method `%s' called on broken T_???" "(0x%02x) object"
519 " (%p flags=0x%"PRIxVALUE
" klass=0x%"PRIxVALUE
")",
520 rb_id2name(mid), type, (
void *)recv, flags, klass);
540 if (oid != idMethodMissing) {
549 VALUE defined_class = klass;
552 defined_class =
RBASIC(defined_class)->klass;
589 VALUE obj,
int call_status));
632 #define NOEX_MISSING 0x80
642 format =
"undefined method `%s' for %s";
660 int last_call_status)
663 const char *format = 0;
665 if (argc == 0 || !
SYMBOL_P(argv[0])) {
672 format =
"private method `%s' called for %s";
675 format =
"protected method `%s' called for %s";
678 format =
"undefined local variable or method `%s' for %s";
682 format =
"super: no superclass method `%s' for %s";
704 if (
id == idMethodMissing) {
723 result =
rb_funcall2(obj, idMethodMissing, argc + 1, nargv);
730 VALUE obj,
int call_status)
786 for (i = 0; i < n; i++) {
787 argv[
i] = va_arg(ar,
VALUE);
852 vid = *argv++; argc--;
858 recv, ++argc, --argv);
864 return rb_call0(recv,
id, argc, argv, scope,
self);
940 for (i=0; i<n; i++) {
941 argv[
i] = va_arg(args,
VALUE);
1033 blockptr->
iseq = (
void *)node;
1041 retval = (*it_proc) (data1);
1049 if (cep == escape_ep) {
1056 while (th->
cfp != cfp) {
1058 printf(
"skipped frame: %s\n", vm_frametype_name(th->
cfp));
1077 if (cep == escape_ep) {
1164 volatile int parse_in_eval;
1165 volatile int mild_compile_error;
1177 volatile VALUE iseqval;
1179 if (scope !=
Qnil) {
1183 if (strcmp(file,
"(eval)") == 0 && bind->
path !=
Qnil) {
1190 "wrong argument type %s (expected Binding)",
1194 base_block = &env->
block;
1201 base_block = █
1202 base_block->
self =
self;
1241 if (strcmp(file,
"(eval)") == 0) {
1242 VALUE mesg, errat, bt2;
1297 VALUE src, scope, vfile, vline;
1298 const char *file =
"(eval)";
1301 rb_scan_args(argc, argv,
"13", &src, &scope, &vfile, &vline);
1306 "Insecure: can't modify trusted binding");
1496 block.
self = refinement;
1501 cref->nd_refinements = refinements;
1533 const char *file =
"(eval)";
1548 return eval_under(klass,
self, argv[0], file, line);
1707 if (tt->
tag == tag) {
1810 th->
cfp = saved_cfp;
1865 while (cfp->
ep != ep) {