[PRISM] ScopeNode doesn't need void * anymore
This commit is contained in:
parent
8f71a5c530
commit
b5f6e2a7c4
@ -984,7 +984,7 @@ rb_iseq_compile_prism_node(rb_iseq_t * iseq, pm_scope_node_t *scope_node, pm_par
|
|||||||
constants[index] = rb_intern3((const char *) constant->start, constant->length, encoding);
|
constants[index] = rb_intern3((const char *) constant->start, constant->length, encoding);
|
||||||
}
|
}
|
||||||
|
|
||||||
scope_node->constants = (void *)constants;
|
scope_node->constants = constants;
|
||||||
|
|
||||||
CHECK(rb_translate_prism(iseq, scope_node, ret));
|
CHECK(rb_translate_prism(iseq, scope_node, ret));
|
||||||
free(constants);
|
free(constants);
|
||||||
|
@ -2467,7 +2467,7 @@ pm_compile_node(rb_iseq_t *iseq, const pm_node_t *node, LINK_ANCHOR *const ret,
|
|||||||
st_insert(index_lookup_table, constant_id, i);
|
st_insert(index_lookup_table, constant_id, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
scope_node->index_lookup_table = (void *)index_lookup_table;
|
scope_node->index_lookup_table = index_lookup_table;
|
||||||
|
|
||||||
ISEQ_BODY(iseq)->param.lead_num = (int)requireds_list.size;
|
ISEQ_BODY(iseq)->param.lead_num = (int)requireds_list.size;
|
||||||
ISEQ_BODY(iseq)->param.opt_num = (int)optionals_list.size;
|
ISEQ_BODY(iseq)->param.opt_num = (int)optionals_list.size;
|
||||||
|
@ -11,10 +11,8 @@ typedef struct pm_scope_node {
|
|||||||
pm_constant_id_list_t locals;
|
pm_constant_id_list_t locals;
|
||||||
pm_parser_t *parser;
|
pm_parser_t *parser;
|
||||||
|
|
||||||
// We don't have the CRuby types ID and st_table within Prism
|
ID *constants;
|
||||||
// so we use void *
|
st_table *index_lookup_table;
|
||||||
void *constants; // ID *constants
|
|
||||||
void *index_lookup_table; // st_table *index_lookup_table
|
|
||||||
} pm_scope_node_t;
|
} pm_scope_node_t;
|
||||||
|
|
||||||
void pm_scope_node_init(const pm_node_t *node, pm_scope_node_t *scope, pm_scope_node_t *previous, pm_parser_t *parser);
|
void pm_scope_node_init(const pm_node_t *node, pm_scope_node_t *scope, pm_scope_node_t *previous, pm_parser_t *parser);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user