aboutsummaryrefslogtreecommitdiffstats
path: root/iseq.c
diff options
context:
space:
mode:
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/iseq.c b/iseq.c
index 0ca697ceb8..3cfb7602d0 100644
--- a/iseq.c
+++ b/iseq.c
@@ -12,6 +12,7 @@
#include "internal.h"
#include "ruby/util.h"
#include "eval_intern.h"
+#include "builtin.h"
#ifdef HAVE_DLADDR
# include <dlfcn.h>
@@ -559,6 +560,8 @@ prepare_iseq_build(rb_iseq_t *iseq,
ISEQ_COMPILE_DATA(iseq)->ivar_cache_table = NULL;
+ ISEQ_COMPILE_DATA(iseq)->builtin_function_table = GET_VM()->builtin_function_table;
+
if (option->coverage_enabled) {
VALUE coverages = rb_get_coverages();
if (RTEST(coverages)) {
@@ -1968,6 +1971,14 @@ rb_insn_operand_intern(const rb_iseq_t *iseq,
}
break;
+ case TS_BUILTIN:
+ {
+ const struct rb_builtin_function *bf = (const struct rb_builtin_function *)op;
+ ret = rb_sprintf("<builtin!%s/%d>",
+ bf->name, bf->argc);
+ }
+ break;
+
default:
rb_bug("unknown operand type: %c", type);
}