Kernel: Removal of unused and little-used legacy code #276

Open
opened 2025-08-13 19:23:51 +02:00 by Doczom · 2 comments
Owner

В рамках данной задачи будет производится постепенное нахождение и удаление устаревших участков кода.
Под устаревшими участками кода подразумеваются следующие элементы:

  • Константы, не используемые в коде, если они не созданы для будущих изменений функционала
  • Участки памяти(переменные и структуры), не используемые в коде (исключения см выше)
  • Структуры, не используемые в коде (исключения см выше)
  • Метки, не несущие смысловой нагрузки и не используемые в коде (исключения см выше)
  • Блоки кода, не используемые и являющиеся явно устаревшими остатками старого кода ядра
  • Магические числа, к которым могут быть применены аналогичные записи из констант без потери читаемости логики кода
В рамках данной задачи будет производится постепенное нахождение и удаление устаревших участков кода. Под устаревшими участками кода подразумеваются следующие элементы: - Константы, не используемые в коде, если они не созданы для будущих изменений функционала - Участки памяти(переменные и структуры), не используемые в коде (исключения см выше) - Структуры, не используемые в коде (исключения см выше) - Метки, не несущие смысловой нагрузки и не используемые в коде (исключения см выше) - Блоки кода, не используемые и являющиеся явно устаревшими остатками старого кода ядра - Магические числа, к которым могут быть применены аналогичные записи из констант без потери читаемости логики кода
Doczom added the
Priority
Low
Kind
Enhancement
Category/Kernel
FASM
labels 2025-08-13 19:23:51 +02:00
Author
Owner

Некоторые примеры подобного кода:

tss_step
tss_data
01100000_00000000_00000000_00000000b 
DRIVE_DATA: rb  DRIVE_DATA_SIZE
cdbase  dd  ?
if 0

struc TIMER
{
  .next      dd ?
  .exp_time  dd ?
  .func      dd ?
  .arg       dd ?
}

Некоторые примеры подобного кода: ``` tss_step tss_data 01100000_00000000_00000000_00000000b DRIVE_DATA: rb DRIVE_DATA_SIZE cdbase dd ? if 0 struc TIMER { .next dd ? .exp_time dd ? .func dd ? .arg dd ? } ```
Member

Auto-translated:

Within the framework of this task, there will be a gradual finding and deletion of outdated sections of the code. Obsolete sections of the code mean the following elements:

  • Constants not used in the code, if they are not created for future functional changes
  • Memory sections (variables and structures) not used in the code (see above for exceptions)
  • Structures not used in the code (see exceptions above)
  • Labels that do not carry a semantic load and are not used in the code (see exceptions above)
  • Unused code blocks that are clearly obsolete remnants of the old kernel code
  • Magic numbers to which similar entries from constants can be applied without losing the readability of the code logic
Auto-translated: > Within the framework of this task, there will be a gradual finding and deletion of outdated sections of the code. Obsolete sections of the code mean the following elements: > > - Constants not used in the code, if they are not created for future functional changes > - Memory sections (variables and structures) not used in the code (see above for exceptions) > - Structures not used in the code (see exceptions above) > - Labels that do not carry a semantic load and are not used in the code (see exceptions above) > - Unused code blocks that are clearly obsolete remnants of the old kernel code > - Magic numbers to which similar entries from constants can be applied without losing the readability of the code logic
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KolibriOS/kolibrios#276
No description provided.