Libraries (box_lib, buf2d, libimg, tinygl): optimize function import #231

Merged
Burer merged 1 commits from libraries-import-optimize into main 2025-07-14 08:20:37 +02:00
Member

Libraries (box_lib, buf2d, libimg, tinygl): optimize function import

Рrograms updated:

  • gears, test3, test_glu1, test_glu2,
  • test_array1, textures0, textures1, textures2,
  • ctrldemo, editbox_ex, crypt_files, img_transform,
  • scrshoot, t_edit, cnc_control, cnc_editor
Libraries (box_lib, buf2d, libimg, tinygl): optimize function import Рrograms updated: - gears, test3, test_glu1, test_glu2, - test_array1, textures0, textures1, textures2, - ctrldemo, editbox_ex, crypt_files, img_transform, - scrshoot, t_edit, cnc_control, cnc_editor
IgorA added 1 commit 2025-05-08 21:36:29 +02:00
Libraries (box_lib, buf2d, libimg, tinygl): optimize function import
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 37s
Build system / Build (pull_request) Successful in 4m50s
a8675404e7
Рrograms updated:
- info3ds: added resizing of the window with the figure
  and the list of vertices in the properties window

- info3ds_u, gears, test3, test_glu1, test_glu2,
- test_array1, textures0, textures1, textures2,
- ctrldemo, editbox_ex, crypt_files, img_transform,
- scrshoot, t_edit, cnc_control, cnc_editor
IgorA added the
Category/Applications
Category/Libraries
FASM
labels 2025-05-11 15:25:32 +02:00
mxlgv added the
PR
Review required
label 2025-05-14 21:08:51 +02:00
Owner

Do I understand correctly that only those functions that are used in the code are imported?

Do I understand correctly that only those functions that are used in the code are imported?
Author
Member

Do I understand correctly that only those functions that are used in the code are imported?

That's right, only those functions that are used in the program are imported. That's why some programs have become smaller than they were.

> Do I understand correctly that only those functions that are used in the code are imported? That's right, only those functions that are used in the program are imported. That's why some programs have become smaller than they were.
Owner

We already have the shared /programs/dll.inc file included in some programs to help them with loading of dynamic libraries. Can we expand that single file instead of introducing two more files per each library? This is not a requirement, just a question if it's possible to avoid adding many similar files. I once cleaned some semi-duplicates, I'm afraid we can end up in a similar place with these import.inc and export.inc 2c778124e3

We already have the shared /programs/dll.inc file included in some programs to help them with loading of dynamic libraries. Can we expand that single file instead of introducing two more files per each library? This is not a requirement, just a question if it's possible to avoid adding many similar files. I once cleaned some semi-duplicates, I'm afraid we can end up in a similar place with these import.inc and export.inc https://git.kolibrios.org/KolibriOS/kolibrios/commit/2c778124e3a64f27f88c21c0578d18d597377578
Author
Member

We already have the shared /programs/dll.inc file included in some programs to help them with loading of dynamic libraries. Can we expand that single file instead of introducing two more files per each library? This is not a requirement, just a question if it's possible to avoid adding many similar files. I once cleaned some semi-duplicates, I'm afraid we can end up in a similar place with these import.inc and export.inc 2c778124e3

The dll.inc file has a different format for describing the export table, not the same as in load_lib.mac. That's why I added two additional files, one with a list of functions and the other with the formation of the export table. At first I wanted to make a macro for forming the export table, and in that case the second file would not be needed. But I couldn't write such a macro because it requires a macro inside another macro.

> We already have the shared /programs/dll.inc file included in some programs to help them with loading of dynamic libraries. Can we expand that single file instead of introducing two more files per each library? This is not a requirement, just a question if it's possible to avoid adding many similar files. I once cleaned some semi-duplicates, I'm afraid we can end up in a similar place with these import.inc and export.inc https://git.kolibrios.org/KolibriOS/kolibrios/commit/2c778124e3a64f27f88c21c0578d18d597377578 The dll.inc file has a different format for describing the export table, not the same as in load_lib.mac. That's why I added two additional files, one with a list of functions and the other with the formation of the export table. At first I wanted to make a macro for forming the export table, and in that case the second file would not be needed. But I couldn't write such a macro because it requires a macro inside another macro.
IgorA force-pushed libraries-import-optimize from a8675404e7 to 1a2e3e7938 2025-05-17 21:08:00 +02:00 Compare
IgorA added a new dependency 2025-05-17 21:33:39 +02:00
IgorA added a new dependency 2025-05-18 14:45:29 +02:00
mxlgv requested changes 2025-05-20 22:47:39 +02:00
@@ -435,3 +435,2 @@
;--------------------------------------------------
align 4
import_tinygl:
sz_lib_init db 'lib_init',0
Owner

Let's try adding this to import.inc...

Let's try adding this to import.inc...
Author
Member

moved declaration of sz_lib_init to file load_lib.mac

moved declaration of `sz_lib_init` to file load_lib.mac
Burer marked this conversation as resolved
mxlgv added
PR
Request changes
and removed
PR
Review required
labels 2025-05-20 22:47:57 +02:00
IgorA force-pushed libraries-import-optimize from 9f858e0265 to 5623b3510c 2025-05-21 00:42:34 +02:00 Compare
IgorA force-pushed libraries-import-optimize from 5623b3510c to 14c2c965c5 2025-05-21 06:10:20 +02:00 Compare
Doczom approved these changes 2025-07-13 14:31:55 +02:00
dunkaist approved these changes 2025-07-13 14:53:23 +02:00
Burer force-pushed libraries-import-optimize from 14c2c965c5 to 21658ef74c 2025-07-14 08:10:49 +02:00 Compare
Burer merged commit 1483ec8462 into main 2025-07-14 08:20:37 +02:00
Burer deleted branch libraries-import-optimize 2025-07-14 08:20:37 +02:00
Sign in to join this conversation.
5 Participants
Notifications
Due Date
No due date set.
Reference: KolibriOS/kolibrios#231
No description provided.