From: Chip Salzenberg <[EMAIL PROTECTED]>
   Date: Tue, 29 Nov 2005 12:27:03 -0800

   On Tue, Nov 29, 2005 at 12:14:24PM -0800, Brent 'Dax' Royal-Gordon wrote:
   > Chip Salzenberg <[EMAIL PROTECTED]> wrote:
   > >    P0 := P1      # aliasing:   P0 and P1 point to same PMC
   > >    P0 := opcode  # aliasing:   P0 points to PMC returned by opcode
   > >    P0 = ...      # assignment: modifies P0, NO MATTER WHAT '...' IS
   > >
   > >    S0 := S1      # aliasing:   S0 and S1 point to same header
   > >    S0 := opcode  # aliasing:   S0 points to header returned by opcode
   > >    S0 = ...      # assignment: modifies S0, NO MATTER WHAT '...' IS
   > >
   > >    I0 := ...     # ILLEGAL
   > >    I0 = ...      # assignment: modifies I0
   > >
   > >    N0 := ...     # ILLEGAL
   > >    N0 = ...      # assignment: modifies N0
   > 
   > I'm not sure about the last two (in a lot of ways, they're more like
   > := than = ),

   I don't see that.  The key semantic behind := is alias creation.  After

      I0 = I1   # both old and new syntax

   is I0 an alias for I1?  No.  Does modifying I0 modify I1?  No.
   Therefore, that's an '=', not a ':='.

So "aliasing" copies the pointer (i.e. the object itself), and
"assignment" copies the value?  Personally, I think of "object" and
"value" for numbers as being the same thing, so I would argue that both
"=" and ":=" should be legal for N and I registers; they just happen to
mean the same.  I also think it would be easier for compilers to choose
to emit either syntax.  FWIW.

                                        -- Bob Rogers
                                           http://rgrjr.dyndns.org/

Reply via email to