Runtime leak tracker (blaise_arc.pas): - Open-addressing hash map (1024 buckets, 16 bytes each) tracks every live class instance; zero overhead when disabled. - _LeakTrackerEnable() activates tracking and registers _LeakTrackerReport via atexit; called from $main when --debug is passed. - _LeakTrackerRegister(UserPtr, ClassName) inserts into the map; called from codegen at every constructor site (both TFieldAccessExpr and TMethodCallExpr paths). - _ClassRelease unregisters on refcount-zero free via LTDelete. - Report written to stderr lists count + class name of each survivor. Compiler (--debug flag): - New --debug CLI flag sets FDebugMode on TCodeGenQBE; emits call $_LeakTrackerEnable() in EmitMainHeader after unit init calls, and call $_LeakTrackerRegister(...) after every _ClassAlloc site. - --debug-opdf remains independent (OPDF only, no leak tracking). - SetDebugMode(Bool) added to TCodeGenQBE public API for e2e tests. Pointer/PtrUInt cast pairs (semantic + codegen): - Pointer(intOrPtrExpr) validated in AnalyseFuncCallExpr; accepts integer, pointer, class, metaclass, procedural, and nil sources. - PtrUInt(intOrPtrExpr) same validation; resolves to tyUInt64. - Codegen: w-to-l widening uses extuw for Pointer/PChar targets (zero-extend, not sign-extend) to preserve address semantics. - Four new unit tests in cp.test.pointers.pas. E2E test infrastructure: - CompileAndRunWithRTLDebug added to TE2ETestCase base for in-process debug-mode compilation without recursive overload ambiguity. - cp.test.e2e.leakcheck.pas: 5 tests covering no-leak silence, single leak, multiple leaks, reference cycles, and debug-off. 2258 tests pass; fixpoint verified.
80 lines
955 B
Plaintext
80 lines
955 B
Plaintext
# Local binary release archives (not tracked; see releases/ directory)
|
|
releases/
|
|
|
|
# FPC compiled output
|
|
*.ppu
|
|
*.o
|
|
*.a
|
|
*.or
|
|
*.res
|
|
*.rst
|
|
*.s
|
|
!runtime/src/main/asm/*.s
|
|
|
|
# Shared / dynamic libraries
|
|
*.so
|
|
*.so.*
|
|
*.dylib
|
|
*.dll
|
|
|
|
# Static libraries
|
|
*.lib
|
|
|
|
# PasBuild build output (per-module target/ directories)
|
|
target/
|
|
|
|
# QBE build artefacts (source is vendored; binary is built locally)
|
|
vendor/qbe/*.o
|
|
vendor/qbe/qbe
|
|
vendor/qbe/amd64/*.o
|
|
vendor/qbe/arm64/*.o
|
|
vendor/qbe/rv64/*.o
|
|
|
|
# FPC unit cache directories
|
|
lib/
|
|
units/
|
|
|
|
# PasBuild output
|
|
*.pbc
|
|
|
|
# Debug symbols
|
|
*.dbg
|
|
*.opdf
|
|
|
|
# Editor and IDE
|
|
.vscode/settings.json
|
|
.vscode/launch.json
|
|
*.swp
|
|
*.swo
|
|
*~
|
|
.idea/
|
|
*.iml
|
|
*.ipr
|
|
*.iws
|
|
|
|
# macOS
|
|
.DS_Store
|
|
.AppleDouble
|
|
.LSOverride
|
|
|
|
# Windows
|
|
Thumbs.db
|
|
ehthumbs.db
|
|
Desktop.ini
|
|
|
|
# Linux
|
|
.directory
|
|
|
|
# Temporary files
|
|
*.tmp
|
|
*.bak
|
|
*.orig
|
|
|
|
# Claude Code session notes — not for version control
|
|
CLAUDE.md
|
|
.ide/
|
|
|
|
# Local bug-tracking notes — not committed
|
|
bugs.txt
|
|
.gstack/
|