ruby-changes:56735
From: Aaron <ko1@a...>
Date: Thu, 1 Aug 2019 01:43:20 +0900 (JST)
Subject: [ruby-changes:56735] Aaron Patterson: e352445863 (master): Let prev EP move
https://git.ruby-lang.org/ruby.git/commit/?id=e352445863 From e352445863588b90f7af6cdf6c1b6dc432ee33ab Mon Sep 17 00:00:00 2001 From: Aaron Patterson <tenderlove@r...> Date: Tue, 2 Jul 2019 11:02:11 +0100 Subject: Let prev EP move This commit allows the previos EP pointer to move, then updates its location diff --git a/gc.c b/gc.c index 1b0f13e..bfa5c18 100644 --- a/gc.c +++ b/gc.c @@ -5006,7 +5006,7 @@ gc_mark_imemo(rb_objspace_t *objspace, VALUE obj) https://github.com/ruby/ruby/blob/trunk/gc.c#L5006 GC_ASSERT(VM_ENV_ESCAPED_P(env->ep)); gc_mark_values(objspace, (long)env->env_size, env->env); VM_ENV_FLAGS_SET(env->ep, VM_ENV_FLAG_WB_REQUIRED); - gc_mark_and_pin(objspace, (VALUE)rb_vm_env_prev_env(env)); + gc_mark(objspace, (VALUE)rb_vm_env_prev_env(env)); gc_mark(objspace, (VALUE)env->iseq); } return; @@ -7845,10 +7845,12 @@ gc_ref_update_imemo(rb_objspace_t *objspace, VALUE obj) https://github.com/ruby/ruby/blob/trunk/gc.c#L7845 { rb_env_t *env = (rb_env_t *)obj; TYPED_UPDATE_IF_MOVED(objspace, rb_iseq_t *, env->iseq); + if (gc_object_moved_p(objspace, VM_ENV_ENVVAL(env->ep))) { + VM_STACK_ENV_WRITE(env->ep, VM_ENV_DATA_INDEX_ENV, rb_gc_location(VM_ENV_ENVVAL(env->ep))); + } gc_update_values(objspace, (long)env->env_size, (VALUE *)env->env); } break; - break; case imemo_cref: UPDATE_IF_MOVED(objspace, RANY(obj)->as.imemo.cref.klass); TYPED_UPDATE_IF_MOVED(objspace, struct rb_cref_struct *, RANY(obj)->as.imemo.cref.next); -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/