Re: [perl #38594] [BUG] source line numbers
Hi Chip, Can you please apply this patch for me? This is a fix to the YACC file. As a result you will also have to checkin the imcparser.c and imcparser.h after applying the patch and recompiling the source. Thanks, Vishal Index: compilers/imcc/imcc.y === --- compilers/imcc/imcc.y (revision 13035) +++ compilers/imcc/imcc.y (working copy) @@ -202,7 +202,7 @@ r->type = (r->type & VT_ENCODED) ? VT_PCC_SUB|VT_ENCODED : VT_PCC_SUB; r->pcc_sub = calloc(1, sizeof(struct pcc_sub_t)); cur_call = r; -i->line = line - 1; +i->line = line ; add_namespace(interp, unit); return i; } On 7/3/06, Vishal Soni <[EMAIL PROTECTED]> wrote: Will, Did we get this one in? -Vishal On 6/30/06, Vishal Soni <[EMAIL PROTECTED]> wrote: > > Hi, > > The .end seems to be replaced by an implicit end. > > -Vishal > > > On 6/29/06, Will Coleda via RT < [EMAIL PROTECTED]> > wrote: > > > > Hey, Vishal: > > > > > [vsoni - Tue Jun 27 05:48:27 2006]: > > > > > > Hi, > > > > > > This was a straight forward fix. The line number was being > > decremented > > > at the start of a 'sub' token imcc.y. > > > > > > > > > Thanks, > > > Vishal > > > > > > Here is a sample run > > > > > > Sample Code: > > > --- > > > .sub main :main > > > print "2\n" > > > print "3\n" > > > print "4\n" > > > .end > > > > > > Output: > > > > > > ./parrot -d 10 ./hello.pir > > > 1 > > > last:5 > > > pcc_sub main nparams 0 > > > > > > Dumping the instructions status: > > > --- > > > nins line blck deep flags type opnr size pc X ins > > >0100 0 8 -100 main: > > >1200 1 0 41320print > > "2\n" > > >2300 1 0 41322print > > "3\n" > > >3400 1 0 41324print > > "4\n" > > >4400 0 18000016end > > > > Looks like the first line is fixed there (1) and then the guts are > > fixed (2,3,4), but is the > > duplicate line 4 correct? (is that corresponding to the implicit end > > that PIR puts in, or the .end > > of the subroutine? > > > > If you can just validate that, we can apply this. > > > > > > > > Labels > > > namepos last ref > > > --- > > > > > > > > > Dumping the CFG: > > > --- > > > 0 (0)-> <- > > > > > > > > > Dumping the Dominators Tree: > > > --- > > > 0 <- ( 0) 0 > > > > > > Loop info > > > - > > > > > > > > > > > > Patch > > > > > > > > > Index: compilers/imcc/imcc.y > > > > > = > > == > > > --- compilers/imcc/imcc.y (revision 13035) > > > +++ compilers/imcc/imcc.y (working copy) > > > @@ -202,7 +202,7 @@ > > > r->type = (r->type & VT_ENCODED) ? VT_PCC_SUB|VT_ENCODED : > > > VT_PCC_SUB; > > > r->pcc_sub = calloc(1, sizeof(struct pcc_sub_t)); > > > cur_call = r; > > > -i->line = line - 1; > > > +i->line = line ; > > > add_namespace(interp, unit); > > > return i; > > > } > > > > > > > > > > > > > > > > > > > > > > -- > Thanks, > > Vishal > -- Thanks, Vishal -- Thanks, Vishal
Re: [perl #38594] [BUG] source line numbers
Will, Did we get this one in? -Vishal On 6/30/06, Vishal Soni <[EMAIL PROTECTED]> wrote: Hi, The .end seems to be replaced by an implicit end. -Vishal On 6/29/06, Will Coleda via RT <[EMAIL PROTECTED]> wrote: > > Hey, Vishal: > > > [vsoni - Tue Jun 27 05:48:27 2006]: > > > > Hi, > > > > This was a straight forward fix. The line number was being decremented > > > at the start of a 'sub' token imcc.y. > > > > > > Thanks, > > Vishal > > > > Here is a sample run > > > > Sample Code: > > --- > > .sub main :main > > print "2\n" > > print "3\n" > > print "4\n" > > .end > > > > Output: > > > > ./parrot -d 10 ./hello.pir > > 1 > > last:5 > > pcc_sub main nparams 0 > > > > Dumping the instructions status: > > --- > > nins line blck deep flags type opnr size pc X ins > >0100 0 8 -100 main: > >1200 1 0 41320print "2\n" > >2300 1 0 41322print "3\n" > >3400 1 0 41324print "4\n" > > >4400 0 18000016end > > Looks like the first line is fixed there (1) and then the guts are fixed > (2,3,4), but is the > duplicate line 4 correct? (is that corresponding to the implicit end > that PIR puts in, or the .end > of the subroutine? > > If you can just validate that, we can apply this. > > > > > Labels > > namepos last ref > > --- > > > > > > Dumping the CFG: > > --- > > 0 (0)-> <- > > > > > > Dumping the Dominators Tree: > > --- > > 0 <- ( 0) 0 > > > > Loop info > > - > > > > > > > > Patch > > > > > > Index: compilers/imcc/imcc.y > > > = > == > > --- compilers/imcc/imcc.y (revision 13035) > > +++ compilers/imcc/imcc.y (working copy) > > @@ -202,7 +202,7 @@ > > r->type = (r->type & VT_ENCODED) ? VT_PCC_SUB|VT_ENCODED : > > VT_PCC_SUB; > > r->pcc_sub = calloc(1, sizeof(struct pcc_sub_t)); > > cur_call = r; > > -i->line = line - 1; > > +i->line = line ; > > add_namespace(interp, unit); > > return i; > > } > > > > > > > > > > > > -- Thanks, Vishal -- Thanks, Vishal
Re: [perl #38594] [BUG] source line numbers
Hi, The .end seems to be replaced by an implicit end. -Vishal On 6/29/06, Will Coleda via RT <[EMAIL PROTECTED]> wrote: Hey, Vishal: > [vsoni - Tue Jun 27 05:48:27 2006]: > > Hi, > > This was a straight forward fix. The line number was being decremented > at the start of a 'sub' token imcc.y. > > > Thanks, > Vishal > > Here is a sample run > > Sample Code: > --- > .sub main :main > print "2\n" > print "3\n" > print "4\n" > .end > > Output: > > ./parrot -d 10 ./hello.pir > 1 > last:5 > pcc_sub main nparams 0 > > Dumping the instructions status: > --- > nins line blck deep flags type opnr size pc X ins >0100 0 8 -100 main: >1200 1 0 41320print "2\n" >2300 1 0 41322print "3\n" >3400 1 0 41324print "4\n" >4400 0 18000016end Looks like the first line is fixed there (1) and then the guts are fixed (2,3,4), but is the duplicate line 4 correct? (is that corresponding to the implicit end that PIR puts in, or the .end of the subroutine? If you can just validate that, we can apply this. > > Labels > namepos last ref > --- > > > Dumping the CFG: > --- > 0 (0)-> <- > > > Dumping the Dominators Tree: > --- > 0 <- ( 0) 0 > > Loop info > - > > > > Patch > > > Index: compilers/imcc/imcc.y > = == > --- compilers/imcc/imcc.y (revision 13035) > +++ compilers/imcc/imcc.y (working copy) > @@ -202,7 +202,7 @@ > r->type = (r->type & VT_ENCODED) ? VT_PCC_SUB|VT_ENCODED : > VT_PCC_SUB; > r->pcc_sub = calloc(1, sizeof(struct pcc_sub_t)); > cur_call = r; > -i->line = line - 1; > +i->line = line ; > add_namespace(interp, unit); > return i; > } > > > > > -- Thanks, Vishal