3 ms·
It could also be interpreted as atomic { tmp = x + 1 } atomic { x = tmp } atomic { tmp = y - 1 } atomic { y = tmp } In fact I would expect thi
by quietbritishjim 5y ago
It could also be interpreted as
atomic { tmp = x + 1 }
atomic { x = tmp }
atomic { tmp = y - 1 }
atomic { y = tmp }
In fact I would expect this is the most likely possibility, at least for user defined objects.
- michaelrpeskin 5y agoI haven’t looked at the source, but I’ve written similar interpreters and I’d be willing to bet its atomic tmp=x atomic tmp+=1 atomic x=tmp atomic tmp=y atomic tmp-=1 atomic y=tmp