libera/#sicl - IRC Chatlog
Search
3:09:43
moon-child
so, sbcl supports ATOMIC-INCF on conses. At high safety levels, it will generate a cas loop; at low safety, it will take advantage of XADD (not checking whether the object pointed-to is actually a fixnum). Presumably the latter behaviour is not desirable for sicl. So atomic-incf
3:35:06
Bike
couldn't you do a cas loop generally, and optimize to xadd or whatnot when type inference can prove it's a fixnum
3:37:01
moon-child
I was going to say: I can't imagine there's any meaningful case where you could prove the car of some cons was a fixnum, and you would also want to do atomics on it
3:37:33
moon-child
because it would necessarily shared, so any alias analysis you might try would be nil. Would need global analyses, which I do not think sicl intends to perform
3:38:28
moon-child
but I realised you might be able to perform such an inference in one case: when the cons is only available to closures
3:42:12
Bike
also, this would also apply to more general kinds of things, like standard objects or arrays
3:46:21
moon-child
yeah, just specifically thinking of atomics as a case where hardware acceleration is more significant. Type declaration I don't think would be very helpful