Hi Sebastiàn,

2015-10-12 13:53 GMT+02:00 Sebastián Krynski <[email protected]>:

> Hello my name is Sebastián Krynski from Buenos Aires, Argentina.
> Just writing to let you know that I'm starting to work on adding an atomic
> swap operator in Pharo , guaranteed not to be interrupted by the VM. The
> operator will be used this way:
>
> a :=: b
>
> meaning 'swap variable a with variable b'.
>

Why a cryptic, special syntax? The compiler could inline an explicit
message send which would make the intent clear.

a atomicSwapWith: b.

Well, anyway, the compiler has to do something special there.

Could we have something like...

[ | temp |
  temp := a.
  a := b.
  b := a ] atomic

? Would a compiler be able to merge that in a swap instruction? And make
another type of processing for a different code inside the block?


> In order to do this I will be modifying the VM and the Compiler .
>
> Good luck. This is an important step.


> I'm working under the direction of INRIA and Gabriela Arévalo.
>

Welcome!

Thierry

Reply via email to