diff --git a/CHANGELOG b/CHANGELOG index 15424b8..657302f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,7 @@ - fix: disable SIMD in generated transform code by default - fix: re-add as-bs dependency so that it will not break in non-local environments +- fix: remove AS201 'conversion from type usize to i32' warning ## 2025-01-20 - 1.0.0-alpha.1 diff --git a/assembly/deserialize/simple/object.ts b/assembly/deserialize/simple/object.ts index 494cb03..375e8f0 100644 --- a/assembly/deserialize/simple/object.ts +++ b/assembly/deserialize/simple/object.ts @@ -9,7 +9,7 @@ export function deserializeObject(srcStart: usize, srcEnd: usize, dst: usize) let keyEnd: usize = 0; let isKey = false; let depth = 0; - let lastIndex = 0; + let lastIndex: usize = 0; // while (srcStart < srcEnd && isSpace(load(srcStart))) srcStart += 2; // while (srcEnd > srcStart && isSpace(load(srcEnd))) srcEnd -= 2; diff --git a/assembly/serialize/simple/string.ts b/assembly/serialize/simple/string.ts index 3b5e99e..9f67fa0 100644 --- a/assembly/serialize/simple/string.ts +++ b/assembly/serialize/simple/string.ts @@ -18,7 +18,7 @@ export function serializeString(src: string): void { store(bs.offset, QUOTE); bs.offset += 2; - let lastPtr: i32 = srcPtr; + let lastPtr: usize = srcPtr; while (srcPtr < srcEnd) { const code = load(srcPtr); if (code == 34 || code == 92 || code < 32) { diff --git a/transform/lib/builder.js b/transform/lib/builder.js deleted file mode 100644 index 84f3c34..0000000 --- a/transform/lib/builder.js +++ /dev/null @@ -1,1353 +0,0 @@ -import { isTypeOmitted, operatorTokenToString, util } from "assemblyscript/dist/assemblyscript.js"; -import { Visitor } from "./visitor.js"; -function assert(isTruish, message = "assertion error") { - if (!isTruish) - throw new Error(message); - return isTruish; -} -export class ASTBuilder extends Visitor { - static build(node) { - var builder = new ASTBuilder(); - builder.visitNode(node); - return builder.finish(); - } - sb = []; - indentLevel = 0; - visitNode(node) { - return this.visit(node); - } - visitSource(source) { - var statements = source.statements; - for (let i = 0, k = statements.length; i < k; ++i) { - this.visitNodeAndTerminate(statements[i]); - } - } - visitTypeNode(node) { - switch (node.kind) { - case 1: { - this.visitNamedTypeNode(node); - break; - } - case 2: { - this.visitFunctionTypeNode(node); - break; - } - default: - assert(false); - } - } - visitTypeName(node) { - this.visitIdentifierExpression(node.identifier); - var sb = this.sb; - var current = node.next; - while (current) { - sb.push("."); - this.visitIdentifierExpression(current.identifier); - current = current.next; - } - } - visitNamedTypeNode(node) { - this.visitTypeName(node.name); - var typeArguments = node.typeArguments; - if (typeArguments) { - let numTypeArguments = typeArguments.length; - let sb = this.sb; - if (numTypeArguments) { - sb.push("<"); - this.visitTypeNode(typeArguments[0]); - for (let i = 1; i < numTypeArguments; ++i) { - sb.push(", "); - this.visitTypeNode(typeArguments[i]); - } - sb.push(">"); - } - if (node.isNullable) - sb.push(" | null"); - } - } - visitFunctionTypeNode(node) { - var isNullable = node.isNullable; - var sb = this.sb; - sb.push(isNullable ? "((" : "("); - var explicitThisType = node.explicitThisType; - if (explicitThisType) { - sb.push("this: "); - this.visitTypeNode(explicitThisType); - } - var parameters = node.parameters; - var numParameters = parameters.length; - if (numParameters) { - if (explicitThisType) - sb.push(", "); - this.serializeParameter(parameters[0]); - for (let i = 1; i < numParameters; ++i) { - sb.push(", "); - this.serializeParameter(parameters[i]); - } - } - var returnType = node.returnType; - if (returnType) { - sb.push(") => "); - this.visitTypeNode(returnType); - } - else { - sb.push(") => void"); - } - if (isNullable) - sb.push(") | null"); - } - visitTypeParameter(node) { - this.visitIdentifierExpression(node.name); - var extendsType = node.extendsType; - if (extendsType) { - this.sb.push(" extends "); - this.visitTypeNode(extendsType); - } - var defaultType = node.defaultType; - if (defaultType) { - this.sb.push("="); - this.visitTypeNode(defaultType); - } - } - visitIdentifierExpression(node) { - if (node.isQuoted) - this.visitStringLiteral(node.text); - else - this.sb.push(node.text); - } - visitArrayLiteralExpression(node) { - var sb = this.sb; - sb.push("["); - var elements = node.elementExpressions; - var numElements = elements.length; - if (numElements) { - let element = elements[0]; - if (element) - this.visitNode(element); - for (let i = 1; i < numElements; ++i) { - element = elements[i]; - sb.push(", "); - if (element) - this.visitNode(element); - } - } - sb.push("]"); - } - visitObjectLiteralExpression(node) { - var sb = this.sb; - var names = node.names; - var values = node.values; - var numElements = names.length; - assert(numElements == values.length); - if (numElements) { - sb.push("{\n"); - util.indent(sb, ++this.indentLevel); - this.visitNode(names[0]); - sb.push(": "); - this.visitNode(values[0]); - for (let i = 1; i < numElements; ++i) { - sb.push(",\n"); - util.indent(sb, this.indentLevel); - let name = names[i]; - let value = values[i]; - if (name == value) { - this.visitNode(name); - } - else { - this.visitNode(name); - sb.push(": "); - this.visitNode(value); - } - } - sb.push("\n"); - util.indent(sb, --this.indentLevel); - sb.push("}"); - } - else { - sb.push("{}"); - } - } - visitAssertionExpression(node) { - var sb = this.sb; - switch (node.assertionKind) { - case 0: { - sb.push("<"); - if (node.toType) - this.visitTypeNode(node.toType); - sb.push(">"); - this.visitNode(node.expression); - break; - } - case 1: { - this.visitNode(node.expression); - sb.push(" as "); - if (node.toType) - this.visitTypeNode(node.toType); - break; - } - case 2: { - this.visitNode(node.expression); - sb.push("!"); - break; - } - case 3: { - this.visitNode(node.expression); - sb.push(" as const"); - break; - } - default: - assert(false); - } - } - visitBinaryExpression(node) { - var sb = this.sb; - this.visitNode(node.left); - sb.push(" "); - sb.push(operatorTokenToString(node.operator)); - sb.push(" "); - this.visitNode(node.right); - } - visitCallExpression(node) { - this.visitNode(node.expression); - this.visitArguments(node.typeArguments, node.args); - } - visitArguments(typeArguments, args) { - var sb = this.sb; - if (typeArguments) { - let numTypeArguments = typeArguments.length; - if (numTypeArguments) { - sb.push("<"); - this.visitTypeNode(typeArguments[0]); - for (let i = 1; i < numTypeArguments; ++i) { - sb.push(", "); - this.visitTypeNode(typeArguments[i]); - } - sb.push(">("); - } - } - else { - sb.push("("); - } - var numArgs = args.length; - if (numArgs) { - this.visitNode(args[0]); - for (let i = 1; i < numArgs; ++i) { - sb.push(", "); - this.visitNode(args[i]); - } - } - sb.push(")"); - } - visitClassExpression(node) { - var declaration = node.declaration; - this.visitClassDeclaration(declaration); - } - visitCommaExpression(node) { - var expressions = node.expressions; - var numExpressions = expressions.length; - this.visitNode(expressions[0]); - var sb = this.sb; - for (let i = 1; i < numExpressions; ++i) { - sb.push(","); - this.visitNode(expressions[i]); - } - } - visitElementAccessExpression(node) { - var sb = this.sb; - this.visitNode(node.expression); - sb.push("["); - this.visitNode(node.elementExpression); - sb.push("]"); - } - visitFunctionExpression(node) { - var declaration = node.declaration; - if (!declaration.arrowKind) { - if (declaration.name.text.length) { - this.sb.push("function "); - } - else { - this.sb.push("function"); - } - } - else { - assert(declaration.name.text.length == 0); - } - this.visitFunctionCommon(declaration); - } - visitLiteralExpression(node) { - switch (node.literalKind) { - case 0: { - this.visitFloatLiteralExpression(node); - break; - } - case 1: { - this.visitIntegerLiteralExpression(node); - break; - } - case 2: { - this.visitStringLiteralExpression(node); - break; - } - case 3: { - this.visitTemplateLiteralExpression(node); - break; - } - case 4: { - this.visitRegexpLiteralExpression(node); - break; - } - case 5: { - this.visitArrayLiteralExpression(node); - break; - } - case 6: { - this.visitObjectLiteralExpression(node); - break; - } - default: { - assert(false); - break; - } - } - } - visitFloatLiteralExpression(node) { - this.sb.push(node.value.toString()); - } - visitInstanceOfExpression(node) { - this.visitNode(node.expression); - this.sb.push(" instanceof "); - this.visitTypeNode(node.isType); - } - visitIntegerLiteralExpression(node) { - this.sb.push(i64_to_string(node.value)); - } - visitStringLiteral(str) { - var sb = this.sb; - sb.push('"'); - this.visitRawString(str, 34); - sb.push('"'); - } - visitRawString(str, quote) { - var sb = this.sb; - var off = 0; - var i = 0; - for (let k = str.length; i < k;) { - switch (str.charCodeAt(i)) { - case 0: { - if (i > off) - sb.push(str.substring(off, (off = i + 1))); - sb.push("\\0"); - off = ++i; - break; - } - case 92: { - if (i > off) - sb.push(str.substring(off, i)); - off = ++i; - sb.push("\\b"); - break; - } - case 9: { - if (i > off) - sb.push(str.substring(off, i)); - off = ++i; - sb.push("\\t"); - break; - } - case 10: { - if (i > off) - sb.push(str.substring(off, i)); - off = ++i; - sb.push("\\n"); - break; - } - case 11: { - if (i > off) - sb.push(str.substring(off, i)); - off = ++i; - sb.push("\\v"); - break; - } - case 12: { - if (i > off) - sb.push(str.substring(off, i)); - off = ++i; - sb.push("\\f"); - break; - } - case 13: { - if (i > off) - sb.push(str.substring(off, i)); - sb.push("\\r"); - off = ++i; - break; - } - case 34: { - if (quote == 34) { - if (i > off) - sb.push(str.substring(off, i)); - sb.push('\\"'); - off = ++i; - } - else { - ++i; - } - break; - } - case 39: { - if (quote == 39) { - if (i > off) - sb.push(str.substring(off, i)); - sb.push("\\'"); - off = ++i; - } - else { - ++i; - } - break; - } - case 92: { - if (i > off) - sb.push(str.substring(off, i)); - sb.push("\\\\"); - off = ++i; - break; - } - case 96: { - if (quote == 96) { - if (i > off) - sb.push(str.substring(off, i)); - sb.push("\\`"); - off = ++i; - } - else { - ++i; - } - break; - } - default: { - ++i; - break; - } - } - } - if (i > off) - sb.push(str.substring(off, i)); - } - visitStringLiteralExpression(node) { - this.visitStringLiteral(node.value); - } - visitTemplateLiteralExpression(node) { - var sb = this.sb; - var tag = node.tag; - var parts = node.parts; - var expressions = node.expressions; - if (tag) - this.visitNode(tag); - sb.push("`"); - this.visitRawString(parts[0], 96); - assert(parts.length == expressions.length + 1); - for (let i = 0, k = expressions.length; i < k; ++i) { - sb.push("${"); - this.visitNode(expressions[i]); - sb.push("}"); - this.visitRawString(parts[i + 1], 96); - } - sb.push("`"); - } - visitRegexpLiteralExpression(node) { - var sb = this.sb; - sb.push("/"); - sb.push(node.pattern); - sb.push("/"); - sb.push(node.patternFlags); - } - visitNewExpression(node) { - this.sb.push("new "); - this.visitTypeName(node.typeName); - this.visitArguments(node.typeArguments, node.args); - } - visitParenthesizedExpression(node) { - var sb = this.sb; - sb.push("("); - this.visitNode(node.expression); - sb.push(")"); - } - visitPropertyAccessExpression(node) { - this.visitNode(node.expression); - this.sb.push("."); - this.visitIdentifierExpression(node.property); - } - visitTernaryExpression(node) { - var sb = this.sb; - this.visitNode(node.condition); - sb.push(" ? "); - this.visitNode(node.ifThen); - sb.push(" : "); - this.visitNode(node.ifElse); - } - visitUnaryExpression(node) { - switch (node.kind) { - case 27: { - this.visitUnaryPostfixExpression(node); - break; - } - case 28: { - this.visitUnaryPrefixExpression(node); - break; - } - default: - assert(false); - } - } - visitUnaryPostfixExpression(node) { - this.visitNode(node.operand); - this.sb.push(operatorTokenToString(node.operator)); - } - visitUnaryPrefixExpression(node) { - this.sb.push(operatorTokenToString(node.operator)); - this.visitNode(node.operand); - } - visitNodeAndTerminate(node) { - this.visitNode(node); - var sb = this.sb; - if (!sb.length || - node.kind == 47 || - node.kind == 38) { - sb.push(";\n"); - } - else { - let last = sb[sb.length - 1]; - let lastCharPos = last.length - 1; - if (lastCharPos >= 0 && (last.charCodeAt(lastCharPos) == 125 || last.charCodeAt(lastCharPos) == 59)) { - sb.push("\n"); - } - else { - sb.push(";\n"); - } - } - } - visitBlockStatement(node) { - var sb = this.sb; - var statements = node.statements; - var numStatements = statements.length; - if (numStatements) { - sb.push("{\n"); - let indentLevel = ++this.indentLevel; - for (let i = 0; i < numStatements; ++i) { - util.indent(sb, indentLevel); - this.visitNodeAndTerminate(statements[i]); - } - util.indent(sb, --this.indentLevel); - sb.push("}"); - } - else { - sb.push("{}"); - } - } - visitBreakStatement(node) { - var label = node.label; - if (label) { - this.sb.push("break "); - this.visitIdentifierExpression(label); - } - else { - this.sb.push("break"); - } - } - visitContinueStatement(node) { - var label = node.label; - if (label) { - this.sb.push("continue "); - this.visitIdentifierExpression(label); - } - else { - this.sb.push("continue"); - } - } - visitClassDeclaration(node, isDefault = false) { - var decorators = node.decorators; - if (decorators) { - for (let i = 0, k = decorators.length; i < k; ++i) { - this.serializeDecorator(decorators[i]); - } - } - var sb = this.sb; - if (isDefault) { - sb.push("export default "); - } - else { - this.serializeExternalModifiers(node); - } - if (node.is(128)) - sb.push("abstract "); - if (node.name.text.length) { - sb.push("class "); - this.visitIdentifierExpression(node.name); - } - else { - sb.push("class"); - } - var typeParameters = node.typeParameters; - if (typeParameters != null && typeParameters.length > 0) { - sb.push("<"); - this.visitTypeParameter(typeParameters[0]); - for (let i = 1, k = typeParameters.length; i < k; ++i) { - sb.push(", "); - this.visitTypeParameter(typeParameters[i]); - } - sb.push(">"); - } - var extendsType = node.extendsType; - if (extendsType) { - sb.push(" extends "); - this.visitTypeNode(extendsType); - } - var implementsTypes = node.implementsTypes; - if (implementsTypes) { - let numImplementsTypes = implementsTypes.length; - if (numImplementsTypes) { - sb.push(" implements "); - this.visitTypeNode(implementsTypes[0]); - for (let i = 1; i < numImplementsTypes; ++i) { - sb.push(", "); - this.visitTypeNode(implementsTypes[i]); - } - } - } - var indexSignature = node.indexSignature; - var members = node.members; - var numMembers = members.length; - if (indexSignature !== null || numMembers) { - sb.push(" {\n"); - let indentLevel = ++this.indentLevel; - if (indexSignature) { - util.indent(sb, indentLevel); - this.visitNodeAndTerminate(indexSignature); - } - for (let i = 0, k = members.length; i < k; ++i) { - let member = members[i]; - if (member.kind != 54 || member.parameterIndex < 0) { - util.indent(sb, indentLevel); - this.visitNodeAndTerminate(member); - } - } - util.indent(sb, --this.indentLevel); - sb.push("}"); - } - else { - sb.push(" {}"); - } - } - visitDoStatement(node) { - var sb = this.sb; - sb.push("do "); - this.visitNode(node.body); - if (node.body.kind == 30) { - sb.push(" while ("); - } - else { - util.indent(sb, this.indentLevel); - sb.push("while ("); - } - this.visitNode(node.condition); - sb.push(")"); - } - visitEmptyStatement(node) { - } - visitEnumDeclaration(node, isDefault = false) { - var sb = this.sb; - if (isDefault) { - sb.push("export default "); - } - else { - this.serializeExternalModifiers(node); - } - if (node.is(8)) - sb.push("const "); - sb.push("enum "); - this.visitIdentifierExpression(node.name); - var values = node.values; - var numValues = values.length; - if (numValues) { - sb.push(" {\n"); - let indentLevel = ++this.indentLevel; - util.indent(sb, indentLevel); - this.visitEnumValueDeclaration(node.values[0]); - for (let i = 1; i < numValues; ++i) { - sb.push(",\n"); - util.indent(sb, indentLevel); - this.visitEnumValueDeclaration(node.values[i]); - } - sb.push("\n"); - util.indent(sb, --this.indentLevel); - sb.push("}"); - } - else { - sb.push(" {}"); - } - } - visitEnumValueDeclaration(node) { - this.visitIdentifierExpression(node.name); - var initializer = node.initializer; - if (initializer) { - this.sb.push(" = "); - this.visitNode(initializer); - } - } - visitExportImportStatement(node) { - var sb = this.sb; - sb.push("export import "); - this.visitIdentifierExpression(node.externalName); - sb.push(" = "); - this.visitIdentifierExpression(node.name); - } - visitExportMember(node) { - this.visitIdentifierExpression(node.localName); - if (node.exportedName.text != node.localName.text) { - this.sb.push(" as "); - this.visitIdentifierExpression(node.exportedName); - } - } - visitExportStatement(node) { - var sb = this.sb; - if (node.isDeclare) { - sb.push("declare "); - } - var members = node.members; - if (members == null) { - sb.push("export *"); - } - else if (members.length > 0) { - let numMembers = members.length; - sb.push("export {\n"); - let indentLevel = ++this.indentLevel; - util.indent(sb, indentLevel); - this.visitExportMember(members[0]); - for (let i = 1; i < numMembers; ++i) { - sb.push(",\n"); - util.indent(sb, indentLevel); - this.visitExportMember(members[i]); - } - --this.indentLevel; - sb.push("\n}"); - } - else { - sb.push("export {}"); - } - var path = node.path; - if (path) { - sb.push(" from "); - this.visitStringLiteralExpression(path); - } - sb.push(";"); - } - visitExportDefaultStatement(node) { - var declaration = node.declaration; - switch (declaration.kind) { - case 52: { - this.visitEnumDeclaration(declaration, true); - break; - } - case 55: { - this.visitFunctionDeclaration(declaration, true); - break; - } - case 51: { - this.visitClassDeclaration(declaration, true); - break; - } - case 57: { - this.visitInterfaceDeclaration(declaration, true); - break; - } - case 59: { - this.visitNamespaceDeclaration(declaration, true); - break; - } - default: - assert(false); - } - } - visitExpressionStatement(node) { - this.visitNode(node.expression); - } - visitFieldDeclaration(node) { - var decorators = node.decorators; - if (decorators) { - for (let i = 0, k = decorators.length; i < k; ++i) { - this.serializeDecorator(decorators[i]); - } - } - this.serializeAccessModifiers(node); - this.visitIdentifierExpression(node.name); - var sb = this.sb; - if (node.flags & 16384) { - sb.push("!"); - } - var type = node.type; - if (type) { - sb.push(": "); - this.visitTypeNode(type); - } - var initializer = node.initializer; - if (initializer) { - sb.push(" = "); - this.visitNode(initializer); - } - } - visitForStatement(node) { - var sb = this.sb; - sb.push("for ("); - var initializer = node.initializer; - if (initializer) { - this.visitNode(initializer); - } - var condition = node.condition; - if (condition) { - sb.push("; "); - this.visitNode(condition); - } - else { - sb.push(";"); - } - var incrementor = node.incrementor; - if (incrementor) { - sb.push("; "); - this.visitNode(incrementor); - } - else { - sb.push(";"); - } - sb.push(") "); - this.visitNode(node.body); - } - visitForOfStatement(node) { - var sb = this.sb; - sb.push("for ("); - this.visitNode(node.variable); - sb.push(" of "); - this.visitNode(node.iterable); - sb.push(") "); - this.visitNode(node.body); - } - visitFunctionDeclaration(node, isDefault = false) { - var sb = this.sb; - var decorators = node.decorators; - if (decorators) { - for (let i = 0, k = decorators.length; i < k; ++i) { - this.serializeDecorator(decorators[i]); - } - } - if (isDefault) { - sb.push("export default "); - } - else { - this.serializeExternalModifiers(node); - this.serializeAccessModifiers(node); - } - if (node.name.text.length) { - sb.push("function "); - } - else { - sb.push("function"); - } - this.visitFunctionCommon(node); - } - visitFunctionCommon(node) { - var sb = this.sb; - this.visitIdentifierExpression(node.name); - var signature = node.signature; - var typeParameters = node.typeParameters; - if (typeParameters) { - let numTypeParameters = typeParameters.length; - if (numTypeParameters) { - sb.push("<"); - this.visitTypeParameter(typeParameters[0]); - for (let i = 1; i < numTypeParameters; ++i) { - sb.push(", "); - this.visitTypeParameter(typeParameters[i]); - } - sb.push(">"); - } - } - if (node.arrowKind == 2) { - let parameters = signature.parameters; - assert(parameters.length == 1); - assert(!signature.explicitThisType); - this.serializeParameter(parameters[0]); - } - else { - sb.push("("); - let parameters = signature.parameters; - let numParameters = parameters.length; - let explicitThisType = signature.explicitThisType; - if (explicitThisType) { - sb.push("this: "); - this.visitTypeNode(explicitThisType); - } - if (numParameters) { - if (explicitThisType) - sb.push(", "); - this.serializeParameter(parameters[0]); - for (let i = 1; i < numParameters; ++i) { - sb.push(", "); - this.serializeParameter(parameters[i]); - } - } - } - var body = node.body; - var returnType = signature.returnType; - if (node.arrowKind) { - if (body) { - if (node.arrowKind == 2) { - assert(isTypeOmitted(returnType)); - } - else { - if (isTypeOmitted(returnType)) { - sb.push(")"); - } - else { - sb.push("): "); - this.visitTypeNode(returnType); - } - } - sb.push(" => "); - this.visitNode(body); - } - else { - assert(!isTypeOmitted(returnType)); - sb.push(" => "); - this.visitTypeNode(returnType); - } - } - else { - if (!isTypeOmitted(returnType) && !node.isAny(524288 | 4096)) { - sb.push("): "); - this.visitTypeNode(returnType); - } - else { - sb.push(")"); - } - if (body) { - sb.push(" "); - this.visitNode(body); - } - } - } - visitIfStatement(node) { - var sb = this.sb; - sb.push("if ("); - this.visitNode(node.condition); - sb.push(") "); - var ifTrue = node.ifTrue; - this.visitNode(ifTrue); - if (ifTrue.kind != 30) { - sb.push(";\n"); - } - var ifFalse = node.ifFalse; - if (ifFalse) { - if (ifTrue.kind == 30) { - sb.push(" else "); - } - else { - sb.push("else "); - } - this.visitNode(ifFalse); - } - } - visitImportDeclaration(node) { - var externalName = node.foreignName; - var name = node.name; - this.visitIdentifierExpression(externalName); - if (externalName.text != name.text) { - this.sb.push(" as "); - this.visitIdentifierExpression(name); - } - } - visitImportStatement(node) { - var sb = this.sb; - sb.push("import "); - var declarations = node.declarations; - var namespaceName = node.namespaceName; - if (declarations) { - let numDeclarations = declarations.length; - if (numDeclarations) { - sb.push("{\n"); - let indentLevel = ++this.indentLevel; - util.indent(sb, indentLevel); - this.visitImportDeclaration(declarations[0]); - for (let i = 1; i < numDeclarations; ++i) { - sb.push(",\n"); - util.indent(sb, indentLevel); - this.visitImportDeclaration(declarations[i]); - } - --this.indentLevel; - sb.push("\n} from "); - } - else { - sb.push("{} from "); - } - } - else if (namespaceName) { - sb.push("* as "); - this.visitIdentifierExpression(namespaceName); - sb.push(" from "); - } - this.visitStringLiteralExpression(node.path); - } - visitIndexSignature(node) { - var sb = this.sb; - sb.push("[key: "); - this.visitTypeNode(node.keyType); - sb.push("]: "); - this.visitTypeNode(node.valueType); - } - visitInterfaceDeclaration(node, isDefault = false) { - var decorators = node.decorators; - if (decorators) { - for (let i = 0, k = decorators.length; i < k; ++i) { - this.serializeDecorator(decorators[i]); - } - } - var sb = this.sb; - if (isDefault) { - sb.push("export default "); - } - else { - this.serializeExternalModifiers(node); - } - sb.push("interface "); - this.visitIdentifierExpression(node.name); - var typeParameters = node.typeParameters; - if (typeParameters != null && typeParameters.length > 0) { - sb.push("<"); - this.visitTypeParameter(typeParameters[0]); - for (let i = 1, k = typeParameters.length; i < k; ++i) { - sb.push(", "); - this.visitTypeParameter(typeParameters[i]); - } - sb.push(">"); - } - var extendsType = node.extendsType; - if (extendsType) { - sb.push(" extends "); - this.visitTypeNode(extendsType); - } - sb.push(" {\n"); - var indentLevel = ++this.indentLevel; - var members = node.members; - for (let i = 0, k = members.length; i < k; ++i) { - util.indent(sb, indentLevel); - this.visitNodeAndTerminate(members[i]); - } - --this.indentLevel; - sb.push("}"); - } - visitMethodDeclaration(node) { - var decorators = node.decorators; - if (decorators) { - for (let i = 0, k = decorators.length; i < k; ++i) { - this.serializeDecorator(decorators[i]); - } - } - this.serializeAccessModifiers(node); - if (node.is(2048)) { - this.sb.push("get "); - } - else if (node.is(4096)) { - this.sb.push("set "); - } - this.visitFunctionCommon(node); - } - visitNamespaceDeclaration(node, isDefault = false) { - var decorators = node.decorators; - if (decorators) { - for (let i = 0, k = decorators.length; i < k; ++i) { - this.serializeDecorator(decorators[i]); - } - } - var sb = this.sb; - if (isDefault) { - sb.push("export default "); - } - else { - this.serializeExternalModifiers(node); - } - sb.push("namespace "); - this.visitIdentifierExpression(node.name); - var members = node.members; - var numMembers = members.length; - if (numMembers) { - sb.push(" {\n"); - let indentLevel = ++this.indentLevel; - for (let i = 0, k = members.length; i < k; ++i) { - util.indent(sb, indentLevel); - this.visitNodeAndTerminate(members[i]); - } - util.indent(sb, --this.indentLevel); - sb.push("}"); - } - else { - sb.push(" {}"); - } - } - visitReturnStatement(node) { - var value = node.value; - if (value) { - this.sb.push("return "); - this.visitNode(value); - } - else { - this.sb.push("return"); - } - } - visitTrueExpression(node) { - this.sb.push("true"); - } - visitFalseExpression(node) { - this.sb.push("false"); - } - visitNullExpression(node) { - this.sb.push("null"); - } - visitSwitchCase(node) { - var sb = this.sb; - var label = node.label; - if (label) { - sb.push("case "); - this.visitNode(label); - sb.push(":\n"); - } - else { - sb.push("default:\n"); - } - var statements = node.statements; - var numStatements = statements.length; - if (numStatements) { - let indentLevel = ++this.indentLevel; - util.indent(sb, indentLevel); - this.visitNodeAndTerminate(statements[0]); - for (let i = 1; i < numStatements; ++i) { - util.indent(sb, indentLevel); - this.visitNodeAndTerminate(statements[i]); - } - --this.indentLevel; - } - } - visitSwitchStatement(node) { - var sb = this.sb; - sb.push("switch ("); - this.visitNode(node.condition); - sb.push(") {\n"); - var indentLevel = ++this.indentLevel; - var cases = node.cases; - for (let i = 0, k = cases.length; i < k; ++i) { - util.indent(sb, indentLevel); - this.visitSwitchCase(cases[i]); - sb.push("\n"); - } - --this.indentLevel; - sb.push("}"); - } - visitThrowStatement(node) { - this.sb.push("throw "); - this.visitNode(node.value); - } - visitTryStatement(node) { - var sb = this.sb; - sb.push("try {\n"); - var indentLevel = ++this.indentLevel; - var statements = node.bodyStatements; - for (let i = 0, k = statements.length; i < k; ++i) { - util.indent(sb, indentLevel); - this.visitNodeAndTerminate(statements[i]); - } - var catchVariable = node.catchVariable; - if (catchVariable) { - util.indent(sb, indentLevel - 1); - sb.push("} catch ("); - this.visitIdentifierExpression(catchVariable); - sb.push(") {\n"); - let catchStatements = node.catchStatements; - if (catchStatements) { - for (let i = 0, k = catchStatements.length; i < k; ++i) { - util.indent(sb, indentLevel); - this.visitNodeAndTerminate(catchStatements[i]); - } - } - } - var finallyStatements = node.finallyStatements; - if (finallyStatements) { - util.indent(sb, indentLevel - 1); - sb.push("} finally {\n"); - for (let i = 0, k = finallyStatements.length; i < k; ++i) { - util.indent(sb, indentLevel); - this.visitNodeAndTerminate(finallyStatements[i]); - } - } - util.indent(sb, indentLevel - 1); - sb.push("}"); - } - visitTypeDeclaration(node) { - var decorators = node.decorators; - if (decorators) { - for (let i = 0, k = decorators.length; i < k; ++i) { - this.serializeDecorator(decorators[i]); - } - } - var sb = this.sb; - this.serializeExternalModifiers(node); - sb.push("type "); - this.visitIdentifierExpression(node.name); - var typeParameters = node.typeParameters; - if (typeParameters) { - let numTypeParameters = typeParameters.length; - if (numTypeParameters) { - sb.push("<"); - for (let i = 0; i < numTypeParameters; ++i) { - this.visitTypeParameter(typeParameters[i]); - } - sb.push(">"); - } - } - sb.push(" = "); - this.visitTypeNode(node.type); - } - visitVariableDeclaration(node) { - this.visitIdentifierExpression(node.name); - var type = node.type; - var sb = this.sb; - if (node.flags & 16384) { - sb.push("!"); - } - if (type) { - sb.push(": "); - this.visitTypeNode(type); - } - var initializer = node.initializer; - if (initializer) { - sb.push(" = "); - this.visitNode(initializer); - } - } - visitVariableStatement(node) { - var decorators = node.decorators; - if (decorators) { - for (let i = 0, k = decorators.length; i < k; ++i) { - this.serializeDecorator(decorators[i]); - } - } - var sb = this.sb; - var declarations = node.declarations; - var numDeclarations = declarations.length; - var firstDeclaration = declarations[0]; - this.serializeExternalModifiers(firstDeclaration); - sb.push(firstDeclaration.is(8) ? "const " : firstDeclaration.is(16) ? "let " : "var "); - this.visitVariableDeclaration(node.declarations[0]); - for (let i = 1; i < numDeclarations; ++i) { - sb.push(", "); - this.visitVariableDeclaration(node.declarations[i]); - } - } - visitWhileStatement(node) { - var sb = this.sb; - sb.push("while ("); - this.visitNode(node.condition); - var statement = node.body; - if (statement.kind == 34) { - sb.push(")"); - } - else { - sb.push(") "); - this.visitNode(node.body); - } - } - serializeDecorator(node) { - var sb = this.sb; - sb.push("@"); - this.visitNode(node.name); - var args = node.args; - if (args) { - sb.push("("); - let numArgs = args.length; - if (numArgs) { - this.visitNode(args[0]); - for (let i = 1; i < numArgs; ++i) { - sb.push(", "); - this.visitNode(args[i]); - } - } - sb.push(")\n"); - } - else { - sb.push("\n"); - } - util.indent(sb, this.indentLevel); - } - serializeParameter(node) { - var sb = this.sb; - var kind = node.parameterKind; - var implicitFieldDeclaration = node.implicitFieldDeclaration; - if (implicitFieldDeclaration) { - this.serializeAccessModifiers(implicitFieldDeclaration); - } - if (kind == 2) { - sb.push("..."); - } - this.visitIdentifierExpression(node.name); - var type = node.type; - var initializer = node.initializer; - if (type) { - if (kind == 1 && !initializer) - sb.push("?"); - if (!isTypeOmitted(type)) { - sb.push(": "); - this.visitTypeNode(type); - } - } - if (initializer) { - sb.push(" = "); - this.visitNode(initializer); - } - } - serializeExternalModifiers(node) { - var sb = this.sb; - if (node.is(2)) { - sb.push("export "); - } - else if (node.is(1)) { - sb.push("import "); - } - else if (node.is(4)) { - sb.push("declare "); - } - } - serializeAccessModifiers(node) { - var sb = this.sb; - if (node.is(256)) { - sb.push("public "); - } - else if (node.is(512)) { - sb.push("private "); - } - else if (node.is(1024)) { - sb.push("protected "); - } - if (node.is(32)) { - sb.push("static "); - } - else if (node.is(128)) { - sb.push("abstract "); - } - if (node.is(64)) { - sb.push("readonly "); - } - } - finish() { - var ret = this.sb.join(""); - this.sb = []; - return ret; - } -} -//# sourceMappingURL=builder.js.map \ No newline at end of file diff --git a/transform/lib/builder.js.map b/transform/lib/builder.js.map deleted file mode 100644 index a7fbfd0..0000000 --- a/transform/lib/builder.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"builder.js","sourceRoot":"","sources":["../src/builder.ts"],"names":[],"mappings":"AAGA,OAAO,EAA0vC,aAAa,EAAE,qBAAqB,EAAiE,IAAI,EAAmD,MAAM,uCAAuC,CAAC;AAC38C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,SAAS,MAAM,CAAI,QA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,IAAI,IAAI,CAAC,EAAE,KAAqB,EAAE,CAAC;YACxC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACtB,CAAC;aAAM,IAAI,IAAI,CAAC,EAAE,MAAuB,EAAE,CAAC;YAC1C,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,EAAE,IAAoB,EAAE,CAAC;YAChC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACrB,CAAC;aAAM,IAAI,IAAI,CAAC,EAAE,KAAsB,EAAE,CAAC;YACzC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACvB,CAAC;QACD,IAAI,IAAI,CAAC,EAAE,IAAsB,EAAE,CAAC;YAClC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IAED,MAAM;QACJ,IAAI,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC3B,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,OAAO,GAAG,CAAC;IACb,CAAC;CACF"} \ No newline at end of file diff --git a/transform/lib/index.js b/transform/lib/index.js deleted file mode 100644 index 6e17ea0..0000000 --- a/transform/lib/index.js +++ /dev/null @@ -1,627 +0,0 @@ -import { IdentifierExpression, Source, StringLiteralExpression, IntegerLiteralExpression, FloatLiteralExpression, NullExpression, TrueExpression, FalseExpression, Node, Tokenizer } from "assemblyscript/dist/assemblyscript.js"; -import { Transform } from "assemblyscript/dist/transform.js"; -import { Visitor } from "./visitor.js"; -import { SimpleParser, toString } from "./util.js"; -import * as path from "path"; -import { fileURLToPath } from "url"; -import { Property, PropertyFlags, Schema } from "./types.js"; -import { getClasses, getImportedClass } from "./linker.js"; -let indent = " "; -class JSONTransform extends Visitor { - parser; - schemas = []; - schema; - sources = new Set(); - imports = []; - jsonImport = null; - bsImport = null; - newStmts = { simd: [] }; - visitClassDeclaration(node) { - if (!node.decorators?.length) - return; - if (!node.decorators.some((decorator) => { - const name = decorator.name.text; - return name === "json" || name === "serializable"; - })) - return; - this.schema = new Schema(); - this.schema.node = node; - this.schema.name = node.name.text; - this.schemas.push(this.schema); - if (process.env["JSON_DEBUG"]) - console.log("Created schema: " + this.schema.name); - const members = [...node.members.filter((v) => v.kind === 54 && v.flags !== 32 && v.flags !== 512 && v.flags !== 1024 && !v.decorators?.some((decorator) => decorator.name.text === "omit"))]; - if (node.extendsType) { - const extendsName = node.extendsType?.name.identifier.text; - this.schema.parent = this.schemas.find((v) => v.name == extendsName); - if (!this.schema.parent) { - const internalSearch = getClasses(node.range.source).find((v) => v.name.text == extendsName); - if (internalSearch) { - if (process.env["JSON_DEBUG"]) - console.log("Found " + extendsName + " internally"); - this.visitClassDeclaration(internalSearch); - this.visitClassDeclaration(node); - return; - } - const externalSearch = getImportedClass(extendsName, node.range.source, this.parser); - if (externalSearch) { - if (process.env["JSON_DEBUG"]) - console.log("Found " + extendsName + " externally"); - this.visitClassDeclaration(externalSearch); - this.visitClassDeclaration(node); - return; - } - } - if (this.schema.parent?.members) { - for (let i = this.schema.parent.members.length - 1; i >= 0; i--) { - const replace = this.schema.members.find((v) => v.name == this.schema.parent?.members[i]?.name); - if (!replace) { - members.unshift(this.schema.parent?.members[i].node); - } - } - } - } - if (!members.length) { - this.generateEmptyMethods(node); - return; - } - this.addRequiredImports(node); - for (const member of members) { - if (!member.type) - throwError("Fields must be strongly typed", node.range); - const type = toString(member.type); - const name = member.name; - const value = member.initializer ? toString(member.initializer) : null; - if (type.startsWith("(") && type.includes("=>")) - continue; - const mem = new Property(); - mem.name = name.text; - mem.type = type; - mem.value = value; - mem.node = member; - mem.byteSize = sizeof(mem.type); - this.schema.byteSize += mem.byteSize; - if (type.includes("JSON.Raw")) - mem.flags.set(PropertyFlags.Raw, null); - if (member.decorators) { - for (const decorator of member.decorators) { - const decoratorName = decorator.name.text.toLowerCase().trim(); - switch (decoratorName) { - case "alias": { - const args = getArgs(decorator.args); - if (!args.length) - throwError("@alias must have an argument of type string or number", member.range); - mem.alias = args[0]; - break; - } - case "omitif": { - let arg = decorator.args[0]; - if (!decorator.args?.length) - throwError("@omitif must have an argument or callback that resolves to type bool", member.range); - mem.flags.set(PropertyFlags.OmitIf, arg); - this.schema.static = false; - break; - } - case "omitnull": { - if (isPrimitive(type)) { - throwError("@omitnull cannot be used on primitive types!", member.range); - } - else if (!member.type.isNullable) { - throwError("@omitnull cannot be used on non-nullable types!", member.range); - } - mem.flags.set(PropertyFlags.OmitNull, null); - this.schema.static = false; - break; - } - } - } - } - this.schema.members.push(mem); - } - if (!this.schema.static) - this.schema.members = sortMembers(this.schema.members); - let SERIALIZE = "__SERIALIZE(ptr: usize): void {\n"; - let INITIALIZE = "@inline __INITIALIZE(): this {\n"; - let DESERIALIZE = "__DESERIALIZE(keyStart: usize, keyEnd: usize, valStart: usize, valEnd: usize, ptr: usize): void {\n switch (keyEnd - keyStart) {\n"; - let ALLOCATE = "@inline __ALLOCATE(): void {\n"; - indent = " "; - if (this.schema.static == false) { - if (this.schema.members.some((v) => v.flags.has(PropertyFlags.OmitNull))) { - SERIALIZE += indent + "let block: usize = 0;\n"; - } - this.schema.byteSize += 2; - SERIALIZE += indent + "store(bs.offset, 123, 0); // {\n"; - SERIALIZE += indent + "bs.offset += 2;\n"; - } - let isPure = this.schema.static; - let isRegular = isPure; - let isFirst = true; - for (let i = 0; i < this.schema.members.length; i++) { - const member = this.schema.members[i]; - const aliasName = JSON.stringify(member.alias || member.name); - const realName = member.name; - const isLast = i == this.schema.members.length - 1; - const nonNullType = member.type.replace(" | null", ""); - if (member.value) { - INITIALIZE += ` this.${member.name} = ${member.value};\n`; - } - else if (this.schemas.find((v) => nonNullType == v.name)) { - INITIALIZE += ` this.${member.name} = changetype>(__new(offsetof>(), idof>())).__INITIALIZE();\n`; - } - else if (member.type.startsWith("Array<") || member.type.startsWith("Map<")) { - INITIALIZE += ` this.${member.name} = [];\n`; - } - else if (member.type == "string" || member.type == "String" || member.type == "JSON.Raw") { - INITIALIZE += ` this.${member.name} = "";\n`; - } - if (!isRegular && !member.flags.has(PropertyFlags.OmitIf) && !member.flags.has(PropertyFlags.OmitNull)) - isRegular = true; - if (isRegular && isPure) { - const keyPart = (isFirst ? "{" : ",") + aliasName + ":"; - this.schema.byteSize += keyPart.length << 1; - SERIALIZE += this.getStores(keyPart) - .map((v) => indent + v + "\n") - .join(""); - SERIALIZE += indent + `JSON.__serialize<${member.type}>(load<${member.type}>(ptr, offsetof(${JSON.stringify(realName)})));\n`; - if (isFirst) - isFirst = false; - } - else if (isRegular && !isPure) { - const keyPart = (isFirst ? "" : ",") + aliasName + ":"; - this.schema.byteSize += keyPart.length << 1; - SERIALIZE += this.getStores(keyPart) - .map((v) => indent + v + "\n") - .join(""); - SERIALIZE += indent + `JSON.__serialize<${member.type}>(load<${member.type}>(ptr, offsetof(${JSON.stringify(realName)})));\n`; - if (isFirst) - isFirst = false; - } - else { - if (member.flags.has(PropertyFlags.OmitNull)) { - SERIALIZE += indent + `if ((block = load(ptr, offsetof(${JSON.stringify(realName)}))) !== 0) {\n`; - indentInc(); - const keyPart = aliasName + ":"; - this.schema.byteSize += keyPart.length << 1; - SERIALIZE += this.getStores(keyPart) - .map((v) => indent + v + "\n") - .join(""); - SERIALIZE += indent + `JSON.__serialize<${member.type}>(load<${member.type}>(ptr, offsetof(${JSON.stringify(realName)})));\n`; - if (!isLast) { - this.schema.byteSize += 2; - SERIALIZE += indent + `store(bs.offset, 44, 0); // ,\n`; - SERIALIZE += indent + `bs.offset += 2;\n`; - } - indentDec(); - this.schema.byteSize += 2; - SERIALIZE += indent + `}\n`; - } - else if (member.flags.has(PropertyFlags.OmitIf)) { - if (member.flags.get(PropertyFlags.OmitIf).kind == 14) { - const arg = member.flags.get(PropertyFlags.OmitIf); - arg.declaration.signature.returnType.name = Node.createSimpleTypeName("boolean", arg.declaration.signature.returnType.name.range); - SERIALIZE += indent + `if ((${toString(member.flags.get(PropertyFlags.OmitIf))})(this)) {\n`; - } - else { - SERIALIZE += indent + `if (${toString(member.flags.get(PropertyFlags.OmitIf))}) {\n`; - } - indentInc(); - SERIALIZE += this.getStores(aliasName + ":") - .map((v) => indent + v + "\n") - .join(""); - SERIALIZE += indent + `JSON.__serialize<${member.type}>(load<${member.type}>(ptr, offsetof(${JSON.stringify(realName)})));\n`; - if (!isLast) { - this.schema.byteSize += 2; - SERIALIZE += indent + `store(bs.offset, 44, 0); // ,\n`; - SERIALIZE += indent + `bs.offset += 2;\n`; - } - indentDec(); - SERIALIZE += indent + `}\n`; - } - } - } - let sortedMembers = []; - let len = -1; - this.schema.members - .slice() - .sort((a, b) => (a.alias?.length || a.name.length) - (b.alias?.length || b.name.length)) - .forEach((member) => { - const _nameLength = member.alias?.length || member.name.length; - if (_nameLength === len) { - sortedMembers[sortedMembers.length - 1].push(member); - } - else { - sortedMembers.push([member]); - len = _nameLength; - } - }); - sortedMembers = sortedMembers.sort((a, b) => b.length - a.length); - indentInc(); - for (const memberGroup of sortedMembers) { - 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`; - 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; - if (memberLen == 2) { - DESERIALIZE += `${indent} case ${memberName.charCodeAt(0)}: { // ${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 == 4) { - 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"}`; - } - } - if (memberLen < 6) { - DESERIALIZE += `${indent}}\n`; - } - indentDec(); - DESERIALIZE += `${indent} return;\n`; - DESERIALIZE += `${indent}}\n`; - } - indentDec(); - DESERIALIZE += `${indent}}\n`; - indentDec(); - DESERIALIZE += `${indent}}\n`; - indent = " "; - this.schema.byteSize += 2; - SERIALIZE += indent + "store(bs.offset, 125, 0); // }\n"; - SERIALIZE += indent + "bs.offset += 2;\n"; - SERIALIZE += "}"; - ALLOCATE += indent + "bs.ensureSize(" + this.schema.byteSize + ");\n"; - ALLOCATE += "}"; - INITIALIZE += " return this;\n"; - INITIALIZE += "}"; - if (process.env["JSON_DEBUG"]) { - console.log(SERIALIZE); - console.log(INITIALIZE); - console.log(DESERIALIZE); - console.log(ALLOCATE); - } - const SERIALIZE_METHOD = SimpleParser.parseClassMember(SERIALIZE, node); - const INITIALIZE_METHOD = SimpleParser.parseClassMember(INITIALIZE, node); - const DESERIALIZE_METHOD = SimpleParser.parseClassMember(DESERIALIZE, node); - const ALLOCATE_METHOD = SimpleParser.parseClassMember(ALLOCATE, node); - if (!node.members.find((v) => v.name.text == "__SERIALIZE")) - node.members.push(SERIALIZE_METHOD); - if (!node.members.find((v) => v.name.text == "__INITIALIZE")) - node.members.push(INITIALIZE_METHOD); - if (!node.members.find((v) => v.name.text == "__DESERIALIZE")) - node.members.push(DESERIALIZE_METHOD); - if (!node.members.find((v) => v.name.text == "__ALLOCATE")) - node.members.push(ALLOCATE_METHOD); - super.visitClassDeclaration(node); - } - generateEmptyMethods(node) { - let SERIALIZE_RAW_EMPTY = '@inline __SERIALIZE(ptr: usize = changetype(this)): string {\n return "{}";\n}'; - let SERIALIZE_BS_EMPTY = "@inline __SERIALIZE(ptr: usize: bool): void {\n store(bs.offset, 8192123);\n bs.offset += 4;\n}"; - let INITIALIZE_EMPTY = "@inline __INITIALIZE(): this {\n return this;\n}"; - let DESERIALIZE_EMPTY = "@inline __DESERIALIZE(keyStart: usize, keyEnd: usize, valStart: usize, valEnd: usize, ptr: usize): void {\n return false;\n}"; - let ALLOCATE_EMPTY = "@inline __ALLOCATE(): void {\n bs.ensureSize(4);\n}"; - if (process.env["JSON_DEBUG"]) { - console.log(SERIALIZE_RAW_EMPTY); - console.log(SERIALIZE_BS_EMPTY); - console.log(INITIALIZE_EMPTY); - console.log(DESERIALIZE_EMPTY); - console.log(ALLOCATE_EMPTY); - } - const SERIALIZE_RAW_METHOD_EMPTY = SimpleParser.parseClassMember(SERIALIZE_RAW_EMPTY, node); - const SERIALIZE_BS_METHOD_EMPTY = SimpleParser.parseClassMember(SERIALIZE_BS_EMPTY, node); - const INITIALIZE_METHOD_EMPTY = SimpleParser.parseClassMember(INITIALIZE_EMPTY, node); - const DESERIALIZE_METHOD_EMPTY = SimpleParser.parseClassMember(DESERIALIZE_EMPTY, node); - const ALLOCATE_METHOD_EMPTY = SimpleParser.parseClassMember(ALLOCATE_EMPTY, node); - if (!node.members.find((v) => v.name.text == "__SERIALIZE")) - node.members.push(SERIALIZE_RAW_METHOD_EMPTY); - if (!node.members.find((v) => v.name.text == "__SERIALIZE")) - node.members.push(SERIALIZE_BS_METHOD_EMPTY); - if (!node.members.find((v) => v.name.text == "__INITIALIZE")) - node.members.push(INITIALIZE_METHOD_EMPTY); - if (!node.members.find((v) => v.name.text == "__DESERIALIZE")) - node.members.push(DESERIALIZE_METHOD_EMPTY); - if (!node.members.find((v) => v.name.text == "__ALLOCATE")) - node.members.push(ALLOCATE_METHOD_EMPTY); - } - visitImportStatement(node) { - super.visitImportStatement(node); - const source = this.parser.sources.find((src) => src.internalPath == node.internalPath); - if (!source) - return; - if (source.statements.some((stmt) => stmt.kind === 59 && stmt.name.text === "JSON")) - this.imports.push(node); - } - visitSource(node) { - this.imports = []; - super.visitSource(node); - } - addRequiredImports(node) { - if (!this.imports.find((i) => i.declarations.find((d) => d.foreignName.text == "bs"))) { - if (!this.bsImport) { - this.bsImport = "import { bs } from \"as-bs\""; - if (process.env["JSON_DEBUG"]) - console.log("Added as-bs import: " + this.bsImport + "\n"); - } - } - if (!this.imports.find((i) => i.declarations.find((d) => d.foreignName.text == "JSON"))) { - const __filename = fileURLToPath(import.meta.url); - const __dirname = path.dirname(__filename); - let relativePath = path.relative(path.dirname(node.range.source.normalizedPath), path.resolve(__dirname, "../../assembly/index.ts")); - if (!relativePath.startsWith(".") && !relativePath.startsWith("/")) - relativePath = "./" + relativePath; - const txt = `import { JSON } from "${relativePath}";`; - if (!this.jsonImport) { - this.jsonImport = txt; - if (process.env["JSON_DEBUG"]) - console.log("Added json-as import: " + txt + "\n"); - } - } - } - getStores(data, simd = false) { - const out = []; - const sizes = strToNum(data, simd); - let offset = 0; - for (const [size, num] of sizes) { - 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 && !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; - } - if (size == "u64") { - out.push("store(bs.offset, " + num + ", " + offset + "); // " + data.slice(offset >> 1, (offset >> 1) + 4)); - offset += 8; - } - else if (size == "u32") { - out.push("store(bs.offset, " + num + ", " + offset + "); // " + data.slice(offset >> 1, (offset >> 1) + 2)); - offset += 4; - } - else if (size == "u16") { - out.push("store(bs.offset, " + num + ", " + offset + "); // " + data.slice(offset >> 1, (offset >> 1) + 1)); - offset += 2; - } - } - out.push("bs.offset += " + offset + ";"); - return out; - } -} -export default class Transformer extends Transform { - afterParse(parser) { - const transformer = new JSONTransform(); - const sources = parser.sources.sort((_a, _b) => { - const a = _a.internalPath; - const b = _b.internalPath; - if (a[0] == "~" && b[0] !== "~") { - return -1; - } - else if (a[0] !== "~" && b[0] == "~") { - return 1; - } - else { - return 0; - } - }); - transformer.parser = parser; - for (const source of sources) { - transformer.imports = []; - transformer.currentSource = source; - transformer.visit(source); - if (transformer.newStmts.simd) { - const tokenizer = new Tokenizer(new Source(0, source.normalizedPath, transformer.newStmts.simd.join("\n"))); - parser.currentSource = tokenizer.source; - for (let i = 0; i < transformer.newStmts.simd.length; i++) - source.statements.unshift(parser.parseTopLevelStatement(tokenizer)); - parser.currentSource = source; - transformer.newStmts.simd = []; - } - if (transformer.jsonImport) { - const tokenizer = new Tokenizer(new Source(0, source.normalizedPath, transformer.jsonImport)); - parser.currentSource = tokenizer.source; - source.statements.unshift(parser.parseTopLevelStatement(tokenizer)); - parser.currentSource = source; - transformer.jsonImport = null; - } - if (transformer.bsImport) { - const tokenizer = new Tokenizer(new Source(0, source.normalizedPath, transformer.bsImport)); - parser.currentSource = tokenizer.source; - source.statements.unshift(parser.parseTopLevelStatement(tokenizer)); - parser.currentSource = source; - transformer.bsImport = null; - } - } - const schemas = transformer.schemas; - for (const schema of schemas) { - if (schema.parent) { - const parent = schemas.find((v) => v.name == schema.parent?.name); - if (!parent) - throwError(`Class ${schema.name} extends its parent class ${schema.parent}, but ${schema.parent} does not include a @json or @serializable decorator!`, schema.parent.node.range); - } - } - } -} -function sortMembers(members) { - return members.sort((a, b) => { - const aMove = a.flags.has(PropertyFlags.OmitIf) || a.flags.has(PropertyFlags.OmitNull); - const bMove = b.flags.has(PropertyFlags.OmitIf) || b.flags.has(PropertyFlags.OmitNull); - if (aMove && !bMove) { - return -1; - } - else if (!aMove && bMove) { - return 1; - } - else { - return 0; - } - }); -} -function getArgs(args) { - if (!args) - return []; - let out = []; - for (const arg of args) { - if (arg instanceof StringLiteralExpression) { - out.push(arg.value); - } - else if (arg instanceof IntegerLiteralExpression) { - out.push(i64_to_string(arg.value)); - } - else if (arg instanceof FloatLiteralExpression) { - out.push(arg.value.toString()); - } - else if (arg instanceof NullExpression) { - out.push(arg.text); - } - else if (arg instanceof TrueExpression) { - out.push(arg.text); - } - else if (arg instanceof FalseExpression) { - out.push(arg.text); - } - else if (arg instanceof IdentifierExpression) { - out.push(arg.text); - } - } - 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; - while (n >= 8 && simd) { - out.push(["v128", "i16x8(" + data.charCodeAt(offset + 0) + ", " + data.charCodeAt(offset + 1) + ", " + data.charCodeAt(offset + 2) + ", " + data.charCodeAt(offset + 3) + ", " + data.charCodeAt(offset + 4) + ", " + data.charCodeAt(offset + 5) + ", " + data.charCodeAt(offset + 6) + ", " + data.charCodeAt(offset + 7) + ")"]); - offset += 8; - n -= 8; - } - while (n >= 4) { - const value = (BigInt(data.charCodeAt(offset + 3)) << 48n) | (BigInt(data.charCodeAt(offset + 2)) << 32n) | (BigInt(data.charCodeAt(offset + 1)) << 16n) | BigInt(data.charCodeAt(offset + 0)); - out.push(["u64", value.toString()]); - offset += 4; - n -= 4; - } - while (n >= 2) { - const value = (data.charCodeAt(offset + 1) << 16) | data.charCodeAt(offset + 0); - out.push(["u32", value.toString()]); - offset += 2; - n -= 2; - } - if (n === 1) { - const value = data.charCodeAt(offset + 0); - out.push(["u16", value.toString()]); - } - return out; -} -function isPrimitive(type) { - const primitiveTypes = ["u8", "u16", "u32", "u64", "i8", "i16", "i32", "i64", "f32", "f64", "bool", "boolean"]; - return primitiveTypes.some((v) => type.includes(v)); -} -function throwError(message, range) { - const err = new Error(); - err.stack = `${message}\n at ${range.source.normalizedPath}:${range.source.lineAt(range.start)}:${range.source.columnAt()}\n`; - throw err; -} -function indentInc() { - indent += " "; -} -function indentDec() { - indent = indent.slice(0, Math.max(0, indent.length - 2)); -} -function sizeof(type) { - if (type == "u8") - return 6; - else if (type == "i8") - return 8; - else if (type == "u16") - return 10; - else if (type == "i16") - return 12; - else if (type == "u32") - return 20; - else if (type == "i32") - return 22; - else if (type == "u64") - return 40; - else if (type == "i64") - return 40; - else if (type == "bool" || type == "boolean") - return 10; - else - return 0; -} -function allPrimitive(schema) { - return !schema.members.some((p) => p.byteSize == 0); -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/transform/lib/index.js.map b/transform/lib/index.js.map deleted file mode 100644 index 7c68437..0000000 --- a/transform/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"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,EAAyD,IAAI,EAAa,SAAS,EAA8J,MAAM,uCAAuC,CAAC;AAC/gB,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE3D,IAAI,MAAM,GAAG,IAAI,CAAC;AAElB,MAAM,aAAc,SAAQ,OAAO;IAC1B,MAAM,CAAU;IAChB,OAAO,GAAa,EAAE,CAAC;IACvB,MAAM,CAAU;IAChB,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;IAC5B,OA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AAI,IAAI,KAAK;QACpB,OAAO,EAAE,CAAC;SACP,IAAI,IAAI,IAAI,KAAK;QACpB,OAAO,EAAE,CAAC;SACP,IAAI,IAAI,IAAI,KAAK;QACpB,OAAO,EAAE,CAAC;SACP,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,EAAE,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC;AACtD,CAAC"} \ No newline at end of file diff --git a/transform/lib/index.old.js b/transform/lib/index.old.js deleted file mode 100644 index 0893cd5..0000000 --- a/transform/lib/index.old.js +++ /dev/null @@ -1,404 +0,0 @@ -import { FieldDeclaration, IdentifierExpression, StringLiteralExpression, IntegerLiteralExpression, FloatLiteralExpression, NullExpression, TrueExpression, FalseExpression } from "assemblyscript/dist/assemblyscript.js"; -import { toString, isStdlib } from "visitor-as/dist/utils.js"; -import { BaseVisitor, SimpleParser } from "visitor-as/dist/index.js"; -import { Transform } from "assemblyscript/dist/transform.js"; -class JSONTransform extends BaseVisitor { - schemasList = []; - currentClass; - sources = new Set(); - visitMethodDeclaration() {} - visitClassDeclaration(node) { - if (!node.decorators?.length) return; - let found = false; - for (const decorator of node.decorators) { - const name = decorator.name.text; - if (name === "json" || name === "serializable") { - found = true; - break; - } - } - if (!found) return; - const schema = new SchemaData(); - schema.node = node; - schema.name = node.name.text; - const members = [...node.members.filter((v) => v.kind === 54)]; - if (node.extendsType) { - schema.parent = this.schemasList.find((v) => v.name == node.extendsType?.name.identifier.text); - if (schema.parent?.members) { - for (let i = schema.parent.members.length - 1; i >= 0; i--) { - const replace = schema.members.find((v) => v.name == schema.parent?.members[i]?.name); - if (!replace) { - members.unshift(schema.parent?.members[i].node); - } - } - } - } - if (!members.length) { - let SERIALIZE_RAW_EMPTY = '__SERIALIZE(): string {\n return "{}";\n}'; - let INITIALIZE_EMPTY = "__INITIALIZE(): this {\n return this;\n}"; - let DESERIALIZE_EMPTY = "__DESERIALIZE(data: string, key_start: i32, key_end: i32, value_start: i32, value_end: i32): boolean {\n return false;\n}"; - if (process.env["JSON_DEBUG"]) { - console.log(SERIALIZE_RAW_EMPTY); - console.log(INITIALIZE_EMPTY); - console.log(DESERIALIZE_EMPTY); - } - const SERIALIZE_RAW_METHOD_EMPTY = SimpleParser.parseClassMember(SERIALIZE_RAW_EMPTY, node); - const INITIALIZE_METHOD_EMPTY = SimpleParser.parseClassMember(INITIALIZE_EMPTY, node); - const DESERIALIZE_METHOD_EMPTY = SimpleParser.parseClassMember(DESERIALIZE_EMPTY, node); - if (!node.members.find((v) => v.name.text == "__SERIALIZE")) node.members.push(SERIALIZE_RAW_METHOD_EMPTY); - if (!node.members.find((v) => v.name.text == "__INITIALIZE")) node.members.push(INITIALIZE_METHOD_EMPTY); - if (!node.members.find((v) => v.name.text == "__DESERIALIZE")) node.members.push(DESERIALIZE_METHOD_EMPTY); - this.schemasList.push(schema); - } - for (const member of members) { - const name = member.name; - if (!(member instanceof FieldDeclaration)) continue; - if (!member.type) { - throw new Error("Fields must be strongly typed! Found " + toString(member) + " at " + node.range.source.normalizedPath); - } - const type = toString(member.type); - if (type.startsWith("(") && type.includes("=>")) continue; - const value = member.initializer ? toString(member.initializer) : null; - if (member.flags == 32) continue; - if (member.flags === 512) continue; - if (member.flags === 1024) continue; - const mem = new Property(); - mem.name = name.text; - mem.type = type; - mem.value = value; - mem.node = member; - if (type.includes("JSON.Raw")) { - mem.flags.set(PropertyFlags.JSON_Raw, []); - } - if (member.type.isNullable) { - mem.flags.set(PropertyFlags.Null, []); - } - if (member.decorators) { - for (const decorator of member.decorators) { - const decoratorName = decorator.name.text; - const args = getArgs(decorator.args); - switch (decoratorName) { - case "alias": { - if (!args.length) throw new Error("Expected 1 argument but got zero at @alias in " + node.range.source.normalizedPath); - mem.alias = args[0]; - mem.flags.set(PropertyFlags.Alias, args); - break; - } - case "omit": { - mem.flags.set(PropertyFlags.Omit, args); - break; - } - case "omitif": { - if (!decorator.args?.length) throw new Error("Expected 1 argument but got zero at @omitif in " + node.range.source.normalizedPath); - mem.flags.set(PropertyFlags.OmitIf, args); - break; - } - case "omitnull": { - mem.flags.set(PropertyFlags.OmitNull, args); - break; - } - } - } - } - mem.generate(false); - if (this.schemasList.find((v) => v.name == type)) { - mem.initialize = "this." + name.text + " = changetype>(__new(offsetof>(), idof>()));\n changetype>(this." + name.text + ").__INITIALIZE()"; - } else if (mem.value) { - mem.initialize = "this." + name.text + " = " + mem.value; - } else if (type === "Map") { - mem.initialize = "this." + name.text + " = new " + mem.type + "()"; - } else if (type === "string") { - mem.initialize = "this." + name.text + ' = ""'; - } else if (type === "Array") { - mem.initialize = "this." + name.text + " = instantiate<" + mem.type + ">()"; - } else if (type === "bool" || type === "boolean") { - mem.initialize = "this." + name.text + " = false"; - } else if (type === "JSON.Raw") { - mem.initialize = "this." + name.text + ' = ""'; - } else if (type === "u8" || type === "u16" || type === "u32" || type === "u64" || type === "i8" || type === "i16" || type === "i32" || type === "i64") { - mem.initialize = "this." + name.text + " = 0"; - } else if (type === "f32" || type === "f64") { - mem.initialize = "this." + name.text + " = 0.0"; - } - schema.members.push(mem); - } - let SERIALIZE_RAW = "__SERIALIZE(): string {\n let out = `{"; - let SERIALIZE_PRETTY = "__SERIALIZE_PRETTY(): string {\n let out = `{"; - let INITIALIZE = "__INITIALIZE(): this {\n"; - let DESERIALIZE = "__DESERIALIZE(data: string, key_start: i32, key_end: i32, value_start: i32, value_end: i32): boolean {\n const len = key_end - key_start;\n"; - let indent = " "; - if (!schema.members.length) return; - found = false; - if (schema.members[0]?.flags.has(PropertyFlags.OmitNull) || schema.members[0]?.flags.has(PropertyFlags.OmitIf)) { - SERIALIZE_RAW += schema.members[0]?.serialize; - SERIALIZE_PRETTY += "\\n" + schema.members[0]?.serialize; - } else { - SERIALIZE_RAW += schema.members[0]?.serialize + ","; - SERIALIZE_PRETTY += "\\n" + schema.members[0]?.serialize + ",\\n"; - found = true; - } - if (schema.members[0]?.initialize) INITIALIZE += " " + schema.members[0]?.initialize + ";\n"; - for (let i = 1; i < schema.members.length; i++) { - const member = schema.members[i]; - if (member.initialize) INITIALIZE += " " + member.initialize + ";\n"; - if (member.flags.has(PropertyFlags.OmitNull) || member.flags.has(PropertyFlags.OmitIf)) { - SERIALIZE_RAW += member.serialize; - SERIALIZE_PRETTY += member.serialize; - } else { - SERIALIZE_RAW += member.serialize + ","; - SERIALIZE_PRETTY += indent + member.serialize + ",\\n"; - found = true; - } - } - if (found) { - SERIALIZE_RAW += "`;\n store(changetype(out) + ((out.length - 1) << 1), 125);\n return out;\n}"; - SERIALIZE_PRETTY += "`;\n store(changetype(out) + ((out.length - 2) << 1), 8192010);\n return out;\n}"; - } else { - SERIALIZE_RAW += "}`;\n return out;\n}"; - SERIALIZE_PRETTY += "}`;\n return out;\n}"; - } - INITIALIZE += " return this;\n}"; - const sortedMembers = []; - const _sorted = schema.members.sort((a, b) => (a.alias?.length || a.name.length) - (b.alias?.length || b.name.length)); - let len = -1; - let offset = -1; - for (let i = 0; i < _sorted.length; i++) { - const member = _sorted[i]; - const _name = member.alias || member.name; - if (_name.length === len) { - sortedMembers[offset]?.push(member); - } else { - sortedMembers.push([member]); - len = _name.length; - offset++; - } - } - let first = true; - for (const memberSet of sortedMembers) { - const firstMember = memberSet[0]; - const _name = encodeKey(firstMember.alias || firstMember.name); - if (_name.length === 1) { - if (first) { - DESERIALIZE += " if (1 === len) {\n switch (load(changetype(data) + (key_start << 1))) {\n"; - first = false; - } else { - DESERIALIZE += "else if (1 === len) {\n switch (load(changetype(data) + (key_start << 1))) {\n"; - } - } else if (_name.length === 2) { - if (first) { - DESERIALIZE += " if (2 === len) {\n switch (load(changetype(data) + (key_start << 1))) {\n"; - first = false; - } else { - DESERIALIZE += "else if (2 === len) {\n switch (load(changetype(data) + (key_start << 1))) {\n"; - } - } else if (_name.length === 4) { - if (first) { - DESERIALIZE += " if (4 === len) {\n const code = load(changetype(data) + (key_start << 1));\n"; - first = false; - } else { - DESERIALIZE += "else if (4 === len) {\n const code = load(changetype(data) + (key_start << 1));\n"; - } - } else { - if (first) { - DESERIALIZE += " if (" + _name.length + " === len) {\n"; - first = false; - } else { - DESERIALIZE += "else if (" + _name.length + " === len) {\n"; - } - } - let f = true; - for (let i = 0; i < memberSet.length; i++) { - const member = memberSet[i]; - if (!member.deserialize) continue; - const _name = encodeKey(member.alias || member.name); - if (_name.length === 1) { - DESERIALIZE += ` case ${_name.charCodeAt(0)}: { /* ${_name} */\n ${member.deserialize}\n return true;\n }\n`; - } else if (_name.length === 2) { - DESERIALIZE += ` case ${charCodeAt32(_name, 0)}: { /* ${_name} */\n ${member.deserialize}\n return true;\n }\n`; - } else if (_name.length === 4) { - if (f) { - f = false; - DESERIALIZE += ` if (${charCodeAt64(_name, 0)} === code) { /* ${_name} */\n ${member.deserialize}\n return true;\n }\n`; - } else { - DESERIALIZE = DESERIALIZE.slice(0, DESERIALIZE.length - 1) + `else if (${charCodeAt64(_name, 0)} === code) {\n ${member.deserialize}\n return true;\n }\n`; - } - } else { - if (f) { - f = false; - DESERIALIZE += ` if (0 === memory.compare(changetype("${escapeQuote(escapeSlash(_name))}"), changetype(data) + (key_start << 1), ${_name.length << 1})) { /* ${_name} */\n ${member.deserialize}\n return true;\n }\n`; - } else { - DESERIALIZE = DESERIALIZE.slice(0, DESERIALIZE.length - 1) + ` else if (0 === memory.compare(changetype("${escapeQuote(escapeSlash(_name))}"), changetype(data) + (key_start << 1), ${_name.length << 1})) { /* ${_name} */\n ${member.deserialize}\n return true;\n }\n`; - } - } - } - if (_name.length < 3) { - DESERIALIZE += ` default: {\n return false;\n }\n }\n`; - } else if (_name.length == 4) { - DESERIALIZE = DESERIALIZE.slice(0, DESERIALIZE.length - 1) + ` else {\n return false;\n }\n`; - } else { - DESERIALIZE = DESERIALIZE.slice(0, DESERIALIZE.length - 1) + ` else {\n return false;\n }\n`; - } - DESERIALIZE += " } "; - } - DESERIALIZE += "\n return false;\n}"; - if (process.env["JSON_DEBUG"]) { - console.log(SERIALIZE_RAW); - console.log(INITIALIZE); - console.log(DESERIALIZE); - } - const SERIALIZE_RAW_METHOD = SimpleParser.parseClassMember(SERIALIZE_RAW, node); - const DESERIALIZE_SAFE = DESERIALIZE.replaceAll("__DESERIALIZE", "__DESERIALIZE_SAFE"); - const INITIALIZE_METHOD = SimpleParser.parseClassMember(INITIALIZE, node); - const DESERIALIZE_METHOD = SimpleParser.parseClassMember(DESERIALIZE, node); - const DESERIALIZE_SAFE_METHOD = SimpleParser.parseClassMember(DESERIALIZE_SAFE, node); - if (!node.members.find((v) => v.name.text == "__SERIALIZE")) node.members.push(SERIALIZE_RAW_METHOD); - if (!node.members.find((v) => v.name.text == "__INITIALIZE")) node.members.push(INITIALIZE_METHOD); - if (!node.members.find((v) => v.name.text == "__DESERIALIZE")) node.members.push(DESERIALIZE_METHOD); - if (!node.members.find((v) => v.name.text == "__DESERIALIZE_SAFE")) node.members.push(DESERIALIZE_SAFE_METHOD); - this.schemasList.push(schema); - } - visitSource(node) { - super.visitSource(node); - if (!this.sources.has(node)) { - return; - } - } -} -export default class Transformer extends Transform { - afterParse(parser) { - const transformer = new JSONTransform(); - const sources = parser.sources - .filter((source) => !isStdlib(source)) - .sort((_a, _b) => { - const a = _a.internalPath; - const b = _b.internalPath; - if (a[0] === "~" && b[0] !== "~") { - return -1; - } else if (a[0] !== "~" && b[0] === "~") { - return 1; - } else { - return 0; - } - }); - for (const source of sources) { - if (!isStdlib(source)) { - transformer.visit(source); - } - } - const schemas = transformer.schemasList; - for (const schema of schemas) { - if (schema.parent) { - const parent = schemas.find((v) => v.name === schema.parent?.name); - if (!parent) throw new Error(`Class ${schema.name} extends its parent class ${schema.parent}, but ${schema.parent} does not include a @json or @serializable decorator! Add the decorator and rebuild.`); - } - } - } -} -var PropertyFlags; -(function (PropertyFlags) { - PropertyFlags[(PropertyFlags["Null"] = 0)] = "Null"; - PropertyFlags[(PropertyFlags["Omit"] = 1)] = "Omit"; - PropertyFlags[(PropertyFlags["OmitNull"] = 2)] = "OmitNull"; - PropertyFlags[(PropertyFlags["OmitIf"] = 3)] = "OmitIf"; - PropertyFlags[(PropertyFlags["Alias"] = 4)] = "Alias"; - PropertyFlags[(PropertyFlags["JSON_Raw"] = 5)] = "JSON_Raw"; -})(PropertyFlags || (PropertyFlags = {})); -class Property { - name = ""; - alias = null; - type = ""; - value = null; - flags = new Map(); - serialize = null; - deserialize = null; - initialize = null; - node; - right_s = ""; - right_d = ""; - generate(safe) { - const name = this.name; - const escapedName = escapeString(JSON.stringify(this.alias || this.name)); - const type = this.type; - if (this.flags.has(PropertyFlags.Omit)) return; - if (this.flags.has(PropertyFlags.JSON_Raw)) { - if (this.flags.has(PropertyFlags.Null)) { - this.right_s = "(this." + name + ' || "null")'; - this.right_d = "value_start === value_end - 4 && 30399761348886638 === load(changetype(data) + (value_start << 1)) ? null : data.substring(value_start, value_end)"; - } else { - this.right_s = "this." + name; - this.right_d = "data.substring(value_start, value_end);"; - } - } else { - this.right_s = "__SERIALIZE<" + type + ">(this." + name + ")"; - this.right_d = (safe ? "__DESERIALIZE_SAFE" : "__DESERIALIZE") + "<" + type + ">(data.substring(value_start, value_end))"; - } - if (this.flags.has(PropertyFlags.OmitIf)) { - const condition = this.flags.get(PropertyFlags.OmitIf)[0]; - if (!condition) throw new Error("Could not find condition when using decorator @omitif! Provide at least one condition"); - this.serialize = "${" + condition + ' ? "" : \'' + escapedName + ":' + " + this.right_s + ' + ","}'; - this.deserialize = "this." + name + " = " + this.right_d + ";"; - } else if (this.flags.has(PropertyFlags.OmitNull)) { - this.serialize = "${changetype(this." + name + ") == 0" + ' ? "" : \'' + escapedName + ":' + " + this.right_s + ' + ","}'; - this.deserialize = "this." + name + " = " + this.right_d + ";"; - } else { - this.serialize = escapedName + ":${" + this.right_s + "}"; - this.deserialize = "this." + name + " = " + this.right_d + ";"; - } - } -} -class SchemaData { - name = ""; - members = []; - parent = null; - node; -} -function charCodeAt32(data, offset) { - return (data.charCodeAt(offset + 1) << 16) | data.charCodeAt(offset); -} -function charCodeAt64(data, offset) { - if (offset + 3 >= data.length) { - throw new Error("The string must have at least 4 characters from the specified offset."); - } - const firstCharCode = BigInt(data.charCodeAt(offset)); - const secondCharCode = BigInt(data.charCodeAt(offset + 1)); - const thirdCharCode = BigInt(data.charCodeAt(offset + 2)); - const fourthCharCode = BigInt(data.charCodeAt(offset + 3)); - const u64Value = (fourthCharCode << 48n) | (thirdCharCode << 32n) | (secondCharCode << 16n) | firstCharCode; - return u64Value; -} -function encodeKey(key) { - const data = JSON.stringify(key); - return data.slice(1, data.length - 1); -} -function escapeString(data) { - return data.replace(/\\/g, "\\\\").replace(/\`/g, "\\`"); -} -function escapeSlash(data) { - return data.replace(/\\/g, "\\\\").replace(/\`/g, "\\`"); -} -function escapeQuote(data) { - return data.replace(/\"/g, '\\"'); -} -function getArgs(args) { - if (!args) return []; - let out = []; - for (const arg of args) { - if (arg instanceof StringLiteralExpression) { - out.push(arg.value); - } else if (arg instanceof IntegerLiteralExpression) { - out.push(i64_to_string(arg.value)); - } else if (arg instanceof FloatLiteralExpression) { - out.push(arg.value.toString()); - } else if (arg instanceof NullExpression) { - out.push(arg.text); - } else if (arg instanceof TrueExpression) { - out.push(arg.text); - } else if (arg instanceof FalseExpression) { - out.push(arg.text); - } else if (arg instanceof IdentifierExpression) { - out.push(arg.text); - } - } - return out; -} -//# sourceMappingURL=index.old.js.map diff --git a/transform/lib/index.old.js.map b/transform/lib/index.old.js.map deleted file mode 100644 index 57956b0..0000000 --- a/transform/lib/index.old.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.old.js","sourceRoot":"","sources":["../src/index.old.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,gBAAgB,EAAE,oBAAoB,EAAqD,uBAAuB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C,GAAG,CAAC,IAAI,CAAC,CAAC;QACrB,CAAC;aAAM,IAAI,GAAG,YAAY,cAAc,EAAE,CAAC;YACzC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACrB,CAAC;aAAM,IAAI,GAAG,YAAY,eAAe,EAAE,CAAC;YAC1C,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACrB,CAAC;aAAM,IAAI,GAAG,YAAY,oBAAoB,EAAE,CAAC;YAC/C,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACrB,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"} \ No newline at end of file diff --git a/transform/lib/linker.js b/transform/lib/linker.js deleted file mode 100644 index bd4067b..0000000 --- a/transform/lib/linker.js +++ /dev/null @@ -1,18 +0,0 @@ -export function getImports(source) { - return source.statements.filter((v) => v.kind === 42); -} -export function getImportedClass(name, source, parser) { - for (const stmt of getImports(source)) { - const externalSource = parser.sources.find((src) => src.internalPath === stmt.internalPath); - if (!externalSource) - continue; - const classDeclaration = externalSource.statements.find((s) => s.kind === 51 && s.name.text === name); - if (classDeclaration) - return classDeclaration; - } - return null; -} -export function getClasses(source) { - return source.statements.filter((v) => v.kind === 51); -} -//# sourceMappingURL=linker.js.map \ No newline at end of file diff --git a/transform/lib/linker.js.map b/transform/lib/linker.js.map deleted file mode 100644 index 22908c9..0000000 --- a/transform/lib/linker.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"linker.js","sourceRoot":"","sources":["../src/linker.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,UAAU,CAAC,MAAc;IACvC,OAAO,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,OAAoB,CAAsB,CAAC;AAC1F,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,MAAc,EAAE,MAAc;IAC3E,KAAK,MAAM,IAAI,IAAI,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QACtC,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,YAAY,KAAK,IAAI,CAAC,YAAY,CAAC,CAAC;QAC5F,IAAI,CAAC,cAAc;YAAE,SAAS;QAE9B,MAAM,gBAAgB,GAAG,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,OAA8B,IAAuB,CAAE,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,CAA4B,CAAC;QAE5K,IAAI,gBAAgB;YAAE,OAAO,gBAAgB,CAAC;IAChD,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,MAAc;IACvC,OAAO,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,OAA8B,CAAuB,CAAC;AACrG,CAAC"} \ No newline at end of file diff --git a/transform/lib/types.js b/transform/lib/types.js deleted file mode 100644 index a577c46..0000000 --- a/transform/lib/types.js +++ /dev/null @@ -1,25 +0,0 @@ -export var PropertyFlags; -(function (PropertyFlags) { - PropertyFlags[PropertyFlags["OmitNull"] = 0] = "OmitNull"; - PropertyFlags[PropertyFlags["OmitIf"] = 1] = "OmitIf"; - PropertyFlags[PropertyFlags["Raw"] = 2] = "Raw"; -})(PropertyFlags || (PropertyFlags = {})); -export class Property { - name = ""; - alias = null; - type = ""; - value = null; - flags = new Map(); - node; - byteSize = 0; -} -export class Schema { - static = true; - name = ""; - members = []; - parent = null; - node; - needsLink = null; - byteSize = 0; -} -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/transform/lib/types.js.map b/transform/lib/types.js.map deleted file mode 100644 index ef48c8a..0000000 --- a/transform/lib/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,yDAAQ,CAAA;IACR,qDAAM,CAAA;IACN,+CAAG,CAAA;AACL,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB;AAED,MAAM,OAAO,QAAQ;IACZ,IAAI,GAAW,EAAE,CAAC;IAClB,KAAK,GAAkB,IAAI,CAAC;IAC5B,IAAI,GAAW,EAAE,CAAC;IAClB,KAAK,GAAkB,IAAI,CAAC;IAC5B,KAAK,GAA0C,IAAI,GAAG,EAAoC,CAAC;IAC3F,IAAI,CAAoB;IACxB,QAAQ,GAAW,CAAC,CAAC;CAC7B;AAED,MAAM,OAAO,MAAM;IACV,MAAM,GAAY,IAAI,CAAC;IACvB,IAAI,GAAW,EAAE,CAAC;IAClB,OAAO,GAAe,EAAE,CAAC;IACzB,MAAM,GAAkB,IAAI,CAAC;IAC7B,IAAI,CAAoB;IACxB,SAAS,GAAkB,IAAI,CAAC;IAChC,QAAQ,GAAW,CAAC,CAAC;CAC7B"} \ No newline at end of file diff --git a/transform/lib/util.js b/transform/lib/util.js deleted file mode 100644 index b8f8129..0000000 --- a/transform/lib/util.js +++ /dev/null @@ -1,47 +0,0 @@ -import { Parser, Tokenizer, Source } from "assemblyscript/dist/assemblyscript.js"; -import { ASTBuilder } from "./builder.js"; -export class SimpleParser { - static get parser() { - return new Parser(); - } - static getTokenizer(s, file = "index.ts") { - return new Tokenizer(new Source(0, file, s)); - } - static parseExpression(s) { - const res = this.parser.parseExpression(this.getTokenizer(s)); - if (res == null) { - throw new Error("Failed to parse the expression: '" + s + "'"); - } - return res; - } - static parseStatement(s, topLevel = false) { - const res = this.parser.parseStatement(this.getTokenizer(s), topLevel); - if (res == null) { - throw new Error("Failed to parse the statement: '" + s + "'"); - } - return res; - } - static parseTopLevelStatement(s, namespace) { - const res = this.parser.parseTopLevelStatement(this.getTokenizer(s), namespace); - if (res == null) { - throw new Error("Failed to parse the top level statement: '" + s + "'"); - } - return res; - } - static parseClassMember(s, _class) { - let res = this.parser.parseClassMember(this.getTokenizer(s, _class.range.source.normalizedPath), _class); - if (res == null) { - throw new Error("Failed to parse the class member: '" + s + "'"); - } - return res; - } -} -let isStdlibRegex = /\~lib\/(?:array|arraybuffer|atomics|builtins|crypto|console|compat|dataview|date|diagnostics|error|function|iterator|map|math|number|object|process|reference|regexp|set|staticarray|string|symbol|table|typedarray|vector|rt\/?|bindings\/|shared\/typeinfo)|util\/|uri|polyfills|memory/; -export function isStdlib(s) { - let source = s instanceof Source ? s : s.range.source; - return isStdlibRegex.test(source.internalPath); -} -export function toString(node) { - return ASTBuilder.build(node); -} -//# sourceMappingURL=util.js.map \ No newline at end of file diff --git a/transform/lib/util.js.map b/transform/lib/util.js.map deleted file mode 100644 index df39bed..0000000 --- a/transform/lib/util.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAgH,MAAM,uCAAuC,CAAC;AAChM,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,OAAO,YAAY;IACf,MAAM,KAAK,MAAM;QACvB,OAAO,IAAI,MAAM,EAAE,CAAC;IACtB,CAAC;IAEO,MAAM,CAAC,YAAY,CAAC,CAAS,EAAE,OAAe,UAAU;QAC9D,OAAO,IAAI,SAAS,CAAC,IAAI,MAAM,IAAkB,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC7D,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,CAAS;QAC9B,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9D,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YAChB,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,MAAM,UAAU,QAAQ,CAAC,CAA4B;IACnD,IAAI,MAAM,GAAG,CAAC,YAAY,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC;IACtD,OAAO,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,IAAU;IACjC,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC"} \ No newline at end of file diff --git a/transform/lib/visitor.js b/transform/lib/visitor.js deleted file mode 100644 index 6c8dc4c..0000000 --- a/transform/lib/visitor.js +++ /dev/null @@ -1,531 +0,0 @@ -export class Visitor { - currentSource = null; - visit(node, ref = null) { - if (node == null) - return; - if (node instanceof Array) { - for (const n of node) { - this._visit(n, ref); - } - } - else { - this._visit(node, ref); - } - } - _visit(node, ref) { - switch (node.kind) { - case 0: - this.visitSource(node, ref); - break; - case 1: - this.visitNamedTypeNode(node, ref); - break; - case 2: - this.visitFunctionTypeNode(node, ref); - break; - case 3: - this.visitTypeName(node, ref); - break; - case 4: - this.visitTypeParameter(node, ref); - break; - case 6: - this.visitIdentifierExpression(node, ref); - break; - case 7: - this.visitAssertionExpression(node, ref); - break; - case 8: - this.visitBinaryExpression(node, ref); - break; - case 9: - this.visitCallExpression(node, ref); - break; - case 10: - this.visitClassExpression(node, ref); - break; - case 11: - this.visitCommaExpression(node, ref); - break; - case 12: - this.visitElementAccessExpression(node, ref); - break; - case 14: - this.visitFunctionExpression(node, ref); - break; - case 15: - this.visitInstanceOfExpression(node, ref); - break; - case 16: - this.visitLiteralExpression(node, ref); - break; - case 17: - this.visitNewExpression(node, ref); - break; - case 20: - this.visitParenthesizedExpression(node, ref); - break; - case 21: - this.visitPropertyAccessExpression(node, ref); - break; - case 22: - this.visitTernaryExpression(node, ref); - break; - case 27: - this.visitUnaryPostfixExpression(node, ref); - break; - case 28: - this.visitUnaryPrefixExpression(node, ref); - break; - case 30: - this.visitBlockStatement(node, ref); - break; - case 31: - this.visitBreakStatement(node, ref); - break; - case 32: - this.visitContinueStatement(node, ref); - break; - case 33: - this.visitDoStatement(node, ref); - break; - case 34: - this.visitEmptyStatement(node, ref); - break; - case 35: - this.visitExportStatement(node, ref); - break; - case 36: - this.visitExportDefaultStatement(node, ref); - break; - case 37: - this.visitExportImportStatement(node, ref); - break; - case 38: - this.visitExpressionStatement(node, ref); - break; - case 39: - this.visitForStatement(node, ref); - break; - case 41: - this.visitIfStatement(node, ref); - break; - case 42: - this.visitImportStatement(node, ref); - break; - case 43: - this.visitReturnStatement(node, ref); - break; - case 44: - this.visitSwitchStatement(node, ref); - break; - case 45: - this.visitThrowStatement(node, ref); - break; - case 46: - this.visitTryStatement(node, ref); - break; - case 47: - this.visitVariableStatement(node, ref); - break; - case 49: - this.visitWhileStatement(node, ref); - break; - case 51: - this.visitClassDeclaration(node, false, ref); - break; - case 52: - this.visitEnumDeclaration(node, false, ref); - break; - case 53: - this.visitEnumValueDeclaration(node, ref); - break; - case 54: - this.visitFieldDeclaration(node, ref); - break; - case 55: - this.visitFunctionDeclaration(node, false, ref); - break; - case 56: - this.visitImportDeclaration(node, ref); - break; - case 57: - this.visitInterfaceDeclaration(node, false, ref); - break; - case 58: - this.visitMethodDeclaration(node, ref); - break; - case 59: - this.visitNamespaceDeclaration(node, false, ref); - break; - case 60: - this.visitTypeDeclaration(node, ref); - break; - case 61: - this.visitVariableDeclaration(node, ref); - break; - case 62: - this.visitDecoratorNode(node, ref); - break; - case 63: - this.visitExportMember(node, ref); - break; - case 64: - this.visitSwitchCase(node, ref); - break; - case 65: - this.visitIndexSignature(node, ref); - break; - case 18: - this.visitNullExpression(node, ref); - break; - case 25: { - this.visitTrueExpression(node, ref); - break; - } - case 13: { - this.visitFalseExpression(node, ref); - break; - } - case 29: { - this.visitCompiledExpression(node, ref); - break; - } - case 26: { - this.visitConstructorExpression(node, ref); - break; - } - case 66: { - this.visitComment(node, ref); - break; - } - case 40: { - this.visitForOfStatement(node, ref); - break; - } - case 50: { - this.visitModuleDeclaration(node, ref); - break; - } - case 19: { - this.visitOmittedExpression(node, ref); - break; - } - case 5: { - this.visitParameter(node, ref); - break; - } - case 23: { - this.visitSuperExpression(node, ref); - break; - } - case 24: { - this.visitThisExpression(node, ref); - break; - } - case 48: { - this.visitVoidStatement(node, ref); - break; - } - default: - throw new Error("Could not visit invalid type!"); - } - } - visitSource(node, ref = null) { - this.currentSource = node; - this.visit(node.statements, node); - this.currentSource = null; - } - visitTypeNode(node, ref = null) { } - visitTypeName(node, ref = null) { - this.visit(node.identifier, node); - this.visit(node.next, node); - } - visitNamedTypeNode(node, ref = null) { - this.visit(node.name, node); - this.visit(node.typeArguments, node); - } - visitFunctionTypeNode(node, ref = null) { - this.visit(node.parameters, node); - this.visit(node.returnType, node); - this.visit(node.explicitThisType, node); - } - visitTypeParameter(node, ref = null) { - this.visit(node.name, node); - this.visit(node.extendsType, node); - this.visit(node.defaultType, node); - } - visitIdentifierExpression(node, ref = null) { } - visitArrayLiteralExpression(node, ref = null) { - this.visit(node.elementExpressions, node); - } - visitObjectLiteralExpression(node, ref = null) { - this.visit(node.names, node); - this.visit(node.values, node); - } - visitAssertionExpression(node, ref = null) { - this.visit(node.toType, node); - this.visit(node.expression, node); - } - visitBinaryExpression(node, ref = null) { - this.visit(node.left, node); - this.visit(node.right, node); - } - visitCallExpression(node, ref = null) { - this.visit(node.expression, node); - this.visit(node.typeArguments, node); - this.visit(node.args, node); - } - visitClassExpression(node, ref = null) { - this.visit(node.declaration, node); - } - visitCommaExpression(node, ref = null) { - this.visit(node.expressions, node); - } - visitElementAccessExpression(node, ref = null) { - this.visit(node.elementExpression, node); - this.visit(node.expression, node); - } - visitFunctionExpression(node, ref = null) { - this.visit(node.declaration, node); - } - visitLiteralExpression(node, ref = null) { - switch (node.literalKind) { - case 0: - this.visitFloatLiteralExpression(node); - break; - case 1: - this.visitIntegerLiteralExpression(node); - break; - case 2: - this.visitStringLiteralExpression(node); - break; - case 3: - this.visitTemplateLiteralExpression(node); - break; - case 4: - this.visitRegexpLiteralExpression(node); - break; - case 5: - this.visitArrayLiteralExpression(node); - break; - case 6: - this.visitObjectLiteralExpression(node); - break; - default: - throw new Error("Invalid LiteralKind at visitLiteralExpression(): " + node.literalKind); - } - } - visitFloatLiteralExpression(node, ref = null) { } - visitInstanceOfExpression(node, ref = null) { - this.visit(node.expression, node); - this.visit(node.isType, node); - } - visitIntegerLiteralExpression(node, ref = null) { } - visitStringLiteralExpression(node, ref = null) { } - visitTemplateLiteralExpression(node, ref = null) { } - visitRegexpLiteralExpression(node, ref = null) { } - visitNewExpression(node, ref = null) { - this.visit(node.typeName, node); - this.visit(node.typeArguments, node); - this.visit(node.args, node); - } - visitParenthesizedExpression(node, ref = null) { - this.visit(node.expression, node); - } - visitPropertyAccessExpression(node, ref = null) { - this.visit(node.property, node); - this.visit(node.expression, node); - } - visitTernaryExpression(node, ref = null) { - this.visit(node.condition, node); - this.visit(node.ifThen, node); - this.visit(node.ifElse, node); - } - visitUnaryExpression(node, ref = null) { - this.visit(node.operand, node); - } - visitUnaryPostfixExpression(node, ref = null) { - this.visit(node.operand, node); - } - visitUnaryPrefixExpression(node, ref = null) { - this.visit(node.operand, node); - } - visitSuperExpression(node, ref = null) { } - visitFalseExpression(node, ref = null) { } - visitTrueExpression(node, ref = null) { } - visitThisExpression(node, ref = null) { } - visitNullExpression(node, ref = null) { } - visitConstructorExpression(node, ref = null) { } - visitNodeAndTerminate(statement, ref = null) { } - visitBlockStatement(node, ref = null) { - this.visit(node.statements, node); - } - visitBreakStatement(node, ref = null) { - this.visit(node.label, node); - } - visitContinueStatement(node, ref = null) { - this.visit(node.label, node); - } - visitClassDeclaration(node, isDefault = false, ref = null) { - this.visit(node.name, node); - this.visit(node.decorators, node); - if (node.isGeneric ? node.typeParameters != null : node.typeParameters == null) { - this.visit(node.typeParameters, node); - this.visit(node.extendsType, node); - this.visit(node.implementsTypes, node); - this.visit(node.members, node); - } - else { - throw new Error("Expected to type parameters to match class declaration, but found type mismatch instead!"); - } - } - visitDoStatement(node, ref = null) { - this.visit(node.condition, node); - this.visit(node.body, node); - } - visitEmptyStatement(node, ref = null) { } - visitEnumDeclaration(node, isDefault = false, ref = null) { - this.visit(node.name, node); - this.visit(node.decorators, node); - this.visit(node.values, node); - } - visitEnumValueDeclaration(node, ref = null) { - this.visit(node.name, node); - this.visit(node.initializer, node); - } - visitExportImportStatement(node, ref = null) { - this.visit(node.name, node); - this.visit(node.externalName, node); - } - visitExportMember(node, ref = null) { - this.visit(node.localName, node); - this.visit(node.exportedName, node); - } - visitExportStatement(node, ref = null) { - this.visit(node.path, node); - this.visit(node.members, node); - } - visitExportDefaultStatement(node, ref = null) { - this.visit(node.declaration, node); - } - visitExpressionStatement(node, ref = null) { - this.visit(node.expression, ref); - } - visitFieldDeclaration(node, ref = null) { - this.visit(node.name, node); - this.visit(node.type, node); - this.visit(node.initializer, node); - this.visit(node.decorators, node); - } - visitForStatement(node, ref = null) { - this.visit(node.initializer, node); - this.visit(node.condition, node); - this.visit(node.incrementor, node); - this.visit(node.body, node); - } - visitFunctionDeclaration(node, isDefault = false, ref = null) { - this.visit(node.name, node); - this.visit(node.decorators, node); - this.visit(node.typeParameters, node); - this.visit(node.signature, node); - this.visit(node.body, node); - } - visitIfStatement(node, ref = null) { - this.visit(node.condition, node); - this.visit(node.ifTrue, node); - this.visit(node.ifFalse, node); - } - visitImportDeclaration(node, ref = null) { - this.visit(node.foreignName, node); - this.visit(node.name, node); - this.visit(node.decorators, node); - } - visitImportStatement(node, ref = null) { - this.visit(node.namespaceName, node); - this.visit(node.declarations, node); - } - visitIndexSignature(node, ref = null) { - this.visit(node.keyType, node); - this.visit(node.valueType, node); - } - visitInterfaceDeclaration(node, isDefault = false, ref = null) { - this.visit(node.name, node); - this.visit(node.typeParameters, node); - this.visit(node.implementsTypes, node); - this.visit(node.extendsType, node); - this.visit(node.members, node); - } - visitMethodDeclaration(node, ref = null) { - this.visit(node.name, node); - this.visit(node.typeParameters, node); - this.visit(node.signature, node); - this.visit(node.decorators, node); - this.visit(node.body, node); - } - visitNamespaceDeclaration(node, isDefault = false, ref = null) { - this.visit(node.name, node); - this.visit(node.decorators, node); - this.visit(node.members, node); - } - visitReturnStatement(node, ref = null) { - this.visit(node.value, node); - } - visitSwitchCase(node, ref = null) { - this.visit(node.label, node); - this.visit(node.statements, node); - } - visitSwitchStatement(node, ref = null) { - this.visit(node.condition, node); - this.visit(node.cases, node); - } - visitThrowStatement(node, ref = null) { - this.visit(node.value, node); - } - visitTryStatement(node, ref = null) { - this.visit(node.bodyStatements, node); - this.visit(node.catchVariable, node); - this.visit(node.catchStatements, node); - this.visit(node.finallyStatements, node); - } - visitTypeDeclaration(node, ref = null) { - this.visit(node.name, node); - this.visit(node.decorators, node); - this.visit(node.type, node); - this.visit(node.typeParameters, node); - } - visitVariableDeclaration(node, ref = null) { - this.visit(node.name, node); - this.visit(node.type, node); - this.visit(node.initializer, node); - } - visitVariableStatement(node, ref = null) { - this.visit(node.decorators, node); - this.visit(node.declarations, node); - } - visitWhileStatement(node, ref = null) { - this.visit(node.condition, node); - this.visit(node.body, node); - } - visitVoidStatement(node, ref = null) { } - visitComment(node, ref = null) { } - visitDecoratorNode(node, ref = null) { - this.visit(node.name, node); - this.visit(node.args, node); - } - visitParameter(node, ref = null) { - this.visit(node.name, node); - this.visit(node.implicitFieldDeclaration, node); - this.visit(node.initializer, node); - this.visit(node.type, node); - } - visitCompiledExpression(node, ref = null) { } - visitForOfStatement(node, ref = null) { - this.visit(node.body, node); - this.visit(node.variable, node); - this.visit(node.iterable, node); - } - visitModuleDeclaration(node, ref = null) { } - visitOmittedExpression(node, ref = null) { } -} -//# sourceMappingURL=visitor.js.map \ No newline at end of file diff --git a/transform/lib/visitor.js.map b/transform/lib/visitor.js.map deleted file mode 100644 index 3207307..0000000 --- a/transform/lib/visitor.js.map +++ /dev/null @@ -1 +0,0 @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CAAC,KAAK,CAAC,IAAI,CAAC,wBAAwB,EAAE,IAAI,CAAC,CAAC;QAChD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IACD,uBAAuB,CAAC,IAAwB,EAAE,MAAmB,IAAI,IAAS,CAAC;IACnF,mBAAmB,CAAC,IAAoB,EAAE,MAAmB,IAAI;QAC/D,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC5B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAChC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAClC,CAAC;IACD,sBAAsB,CAAC,IAAuB,EAAE,MAAmB,IAAI,IAAS,CAAC;IACjF,sBAAsB,CAAC,IAAuB,EAAE,MAAmB,IAAI,IAAS,CAAC;CAClF"} \ No newline at end of file diff --git a/transform/src/index.ts b/transform/src/index.ts index 21a9a73..e6a0184 100644 --- a/transform/src/index.ts +++ b/transform/src/index.ts @@ -137,7 +137,7 @@ class JSONTransform extends Visitor { let SERIALIZE = "__SERIALIZE(ptr: usize): void {\n"; let INITIALIZE = "@inline __INITIALIZE(): this {\n"; - let DESERIALIZE = "__DESERIALIZE(keyStart: usize, keyEnd: usize, valStart: usize, valEnd: usize, ptr: usize): void {\n switch (keyEnd - keyStart) {\n"; + let DESERIALIZE = "__DESERIALIZE(keyStart: usize, keyEnd: usize, valStart: usize, valEnd: usize, ptr: usize): void {\n switch (keyEnd - keyStart) {\n"; let ALLOCATE = "@inline __ALLOCATE(): void {\n"; indent = " ";