at least the one of RSX M+ 4.6.
Inconsistent flags given to .PSECT seem to be simply combined, with
nothing special done after pass 1 when re-reading for 2. The situation
at the end of pass 2 wins.
Given the following conditional inclusion, as seen in RSX Kermit-11
sources:
.if ndf, K11INC
.ift
.include /IN:K11MAC.MAC/
.include /IN:K11DEF.MAC/
.endc
macros defined in K11MAC.MAC are unknown when used later on.
The assembler keeps a running count of the line number (stmtno) and
stores it in the macro definition. In the second pass, it tries to avoid
cases of use-before-defined, because it doesn't really forget the
macros.
However, in this case, the second pass has fewer lines, because there
was some conditional inclusion... so when the macro is used in the
second pass, its running line number (including the skipped inclusions)
is lower than the line number where the macro was defined...
The line number check would also interfere when the /PASS:1 and /PASS:2
input file modifiers would be implemented.
It seems to me that in most normal cases, a use-before-defined is
already detected in the first pass, so the check is not really needed.
Therefore I have simply removed it.
evaluate() would not-quite-copy the original tree, which often would
get freed afterward. Including the shared parts.
Also fixed the case where evaluate() would turn a EX_NEG node into an
EX_COM node.