From 6dba0b4836e192906c63773527861ddf9de1d679 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 4 Oct 2011 15:41:33 -0700 Subject: * lib.c (acons): New function. (set_diff): Optimize common case: list1 and list2 are the same, or list2 is substructure of list1. Situations in which this won't be the case for variable bindings are rare. * lib.h (acons): Declared. * match.c (match_line): Use acons rather than acons_new, when binding variables that we know are new (the symbol is unbound). When computing the set difference over bindings, use cons cell equality, rather than symbol equality. Symbol equality is wrong because a binding can be removed, and then a new binding can be introduced using the same symbol. This must be treated as a different binding. --- ChangeLog | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 553f3b26..69f49eb2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2011-10-04 Kaz Kylheku + + * lib.c (acons): New function. + (set_diff): Optimize common case: list1 and list2 + are the same, or list2 is substructure of list1. + Situations in which this won't be the case for variable bindings are + rare. + + * lib.h (acons): Declared. + + * match.c (match_line): Use acons rather than acons_new, when binding + variables that we know are new (the symbol is unbound). + When computing the set difference over bindings, use cons cell + equality, rather than symbol equality. Symbol equality is wrong + because a binding can be removed, and then a new binding can be + introduced using the same symbol. This must be treated as + a different binding. + 2011-10-04 Kaz Kylheku Bugfixes to the semantics of binding environments, which -- cgit v1.2.3