Fragments and assertions reference LineInfo items instead of having separate

embedded FilePos items.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4915 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2011-01-24 22:39:07 +00:00
parent 06e3152035
commit 6ddf79fc30
9 changed files with 137 additions and 113 deletions

View File

@@ -98,14 +98,19 @@ Fragment* NewFragment (unsigned char Type, unsigned Size, Section* S)
void AddLineInfo (Fragment* F, LineInfo* LI)
/* Add the line info to the given fragment */
void FragResolveLineInfos (Fragment* F)
/* Resolve the back pointers for the line infos */
{
/* Point from the fragment to the line info ... */
CollAppend (&F->LineInfos, LI);
unsigned I;
/* ... and back from the line info to the fragment */
CollAppend (&LI->Fragments, F);
/* Walk over all line infos for this fragment */
for (I = 0; I < CollCount (&F->LineInfos); ++I) {
/* Get a pointer to this line info */
LineInfo* LI = CollAtUnchecked (&F->LineInfos, I);
/* Add the back pointer to the line info */
CollAppend (&LI->Fragments, F);
}
}