Commit 55c8ccb
feat: unify name demangling with single Lean implementation
This PR replaces three independent name demangling implementations (Lean,
C++, Python) with a single source of truth in Lean. The new
`Lean.Compiler.NameDemangling` module handles the full pipeline: prefix
parsing, postprocessing (suffix flags, private names, hygienic stripping,
specialization contexts), backtrace line parsing, and C exports. The C++
runtime backtrace handler now calls `@[export]`ed Lean functions instead
of its own reimplementation. The Python profiler demangler is replaced
with a thin subprocess wrapper around a Lean CLI tool.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent e9cc84b commit 55c8ccb
File tree
10 files changed
+864
-2245
lines changed- script/profiler
- src
- Lean/Compiler
- runtime
- tests/lean/run
10 files changed
+864
-2245
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
0 commit comments