refactor(domain): reuse ordered map appends in index builders (#14548)

This commit is contained in:
Vincent Koc authored and GitHub committed 2026-11-25 15:19:22 +00:00
1 parent 15e5b421bf
commit 5cd8658643
49 files changed
+115 -195

No files matched your search

+2 -3
View File
@@ -1,3 +1,4 @@
import { appendToMapList } from "../domain/appendToMapList.js";
import type { Il2cppGenericMethodInstance } from "../domain/il2cpp/il2cppMetadata.js";
import { Il2cppBinaryFormatFailure } from "./Il2cppBinaryFormat.js";
import {
@@ -240,9 +241,7 @@ export function* linkGenericMethodsSteps(
for (let row = 0; row < tableCount; row++) {
if (row % BATCH === 0) yield;
const spec = i32(rowAt(row))!;
const rows = specRows.get(spec);
if (rows === undefined) specRows.set(spec, [row]);
else rows.push(row);
appendToMapList(specRows, spec, row);
}
const issues: Il2cppGenericMethodIssue[] = [];
const issue = (row: number, address: bigint, message: string) => {