irep.h: rename mrb_pool_value to mrb_irep_pool

mrb_pool_value is a structure that represents a value in the irep
literal pool and is unrelated to mrb_pool, which performs region-based
memory management. It has been renamed mrb_irep_pool to avoid confusion.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2024-10-28 17:25:40 +09:00
parent 2436b32f1f
commit 62ef5db13e
5 changed files with 51 additions and 51 deletions
+2 -2
View File
@@ -21,7 +21,7 @@
#endif
static int
cdump_pool(mrb_state *mrb, const mrb_pool_value *p, FILE *fp)
cdump_pool(mrb_state *mrb, const mrb_irep_pool *p, FILE *fp)
{
if (p->tt & IREP_TT_NFLAG) { /* number */
switch (p->tt) {
@@ -352,7 +352,7 @@ cdump_irep_struct(mrb_state *mrb, const mrb_irep *irep, uint8_t flags, FILE *fp,
/* dump pool */
if (irep->pool) {
len=irep->plen;
fprintf(fp, "static const mrb_pool_value %s_pool_%d[%d] = {\n", name, n, len);
fprintf(fp, "static const mrb_irep_pool %s_pool_%d[%d] = {\n", name, n, len);
for (i=0; i<len; i++) {
if (cdump_pool(mrb, &irep->pool[i], fp) != MRB_DUMP_OK)
return MRB_DUMP_INVALID_ARGUMENT;
+2 -2
View File
@@ -67,7 +67,7 @@ read_irep_record_1(mrb_state *mrb, const uint8_t *bin, const uint8_t *end, size_
ptrdiff_t diff;
uint16_t tt, pool_data_len, snl;
int plen;
mrb_pool_value *pool;
mrb_irep_pool *pool;
mrb_sym *syms;
int ai = mrb_gc_arena_save(mrb);
mrb_irep *irep = mrb_add_irep(mrb);
@@ -124,7 +124,7 @@ read_irep_record_1(mrb_state *mrb, const uint8_t *bin, const uint8_t *end, size_
if (SIZE_ERROR_MUL(plen, sizeof(mrb_value))) {
return FALSE;
}
irep->pool = pool = (mrb_pool_value*)mrb_calloc(mrb, sizeof(mrb_pool_value), plen);
irep->pool = pool = (mrb_irep_pool*)mrb_calloc(mrb, sizeof(mrb_irep_pool), plen);
for (i = 0; i < plen; i++) {
mrb_bool st = (flags & FLAG_SRC_MALLOC)==0;