ruby-changes:61620
From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Tue, 9 Jun 2020 09:53:20 +0900 (JST)
Subject: [ruby-changes:61620] ffe58b9c8b (master): vm_ccs_push: do not cache non-heap entries
https://git.ruby-lang.org/ruby.git/commit/?id=ffe58b9c8b From ffe58b9c8bde9fa95e91a458e334b375a37ef974 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= <shyouhei@r...> Date: Fri, 5 Jun 2020 15:55:05 +0900 Subject: vm_ccs_push: do not cache non-heap entries Entires not GC-able must be considered to be volatile. Not eligible for later use. diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 15ccf23..11e03f8 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -1473,6 +1473,13 @@ vm_ccs_create(VALUE klass, const rb_callable_method_entry_t *cme) https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L1473 static void vm_ccs_push(VALUE klass, struct rb_class_cc_entries *ccs, const struct rb_callinfo *ci, const struct rb_callcache *cc) { + if (! vm_cc_markable(cc)) { + return; + } + else if (! vm_ci_markable(ci)) { + return; + } + if (UNLIKELY(ccs->len == ccs->capa)) { const int nsize = ccs->capa * 2; struct rb_class_cc_entries_entry *nents = ALLOC_N(struct rb_class_cc_entries_entry, nsize); -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/