[core] Expand component source index to 9 bits (511 max)

Bitfield component_source_index_ (9 bits) and warn_if_blocking_over_
(7 bits) into the same 16 bits. This doubles the max unique component
source names from 255 to 511 without increasing Component size.

The blocking warn threshold max drops from 2550ms to 1270ms which is
more than sufficient since it starts at 50ms and ratchets up.

Fixes test warnings when many components are compiled together:
WARNING Too many unique component source names (max 255)
This commit is contained in:
J. Nick Koston
2026-03-30 08:30:55 -10:00
parent 8688ef7125
commit fcfcb4ed72
4 changed files with 12 additions and 11 deletions
+1 -1
View File
@@ -137,7 +137,7 @@ def test_register_component_source_overflow_warns(
) -> None:
# Pre-fill pool to max
pool = ComponentSourcePool(
sources={f"comp_{i}": i + 1 for i in range(0xFF)},
sources={f"comp_{i}": i + 1 for i in range(0x1FF)},
table_registered=True,
)
monkeypatch.setattr(ch, "CORE", Mock(data={ch._COMPONENT_SOURCE_DOMAIN: pool}))