summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compile.c6
-rw-r--r--iseq.c10
-rw-r--r--prism_compile.c8
3 files changed, 12 insertions, 12 deletions
diff --git a/compile.c b/compile.c
index a097c29a0e..b806ced731 100644
--- a/compile.c
+++ b/compile.c
@@ -968,10 +968,10 @@ rb_iseq_compile_node(rb_iseq_t *iseq, const NODE *node)
return iseq_setup(iseq, ret);
}
-static VALUE rb_translate_prism(rb_iseq_t *iseq, const pm_scope_node_t node, LINK_ANCHOR *const ret);
+static VALUE rb_translate_prism(rb_iseq_t *iseq, const pm_scope_node_t *scope_node, LINK_ANCHOR *const ret);
VALUE
-rb_iseq_compile_prism_node(rb_iseq_t * iseq, pm_scope_node_t scope_node, pm_parser_t *parser)
+rb_iseq_compile_prism_node(rb_iseq_t * iseq, pm_scope_node_t *scope_node, pm_parser_t *parser)
{
DECL_ANCHOR(ret);
INIT_ANCHOR(ret);
@@ -984,7 +984,7 @@ rb_iseq_compile_prism_node(rb_iseq_t * iseq, pm_scope_node_t scope_node, pm_pars
constants[index] = rb_intern3((const char *) constant->start, constant->length, encoding);
}
- scope_node.constants = (void *)constants;
+ scope_node->constants = (void *)constants;
CHECK(rb_translate_prism(iseq, scope_node, ret));
free(constants);
diff --git a/iseq.c b/iseq.c
index 1513f0c2d4..10cddcf57a 100644
--- a/iseq.c
+++ b/iseq.c
@@ -941,10 +941,10 @@ rb_iseq_new_with_opt(const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE rea
return iseq_translate(iseq);
}
-VALUE rb_iseq_compile_prism_node(rb_iseq_t * iseq, pm_scope_node_t scope_node, pm_parser_t *parser);
+VALUE rb_iseq_compile_prism_node(rb_iseq_t * iseq, pm_scope_node_t *scope_node, pm_parser_t *parser);
rb_iseq_t *
-pm_iseq_new_with_opt(pm_scope_node_t scope_node, pm_parser_t *parser, VALUE name, VALUE path, VALUE realpath,
+pm_iseq_new_with_opt(pm_scope_node_t *scope_node, pm_parser_t *parser, VALUE name, VALUE path, VALUE realpath,
int first_lineno, const rb_iseq_t *parent, int isolated_depth,
enum rb_iseq_type type, const rb_compile_option_t *option)
{
@@ -954,8 +954,8 @@ pm_iseq_new_with_opt(pm_scope_node_t scope_node, pm_parser_t *parser, VALUE name
if (!option) option = &COMPILE_OPTION_DEFAULT;
- pm_line_column_t start_line_col = pm_newline_list_line_column(&parser->newline_list, scope_node.base.location.start);
- pm_line_column_t end_line_col = pm_newline_list_line_column(&parser->newline_list, scope_node.base.location.end);
+ pm_line_column_t start_line_col = pm_newline_list_line_column(&parser->newline_list, scope_node->base.location.start);
+ pm_line_column_t end_line_col = pm_newline_list_line_column(&parser->newline_list, scope_node->base.location.end);
code_loc = (rb_code_location_t) {
.beg_pos = {
@@ -1446,7 +1446,7 @@ iseqw_s_compile_prism(int argc, VALUE *argv, VALUE self)
pm_scope_node_t scope_node;
pm_scope_node_init(node, &scope_node, NULL, &parser);
- rb_iseq_compile_prism_node(iseq, scope_node, &parser);
+ rb_iseq_compile_prism_node(iseq, &scope_node, &parser);
finish_iseq_build(iseq);
pm_node_destroy(&parser, node);
diff --git a/prism_compile.c b/prism_compile.c
index b5c3f72042..a145218b48 100644
--- a/prism_compile.c
+++ b/prism_compile.c
@@ -34,7 +34,7 @@
if (!popped) ADD_INSN(ret, &dummy_line_node, putnil);
rb_iseq_t *
-pm_iseq_new_with_opt(pm_scope_node_t node, pm_parser_t *parser, VALUE name, VALUE path, VALUE realpath,
+pm_iseq_new_with_opt(pm_scope_node_t *scope_node, pm_parser_t *parser, VALUE name, VALUE path, VALUE realpath,
int first_lineno, const rb_iseq_t *parent, int isolated_depth,
enum rb_iseq_type type, const rb_compile_option_t *option);
@@ -579,7 +579,7 @@ pm_new_child_iseq(rb_iseq_t *iseq, pm_scope_node_t node, pm_parser_t *parser,
{
debugs("[new_child_iseq]> ---------------------------------------\n");
int isolated_depth = ISEQ_COMPILE_DATA(iseq)->isolated_depth;
- rb_iseq_t * ret_iseq = pm_iseq_new_with_opt(node, parser, name,
+ rb_iseq_t * ret_iseq = pm_iseq_new_with_opt(&node, parser, name,
rb_iseq_path(iseq), rb_iseq_realpath(iseq),
line_no, parent,
isolated_depth ? isolated_depth + 1 : 0,
@@ -2530,11 +2530,11 @@ pm_compile_node(rb_iseq_t *iseq, const pm_node_t *node, LINK_ANCHOR *const ret,
}
static VALUE
-rb_translate_prism(rb_iseq_t *iseq, const pm_scope_node_t scope_node, LINK_ANCHOR *const ret)
+rb_translate_prism(rb_iseq_t *iseq, const pm_scope_node_t *scope_node, LINK_ANCHOR *const ret)
{
RUBY_ASSERT(ISEQ_COMPILE_DATA(iseq));
- pm_compile_node(iseq, (pm_node_t *)&scope_node, ret, scope_node.base.location.start, false, (pm_scope_node_t *)&scope_node);
+ pm_compile_node(iseq, (pm_node_t *)scope_node, ret, scope_node->base.location.start, false, (pm_scope_node_t *)scope_node);
iseq_set_sequence(iseq, ret);
return Qnil;
}