Add the number of attached lines and scopes to a span.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5229 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -1481,6 +1481,16 @@ static void CopySpanInfo (cc65_spandata* D, const SpanInfo* S)
|
|||||||
D->span_start = S->Start;
|
D->span_start = S->Start;
|
||||||
D->span_end = S->End;
|
D->span_end = S->End;
|
||||||
D->segment_id = S->Seg.Info->Id;
|
D->segment_id = S->Seg.Info->Id;
|
||||||
|
if (S->ScopeInfoList) {
|
||||||
|
D->scope_count = CollCount (S->ScopeInfoList);
|
||||||
|
} else {
|
||||||
|
D->scope_count = 0;
|
||||||
|
}
|
||||||
|
if (S->LineInfoList) {
|
||||||
|
D->line_count = CollCount (S->LineInfoList);
|
||||||
|
} else {
|
||||||
|
D->line_count = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -265,6 +265,8 @@ struct cc65_spandata {
|
|||||||
cc65_addr span_start; /* Start of the span */
|
cc65_addr span_start; /* Start of the span */
|
||||||
cc65_addr span_end; /* End of the span (inclusive!) */
|
cc65_addr span_end; /* End of the span (inclusive!) */
|
||||||
unsigned segment_id; /* Id of the segment */
|
unsigned segment_id; /* Id of the segment */
|
||||||
|
unsigned line_count; /* Number of lines attached */
|
||||||
|
unsigned scope_count; /* Number of scopes attached */
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct cc65_spaninfo cc65_spaninfo;
|
typedef struct cc65_spaninfo cc65_spaninfo;
|
||||||
@@ -426,8 +428,7 @@ typedef enum {
|
|||||||
* - For an import, the fields symbol_value and segment_id are taken from
|
* - For an import, the fields symbol_value and segment_id are taken from
|
||||||
* the export, if it is available, since imports have no value or segments
|
* the export, if it is available, since imports have no value or segments
|
||||||
* by itself.
|
* by itself.
|
||||||
* - For an import symbol_type and symbol_size are more or less unusable
|
* - For an import symbol_size doesn't have a meaning.
|
||||||
* because they don't have a meaning for imports.
|
|
||||||
* - For normal symbols (not cheap locals) parent_id contains CC65_INV_ID,
|
* - For normal symbols (not cheap locals) parent_id contains CC65_INV_ID,
|
||||||
* for cheap locals it contains the symbol id of the parent symbol.
|
* for cheap locals it contains the symbol id of the parent symbol.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user