pattern-lookup was not taking care of repeated pattern variables
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Mon, 17 Feb 1992 21:20:57 +0000 (21:20 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Mon, 17 Feb 1992 21:20:57 +0000 (21:20 +0000)
commit37065df6243a4208f44b8f54d89269423744f40d
tree94ea08801540d50aaf2cf95c4b29c6983befc55a
parentce34702d936265f7aa626fc5bf933ef0cceae527
pattern-lookup was not taking care of repeated pattern variables
correctly.  It was looking for the pattern in the list of values!
Patched for now to assume that sharing is rare, and thus extra
work is done then.

To do handle this Correctly, pattern-variables should be modified to
replace each occurrence of a pattern variable with a pattern-variable
+ position, where position is false if this is the first occurrence of
the pattern variable or the index for list-ref of the previous value
if not.  This avoids the runtime memq, etc.
v7/src/compiler/base/pmlook.scm