not ok 52 - __init argcP # TODO new Px, Ix: argcP is wrong in __init method
# Failed (TODO) test (t/pmc/objects.t at line 1712)
# got: 'a: 2345
# X: 0040 <--- argcP is no set to 0 on $P0 = new $I0
# b: 2345
# c: 6789
# X: 0010
# d: 6789
# '
# expected: 'a: 2345
# X: 0000
# b: 2345
# c: 6789
# X: 0010
# d: 6789
# '
jens
The __init shouldn't have arguments originally. But it worked, if you
set the arguments yourself. I0 is zero initially, it's an unprototyped
call and argcP (and 4 PMC arguments) are passed on to __init. This is
the current way to pass arguments.
OTOH when you call run "new Px, Iy, PInit" it's called according to
pdd03 with one argument.
I think both are a bit hackish.
Could you try to use the new_extended opcode instead, if you need
arguments?
PObj = PClass."new_extended"(args)
$ find t imcc/t -name '*.t' | xargs grep new_extended
leo