blaise/tests
Graeme Geldenhuys 5907e1d314 hand source: TObjectList takes strong refs to stored objects
The hand-written self-hosting TObjectList stored bare Pointers and
took no ARC ref when adding.  In loops like

    while Check(tkIdent) do
    begin
      CD := TConstDecl.Create;
      ...
      ABlock.ConstDecls.Add(CD);
    end;

reassigning CD on the next iteration released the prior CD (its only
strong ref) and the list's pointer dangled.  When a later allocation
reused that heap slot, the list silently contained the wrong object,
and semantic analysis crashed in TSymbol.Create reading CD.Name from
an unrelated object's memory.

Add/Put/Delete/Clear/Destroy now AddRef on insert and Release on
remove or destroy, gated on FOwnsObjects so the semantics match the
real compiler's TObjectList.  Extract continues to transfer the ref
to the caller without release.

Lets stage-2 compile the hand source far enough to hit the next bug
(currently a nil Self in TRecordTypeDesc.AddVTableSlot during
AnalyseTypeDecls) — more hand-source polish to follow.
2026-04-24 17:59:21 +01:00
..
integration Add Phase 2: record/class types, ARC strings, RTL stubs, and grammar doc 2026-04-20 19:04:12 +01:00
blaise-compiler.pas hand source: TObjectList takes strong refs to stored objects 2026-04-24 17:59:21 +01:00
phase2_milestone.pas Collapse Write+WriteLn pairs into multi-arg WriteLn in milestone tests 2026-04-22 23:19:55 +01:00
phase3_milestone.pas Add TObjectList and TStringList to RTL; fix string ARC via typed pointers 2026-04-23 12:32:59 +01:00