On Mon, Feb 05, 2001 at 03:35:18PM -0200, Branden wrote:
> It [aliasing] means that the behaviour of $a/@a/%a is felt on $b/@b/%b, and
> vice-versa, so that they are both the same thing. In vtable terms, the
> vtable of $b/@b/%b would get copied to $a/@a/%a 

No, no, not at all. Aliasing is a feature of the symbol table.

Here's what's going on:

  Symbol Table      Data

                    PMC
      $a ---------->PMC
                    PMC
                    PMC
      $b ---------->PMC
                    PMC

When you want to do something with $a, you look up $a in the symbol table
and return its PMC, and operate on *that*. "$a" is just a name. It's not a
"thing".

In the case of aliasing:

  Symbol Table      Data

                    PMC
      $a ---------->PMC
                  / PMC
                 /  PMC
      $b -------/   PMC
                    PMC

                    
-- 
Keep the number of passes in a compiler to a minimum.
                -- D. Gries

Reply via email to