blaise/compiler
Graeme Geldenhuys bc2bbdef03 fix(opdf): method/destructor scope records; export symbols the companion references
Three OPDF emitter gaps from the debugger-feedback backlog:

- Class and record METHODS (destructors included) never got
  recFunctionScope records: after semantic analysis the implementation
  bodies live on the type declarations' method lists, while
  EmitFunctionScopes only walked Block.ProcDecls (whose impl entries are
  body-less matching stubs).  The walk now gathers both sources; method
  records carry the qualified label (TThing_Bump) as the record name —
  the symbol a debugger resolves for break-by-function-name — and as
  LowPC.  Plain functions are unchanged (label = name).

- Under --debug-opdf every function symbol is now exported (ExportPrefix
  and EmitFuncDef honour FOpdfMode): the .opdf companion is assembled as
  a separate object whose scope records reference function labels, so
  local symbols failed to link the moment a method got a scope record.
  Same rationale as the existing VTableDataPrefix export.

- Generic-instance vtables bypassed VTableDataPrefix and stayed local
  under --debug-opdf.

Verified end to end: a program with a virtual-method class compiles,
links and runs with --debug-opdf (previously the documented blocker).
Still open (bugs.txt): per-statement line records need codegen-emitted
statement labels — the line table remains function-start granularity.

Tests: TestOPDF_MethodScope_Emitted + TestOPDF_DestructorScope_Emitted.
Suite: 2950 OK; FIXPOINT_OK; NATIVE_FIXPOINT_OK.
2026-06-11 12:35:45 +01:00
..
src fix(opdf): method/destructor scope records; export symbols the companion references 2026-06-11 12:35:45 +01:00
project.xml refactor: split rtl/ into runtime/ + stdlib/, rename bcl.testing to blaise.testing 2026-05-16 00:51:18 +01:00