Compare commits

...

1 Commits

Author SHA1 Message Date
coah
57dc807c49 match(CHANSVm 224/233) (a5h2 astra high) (worker 1c37888a) 2026-10-03 17:59:49 +00:00
2 changed files with 216 additions and 65 deletions

View File

@@ -6781,10 +6781,79 @@ static CHANSVmErr VmReturnWithValue(CHANSVm* vm, u32 val) {
return ret;
}
static inline CHANSVmErr VmResolveGlobalModules(CHANSVmModule* module, GlobalObjListNode* head) {
DispatchEntry* dispatchTable;
GlobalObjListNode* gIter;
u32 i;
dispatchTable = module->pDispatchTbl;
for (gIter = head; gIter != vmNull; gIter = gIter->next) {
for (i = 0; i < module->moduleCount; i++) {
DispatchEntry entry = dispatchTable[i];
u8* addr;
if (!gIter->nameLength) {
continue;
}
addr = (u8*)dispatchTable + entry.offset;
if (addr + gIter->nameLength > (u8*)module + module->regionSize || gIter->nameLength != entry.nameLength) {
continue;
}
if (memcmp(gIter->name, addr, gIter->nameLength) != 0) {
continue;
}
if (module->pModuleTbl[i].type) {
return CHANS_VM_ERR_RESOLVE_GLOBAL_OBJECT_REFERENCE;
}
module->pModuleTbl[i].type = CHANS_VM_TYPE_GLOBAL_REF;
module->pModuleTbl[i].pGlobalObj = gIter;
module->pModuleTbl[i].flags = CHANSVM_OBJ_FLAG_READONLY;
}
}
return 0;
}
static inline CHANSVmErr VmResolveNativeModules(CHANSVmModule* module, CHANSVmNativeClass* head) {
DispatchEntry* dispatchTable;
CHANSVmNativeClass* nIter;
u32 i;
dispatchTable = module->pDispatchTbl;
for (nIter = head; nIter != vmNull; nIter = nIter->pNext) {
for (i = 0; i < module->moduleCount; i++) {
DispatchEntry entry = dispatchTable[i];
u8* addr;
if (!nIter->nameLength) {
continue;
}
addr = (u8*)dispatchTable + entry.offset;
if (addr + nIter->nameLength > (u8*)module + module->regionSize || nIter->nameLength != entry.nameLength) {
continue;
}
if (memcmp(nIter->sName, addr, nIter->nameLength) != 0) {
continue;
}
if (module->pModuleTbl[i].type) {
return CHANS_VM_ERR_RESOLVE_NATIVE_METHOD_CALL;
}
module->pModuleTbl[i].type = CHANS_VM_TYPE_CLASS_REF;
module->pModuleTbl[i].pNativeClass = nIter;
module->pModuleTbl[i].flags = CHANSVM_OBJ_FLAG_READONLY;
}
}
return 0;
}
CHANSVmErr CHANSVmLinkModules(CHANSVm* vm, vmS32 unk0) {
CHANSVmPrivate* pVm = (CHANSVmPrivate*)vm;
CHANSVmModule* module;
u32 modIdx;
CHANSVmModule* module;
u32 i;
(void)unk0;
@@ -6796,76 +6865,14 @@ CHANSVmErr CHANSVmLinkModules(CHANSVm* vm, vmS32 unk0) {
while (modIdx < (u32)pVm->depth) {
CHANSVmErr result;
DispatchEntry* dispatchTable;
GlobalObjListNode* gIter;
CHANSVmNativeClass* nIter;
pVm->pActiveCtx->pDbg = module;
dispatchTable = module->pDispatchTbl;
for (gIter = pVm->pGlobalObjList; gIter != vmNull; gIter = gIter->next) {
for (i = 0; i < module->moduleCount; i++) {
DispatchEntry entry = dispatchTable[i];
u8* addr;
if (!gIter->nameLength) {
continue;
}
addr = (u8*)dispatchTable + entry.offset;
if (addr + gIter->nameLength > (u8*)module + module->regionSize || gIter->nameLength != entry.nameLength) {
continue;
}
if (memcmp(gIter->name, addr, gIter->nameLength) != 0) {
continue;
}
if (module->pModuleTbl[i].type) {
result = CHANS_VM_ERR_RESOLVE_GLOBAL_OBJECT_REFERENCE;
goto post_pass1;
}
module->pModuleTbl[i].type = CHANS_VM_TYPE_GLOBAL_REF;
module->pModuleTbl[i].pGlobalObj = gIter;
module->pModuleTbl[i].flags = CHANSVM_OBJ_FLAG_READONLY;
}
}
result = 0;
post_pass1:
result = VmResolveGlobalModules(module, pVm->pGlobalObjList);
if (result) {
return result;
}
dispatchTable = module->pDispatchTbl;
for (nIter = pVm->pNativeClasses; nIter != vmNull; nIter = nIter->pNext) {
for (i = 0; i < module->moduleCount; i++) {
DispatchEntry entry = dispatchTable[i];
u8* addr;
if (!nIter->nameLength) {
continue;
}
addr = (u8*)dispatchTable + entry.offset;
if (addr + nIter->nameLength > (u8*)module + module->regionSize || nIter->nameLength != entry.nameLength) {
continue;
}
if (memcmp(nIter->sName, addr, nIter->nameLength) != 0) {
continue;
}
if (module->pModuleTbl[i].type) {
result = CHANS_VM_ERR_RESOLVE_NATIVE_METHOD_CALL;
goto post_pass2;
}
module->pModuleTbl[i].type = CHANS_VM_TYPE_CLASS_REF;
module->pModuleTbl[i].pNativeClass = nIter;
module->pModuleTbl[i].flags = CHANSVM_OBJ_FLAG_READONLY;
}
}
result = 0;
post_pass2:
result = VmResolveNativeModules(module, pVm->pNativeClasses);
if (result) {
return result;
}

View File

@@ -0,0 +1,144 @@
# a5h2 second high round
Owned data-d5 branch agent/w1003/astra-a5-high2, baseline a120e478. Read AGENTS, a5/common/levers and prior a5h, a5, g8, ult14 and CHANSVm/big1/fz1 histories. Prior-art index has no matching unit entry. Pool checked before code work: 125/125 identical. Baseline {"fuzzy_match_percent": 99.44119, "total_code": "53564", "matched_code": "39152", "matched_code_percent": 73.093864, "total_data": "6904", "matched_data": "6904", "matched_data_percent": 100.0, "total_functions": 233, "matched_functions": 223, "matched_functions_percent": 95.70815, "total_units": 1}
All data sections already 100%; no metadata corrections warranted. No linking/config changes. New trials focus on additional self-contained boundaries rather than repeating logged whole-body or leading-declaration searches. Every candidate remains subject to full clean gate and parent verification.
## CHANSVmConvertToFloatFromStr
Origin a120e478; owned source unchanged.
Target83/83: only adjacent initialized end-pointer store and type comparison differ. Allocation, byte-copy, constants loop, integer parse, decimal parse and final store have identical order. Preserve end-pointer initialization. New inner boundaries below do not repeat whole-parser inputs/record trials.
- {"function": "CHANSVmConvertToFloatFromStr", "attempt": "constant-name recognition loop returns boolean and parsed output through inline helper", "source": "470ece29b1ca", "build": 0, "pool": true, "fuzzy": 86.90362, "insns": [91, 83], "diffs": 87, "code": "39152", "data": "6904", "regress": []}
- {"function": "CHANSVmConvertToFloatFromStr", "attempt": "ASCII copy and terminator inline helper returns end-of-buffer pointer", "source": "bb74cf8f9171", "build": 0, "pool": true, "fuzzy": 86.445786, "insns": [88, 83], "diffs": 63, "code": "39152", "data": "6904", "regress": []}
- {"function": "CHANSVmConvertToFloatFromStr", "attempt": "numeric text dispatch in inline scalar helper with caller-owned initialized end pointer", "source": "c80e2b8dee27", "build": 0, "pool": true, "fuzzy": 97.59036, "insns": [83, 83], "diffs": 2, "code": "39152", "data": "6904", "regress": []}
## VmDateDtor
Origin a120e478; owned source unchanged.
Target91/91: sec/min/hour/mday/month/year/weekday signed guards and conversion calls match; seven differences in month/day table loads and varargs year store. No volatile or missing-initialization evidence. Try full value-producing boundary and split guard success joins.
- {"function": "VmDateDtor", "attempt": "calendar initialization, guards and formatting owned by full inline helper CHANSVm* vm, CHANSVmObjHdr* output", "source": "5342727a6e16", "build": 0, "pool": true, "fuzzy": 94.96703, "insns": [91, 91], "diffs": 7, "code": "39152", "data": "6904", "regress": []}
- {"function": "VmDateDtor", "attempt": "calendar initialization, guards and formatting owned by full inline helper CHANSVmObjHdr* output, CHANSVm* vm", "source": "3ae0a6c99c81", "build": 0, "pool": true, "fuzzy": 94.96703, "insns": [91, 91], "diffs": 7, "code": "39152", "data": "6904", "regress": []}
- {"function": "VmDateDtor", "attempt": "formatted length validation and string setter share an inline status boundary", "source": "11e45fb5ff7b", "build": 0, "pool": true, "fuzzy": 90.51649, "insns": [95, 91], "diffs": 40, "code": "39152", "data": "6904", "regress": []}
## VmStringSplit
Origin a120e478; owned source unchanged.
Target222/222 CFG: convert separator, optional limit, load input views, two scans for nonempty separator, array-only fallback, per-character loop for empty separator. New boundaries isolate the empty-separator loop and array-only fallback instead of the previously tried segment-copy helper.
- {"function": "VmStringSplit", "attempt": "empty-separator per-character array creation helper with char input", "source": "3a58af0a6ae9", "build": 0, "pool": true, "fuzzy": 97.10361, "insns": [224, 222], "diffs": 100, "code": "39152", "data": "6904", "regress": []}
- {"function": "VmStringSplit", "attempt": "empty-separator per-character array creation helper with const char input", "source": "ef29a67c630c", "build": 0, "pool": true, "fuzzy": 97.10361, "insns": [224, 222], "diffs": 100, "code": "39152", "data": "6904", "regress": []}
- {"function": "VmStringSplit", "attempt": "null-separator and zero-limit array creation share value-count inline helper", "source": "4c78ba884a67", "build": 0, "pool": true, "fuzzy": 97.10361, "insns": [224, 222], "diffs": 142, "code": "39152", "data": "6904", "regress": []}
## CHANSVmFormatString
Origin a120e478; owned source unchanged.
Target431/431: only r14/r18 lifetimes for character/string temporary and common string-format cleanup differ. Existing record/allocation helpers unsuccessful. Test actual format-tail conversion and precision digit loops as independent boundaries, leaving ownership and argument order intact.
- {"function": "CHANSVmFormatString", "attempt": "wide-format conversion and varargs call helper with string argument", "source": "4e2f34b8c42d", "build": 0, "pool": true, "fuzzy": 99.84919, "insns": [431, 431], "diffs": 13, "code": "39152", "data": "6904", "regress": []}
- {"function": "CHANSVmFormatString", "attempt": "wide-format conversion and varargs call helper with const string argument", "source": "9b4e8dd5e61f", "build": 0, "pool": true, "fuzzy": 99.84919, "insns": [431, 431], "diffs": 13, "code": "39152", "data": "6904", "regress": []}
- {"function": "CHANSVmFormatString", "attempt": "signed numeric formatting dispatch through const object helper", "source": "38bd330f8674", "build": 0, "pool": true, "fuzzy": 99.84919, "insns": [431, 431], "diffs": 13, "code": "39152", "data": "6904", "regress": []}
## VmBlobGetHexString
Origin a120e478; owned source unchanged.
Target82/82: blob validation, argument conversion, count and range guards, allocation, CTR nibble loop, offset commit. Fourteen differences are allocation only. Prior raw encoder boundaries failed; test whole-method input alias lifetime and shared allocation+loop boundary.
- {"function": "VmBlobGetHexString", "attempt": "full hex method helper formal parent object", "source": "20658c1480f8", "build": 0, "pool": true, "fuzzy": 97.13415, "insns": [82, 82], "diffs": 33, "code": "39152", "data": "6904", "regress": []}
- {"function": "VmBlobGetHexString", "attempt": "full hex method helper formal const parent object", "source": "1a29e5ffa85b", "build": 2, "error": "/TMC_JPEG/include -i libs/RVLFaceLib/include -i libs/EGG/include -i libs/OperaWWW/include -ir libs/RVL_SDK/include/private/bte -i build/43U/include -DBUILD_VERSION=0 -DVERSION_43U -i libs/RVL_SDK/include/private/bte -DNDEBUG=1 -DTARGET_RVL -W nomissingreturn -ipa file -gccinc -fp_contract off -O4,s -enc SJIS -lang=c -MMD -c src/channelScript/CHANSVm.c -o build/43U/src/src/channelScript && \"/usr/bin/python3\" tools/transform_dep.py build/43U/src/src/channelScript/CHANSVm.d build/43U/src/src/channelScript/CHANSVm.d\n### mwcceppc.exe Compiler:\n# File: src\\channelScript\\CHANSVm.c\n# ------------------------------------\n# 4286: BlobHeader* blob = (BlobHeader*)VmGetStrFromObjHdr(VmParentObj); \n# Error: ^\n# (10209) illegal implicit conversion from 'const struct CHANSVmObjHdr *' to\n# 'struct CHANSVmObjHdr *'\n# Too many errors printed, aborting program\n\nUser break, cancelled...\nninja: build stopped: subcommand failed.\n"}
- {"function": "VmBlobGetHexString", "attempt": "hex allocation, CTR loop and offset commit in one typed inline boundary", "source": "8f2e23a952ee", "build": 0, "pool": true, "fuzzy": 97.13415, "insns": [82, 82], "diffs": 33, "code": "39152", "data": "6904", "regress": []}
## VmBlobPackCommon
Origin a120e478; owned source unchanged.
Target668/668: first parser scan computes extent, optional blob allocation, second parser scan writes payloads, optional offset reset. Remaining244 differences are register allocation. New boundaries isolate first-pass sizing, string payload conversion and endian staging; retain parser initialization and alias-sensitive blob reloads.
- {"function": "VmBlobPackCommon", "attempt": "entire sizing scan through const source-blob helper with explicit extent output", "source": "9f2ebb529fe8", "build": 2, "error": "s/MSL/include -i libs/RVL_SDK/include -i libs/RevoEX/include -i libs/NW4R/include -i libs/RVLMiddleware/eZiText/include -i libs/RVLMiddleware/TMC_JPEG/include -i libs/RVLFaceLib/include -i libs/EGG/include -i libs/OperaWWW/include -ir libs/RVL_SDK/include/private/bte -i build/43U/include -DBUILD_VERSION=0 -DVERSION_43U -i libs/RVL_SDK/include/private/bte -DNDEBUG=1 -DTARGET_RVL -W nomissingreturn -ipa file -gccinc -fp_contract off -O4,s -enc SJIS -lang=c -MMD -c src/channelScript/CHANSVm.c -o build/43U/src/src/channelScript && \"/usr/bin/python3\" tools/transform_dep.py build/43U/src/src/channelScript/CHANSVm.d build/43U/src/src/channelScript/CHANSVm.d\n### mwcceppc.exe Compiler:\n# File: src\\channelScript\\CHANSVm.c\n# ------------------------------------\n# 4987: u32 totalSize = flag != 0 ? 0 : parentBlob->offset; \n# Error: ^^^\n# (10141) expression syntax error\n# Too many errors printed, aborting program\n\nUser break, cancelled...\nninja: build stopped: subcommand failed.\n"}
- {"function": "VmBlobPackCommon", "attempt": "string zero-fill, width conversion and offset update use const input helper", "source": "0111155c50f2", "build": 2, "error": "bs/RVLMiddleware/TMC_JPEG/include -i libs/RVLFaceLib/include -i libs/EGG/include -i libs/OperaWWW/include -ir libs/RVL_SDK/include/private/bte -i build/43U/include -DBUILD_VERSION=0 -DVERSION_43U -i libs/RVL_SDK/include/private/bte -DNDEBUG=1 -DTARGET_RVL -W nomissingreturn -ipa file -gccinc -fp_contract off -O4,s -enc SJIS -lang=c -MMD -c src/channelScript/CHANSVm.c -o build/43U/src/src/channelScript && \"/usr/bin/python3\" tools/transform_dep.py build/43U/src/src/channelScript/CHANSVm.d build/43U/src/src/channelScript/CHANSVm.d\n### mwcceppc.exe Compiler:\n# File: src\\channelScript\\CHANSVm.c\n# ------------------------------------\n# 4983: srcData = (u8*)VmGetStrFromObjHdr(strObj); \n# Error: ^\n# (10209) illegal implicit conversion from 'const struct CHANSVmObjHdr *' to\n# 'struct CHANSVmObjHdr *'\n# Too many errors printed, aborting program\n\nUser break, cancelled...\nninja: build stopped: subcommand failed.\n"}
- {"function": "VmBlobPackCommon", "attempt": "endianness staging switch owns integer-buffer alias boundary", "source": "0a4f0ab31810", "build": 0, "pool": true, "fuzzy": 97.62724, "insns": [668, 668], "diffs": 253, "code": "39152", "data": "6904", "regress": []}
## VmBlobUnpack
Origin a120e478; owned source unchanged.
Target517/517: parser extent/count pass, array allocation, parser decode pass. New sizing/helper split and blob-element allocation distinguish code from previously tried integer value decoder and hex/zero trimming helpers.
- {"function": "VmBlobUnpack", "attempt": "complete count scan through const blob-and-format inline helper", "source": "2cdadc9a90a6", "build": 0, "pool": true, "fuzzy": 94.471954, "insns": [538, 517], "diffs": 502, "code": "39152", "data": "6904", "regress": []}
- {"function": "VmBlobUnpack", "attempt": "endianness conversion separated before signedness decoding", "source": "b4e6a55b58ac", "build": 0, "pool": true, "fuzzy": 98.03675, "insns": [517, 517], "diffs": 150, "code": "39152", "data": "6904", "regress": []}
- {"function": "VmBlobUnpack", "attempt": "blob-element allocation, source copy and cursor advancement helper", "source": "3fa61d774d6e", "build": 0, "pool": true, "fuzzy": 97.05996, "insns": [522, 517], "diffs": 402, "code": "39152", "data": "6904", "regress": []}
- {"function": "VmBlobGetHexString", "attempt": "formal const parent with explicit legacy accessor adaptation, accessor does not write header", "source": "80c44abc68dd", "build": 0, "pool": true, "fuzzy": 97.13415, "insns": [82, 82], "diffs": 33, "code": "39152", "data": "6904", "regress": []}
- {"function": "VmBlobPackCommon", "attempt": "first-pass sizing helper with C89 declarations and const blob input", "source": "55c48705e748", "build": 0, "pool": true, "fuzzy": 94.18563, "insns": [691, 668], "diffs": 655, "code": "39152", "data": "6904", "regress": []}
- {"function": "VmBlobPackCommon", "attempt": "string payload conversion helper preserving mutable legacy accessor signature", "source": "2e4063c2b5e3", "build": 0, "pool": true, "fuzzy": 97.03443, "insns": [666, 668], "diffs": 362, "code": "39152", "data": "6904", "regress": []}
## VmWinEmuWrite
Origin a120e478; owned source unchanged.
Target67/67 reuses dead VM r27 for converted object; baseline instead uses r29 and uses r27 for length. Earlier whole-writer, whole-loop, typed accessor and call-only helpers already failed. Isolate real per-chunk locals and report handling, leaving object reload in caller.
- {"function": "VmWinEmuWrite", "attempt": "whole per-chunk encoder and report helper owns its actual scratch buffer", "source": "2b5a13b8d79d", "build": 0, "pool": true, "fuzzy": 87.0, "insns": [71, 67], "diffs": 48, "code": "39152", "data": "6904", "regress": []}
- {"function": "VmWinEmuWrite", "attempt": "per-chunk encoding/report helper receives caller-owned buffer and lengths", "source": "fdbef89ce98b", "build": 0, "pool": true, "fuzzy": 87.07462, "insns": [71, 67], "diffs": 47, "code": "39152", "data": "6904", "regress": []}
- {"function": "VmWinEmuWrite", "attempt": "successful SJIS buffer termination and report use separate inline helper", "source": "983e5f910cb8", "build": 0, "pool": true, "fuzzy": 99.62687, "insns": [67, 67], "diffs": 5, "code": "39152", "data": "6904", "regress": []}
## CHANSVmLinkModules
Origin a120e478; owned source unchanged.
Target189/189, 43 allocation differences. Global pass owns r25 table/r26 list/r27 index; native pass owns r27 table/r26 list/r25 index, module lives r23. Separate list-input helpers remove shared loop-index/table variable lifetimes; earlier pVm-input pass helpers were not exact.
- {"function": "CHANSVmLinkModules", "attempt": "resolution passes (1,) receive list head directly, module formal first", "source": "8177855f3d19", "build": 0, "pool": true, "fuzzy": 99.07407, "insns": [189, 189], "diffs": 31, "code": "39152", "data": "6904", "regress": []}
- {"function": "CHANSVmLinkModules", "attempt": "resolution passes (2,) receive list head directly, module formal first", "source": "3e72e69edb87", "build": 0, "pool": true, "fuzzy": 98.783066, "insns": [189, 189], "diffs": 39, "code": "39152", "data": "6904", "regress": []}
- {"function": "CHANSVmLinkModules", "attempt": "resolution passes (1, 2) receive list head directly, module formal first", "source": "dc852938244a", "build": 0, "pool": true, "fuzzy": 99.33862, "insns": [189, 189], "diffs": 23, "code": "39152", "data": "6904", "regress": []}
- {"function": "CHANSVmLinkModules", "attempt": "resolution passes (1, 2) receive list head directly, module formal second", "source": "a6f0eff3d448", "build": 0, "pool": true, "fuzzy": 99.33862, "insns": [189, 189], "diffs": 23, "code": "39152", "data": "6904", "regress": []}
Both list-input helpers reduce LinkModules43 to23 diffs. All inner-pass registers now match; only module r24 versus targetr23 and outer index r23 versus targetr24 differ. Try natural caller declaration/initialization order on this new graph, then third pass boundary.
- {"function": "CHANSVmLinkModules", "attempt": "declare outer index before module pointer with two list-input helpers", "source": "63a498a10d6e", "build": 0, "pool": true, "fuzzy": 100.0, "insns": [189, 189], "diffs": 0, "code": "39908", "data": "6904", "regress": []}
- {"function": "CHANSVmLinkModules", "attempt": "initialize outer index before binding module list with two list-input helpers", "source": "3c99bfc27a2f", "build": 0, "pool": true, "fuzzy": 99.33862, "insns": [189, 189], "diffs": 23, "code": "39152", "data": "6904", "regress": []}
- {"function": "CHANSVmLinkModules", "attempt": "outer module traversal expressed as counted for loop with two list-input helpers", "source": "46540aabf2f8", "build": 0, "pool": true, "fuzzy": 99.33862, "insns": [189, 189], "diffs": 23, "code": "39152", "data": "6904", "regress": []}
- {"function": "CHANSVmLinkModules", "attempt": "three typed pass helpers with const module input for local method scan", "source": "8cc52683bdc5", "build": 0, "pool": true, "fuzzy": 99.33862, "insns": [189, 189], "diffs": 23, "code": "39152", "data": "6904", "regress": []}
## CHANSVmStep
Origin a120e478; owned source unchanged.
Target1253/1253 with276 differences. Previous count/property/type-enumeration boundaries audited and not repeated. Test independently scoped constant-string, indirect-load and indirect-store handlers; preserve frame scratch outputs and return paths.
- {"function": "CHANSVmStep", "attempt": "constant-string validation and accumulator publication form one inline handler", "source": "ca8f3b843126", "build": 0, "pool": true, "fuzzy": 96.98723, "insns": [1253, 1253], "diffs": 276, "code": "39152", "data": "6904", "regress": []}
- {"function": "CHANSVmStep", "attempt": "LOAD_INDIRECT copy lookup store cleanup owned by inline handler with explicit scratch reference", "source": "9cd14aeb2e8e", "build": 0, "pool": true, "fuzzy": 96.98723, "insns": [1253, 1253], "diffs": 276, "code": "39152", "data": "6904", "regress": []}
- {"function": "CHANSVmStep", "attempt": "STORE_INDIRECT copy lookup store cleanup owned by inline handler with explicit scratch reference", "source": "d3d015790c88", "build": 0, "pool": true, "fuzzy": 96.98723, "insns": [1253, 1253], "diffs": 276, "code": "39152", "data": "6904", "regress": []}
- {"function": "CHANSVmLinkModules", "attempt": "format exact helper candidate and remove caller declarations and labels made obsolete by extraction", "source": "b620541da10c", "build": 0, "pool": true, "fuzzy": 100.0, "insns": [189, 189], "diffs": 0, "code": "39908", "data": "6904", "regress": []}
## Exact candidate
CHANSVmLinkModules now100.0%,189/189instructions,diffs0. The global and native dispatch walks each take their module and list head as arguments, own their own table/index/list locals, and return the existing error code. This reproduces target inner-loop register lifetimes. Declaring the outer module counter before its module pointer fixes the final r23/r24 exchange. Calls, traversal order, bounds checks, error joins, writes and literal pool are unchanged. No assembly, undefined values, volatile, metadata or linking change. Cleaned obsolete caller locals/labels and helper indentation; exact status and all233 baseline function scores rechecked. Candidate adds756 matched code bytes, keeps6904/6904 data, and raises223->224 exact functions. Parent validation still required.
All ten remaining baseline functions have at least3 distinct compiled source forms. Failed compiles do not count. Parser/date/formatter/writer scheduling and register ties remain; blob sizing boundaries introduce control-flow cost, so all are restored. Step's three new handler boundaries reproduce the original1253instructions/276diffs unchanged. Only LinkModules is retained.
Quick gate PASS: full43Ubuild, targetDOL26116613f624061ba99c8d1a299aaa6efa85670d, pool identical, instruction-exact224/233, matched code39908/53564, data6904/6904; regressions0, forbidden0, readability0. Focused diff reviewed: only the two dispatch walks extracted and caller index declaration moved. Local checkpoint commit follows; final non-quick clean gate remains required.
## Final coverage and clean gate
- CHANSVmConvertToFloatFromStr: 97.59036%; 83/83 instructions, 2 differences; 3 distinct successful trials.
- VmDateDtor: 94.96703%; 91/91 instructions, 7 differences; 3 distinct successful trials.
- VmStringSplit: 98.04054%; 222/222 instructions, 66 differences; 3 distinct successful trials.
- CHANSVmFormatString: 99.84919%; 431/431 instructions, 13 differences; 3 distinct successful trials.
- VmBlobGetHexString: 98.71951%; 82/82 instructions, 14 differences; 3 distinct successful trials.
- VmBlobPackCommon: 97.949104%; 668/668 instructions, 244 differences; 3 distinct successful trials.
- VmBlobUnpack: 98.452614%; 517/517 instructions, 141 differences; 3 distinct successful trials.
- VmWinEmuWrite: 99.62687%; 67/67 instructions, 5 differences; 3 distinct successful trials.
- CHANSVmStep: 96.98723%; 1253/1253 instructions, 276 differences; 3 distinct successful trials.
36 distinct successful source trials, including final formatting; 3 failed compilation trials excluded. All 9 remaining functions received at least 3 distinct compiling attempts. Only CHANSVmLinkModules source changes retained.
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/channelScript/CHANSVm] pool: IDENTICAL
[src/channelScript/CHANSVm] objdiff: code 39908/53564 data 6904/6904 functions 224/233 fuzzy 99.4599 linked code 0
[src/channelScript/CHANSVm] instruction-exact functions: 224/233
[src/channelScript/CHANSVm] section .data size 4672 match 100.0
[src/channelScript/CHANSVm] section .rodata size 1432 match 100.0
[src/channelScript/CHANSVm] section .sbss size 16 match 100.0
[src/channelScript/CHANSVm] section .sdata size 600 match 100.0
[src/channelScript/CHANSVm] section .sdata2 size 184 match 100.0
[src/channelScript/CHANSVm] section .text size 53564 match 99.45986
[src/channelScript/CHANSVm] below 100: CHANSVmConvertToFloatFromStr 97.59036
[src/channelScript/CHANSVm] below 100: VmDateDtor 94.96703
[src/channelScript/CHANSVm] below 100: VmStringSplit 98.04054
[src/channelScript/CHANSVm] below 100: CHANSVmFormatString 99.84919
[src/channelScript/CHANSVm] below 100: VmBlobGetHexString 98.71951
[src/channelScript/CHANSVm] below 100: VmBlobPackCommon 97.949104
[src/channelScript/CHANSVm] below 100: VmBlobUnpack 98.452614
[src/channelScript/CHANSVm] below 100: VmWinEmuWrite 99.62687
[src/channelScript/CHANSVm] below 100: CHANSVmStep 96.98723
[src/channelScript/CHANSVm] baseline: code 39152/53564 data 6904 functions 223 fuzzy 99.4412
regressions vs baseline: 0
global matched_code_percent: 92.30162 -> 92.32686
global fuzzy_match_percent: 99.73362 -> 99.73394
global complete_code_percent: 74.91312 -> 74.91312
global matched_data_percent: 99.78196 -> 99.78196
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
Final non-quick clean gate PASS. Instruction-exact functions 223/233 -> 224/233, code 39152 -> 39908/53564, data 6904/6904 unchanged. Source commit 594bce67. Fresh post-gate objdiff/report, pool125/125, ctxdiff189/189 with zero differences, full43U build and build/43U/ok agree. DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. Regressions, forbidden additions and readability warnings are all zero. Origin remains a120e478; no concurrent owned-source changes. No push, PR, merge, rebase or other worktree edits.
Parent acceptance remains pending. This worker round has a new exact function; the full unit still has 9 nonexact functions and remains unlinked. The compiler source shapes behind those remaining allocation and scheduling differences are unresolved. No source changes occurred after the clean gate.