Author: kjs Date: Mon Jan 19 14:57:15 2009 New Revision: 35777 Modified: trunk/compilers/pirc/src/pircompunit.c trunk/compilers/pirc/src/pircompunit.h
Log: [pirc] store PIR source line in the instruction for each, ehm, source line :-) Modified: trunk/compilers/pirc/src/pircompunit.c ============================================================================== --- trunk/compilers/pirc/src/pircompunit.c (original) +++ trunk/compilers/pirc/src/pircompunit.c Mon Jan 19 14:57:15 2009 @@ -400,6 +400,9 @@ /* the codesize so far will be the offset of this instruction. */ instr->offset = lexer->codesize; + /* set the PIR source line number */ + instr->sourceline = yypirget_lineno(lexer->yyscanner); + /* fprintf(stderr, "offset of %s is: %d\n", opname, instr->offset); */ Modified: trunk/compilers/pirc/src/pircompunit.h ============================================================================== --- trunk/compilers/pirc/src/pircompunit.h (original) +++ trunk/compilers/pirc/src/pircompunit.h Mon Jan 19 14:57:15 2009 @@ -293,6 +293,7 @@ int oplabelbits; /* bits indicating which operands are labels */ struct op_info_t *opinfo; /* pointer to the op_info containing this op's meta data */ int opcode; /* the opcode of this instruction */ + int sourceline; /* PIR source line */ struct instruction *next; } instruction;