Togos <[EMAIL PROTECTED]> wrote:

>> 1) Have a version of the binary vtable
>>    methods that create the destination PMC

> Well, as I was saying last summer, #1 is really what
> the add instruction should have done in the first
> place, as that would make it behave the same way as it
> does for ints and floats (replacing the value, not
> altering the current one), and it is what most high
> level languages expect, anyway.

What about:

   a = global "$a"      # or fetch a lexcical or ...
   a = b + c

All PMCs living in aggregates have reference semantics. When the LHS is
a lexical, global, property, array member, or hash member, the current
opcodes (and vtables) do the rigth thing.

If a temp is needed the HLL compiler emits the code for creating a temp:

  $P4711 = new PerlUndef   # or PyScalar or ...

Having two sets of opcodes and vtables doesn't help the HLL compiler. It
has to select to correct opcode anyway. Two sets of opcodes and vtables
just increase opcode and vtable count up to an insane number.

leo

Reply via email to