With step 1.9's statements + this section, every scalar kind lowers:
INTEGER/CARDINAL-family, BOOLEAN, CHAR, REAL/LONGREAL (widened to
d), with conversions, comparisons and full control flow.
Suite 30/30 (14 run + 16 reject), LL(1)-clean, zero regressions.
QbeGen)d_ immediates (NormReal); IsImm accepts them; NegFold
folds d_ literals (Test2 recipe).DeclVar: data $x = { d 0 } for ClReal. DeclConst: zero
reals as d 0 (textual IsZeroReal, incl. -0.0); non-zero
REALs as d 0 + a recorded runtime =d copy flushed at
BeginBody (this qbe rejects d 1.5 in data — same limit
Test2 hit, same workaround).isReal through LoadVar (loadd) / StoreVar (stored)
/ Op3 (=d); Cmp gains ceqd/cned/cltd/cled/cgtd/cged;
NegQ via sub d_0.0; new ConvIR (swtof) for
INTEGER→REAL assignment widening.NormReal, no more 230); / added to MulOp
(OpSlash → div, Test2 parity: also defined on integers as
truncating division — documented, matches the lenient family).VAR x: REAL accepted; loads/stores carry the class flag in
Design (var/param/const), SimExpr/Term (arith + unary minus),
Expr (comparisons; flag read before the type becomes BOOLEAN).r := 3 → swtof); mixed
arithmetic and mixed comparisons stay 211/213; REAL→INTEGER
is 210. No implicit anything else.t_real → 31 (zero + flushed CONSTs, conversion, all six real
comparisons, /, real unary-minus temps, int/real branches) with
hand-checked .ssa (flush block, swtof, cgtd all present);
t_bad_mixed (i := r) → 210.
LONGINT/LONGREAL are aliases (true quads = later step).5 / 2 on integers truncates (Test2 parity, not Wirth /).runtime/syslib/Trap).Next: step 3 composites (ARRAY/RECORD/SET/POINTER + the locked length-prefixed layout + WITH + IN).