Release ALLOCV buffer

Release `ALLOCV` buffers promptly when they are no longer needed.
This commit is contained in:
Nobuyoshi Nakada authored and Nobuyoshi Nakada committed 2026-10-02 15:03:17 +09:00
1 parent fccc81a3e6
commit 6c92d5b781
3 files changed
+7 -2
Notes: git 2026-10-02 06:03:52 +00:00

No files matched your search

+1
View File
@@ -13732,6 +13732,7 @@ ibf_dump_outer_variables(struct ibf_dump *dump, const rb_iseq_t *iseq)
ibf_dump_write_small_value(dump, ibf_dump_id(dump, id));
ibf_dump_write_small_value(dump, val);
}
ALLOCV_END(buff);
}
return offset;
+3
View File
@@ -6941,6 +6941,9 @@ pm_compile_scope_node(rb_iseq_t *iseq, pm_scope_node_t *scope_node, const pm_nod
keyword->table = (ID *)&ISEQ_BODY(iseq)->local_table[keyword_start_index];
}
local_table_for_iseq = NULL;
if (idtmp) ALLOCV_END(idtmp);
//********STEP 5************
// Goal: compile anything that needed to be compiled
if (optionals_list && optionals_list->size) {
+3 -2
View File
@@ -4093,8 +4093,6 @@ rb_str_append_as_bytes(int argc, VALUE *argv, VALUE str)
break;
}
RB_GC_GUARD(t0);
clear_cr:
// If no fast path was hit, we clear the coderange.
// append_as_bytes is predominantly meant to be used in
@@ -4104,6 +4102,7 @@ rb_str_append_as_bytes(int argc, VALUE *argv, VALUE str)
// situations.
ENC_CODERANGE_CLEAR(str);
keep_cr:
ALLOCV_END(t0);
return str;
}
@@ -9950,6 +9949,8 @@ tr_trans_pairs(VALUE str, VALUE pairs_val)
}
}
ALLOCV_END(pairs_handle);
if (!modify) {
return Qnil;
}