[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GC crashes
From: |
Kenichi Handa |
Subject: |
Re: GC crashes |
Date: |
Mon, 8 Dec 2003 15:05:01 +0900 (JST) |
User-agent: |
SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) |
In article <jwvptezopsx.fsf-monnier+emacs/address@hidden>, Stefan Monnier
<address@hidden> writes:
> You said that the value associated with each key is always
> an integer, right? In that case, the value is always
> survive_gc_p, so it will never cause the key&value pair to
> be removed,
??? See this code of sweep_weak_table (in fns.c).
for (idx = HASH_INDEX (h, bucket); !GC_NILP (idx); idx = next)
{
int i = XFASTINT (idx);
int key_known_to_survive_p = survives_gc_p (HASH_KEY (h, i));
int value_known_to_survive_p = survives_gc_p (HASH_VALUE (h, i));
int remove_p;
if (EQ (h->weak, Qkey))
remove_p = !key_known_to_survive_p;
else if (EQ (h->weak, Qvalue))
remove_p = !value_known_to_survive_p;
else if (EQ (h->weak, Qkey_or_value))
remove_p = !(key_known_to_survive_p || value_known_to_survive_p);
else if (EQ (h->weak, Qkey_and_value))
remove_p = !(key_known_to_survive_p && value_known_to_survive_p);
else
abort ();
If h->weak is Qkey, it sets remove_p only by checking
key_known_to_survive_p. So, it seems that wether the value
survives GC or not doesn't matter in this case.
---
Ken'ichi HANDA
address@hidden
- Re: GC crashes, (continued)
- Re: GC crashes, Kenichi Handa, 2003/12/03
- Re: GC crashes, Stefan Monnier, 2003/12/03
- Re: GC crashes, Stefan Monnier, 2003/12/03
- Re: GC crashes, Kenichi Handa, 2003/12/03
- Re: GC crashes, Kenichi Handa, 2003/12/03
- Re: GC crashes, Stefan Monnier, 2003/12/04
- Re: GC crashes, Kenichi Handa, 2003/12/07
- Re: GC crashes, Stefan Monnier, 2003/12/07
- Re: GC crashes, Kenichi Handa, 2003/12/08
- Re: GC crashes, Stefan Monnier, 2003/12/08
- Re: GC crashes,
Kenichi Handa <=
- Re: GC crashes, Stefan Monnier, 2003/12/08
- Re: GC crashes, Kenichi Handa, 2003/12/08
Re: GC crashes, Eli Zaretskii, 2003/12/02