estates: reuse same estate for extra_undefined()
commitca4ce5f91feee37d07c87b0c3febd794444b89a9
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 26 May 2012 15:32:39 +0000 (26 18:32 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Sat, 26 May 2012 15:41:11 +0000 (26 18:41 +0300)
tree604cbc2c098a832736b50386fb0226679facaa79
parent89b05a8062e6ba62cd18160b97bebb1d7de54b2d
estates: reuse same estate for extra_undefined()

Using the same state here save a little memory.  It lets us merge two
undefined states and get the same state as a result so that simplifies
the debugging output a bit and makes the ->possible list shorter.

The problem is when the estate_undefined, has a related list then we need
to make a copy of that.  So I had to introduce set_related() to handle
that.

It's not a perfect situation.  Really I would prefer to reuse estates as
much as possible.  So this is only a step in that direction.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_constraints.c
smatch_estate.c
smatch_extra.c
smatch_extra.h