Branch ast-stage-c. Suite 178/178; self-hosting fixpoint OK
(3,016,802 bytes; slice 6 was 3,007,851).
A module-level astUnit now holds NkUnit(name, decls, body) for
DEFINITION, IMPLEMENTATION and program modules. decls is the unit's
NkDeclSeq (from DeclSeq) and body is the program/init NkBlock
(or NoNode). ProgModule and ImplUnit also reset astStmt/
astDecl at entry, so the root never picks up a stale node.
INCL/EXCL, INC/DEC, NEW and DISPOSE now build NkCalls
whose callee is an NkIdent naming the builtin, with the designator
(and step/element expression) as children. Node-building is inserted as
extra actions around the existing emit actions, which are unchanged.
AST.Dump of astUnit, then removed)VAR x : INTEGER; s : BITSET; p : POINTER TO INTEGER;
BEGIN
INC(x); INCL(s, 1); NEW(p); DISPOSE(p)
END
produced
NkUnit(Ident unitdump, NkDeclSeq[NkVarDecl x/s/p], NkBlock[
NkCall(INC, x), NkCall(INCL, s, 1), NkCall(NEW, p), NkCall(DISPOSE, p) ])
with each NkVarDecl carrying its ty index.
NkImport), CLASS items, nested modules in the unit AST.CASE and WITH statements.ResultComp call suffixes.Lower + .ssa byte-compare.CASE/WITH; imports/CLASS; brace/set literals; then the Lower
walk.