Improve ATOMIC-POP in a few ways
commite34456da060d7972551b5868fe4db5a285a3091b
authorDouglas Katzman <dougk@google.com>
Fri, 14 Jul 2017 12:19:53 +0000 (14 08:19 -0400)
committerDouglas Katzman <dougk@google.com>
Fri, 14 Jul 2017 12:24:03 +0000 (14 08:24 -0400)
tree34711aa40915a416fea52ed7e2ebb38d5e5a609d
parent75c413d22ccbcc04acded0d60efa80e6579db768
Improve ATOMIC-POP in a few ways

(1) Don't reload from place on a failed CAS; use the CAS result.
It appears that the previous code tried to do this, but the author
mistook the behavior of "LOOP FOR" for "LOOP WITH".

(2) Elide the final LISTP test. The cell whose CDR was stored back
into place already satisfied LISTP. CAR doesn't need another test.

(3) The simple form of LOOP generates significantly better code here,
including elision of some moves and a useless initialization.
src/code/late-cas.lisp