summaryrefslogtreecommitdiff
path: root/yjit
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2022-11-16 16:30:39 -0800
committerGitHub <noreply@github.com>2022-11-16 16:30:39 -0800
commita777ec0d85f1d52ddf531931c7457a65961f0082 (patch)
tree5fce934b0b0ccba22d12f347231b1aefc674e4dc /yjit
parent3259aceb3514892450664828b39a78cc95a412fa (diff)
YJIT: Shrink version lists after mutation (#6749)
Notes
Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
Diffstat (limited to 'yjit')
-rw-r--r--yjit/src/core.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/yjit/src/core.rs b/yjit/src/core.rs
index ad74067ea0..78b4cbdb0c 100644
--- a/yjit/src/core.rs
+++ b/yjit/src/core.rs
@@ -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.