blaise/docs
Graeme Geldenhuys a4190d73cf feat(lang): enforce member visibility — private/protected/strict
Visibility modifiers on class and record members are now enforced, not merely
parsed.  A `private` member is reachable only within the declaring unit; a
`protected` member additionally within descendant types; `public`/`published`
everywhere the type is.  Adds `strict private` and `strict protected`, which
narrow visibility to the declaring type itself (and, for strict protected, its
descendants) rather than the whole unit.  `strict` composes with `static`.

Parser: track the current visibility section in class/record bodies and the
contextual `strict` keyword (only before private/protected); carry the
visibility onto each field, method, and property declaration.  `strict public`,
`strict published`, and a bare `strict` are rejected.

Semantic: every qualified and unqualified member-access site checks visibility
via MemberVisibleTo / AssertMemberVisibleV, using the member's declaring unit
and declaring type.  Static (class-level) vars now carry Visibility and
OwnerTypeName on their TSymbol so a qualified static-var access enforces the
same rules; a strict/private static var written from another type is rejected
with a "not accessible" diagnostic.  Qualified static-var writes from a
permitted context are reported as not-yet-lowered rather than mis-resolved
(permitted writes use the unqualified form inside a static method).

Cross-unit: member visibility and declaring-type/unit origin are carried across
separately-compiled units in the .bif interface (BLAISE-IFACE version 5) so the
checks hold for imported types.

Updates docs/grammar.ebnf with the visibility-section grammar and adds
cp.test.visibility (parse + semantic enforcement) plus thread-test fixes that
switched two TThread subclasses from private FTerminated/FFinished fields to
the public Terminated/Finished properties.
2026-06-28 23:46:52 +01:00
..
benchmark.txt docs(benchmark): add QBE 1.3 measurement entry 2026-06-02 17:17:54 +01:00
bif-format.adoc docs: .bif file format reference 2026-06-03 19:40:08 +01:00
design.adoc refactor: rename uCodeGen/uCodeGenQBE to blaise.codegen/blaise.codegen.qbe 2026-06-10 12:12:14 +01:00
extending-ast.adoc refactor: rename uCodeGen/uCodeGenQBE to blaise.codegen/blaise.codegen.qbe 2026-06-10 12:12:14 +01:00
freebsd-x86_64-backend-design.adoc feat(rtl): FreeBSD freestanding _start + minimal syscall leaf (Step 3) 2026-06-26 23:58:08 +01:00
future-improvements.adoc feat(stdlib): add Numerics.Money — currency-aware TMoney 2026-06-20 10:33:35 +01:00
grammar.ebnf feat(lang): enforce member visibility — private/protected/strict 2026-06-28 23:46:52 +01:00
inline-asm-design.adoc feat(lang): inline assembler blocks (asm … end routine bodies) 2026-06-25 01:01:41 +01:00
internal-linker-design.adoc docs: mark internal linker Phases C and D as implemented 2026-06-19 10:51:09 +01:00
language-rationale.adoc feat(lang): static class/record members (within-unit) 2026-06-28 16:11:40 +01:00
name-mangling.adoc refactor: rename uCodeGen/uCodeGenQBE to blaise.codegen/blaise.codegen.qbe 2026-06-10 12:12:14 +01:00
native-const-arg-arc-port.adoc docs: native const-arg ARC port design — mark implemented 2026-06-11 07:36:13 +01:00
native-target-architecture.adoc docs: RTL unification plan — one binary, embedded source, no external .a 2026-06-25 23:08:30 +01:00
rtl-unification-plan.adoc docs: RTL-unification implementation plan 2026-06-25 23:08:30 +01:00
self-contained-start-design.adoc fix(linker): ship own _start; drop system CRT startup objects (#142) 2026-06-24 23:39:11 +01:00
testing-strategy.adoc refactor: rename uCodeGen/uCodeGenQBE to blaise.codegen/blaise.codegen.qbe 2026-06-10 12:12:14 +01:00