[Pharo-project] [squeak-dev] Re: How about atomic value-swap bytecode?
siguctua at gmail.com
Thu Oct 14 10:13:01 EDT 2010
On 14 October 2010 16:36, Ralph Boland <rpboland at gmail.com> wrote:
>> I don't get the "dependency from scheduling nuances part", but here's my
>> Add the compiler changes to support :=: as atomic swap. We don't really
>> need a bytecode for now, since a sequence of assignments is currently
>> atomic. So the compiler could compile :=: as three assignments using a
>> hidden temporary variable. On other systems, :=: can be compiled
> What does:
> a :=: b :=: c.
If we define that a result of expression
(x :=: y)
is a value of right operand, then expression like:
a :=: b :=: c.
will be parsed as:
a :=: *err* ( b :=: c )
and you'll get an error 'lvalue expression expected' at *err*.
> Perhaps anybody who does this should be shot but it must be
> well defined in the language (or at least defined as a syntax error)
> and of course the compiler must know what to do.
> How about it meaning:
> | tmp "hidden" |
> tmp := a.
> a := b.
> b := c.
> c := tmp. ?
> And if supported in the VM it should of course be atomic.
> Ralph Boland
> P.S. What does
> a := b :=: c.
it will mean same as:
a:= (b :=: c)
> Pharo-project mailing list
> Pharo-project at lists.gforge.inria.fr
Igor Stasenko AKA sig.
More information about the Pharo-dev