diff --git a/assembly/deserialize/simple/arbitrary.ts b/assembly/deserialize/simple/arbitrary.ts index c16ddd2..66259ee 100644 --- a/assembly/deserialize/simple/arbitrary.ts +++ b/assembly/deserialize/simple/arbitrary.ts @@ -1,22 +1,18 @@ import { JSON } from "../.."; -import { unsafeCharCodeAt } from "../../custom/util"; +import { deserializeArray } from "./array"; import { deserializeBoolean } from "./bool"; import { deserializeFloat } from "./float"; -import { deserializeInteger } from "./integer"; import { deserializeObject } from "./object"; import { deserializeString } from "./string"; // @ts-ignore -@inline export function deserializeArbitrary(srcStart: usize, srcEnd: usize, dst: usize = 0): JSON.Value { - const firstChar = unsafeCharCodeAt(data, 0); - - if (firstChar == 34) return JSON.Value.from(deserializeString(data)); - if (firstChar == 123) return JSON.Value.from(deserializeObject(data)); - if (firstChar > 47 && firstChar < 58) return JSON.Value.from(data.includes(".") ? deserializeInteger(data) : deserializeFloat(data)); - if (firstChar == 45) return JSON.Value.from(data.includes(".") ? deserializeInteger(data) : deserializeFloat(data)); - if (firstChar == 91) { - // array - } - if (firstChar == 116 || firstChar == 102) return JSON.Value.from(deserializeBoolean(data)); +@inline export function deserializeArbitrary(srcStart: usize, srcEnd: usize, dst: usize): JSON.Value { + const firstChar = load(srcStart); + if (firstChar == 34) return JSON.Value.from(deserializeString(srcStart, srcEnd, dst)); + else if (firstChar == 123) return JSON.Value.from(deserializeObject(srcStart, srcEnd, dst)); + else if (firstChar - 48 <= 9 || firstChar == 45) return JSON.Value.from(deserializeFloat(srcStart, srcEnd)); + else if (firstChar == 91) { + return JSON.Value.from(deserializeArray(srcStart, srcEnd, dst)); + } else if (firstChar == 116 || firstChar == 102) return JSON.Value.from(deserializeBoolean(srcStart, srcEnd)); return unreachable(); } diff --git a/assembly/deserialize/simple/array.ts b/assembly/deserialize/simple/array.ts index e20ab82..c316132 100644 --- a/assembly/deserialize/simple/array.ts +++ b/assembly/deserialize/simple/array.ts @@ -1,3 +1,5 @@ +import { JSON } from "../.."; +import { deserializeArbitraryArray } from "./array/arbitrary"; import { deserializeArrayArray } from "./array/array"; import { deserializeBooleanArray } from "./array/bool"; import { deserializeFloatArray } from "./array/float"; @@ -20,17 +22,21 @@ export function deserializeArray(srcStart: usize, srcEnd: u // @ts-ignore return deserializeFloatArray(srcStart, srcEnd, dst); } else if (isArrayLike>()) { - // @ts-ignore + // @ts-ignore: type return deserializeArrayArray(srcStart, srcEnd, dst); - } else if (isMap>()) { - return deserializeMapArray(srcStart, srcEnd, dst); } else if (isManaged>() || isReference>()) { const type = changetype>>(0); - // @ts-ignore - if (isDefined(type.__DESERIALIZE)) { + if (type instanceof JSON.Value) { + // @ts-ignore: type + return deserializeArbitraryArray(srcStart, srcEnd, dst); + } else if (type instanceof Map) { + // @ts-ignore: type + return deserializeMapArray(srcStart, srcEnd, dst); + // @ts-ignore: defined by transform + } else if (isDefined(type.__DESERIALIZE)) { return deserializeObjectArray(srcStart, srcEnd, dst); } - throw new Error("Could not parse array of type " + nameof() + "! Make sure to add the @json decorator over classes!"); + throw new Error("Could not parse array of type " + nameof() + "!"); } else { throw new Error("Could not parse array of type " + nameof() + "!"); } diff --git a/assembly/deserialize/simple/array/arbitrary.ts b/assembly/deserialize/simple/array/arbitrary.ts new file mode 100644 index 0000000..d99b45f --- /dev/null +++ b/assembly/deserialize/simple/array/arbitrary.ts @@ -0,0 +1,113 @@ +import { BACK_SLASH, BRACE_LEFT, BRACE_RIGHT, BRACKET_LEFT, BRACKET_RIGHT, CHAR_F, CHAR_N, CHAR_T, COMMA, QUOTE } from "../../../custom/chars"; +import { JSON } from "../../../"; +import { isSpace } from "util/string"; +import { ptrToStr } from "../../../util/ptrToStr"; + +export function deserializeArbitraryArray(srcStart: usize, srcEnd: usize, dst: usize): JSON.Value[] { + const out: JSON.Value[] = []; + let lastIndex: usize = 0; + let depth: u32 = 0; + while (srcStart < srcEnd) { + const code = load(srcStart); + if (code == QUOTE) { + lastIndex = srcStart; + srcStart += 2; + while (srcStart < srcEnd) { + const code = load(srcStart); + if (code == QUOTE && load(srcStart - 2) !== BACK_SLASH) { + while (isSpace(load((srcStart += 2)))) { + /* empty */ + } + console.log("Value (string): " + ptrToStr(lastIndex, srcStart)); + // @ts-ignore: exists + out.push(JSON.__deserialize>(lastIndex, srcStart)); + break; + } + srcStart += 2; + } + } else if (code - 48 <= 9 || code == 45) { + lastIndex = srcStart; + srcStart += 2; + while (srcStart < srcEnd) { + const code = load(srcStart); + if (code == COMMA || code == BRACE_RIGHT || isSpace(code)) { + // @ts-ignore: type + out.push(JSON.__deserialize>(lastIndex, srcStart)); + console.log("Value (number): " + ptrToStr(lastIndex, srcStart)); + while (isSpace(load((srcStart += 2)))) { + /* empty */ + } + break; + } + srcStart += 2; + } + } else if (code == BRACE_LEFT) { + lastIndex = srcStart; + depth++; + srcStart += 2; + while (srcStart < srcEnd) { + const code = load(srcStart); + if (code == BRACE_RIGHT) { + if (--depth == 0) { + // @ts-ignore: type + out.push(JSON.__deserialize>(lastIndex, srcStart)); + console.log("Value (object): " + ptrToStr(lastIndex, srcStart)); + while (isSpace(load((srcStart += 2)))) { + /* empty */ + } + break; + } + } else if (code == BRACE_LEFT) depth++; + srcStart += 2; + } + } else if (code == BRACKET_LEFT) { + lastIndex = srcStart; + depth++; + srcStart += 2; + while (srcStart < srcEnd) { + const code = load(srcStart); + if (code == BRACKET_RIGHT) { + if (--depth == 0) { + // @ts-ignore: type + out.push(JSON.__deserialize>(lastIndex, srcStart)); + console.log("Value (array): " + ptrToStr(lastIndex, srcStart)); + while (isSpace(load((srcStart += 2)))) { + /* empty */ + } + break; + } + } else if (code == BRACKET_LEFT) depth++; + srcStart += 2; + } + } else if (code == CHAR_T) { + if (load(srcStart) == 28429475166421108) { + // @ts-ignore: type + out.push(JSON.__deserialize>(lastIndex, srcStart += 8)); + console.log("Value (bool): " + ptrToStr(srcStart - 8, srcStart)); + while (isSpace(load((srcStart += 2)))) { + /* empty */ + } + } + } else if (code == CHAR_F) { + if (load(srcStart, 2) == 28429466576093281) { + // @ts-ignore: type + out.push(JSON.__deserialize>(lastIndex, srcStart += 10)); + console.log("Value (bool): " + ptrToStr(srcStart - 10, srcStart)); + while (isSpace(load((srcStart += 2)))) { + /* empty */ + } + } + } else if (code == CHAR_N) { + if (load(srcStart) == 30399761348886638) { + // @ts-ignore: type + out.push(JSON.__deserialize>(lastIndex, srcStart += 8)); + console.log("Value (null): " + ptrToStr(srcStart - 8, srcStart)); + while (isSpace(load((srcStart += 2)))) { + /* empty */ + } + } + } + srcStart += 2; + } + return out; +} diff --git a/assembly/deserialize/simple/object.ts b/assembly/deserialize/simple/object.ts index 96960de..55e7cf1 100644 --- a/assembly/deserialize/simple/object.ts +++ b/assembly/deserialize/simple/object.ts @@ -76,7 +76,7 @@ export function deserializeObject(srcStart: usize, srcEnd: usize, dst: usize) srcStart += 2; while (srcStart < srcEnd) { const code = load(srcStart); - if (((code ^ BRACE_RIGHT) | (code ^ BRACKET_RIGHT)) == 32) { + if (code == BRACE_RIGHT) { if (--depth == 0) { // @ts-ignore: exists out.__DESERIALIZE(keyStart, keyEnd, lastIndex, srcStart, dst); @@ -87,7 +87,27 @@ export function deserializeObject(srcStart: usize, srcEnd: usize, dst: usize) } break; } - } else if (((code ^ BRACE_LEFT) | (code ^ BRACKET_LEFT)) == 220) depth++; + } else if (code == BRACE_LEFT) depth++; + srcStart += 2; + } + } else if (code == BRACKET_LEFT) { + lastIndex = srcStart; + depth++; + srcStart += 2; + while (srcStart < srcEnd) { + const code = load(srcStart); + if (code == BRACKET_RIGHT) { + if (--depth == 0) { + // @ts-ignore: exists + out.__DESERIALIZE(keyStart, keyEnd, lastIndex, srcStart, dst); + console.log("Value (array): " + ptrToStr(lastIndex, srcStart)); + keyStart = 0; + while (isSpace(load((srcStart += 2)))) { + /* empty */ + } + break; + } + } else if (code == BRACKET_LEFT) depth++; srcStart += 2; } } else if (code == CHAR_T) { diff --git a/assembly/test.ts b/assembly/test.ts index a5a8175..1dce255 100644 --- a/assembly/test.ts +++ b/assembly/test.ts @@ -3,12 +3,18 @@ import { deserializeObject } from "./deserialize/simple/object"; import { bytes } from "./util"; @json class Vec3 { - x: i16 = 1 - y: i16 = 2; - z: i16 = 3; + x: i16 = 1; + yy: i16 = 2; + zzz: i16 = 3; + xxxx: i16 = 4; + yyyyy: i16 = 5; + zzzzzz: i16 = 6; + xxxxxxx: i16 = 7; + yyyyyyyy: i16 = 8; + zzzzzzzzz: i16 = 9; } -const serialized = JSON.stringify(new Vec3()); +let serialized = JSON.stringify(new Vec3()); console.log("Serialized: " + serialized); -const deserialized = deserializeObject(changetype(serialized), changetype(serialized) + bytes(serialized), changetype(new Vec3())); +let deserialized = deserializeObject(changetype(serialized), changetype(serialized) + bytes(serialized), changetype(new Vec3())); console.log("Deserialized: " + JSON.stringify(deserialized)); \ No newline at end of file diff --git a/transform/lib/index.js b/transform/lib/index.js index a108126..a2f00da 100644 --- a/transform/lib/index.js +++ b/transform/lib/index.js @@ -215,10 +215,12 @@ class JSONTransform extends Visitor { indentInc(); if (memberLen == 2) DESERIALIZE += `${indent}switch (load(keyStart)) {\n`; - if (memberLen == 4) + else if (memberLen == 4) DESERIALIZE += `${indent}switch (load(keyStart)) {\n`; - if (memberLen == 8) - DESERIALIZE += `${indent}switch (load(keyStart)) {\n`; + else if (memberLen == 6) + DESERIALIZE += `${indent}let code = (load(keyStart) << 16) | load(keyStart, 4);\n`; + else + DESERIALIZE += toMemCDecl(memberLen, indent); for (let i = 0; i < memberGroup.length; i++) { const member = memberGroup[i]; const memberName = member.alias || member.name; @@ -229,22 +231,33 @@ class JSONTransform extends Visitor { DESERIALIZE += `${indent} }\n`; } else if (memberLen == 4) { - DESERIALIZE += `${indent} case ${strToNum(memberName)[1]}: { // ${memberName}\n`; + DESERIALIZE += `${indent} case ${toU32(memberName)}: { // ${memberName}\n`; DESERIALIZE += `${indent} store<${member.type}>(ptr, JSON.__deserialize<${member.type}>(valStart, valEnd), offsetof(${JSON.stringify(member.name)}));\n`; DESERIALIZE += `${indent} return;\n`; DESERIALIZE += `${indent} }\n`; } - else if (memberLen == 8) { - DESERIALIZE += `${indent} case ${strToNum(memberName)[1]}: { // ${memberName}\n`; - DESERIALIZE += `${indent} store<${member.type}>(ptr, JSON.__deserialize<${member.type}>(valStart, valEnd), offsetof(${JSON.stringify(member.name)}));\n`; - DESERIALIZE += `${indent} return;\n`; - DESERIALIZE += `${indent} }\n`; + else if (memberLen == 6) { + DESERIALIZE += i == 0 ? indent : ""; + DESERIALIZE += `if (code == ${toU48(memberName)}) { // ${memberName}\n`; + DESERIALIZE += `${indent} store<${member.type}>(ptr, JSON.__deserialize<${member.type}>(valStart, valEnd), offsetof(${JSON.stringify(member.name)}));\n`; + DESERIALIZE += `${indent} return;\n`; + DESERIALIZE += `${indent}}${i < memberGroup.length - 1 ? " else " : "\n"}`; + } + else { + DESERIALIZE += i == 0 ? indent : ""; + DESERIALIZE += `if (${toMemCCheck(memberName)}) { // ${memberName}\n`; + DESERIALIZE += `${indent} store<${member.type}>(ptr, JSON.__deserialize<${member.type}>(valStart, valEnd), offsetof(${JSON.stringify(member.name)}));\n`; + DESERIALIZE += `${indent} return;\n`; + DESERIALIZE += `${indent}}${i < memberGroup.length - 1 ? " else " : "\n"}`; } } - DESERIALIZE += `${indent}}\n`; + if (memberLen < 6) { + DESERIALIZE += `${indent}}\n`; + } indentDec(); + DESERIALIZE += `${indent} return;\n`; + DESERIALIZE += `${indent}}\n`; } - DESERIALIZE += `${indent}}\n`; indentDec(); DESERIALIZE += `${indent}}\n`; indentDec(); @@ -344,7 +357,7 @@ class JSONTransform extends Visitor { if (size == "v128") { let index = this.newStmts.simd.findIndex(v => v.includes(num)); let name = "SIMD_" + (index == -1 ? this.newStmts.simd.length : index); - if (index) + if (index && !this.newStmts.simd.includes(`const ${name} = ${num};`)) this.newStmts.simd.push(`const ${name} = ${num};`); out.push("store(bs.offset, " + name + ", " + offset + "); // " + data.slice((offset >> 1), (offset >> 1) + 8)); offset += 16; @@ -464,6 +477,61 @@ function getArgs(args) { } return out; } +function toU16(data, offset = 0) { + return (data.charCodeAt(offset + 0)).toString(); +} +function toU32(data, offset = 0) { + return ((data.charCodeAt(offset + 1) << 16) | + data.charCodeAt(offset + 0)).toString(); +} +function toU48(data, offset = 0) { + return ((BigInt(data.charCodeAt(offset + 2)) << 32n) | + (BigInt(data.charCodeAt(offset + 1)) << 16n) | + BigInt(data.charCodeAt(offset + 0))).toString(); +} +function toU64(data, offset = 0) { + return ((BigInt(data.charCodeAt(offset + 3)) << 48n) | + (BigInt(data.charCodeAt(offset + 2)) << 32n) | + (BigInt(data.charCodeAt(offset + 1)) << 16n) | + BigInt(data.charCodeAt(offset + 0))).toString(); +} +function toMemCDecl(n, indent) { + let out = ""; + let offset = 0; + let index = 0; + while (n >= 8) { + out += `${indent}const code${index++} = load(keyStart, ${offset});\n`; + offset += 8; + n -= 8; + } + while (n >= 4) { + out += `${indent}const code${index++} = load(keyStart, ${offset});\n`; + offset += 4; + n -= 4; + } + if (n == 1) + out += `${indent}const code${index++} = load(keyStart, ${offset});\n`; + return out; +} +function toMemCCheck(data) { + let n = data.length << 1; + let out = ""; + let offset = 0; + let index = 0; + while (n >= 8) { + out += ` && code${index++} == ${toU64(data, offset >> 1)}`; + offset += 8; + n -= 8; + } + while (n >= 4) { + out += ` && code${index++} == ${toU32(data, offset >> 1)}`; + offset += 4; + n -= 4; + } + if (n == 1) + out += ` && code${index++} == ${toU16(data, offset >> 1)}`; + return out.slice(4); +} function strToNum(data, simd = false, offset = 0) { const out = []; let n = data.length; diff --git a/transform/lib/index.js.map b/transform/lib/index.js.map index e7fcfb1..04c9d85 100644 --- a/transform/lib/index.js.map +++ b/transform/lib/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,oBAAoB,EAAU,MAAM,EAAqC,uBAAuB,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAA0E,SAA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AAC,CAAC;AAC3D,CAAC;AAED,SAAS,MAAM,CAAC,IAAY;IAC1B,IAAI,IAAI,IAAI,IAAI;QAAE,OAAO,CAAC,CAAC;SACtB,IAAI,IAAI,IAAI,IAAI;QAAE,OAAO,CAAC,CAAC;SAC3B,IAAI,IAAI,IAAI,KAAK;QAAE,OAAO,EAAE,CAAC;SAC7B,IAAI,IAAI,IAAI,KAAK;QAAE,OAAO,EAAE,CAAC;SAC7B,IAAI,IAAI,IAAI,KAAK;QAAE,OAAO,EAAE,CAAC;SAC7B,IAAI,IAAI,IAAI,KAAK;QAAE,OAAO,EAAE,CAAC;SAC7B,IAAI,IAAI,IAAI,KAAK;QAAE,OAAO,EAAE,CAAC;SAC7B,IAAI,IAAI,IAAI,KAAK;QAAE,OAAO,EAAE,CAAC;SAC7B,IAAI,IAAI,IAAI,MAAM,IAAI,IAAI,IAAI,SAAS;QAAE,OAAO,EAAE,CAAC;;QACnD,OAAO,CAAC,CAAC;AAChB,CAAC;AAED,SAAS,YAAY,CAAC,MAAc;IAClC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC;AACpD,CAAC"} \ No newline at end of file diff --git a/transform/src/index.ts b/transform/src/index.ts index 3b13e49..d6bafaa 100644 --- a/transform/src/index.ts +++ b/transform/src/index.ts @@ -238,8 +238,9 @@ class JSONTransform extends Visitor { const memberLen = (memberGroup[0].alias || memberGroup[0].name).length << 1 DESERIALIZE += `${indent}case ${memberLen}: {\n`; indentInc(); if (memberLen == 2) DESERIALIZE += `${indent}switch (load(keyStart)) {\n`; - if (memberLen == 4) DESERIALIZE += `${indent}switch (load(keyStart)) {\n`; - if (memberLen == 8) DESERIALIZE += `${indent}switch (load(keyStart)) {\n`; + else if (memberLen == 4) DESERIALIZE += `${indent}switch (load(keyStart)) {\n`; + else if (memberLen == 6) DESERIALIZE += `${indent}let code = (load(keyStart) << 16) | load(keyStart, 4);\n`; + else DESERIALIZE += toMemCDecl(memberLen, indent); for (let i = 0; i < memberGroup.length; i++) { const member = memberGroup[i]; const memberName = member.alias || member.name; @@ -249,25 +250,36 @@ class JSONTransform extends Visitor { DESERIALIZE += `${indent} return;\n`; DESERIALIZE += `${indent} }\n`; } else if (memberLen == 4) { - DESERIALIZE += `${indent} case ${strToNum(memberName)[1]}: { // ${memberName}\n`; - DESERIALIZE += `${indent} store<${member.type}>(ptr, JSON.__deserialize<${member.type}>(valStart, valEnd), offsetof(${JSON.stringify(member.name)}));\n`; - DESERIALIZE += `${indent} return;\n`; - DESERIALIZE += `${indent} }\n`; - } else if (memberLen == 8) { - DESERIALIZE += `${indent} case ${strToNum(memberName)[1]}: { // ${memberName}\n`; + DESERIALIZE += `${indent} case ${toU32(memberName)}: { // ${memberName}\n`; DESERIALIZE += `${indent} store<${member.type}>(ptr, JSON.__deserialize<${member.type}>(valStart, valEnd), offsetof(${JSON.stringify(member.name)}));\n`; DESERIALIZE += `${indent} return;\n`; DESERIALIZE += `${indent} }\n`; + } else if (memberLen == 6) { + DESERIALIZE += i == 0 ? indent : ""; + DESERIALIZE += `if (code == ${toU48(memberName)}) { // ${memberName}\n`; + DESERIALIZE += `${indent} store<${member.type}>(ptr, JSON.__deserialize<${member.type}>(valStart, valEnd), offsetof(${JSON.stringify(member.name)}));\n`; + DESERIALIZE += `${indent} return;\n`; + DESERIALIZE += `${indent}}${i < memberGroup.length - 1 ? " else " : "\n"}`; + } else { + DESERIALIZE += i == 0 ? indent : ""; + DESERIALIZE += `if (${toMemCCheck(memberName)}) { // ${memberName}\n`; + DESERIALIZE += `${indent} store<${member.type}>(ptr, JSON.__deserialize<${member.type}>(valStart, valEnd), offsetof(${JSON.stringify(member.name)}));\n`; + DESERIALIZE += `${indent} return;\n`; + DESERIALIZE += `${indent}}${i < memberGroup.length - 1 ? " else " : "\n"}`; } } - DESERIALIZE += `${indent}}\n`; + if (memberLen < 6) { + DESERIALIZE += `${indent}}\n`; // Close switch + } indentDec(); + DESERIALIZE += `${indent} return;\n`; // Break switch + DESERIALIZE += `${indent}}\n` // Close length switch } - DESERIALIZE += `${indent}}\n` + indentDec(); - DESERIALIZE += `${indent}}\n` + DESERIALIZE += `${indent}}\n`; // Close length switch indentDec(); - DESERIALIZE += `${indent}}\n` + DESERIALIZE += `${indent}}\n`; // Close function indent = " "; @@ -398,7 +410,7 @@ class JSONTransform extends Visitor { // This could be put in its own file let index = this.newStmts.simd.findIndex(v => v.includes(num)); let name = "SIMD_" + (index == -1 ? this.newStmts.simd.length : index); - if (index) this.newStmts.simd.push(`const ${name} = ${num};`); + if (index && !this.newStmts.simd.includes(`const ${name} = ${num};`)) this.newStmts.simd.push(`const ${name} = ${num};`); out.push("store(bs.offset, " + name + ", " + offset + "); // " + data.slice((offset >> 1), (offset >> 1) + 8)); offset += 16; } @@ -518,6 +530,79 @@ function getArgs(args: Expression[] | null): string[] { return out; } +function toU16(data: string, offset: number = 0): string { + return (data.charCodeAt(offset + 0)).toString(); +} + +function toU32(data: string, offset: number = 0): string { + return ( + (data.charCodeAt(offset + 1) << 16) | + data.charCodeAt(offset + 0) + ).toString(); +} + +function toU48(data: string, offset: number = 0): string { + return ( + (BigInt(data.charCodeAt(offset + 2)) << 32n) | + (BigInt(data.charCodeAt(offset + 1)) << 16n) | + BigInt(data.charCodeAt(offset + 0)) + ).toString(); +} + +function toU64(data: string, offset: number = 0): string { + return ( + (BigInt(data.charCodeAt(offset + 3)) << 48n) | + (BigInt(data.charCodeAt(offset + 2)) << 32n) | + (BigInt(data.charCodeAt(offset + 1)) << 16n) | + BigInt(data.charCodeAt(offset + 0)) + ).toString(); +} + +function toMemCDecl(n: number, indent: string): string { + let out = "" + let offset = 0; + let index = 0; + while (n >= 8) { + out += `${indent}const code${index++} = load(keyStart, ${offset});\n`; + offset += 8; + n -= 8; + } + + while (n >= 4) { + out += `${indent}const code${index++} = load(keyStart, ${offset});\n`; + offset += 4; + n -= 4; + } + + if (n == 1) + out += `${indent}const code${index++} = load(keyStart, ${offset});\n`; + + return out; +} + +function toMemCCheck(data: string): string { + let n = data.length << 1; + let out = ""; + let offset = 0; + let index = 0; + while (n >= 8) { + out += ` && code${index++} == ${toU64(data, offset >> 1)}`; + offset += 8; + n -= 8; + } + + while (n >= 4) { + out += ` && code${index++} == ${toU32(data, offset >> 1)}`; + offset += 4; + n -= 4; + } + + if (n == 1) + out += ` && code${index++} == ${toU16(data, offset >> 1)}`; + + return out.slice(4); +} + function strToNum(data: string, simd: boolean = false, offset: number = 0): string[][] { const out: string[][] = []; let n = data.length;