Commit Graph

15 Commits

Author SHA1 Message Date
abaea77248 engine: look dictionaries up synchronously
The dictionary thread ran in imthread's own proc, so a lookup could
only start once the engine blocked, and it was a trie probe anyway; the
emoji and Hanja searches already called dictlookup directly. The
request/result channels, sequence numbers, staleness checks and the
second draw per Japanese key are gone; dictqjp fills the candidates
in place. Emit.dict and Lang.dictq only ever triggered lookups for
Vietnamese, which has no dictionary. dictlookup(Lang*, key, out, max)
returns the count. The Hanja lookup no longer pre-checks for a single
syllable; a reading either has an entry or it does not.
2026-08-16 16:02:09 +09:00
c7718ece52 data: one trie for maps and dictionaries, one loader
The hash map served a single exact-match lookup that the trie already
answers, at the price of a second container, a second file loader with
its own drift, and a Str-to-UTF-8 conversion on every chain probe. The
files are small (kanji.dict is 7.5k lines), so the trie holds both.
trieopen validates keys and each space-separated value word against Str
and reports path:line; trielookup takes the Str every caller holds and
treats a nil trie as an unloaded map; trienew/trieput exist for tests.
The overflow guards on growth, Trie.root (always 0) and the per-language
init loop written twice are gone.
2026-08-16 15:56:32 +09:00
bfe83d0119 fix(data): reject partial and malformed map data 2026-08-14 23:09:55 +09:00
9a3a92170e engine: reject stale dictionary results 2026-08-14 18:43:12 +09:00
8d68e00f2b data: simplify and validate Japanese imports 2026-08-12 17:32:28 +09:00
a8a6c3b455 fix: construct Plan 9 paths without truncation 2026-08-12 17:28:17 +09:00
91931196e2 refactor: simplify the Plan 9 runtime loop 2026-08-12 17:26:55 +09:00
103f2ec448 fix: harden small core containers 2026-08-12 15:54:16 +09:00
fabce14933 fix: tighten emoji lookup contracts 2026-08-12 15:36:37 +09:00
0fff17c8b8 emoji: add one-shot candidate search 2026-08-11 22:24:59 +09:00
e70278a3d2 fix core text and map ownership 2026-08-11 19:32:58 +09:00
97f897755f rename hnode fields, functions. 2026-02-08 16:29:29 +09:00
e5ce5fd61e rename line => pre 2025-12-28 12:26:28 +09:00
84264e97d4 refactor preedit window layout
'안'
1 안녕
2 안녕하세요
...
8 안녕하세요릭
2025-12-24 23:43:53 +09:00
dcd1147638 first commit 2025-12-23 20:21:56 +09:00