Use callback for PC's value

This causes it to auto-update whenever the current section's attributes are
updated, simplifying the code and eliminating redundancy.
This should also overall reduce overhead (one extra function call on each
PC evaluation, but less bookkeeping for each byte output)
This commit is contained in:
ISSOtm
2020-02-09 15:10:47 +01:00
parent 8c4b473d6f
commit 598c923506
3 changed files with 6 additions and 13 deletions

View File

@@ -405,7 +405,6 @@ static void updateUnion(void)
nPC = unionStart[unionIndex];
pCurrentSection->nPC = unionStart[unionIndex];
pPCSymbol->nValue = unionStart[unionIndex];
}
static size_t strlenUTF8(const char *s)
@@ -858,7 +857,6 @@ endu : T_POP_ENDU
nUnionDepth--;
nPC = unionStart[nUnionDepth] + unionSize[nUnionDepth];
pCurrentSection->nPC = nPC;
pPCSymbol->nValue = nPC;
}
;