def pointers_become_one_way(self, space, from_w, to_w): W_AbstractObjectWithIdentityHash.pointers_become_one_way(self, space, from_w, to_w) idx = -1 try: idx = from_w.index(self.compiledin_class) except ValueError: pass if idx >= 0: compiledin_class = self.compiledin_class new_w_class = to_w[idx] assert isinstance(new_w_class, W_PointersObject) self.compiledin_class = new_w_class compiledin_class.post_become_one_way(new_w_class) new_w_class.as_class_get_shadow(space).flush_method_caches() compiledin_class.as_class_get_shadow(space).flush_method_caches() idx = -1 try: idx = from_w.index(self.lookup_class) except ValueError: pass if idx >= 0: lookup_class = self.lookup_class new_w_class = to_w[idx] assert isinstance(new_w_class, W_PointersObject) self.lookup_class = new_w_class lookup_class.post_become_one_way(new_w_class) new_w_class.as_class_get_shadow(space).flush_method_caches() lookup_class.as_class_get_shadow(space).flush_method_caches()
def pointers_become_one_way(self, space, from_w, to_w): W_AbstractObjectWithIdentityHash.pointers_become_one_way(self, space, from_w, to_w) ptrs = self.fetch_all(space) ptridx = 0 for i, w_from in enumerate(from_w): try: ptridx = ptrs.index(w_from) except ValueError: continue w_to = to_w[i] ptrs[ptridx] = w_to w_from.post_become_one_way(w_to) self.store_all(space, ptrs)
def pointers_become_one_way(self, space, from_w, to_w): W_AbstractObjectWithIdentityHash.pointers_become_one_way(self, space, from_w, to_w) ptrs = self.fetch_all(space) ptridx = 0 for i, w_from in enumerate(from_w): try: ptridx = ptrs.index(w_from) except ValueError: continue w_to = to_w[i] ptrs[ptridx] = w_to w_from.post_become_one_way(w_to) self.store_all(space, ptrs)