Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: cvs commit: parrot/t/pmc objects.t

5 views
Skip to first unread message

Jens Rieks

unread,
Nov 28, 2004, 9:20:52 AM11/28/04
to l...@toetsch.at, perl6-i...@perl.org
On Sunday 28 November 2004, Jens Rieks wrote:
> added new TODO test:
> new Px, Ix: argcP is wrong in __init method
minesweeper does not run because of this.


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

Leopold Toetsch

unread,
Nov 28, 2004, 10:17:09 AM11/28/04
to Jens Rieks, perl6-i...@perl.org
Jens Rieks <par...@jensbeimsurfen.de> wrote:
> On Sunday 28 November 2004, Jens Rieks wrote:
>> added new TODO test:
>> new Px, Ix: argcP is wrong in __init method
> minesweeper does not run because of this.

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

0 new messages