Просмотр исходного кода

docs: qualified names prepared; per-unit mechanism = L7 flip

Eric Streit 1 неделя назад
Родитель
Сommit
18113ea167
1 измененных файлов с 21 добавлено и 3 удалено
  1. 21 3
      docs/summary_lower_l6.md

+ 21 - 3
docs/summary_lower_l6.md

@@ -53,6 +53,24 @@ ident).
 `t_classsibling`, `t_virtual`.  Suite **200/200**; FIXPOINT OK
 (3,378,633 bytes).
 
-## Remaining
-Imports only (see above): blocked by the session-image model, needs the
-per-unit lowering mechanism that L7 also requires.
+## Qualified names (prepared for the flip)
+`76048e0` (`v3-lower6-qualified`): `M.x` designators and `M.P` calls
+resolve through `MaterializeAlias` + `LoadDesignator` /
+`SymTab.Proc*`/`Param*`; `CanLower` no longer rejects imports.
+
+**Not yet byte-verifiable.**  Any multi-unit session contributes
+code/data and consumes backend counters from the *earlier* units — e.g. a
+definition-module `CONST` emits `data $M_K`, and a def-module proc
+heading consumes a temp — while `-lower` re-emits only the last unit.
+So imports can only be verified once the per-unit mechanism exists.
+
+## Remaining: the per-unit mechanism (= the L7 flip)
+Lower is invoked only from `ProgModule`'s END, so it re-emits one unit.
+Making it re-emit every unit needs either a **second backend state**
+(QbeGen is a singleton) or **the flip** — deleting the inline emit so
+Lower becomes the sole emitter, running per unit with that unit's scope
+still open (which is also what makes `GlobalRef`/`MaterializeAlias`
+resolve module symbols naturally).
+
+The flip is the L7 step.  Because `Lower` must then handle everything the
+compiler uses, the qualified-name support above is its prerequisite.