summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2020-11-02 14:40:29 -0800
committerAaron Patterson <tenderlove@ruby-lang.org>2020-11-02 14:42:48 -0800
commit67b2c21c327c96d80b8a0fe02a96d417e85293e8 (patch)
treec4ea1236016fc2b7e40582a69966d35c5f8c7289 /compile.c
parent79b242260bc0530503dde85eda8e79b1c2aa9a6e (diff)
Add `GC.auto_compact= true/false` and `GC.auto_compact`
* `GC.auto_compact=`, `GC.auto_compact` can be used to control when compaction runs. Setting `auto_compact=` to true will cause compaction to occurr duing major collections. At the moment, compaction adds significant overhead to major collections, so please test first! [Feature #17176]
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/compile.c b/compile.c
index bf2c4f88a6..f6f5a1d848 100644
--- a/compile.c
+++ b/compile.c
@@ -1304,6 +1304,9 @@ new_insn_send(rb_iseq_t *iseq, int line_no, ID id, VALUE argc, const rb_iseq_t *
VALUE *operands = compile_data_calloc2(iseq, sizeof(VALUE), 2);
operands[0] = (VALUE)new_callinfo(iseq, id, FIX2INT(argc), FIX2INT(flag), keywords, blockiseq != NULL);
operands[1] = (VALUE)blockiseq;
+ if (blockiseq) {
+ RB_OBJ_WRITTEN(iseq, Qundef, blockiseq);
+ }
return new_insn_core(iseq, line_no, BIN(send), 2, operands);
}