зеркало из https://github.com/github/ruby.git
Set a write barrier between iseq and mark objects
ISeq pins references in the mark array during compile, so it manually marks references in the mark_ary. This was causing write barrier misses, so we need to add a write barrier when pushing on the mark array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
e553d94f01
Коммит
d099eabbb7
|
@ -574,6 +574,7 @@ static int
|
|||
iseq_add_mark_object_compile_time(const rb_iseq_t *iseq, VALUE v)
|
||||
{
|
||||
if (!SPECIAL_CONST_P(v)) {
|
||||
rb_gc_writebarrier(iseq, v);
|
||||
rb_ary_push(ISEQ_COMPILE_DATA(iseq)->mark_ary, v);
|
||||
}
|
||||
return COMPILE_OK;
|
||||
|
@ -583,6 +584,7 @@ static inline VALUE
|
|||
freeze_literal(rb_iseq_t *iseq, VALUE lit)
|
||||
{
|
||||
lit = rb_fstring(lit);
|
||||
rb_gc_writebarrier(iseq, lit);
|
||||
rb_ary_push(ISEQ_COMPILE_DATA(iseq)->mark_ary, lit);
|
||||
return lit;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче