From f704ca3d9baac23ed5780d1f99287eead15cd21d Mon Sep 17 00:00:00 2001 From: Albertas Gimbutas Date: Tue, 16 Apr 2024 20:36:05 +0300 Subject: [PATCH] Add enhancement proposal for unused code which appears after removing unused code. --- enhancement_proposals/dep_3.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 enhancement_proposals/dep_3.md diff --git a/enhancement_proposals/dep_3.md b/enhancement_proposals/dep_3.md new file mode 100644 index 0000000..d00b556 --- /dev/null +++ b/enhancement_proposals/dep_3.md @@ -0,0 +1,18 @@ +# DEP 3 - Removal of unused code might create new unused code +**Status**: Proposed +**Type**: Feature +**Created**: 2024-04-16 + +## Problem statement +Additional unused code could appear after removal of unused code, since +some code might have been used by code, which was not used. + +## Considered solutions +These solutions are possible: +- apply deadcode multiple times till the output does not change in two consequtive runs. +- intelligently mark which code parts are unused and dont mark code as used, if it is used only by the code, which is unused. + +## Chosen soluton +Intelligent code tracking should be implemented, to make this algorithm more efficient. +Implementation details should still be considered: +- Code usage tree might have to be constructed with actual links to usages, which might require a lot of memory.