YJIT: Shrink version lists after mutation (#6749)

This commit is contained in:
Takashi Kokubun 2022-11-16 16:30:39 -08:00 committed by GitHub
parent 3259aceb35
commit a777ec0d85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
Notes: git 2022-11-17 00:31:06 +00:00
Merged-By: k0kubun <takashikkbn@gmail.com>

View File

@ -878,6 +878,7 @@ fn add_block_version(blockref: &BlockRef, cb: &CodeBlock) {
let version_list = get_or_create_version_list(block.blockid);
version_list.push(blockref.clone());
version_list.shrink_to_fit();
// By writing the new block to the iseq, the iseq now
// contains new references to Ruby objects. Run write barriers.