mirror of
https://github.com/morluto/rea.git
synced 2026-12-06 17:23:37 +08:00
refactor(il2cpp): share collection availability for counts (#17431)
This commit is contained in:
@@ -316,6 +316,8 @@ const parseMetadataReport = (
|
||||
const reusable = isImmutableJsonSnapshot(report);
|
||||
const cached = reusable ? checkedReports.get(report) : undefined;
|
||||
if (cached !== undefined) return ok(cached);
|
||||
const rowCount = (collection: Request["collection"]) =>
|
||||
rowsFor(report, collection)?.length ?? null;
|
||||
const methodAddresses =
|
||||
report.binary == null ? undefined : report.method_addresses;
|
||||
const checked = {
|
||||
@@ -334,21 +336,17 @@ const parseMetadataReport = (
|
||||
events: report.events?.length ?? null,
|
||||
parameters: report.parameters?.length ?? null,
|
||||
string_literals: report.string_literals?.length ?? null,
|
||||
code_gen_modules: report.binary?.code_gen_modules.length ?? null,
|
||||
code_gen_modules: rowCount("code_gen_modules"),
|
||||
method_addresses: methodAddresses?.length ?? null,
|
||||
method_address_states: countStates(methodAddresses),
|
||||
return_types:
|
||||
report.binary == null ? null : (report.return_types?.length ?? null),
|
||||
field_types:
|
||||
report.binary == null ? null : (report.field_types?.length ?? null),
|
||||
parameter_types:
|
||||
report.binary == null ? null : (report.parameter_types?.length ?? null),
|
||||
return_types: rowCount("return_types"),
|
||||
field_types: rowCount("field_types"),
|
||||
parameter_types: rowCount("parameter_types"),
|
||||
generic_method_instances: report.generic_method_instances?.length ?? null,
|
||||
generic_method_instance_states: countStates(
|
||||
report.generic_method_instances,
|
||||
),
|
||||
generic_method_issues:
|
||||
report.binary?.generic_methods?.issues.length ?? null,
|
||||
generic_method_issues: rowCount("generic_method_issues"),
|
||||
},
|
||||
};
|
||||
if (reusable) checkedReports.set(report, checked);
|
||||
|
||||
Reference in New Issue
Block a user