summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-08-26 14:25:53 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-08-27 15:52:26 +0900
commitb8fd2e83e7b18fe3c70fc342388b1cb054b22e42 (patch)
treeede1f096b9a970a831f036323915b1b76f40aa17 /iseq.c
parent7329b3339adab12092056bd8159513645d4f9e8a (diff)
decouple compile.c usage of imemo_ifunc
After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is dangerous and should be extinct. This commit deletes ANYARGS from struct vm_ifunc, but in doing so we also have to decouple the usage of this struct in compile.c, which (I think) is an abuse of ANYARGS.
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/iseq.c b/iseq.c
index 86ef5cd498..9154001dc9 100644
--- a/iseq.c
+++ b/iseq.c
@@ -809,9 +809,11 @@ rb_iseq_new_with_opt(const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE rea
}
rb_iseq_t *
-rb_iseq_new_ifunc(const struct vm_ifunc *ifunc, VALUE name, VALUE path, VALUE realpath,
- VALUE first_lineno, const rb_iseq_t *parent,
- enum iseq_type type, const rb_compile_option_t *option)
+rb_iseq_new_with_callback(
+ const struct rb_iseq_new_with_callback_callback_func * ifunc,
+ VALUE name, VALUE path, VALUE realpath,
+ VALUE first_lineno, const rb_iseq_t *parent,
+ enum iseq_type type, const rb_compile_option_t *option)
{
/* TODO: argument check */
rb_iseq_t *iseq = iseq_alloc();
@@ -819,7 +821,7 @@ rb_iseq_new_ifunc(const struct vm_ifunc *ifunc, VALUE name, VALUE path, VALUE re
if (!option) option = &COMPILE_OPTION_DEFAULT;
prepare_iseq_build(iseq, name, path, realpath, first_lineno, NULL, -1, parent, type, option);
- rb_iseq_compile_ifunc(iseq, ifunc);
+ rb_iseq_compile_callback(iseq, ifunc);
finish_iseq_build(iseq);
return iseq_translate(iseq);