Dan Sugalski <[EMAIL PROTECTED]> wrote:
> At 5:35 PM +0200 4/16/04, Leopold Toetsch wrote:
>>This vtable currently copies the string.
> Yeah, and we've the same issue with set_pmc -- some of the versions
> make a copy and some just use the passed in PMC. (the
> get_[string|pmc] vtable methods have a similar issue--should they
> return the real thing or a copy?)

 assign Px, Sy   $1->vtable->assign_string_native  # copy string
 set    Px, Sy   $1->vtable->set_string_native     # refer to string

 assign Px, Py   $1->vtable->assign_pmc
 set    Px, Py   $1->vtable->set_pmc

I'm not sure if we need the two different get vtable methods though. At
least there isn't any usage for these ;)

What about keyed variants of assign for strings and PMCs?

OTOH

  assign Px, Iy
  assign Px, Ny

could be aliased in the assembler to their C<set> variants, so that we
can toss these opcodes.

leo

Reply via email to