On Tue, Oct 21, 2008 at 11:01:21AM -0700, Andrew Whitworth via RT wrote:
On Tue Oct 21 10:47:43 2008, Whiteknight wrote:
On Tue Oct 21 07:53:35 2008, pmichaud wrote:
As of r31667 (pre-mmd), the following worked:
$P0 = subclass 'Integer', 'MyInt'
$P1 = new 'MyInt'
assign $P1, 4
$P1 *= 3
say $P1
In the current head it fails:
If most of the n_* opcodes and their ilk have been removed, then the *=
operator and other inplace operators need to be changed in IMCC to
produce three-operand opcodes instead.
I disagree. The n_* opcodes were all three-operand opcodes to begin
with, while the inplace opcodes have always been two-operand opcodes.
This hasn't changed (or, at least, it shouldn't have), and so shouldn't
be affecting the inplace (two-operand) opcodes at all.
The *= operator should be producing a mul_p_i opcode call (if I am
reading all this correctly). mul_p_i should be calling
VTABLE_i_multiply_int on p. It should fall back to VTABLE_i_multiply_int
in Integer.pmc. Nowhere in here am I seeing an MMD call, because
i_multiply_int is not a multi in Integer.pmc.
The first statement about *= producing mul_p_i is certainly correct;
I can't speak to any of the rest of what's written, though.
Pm