ADD_PCs moved. That didn't change vast majority of event hooks
because vm_traece() has been placed before ADD_PC. However for GC
events the situation is different. We have to take care.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
shyouhei 2018-01-26 06:30:59 +00:00
Родитель 3234245ae3
Коммит 6b61e99e08
1 изменённых файлов: 3 добавлений и 0 удалений

3
gc.c
Просмотреть файл

@ -1819,7 +1819,10 @@ rb_objspace_set_event_hook(const rb_event_flag_t event)
static void
gc_event_hook_body(rb_execution_context_t *ec, rb_objspace_t *objspace, const rb_event_flag_t event, VALUE data)
{
/* increment PC because source line is calculated with PC-1 */
ec->cfp->pc++;
EXEC_EVENT_HOOK(ec, event, ec->cfp->self, 0, 0, 0, data);
ec->cfp->pc--;
}
#define gc_event_hook_available_p(objspace) ((objspace)->flags.has_hook)