* pow MMD function and opcodes
* hash vtable and opcode
Both aren't yet implemented in classes/*
The "new_extended" opcode and vtable got renamed to the more appropriate
"instantiate". classes/complex.pmc has an implementation of this method,
the default is a fallback to pmc_new().
leo
PS please "make clean ; rm runtime/parrot/include/*.pasm ; perl
Configure.pl ..."
> I've added a few ops and methods:
>
> * pow MMD function and opcodes
> * hash vtable and opcode
>
> Both aren't yet implemented in classes/*
>
> The "new_extended" opcode and vtable got renamed to the more appropriate
> "instantiate". classes/complex.pmc has an implementation of this method,
> the default is a fallback to pmc_new().
Excellent!
Question: what is the difference (conceptually) between "new" and
"instantiate"? If they are different, these differences should be
highlighted. If not, the opcode should be named the same in both cases.
Also, I would prefer not to have to deal with implicit registers.
new_p_p would be the method signature I would prefer. The name of the
vtable entry could remain instantiate.
- Sam Ruby
> Excellent!
Welcome.
> Question: what is the difference (conceptually) between "new" and
> "instantiate"? If they are different, these differences should be
> highlighted. If not, the opcode should be named the same in both cases.
$ perldoc -F ops/pmc.ops
instantiate(out PMC)
Create a new PMC of the type of class REG_PMC(2). This
is a classmethod. Arguments are passed according to
the calling conventions in
docs/pdds/pdd03_calling_conventions.pod. See also the
getclass opcode to get a class PMC.
> Also, I would prefer not to have to deal with implicit registers.
How do you pass a variable amount of initializers then?
E.g.
.local pmc cl, o
cl = getclass "Complex"
o = cl."instantiate"(2, 3)
o = cl."instantiate"("2 + 3i")
> - Sam Ruby
leo