mirror of
https://github.com/morluto/rea
synced 2026-10-27 14:42:18 -04:00
refactor(tests): keep fixture adapters outside runtime
This commit is contained in:
@@ -268,24 +268,3 @@ function* referencedTypeCount(
|
||||
|
||||
/** Rows between cooperative yields while linking. */
|
||||
const LINK_BATCH = 256;
|
||||
|
||||
/** Synchronous linking for byte-level callers. */
|
||||
export const linkIl2cppBinary = (
|
||||
bytes: Buffer,
|
||||
metadata: Il2cppMetadataDecoded,
|
||||
facts: Il2cppMetadataLinkFacts,
|
||||
architecture?: string,
|
||||
options: Il2cppBinaryReadOptions = {},
|
||||
): Il2cppBinaryLink => {
|
||||
const steps = linkIl2cppBinarySteps(
|
||||
bytes,
|
||||
metadata,
|
||||
facts,
|
||||
architecture,
|
||||
options,
|
||||
);
|
||||
for (;;) {
|
||||
const step = steps.next();
|
||||
if (step.done) return step.value;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -969,23 +969,3 @@ function* readMetadataCoreSteps(
|
||||
link: tables.linkFacts,
|
||||
};
|
||||
}
|
||||
|
||||
const runSteps = <T>(steps: Generator<void, T>): T => {
|
||||
for (;;) {
|
||||
const step = steps.next();
|
||||
if (step.done) return step.value;
|
||||
}
|
||||
};
|
||||
|
||||
/** Synchronous consumption of the same decoder for byte-level callers. */
|
||||
export const readIl2cppMetadata = (
|
||||
bytes: Buffer,
|
||||
options: Il2cppMetadataReadOptions = {},
|
||||
): Il2cppMetadataDecoded => runSteps(readIl2cppMetadataSteps(bytes, options));
|
||||
|
||||
/** Synchronous decoding that also retains the typed row facts used for native linking. */
|
||||
export const readIl2cppMetadataForLinking = (
|
||||
bytes: Buffer,
|
||||
options: Il2cppMetadataReadOptions = {},
|
||||
): Il2cppMetadataForLinking =>
|
||||
runSteps(readIl2cppMetadataForLinkingSteps(bytes, options));
|
||||
|
||||
Reference in New Issue
Block a user