On Feb 4, 2006, at 16:51, Joshua Isom via RT wrote:
41 callmethodcc P1, "dump" -
P1=Object(PAST::Node)=PMC(0x50ba68),
102 get_params PMC_C[29] (2), P0, I0 - , P0=PMCNULL,
I0=5289976
106 repeat S0, " ", I0 - , , I0=5289976
110 add I0, 1 - I0=5289976,
DOD
GC
113 typeof S1, P0 - , P0=Object(PAST::Node)=PMC(0x50ba68)
116 print S0 - S0=" "
Okay, the problem seems to be that it's getting garbage values in
"optional" integer parameters if the parameters aren't passed in. So,
the PIR code is calling the 'dump' method with no parameters:
node1.dump()
But inside the 'dump' method, get_params is retrieving a value of
5289976 into the integer parameter 'level' (I0).
.param int level
Then, 'level' is used as a multiplier for the number of spaces that
should be used to indent the displayed content of the AST node:
indent = repeat " ", level
That explains all the spaces. It's indenting each line of the output
by 21,159,904 spaces (5289976 * 4).
The question is, where's the garbage value in the parameter list
coming from? Anyone have any suggestions?
(Still curious if you tried running it outside the Parrot::Test
framework. Mostly to determine if this is the same bug as was
reported before or a new bug.)
Allison