variable.c (const_get): avoid mrb_funcall if possible

Directly call mrb_const_missing() if const_missing is not overridden.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2023-06-12 23:47:35 +09:00
parent 89f7bb1056
commit 17720c9b7b
3 changed files with 19 additions and 8 deletions
+2
View File
@@ -23,6 +23,8 @@ mrb_value mrb_mod_to_s(mrb_state *, mrb_value);
void mrb_method_added(mrb_state *mrb, struct RClass *c, mrb_sym mid);
mrb_noreturn void mrb_method_missing(mrb_state *mrb, mrb_sym name, mrb_value self, mrb_value args);
mrb_method_t mrb_vm_find_method(mrb_state *mrb, struct RClass *c, struct RClass **cp, mrb_sym mid);
mrb_value mrb_mod_const_missing(mrb_state *mrb, mrb_value mod);
mrb_value mrb_const_missing(mrb_state *mrb, mrb_value mod, mrb_sym sym);
#endif
/* debug */