1) Strings - summary
set Sx, Sy # alias Sx to Sy
set Sx, "str" # set Sx to COW copy of "str"
set Px, Sy # CHANGED make Px refer to Sy
assign Px, Sy # set Px to COW copy of Sy
2) PMC summary
set Px, Py # alias Px to Py
assign Px, Py # set Px to value of Py := Px->vtable->assign_pmc
setref Px, Py # make Px refer to Py := Px->vtable->set_pmc
The latter is the opposite of deref, which now calls the get_pmc()
vtable. C<assign> for reference PMCs is now just passed on.
leo
jens
Good question:
$ cat set.pasm
new P0, .PerlString
set P0, "str"
set S0, P0
chopn S0, 2
print "str"
print "\n"
end
$ parrot set.pasm
s
:)
We should separate the 2 cases (set_p_sc and set_p_s) like it's done for
strings.
> jens
leo