diff --git a/src/ast.ts b/src/ast.ts index cabb9f47..4a363664 100644 --- a/src/ast.ts +++ b/src/ast.ts @@ -439,11 +439,12 @@ export abstract class Node { return stmt; } - static createImportStatement(declarations: ImportDeclaration[], path: StringLiteralExpression, range: Range): ImportStatement { + static createImportStatement(declarations: ImportDeclaration[] | null, path: StringLiteralExpression, range: Range): ImportStatement { var stmt = new ImportStatement(); stmt.range = range; - for (var i: i32 = 0, k: i32 = (stmt.declarations = declarations).length; i < k; ++i) - declarations[i].parent = stmt; + if (stmt.declarations = declarations) + for (var i: i32 = 0, k: i32 = (declarations).length; i < k; ++i) + (declarations)[i].parent = stmt; stmt.namespaceName = null; stmt.path = path; stmt.normalizedPath = resolvePath(normalizePath(path.value), range.source.normalizedPath); @@ -1709,22 +1710,20 @@ export class ImportStatement extends Statement { internalPath: string; serialize(sb: string[]): void { + sb.push("import "); if (this.declarations) { - sb.push("import {\n"); + sb.push("{\n"); for (var i: i32 = 0, k: i32 = this.declarations.length; i < k; ++i) { if (i > 0) sb.push(",\n"); this.declarations[i].serialize(sb); } - sb.push("\n}"); - } else { - sb.push("import * as "); - if (this.namespaceName) - this.namespaceName.serialize(sb); - else - throw new Error("missing asterisk import identifier"); + sb.push("\n} from "); + } else if (this.namespaceName) { + sb.push("* as "); + this.namespaceName.serialize(sb); + sb.push(" from "); } - sb.push(" from "); this.path.serialize(sb); } } diff --git a/src/builtins.ts b/src/builtins.ts index ba814777..cf519560 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -282,7 +282,7 @@ export function compileCall(compiler: Compiler, prototype: FunctionPrototype, ty if (!validateCall(compiler, typeArguments, 1, operands, 1, reportNode)) return module.createUnreachable(); if ((compiler.currentType = (typeArguments)[0]).isAnyInteger) { - arg0 = compiler.compileExpression(operands[0], (typeArguments)[0]); + arg0 = compiler.compileExpression(operands[0], (typeArguments)[0]); return (compiler.currentType = (typeArguments)[0]).isLongInteger // sic ? module.createUnary(UnaryOp.ClzI64, arg0) : (typeArguments)[0].isSmallInteger diff --git a/src/compiler.ts b/src/compiler.ts index ec04ec0e..b3360ce9 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -453,25 +453,26 @@ export class Compiler extends DiagnosticEmitter { if (element.isCompiled) return true; + element.isCompiled = true; // members might reference each other, triggering another compile var previousValue: EnumValue | null = null; if (element.members) for (var member of element.members.values()) { - if (member.kind != ElementKind.ENUMVALUE) + if (member.kind != ElementKind.ENUMVALUE) // happens if an enum is also a namespace continue; + var initInStart = false; var val = member; if (val.hasConstantValue) { this.module.addGlobal(val.internalName, NativeType.I32, false, this.module.createI32(val.constantValue)); } else if (val.declaration) { - var declaration = val.declaration; + var valueDeclaration = val.declaration; var initExpr: ExpressionRef; - var initInStart = false; - if (declaration.value) { - initExpr = this.compileExpression(declaration.value, Type.i32); + if (valueDeclaration.value) { + initExpr = this.compileExpression(valueDeclaration.value, Type.i32); if (!this.module.noEmit && _BinaryenExpressionGetId(initExpr) != ExpressionId.Const) { initExpr = this.precomputeExpressionRef(initExpr); if (_BinaryenExpressionGetId(initExpr) != ExpressionId.Const) { if (element.isConstant) - this.warning(DiagnosticCode.Compiling_constant_with_non_constant_initializer_as_mutable, declaration.range); + this.warning(DiagnosticCode.Compiling_constant_with_non_constant_initializer_as_mutable, valueDeclaration.range); initInStart = true; } } @@ -486,7 +487,7 @@ export class Compiler extends DiagnosticEmitter { this.module.createI32(1) ); if (element.isConstant) - this.warning(DiagnosticCode.Compiling_constant_with_non_constant_initializer_as_mutable, declaration.range); + this.warning(DiagnosticCode.Compiling_constant_with_non_constant_initializer_as_mutable, valueDeclaration.range); initInStart = true; } if (initInStart) { @@ -506,9 +507,11 @@ export class Compiler extends DiagnosticEmitter { } } else throw new Error("declaration expected"); + if (element.declaration && isModuleExport(element, element.declaration) && !initInStart) + this.module.addGlobalExport(member.internalName, member.internalName); previousValue = val; } - return element.isCompiled = true; + return true; } // functions @@ -2167,6 +2170,8 @@ export class Compiler extends DiagnosticEmitter { return this.module.createUnreachable(); var element = resolved.element; + var tempLocal: Local; + var targetExpr: ExpressionRef; switch (element.kind) { case ElementKind.LOCAL: @@ -2202,12 +2207,12 @@ export class Compiler extends DiagnosticEmitter { return this.module.createUnreachable(); } assert(resolved.targetExpression != null); - var targetExpr = this.compileExpression(resolved.targetExpression, Type.usize32); + targetExpr = this.compileExpression(resolved.targetExpression, Type.usize32); this.currentType = select((element).type, Type.void, tee); var elementNativeType = (element).type.toNativeType(); if (!tee) return this.module.createStore((element).type.byteSize, targetExpr, valueWithCorrectType, elementNativeType, (element).memoryOffset); - var tempLocal = this.currentFunction.getAndFreeTempLocal((element).type); + tempLocal = this.currentFunction.getAndFreeTempLocal((element).type); return this.module.createBlock(null, [ // TODO: simplify if valueWithCorrectType has no side effects this.module.createSetLocal(tempLocal.index, valueWithCorrectType), this.module.createStore((element).type.byteSize, targetExpr, this.module.createGetLocal(tempLocal.index, elementNativeType), elementNativeType, (element).memoryOffset), @@ -2221,8 +2226,15 @@ export class Compiler extends DiagnosticEmitter { if (setterInstance) { assert(setterInstance.parameters.length == 1); if (!tee) { - this.currentType = Type.void; - return this.makeCall(setterInstance, [ valueWithCorrectType ]); + if (setterInstance.isInstance) { + assert(resolved.targetExpression != null); + targetExpr = this.compileExpression(resolved.targetExpression, select(Type.usize64, Type.usize32, this.options.target == Target.WASM64)); + this.currentType = Type.void; + return this.makeCall(setterInstance, [ targetExpr, valueWithCorrectType ]); + } else { + this.currentType = Type.void; + return this.makeCall(setterInstance, [ valueWithCorrectType ]); + } } var getterPrototype = (element).getterPrototype; assert(getterPrototype != null); @@ -2230,10 +2242,19 @@ export class Compiler extends DiagnosticEmitter { if (getterInstance) { assert(getterInstance.parameters.length == 0); this.currentType = getterInstance.returnType; - return this.module.createBlock(null, [ - this.makeCall(setterInstance, [ valueWithCorrectType ]), - this.makeCall(getterInstance) - ], getterInstance.returnType.toNativeType()); + if (setterInstance.isInstance) { + assert(resolved.targetExpression != null); + targetExpr = this.compileExpression(resolved.targetExpression, select(Type.usize64, Type.usize32, this.options.target == Target.WASM64)); + tempLocal = this.currentFunction.getAndFreeTempLocal(getterInstance.returnType); + return this.module.createBlock(null, [ + this.makeCall(setterInstance, [ this.module.createTeeLocal(tempLocal.index, targetExpr), valueWithCorrectType ]), + this.makeCall(getterInstance, [ this.module.createGetLocal(tempLocal.index, tempLocal.type.toNativeType()) ]) + ], getterInstance.returnType.toNativeType()); + } else + return this.module.createBlock(null, [ + this.makeCall(setterInstance, [ valueWithCorrectType ]), + this.makeCall(getterInstance) + ], getterInstance.returnType.toNativeType()); } } } else @@ -2517,6 +2538,7 @@ export class Compiler extends DiagnosticEmitter { return this.module.createUnreachable(); var element = resolved.element; + var targetExpr: ExpressionRef; switch (element.kind) { case ElementKind.GLOBAL: // static property @@ -2542,8 +2564,10 @@ export class Compiler extends DiagnosticEmitter { assert(resolved.target != null); assert(resolved.targetExpression != null); assert((element).memoryOffset >= 0); + targetExpr = this.compileExpression(resolved.targetExpression, select(Type.usize64, Type.usize32, this.options.target == Target.WASM64)); + this.currentType = (element).type; return this.module.createLoad((element).type.byteSize, (element).type.isSignedInteger, - this.compileExpression(resolved.targetExpression, select(Type.usize64, Type.usize32, this.options.target == Target.WASM64)), + targetExpr, (element).type.toNativeType(), (element).memoryOffset ); @@ -2556,7 +2580,11 @@ export class Compiler extends DiagnosticEmitter { return this.module.createUnreachable(); assert(getterInstance.parameters.length == 0); this.currentType = getterInstance.returnType; - return this.makeCall(getterInstance); + if (getterInstance.isInstance) { + var targetExpr = this.compileExpression(resolved.targetExpression, select(Type.usize64, Type.usize32, this.options.target == Target.WASM64)) + return this.makeCall(getterInstance, [ targetExpr ]); + } else + return this.makeCall(getterInstance); } this.error(DiagnosticCode.Operation_not_supported, propertyAccess.range); return this.module.createUnreachable(); @@ -2802,11 +2830,11 @@ export class Compiler extends DiagnosticEmitter { function isModuleExport(element: Element, declaration: DeclarationStatement): bool { if (!element.isExported) return false; - if (declaration.range.source.isEntry) - return true; var parentNode = declaration.parent; if (!parentNode) return false; + if (declaration.range.source.isEntry && parentNode.kind != NodeKind.NAMESPACE) + return true; if (parentNode.kind == NodeKind.VARIABLE) if (!(parentNode = parentNode.parent)) return false; diff --git a/src/parser.ts b/src/parser.ts index 30085b03..5f730199 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -910,10 +910,11 @@ export class Parser extends DiagnosticEmitter { } parseImport(tn: Tokenizer): ImportStatement | null { - // at 'import': ('{' (ImportMember (',' ImportMember)*)? '}' | '*' 'as' Identifier) 'from' StringLiteral ';'? + // at 'import': ('{' (ImportMember (',' ImportMember)*)? '}' | '*' 'as' Identifier)? 'from' StringLiteral ';'? var startPos = tn.tokenPos; var members: ImportDeclaration[] | null = null; var namespaceName: IdentifierExpression | null = null; + var skipFrom = false; if (tn.skip(Token.OPENBRACE)) { members = new Array(); if (!tn.skip(Token.CLOSEBRACE)) { @@ -940,26 +941,18 @@ export class Parser extends DiagnosticEmitter { this.error(DiagnosticCode._0_expected, tn.range(), "as"); return null; } - } else { - this.error(DiagnosticCode._0_expected, tn.range(), "{"); - return null; - } - if (tn.skip(Token.FROM)) { + } else + skipFrom = true; + + if (skipFrom || tn.skip(Token.FROM)) { if (tn.skip(Token.STRINGLITERAL)) { var path = Node.createStringLiteralExpression(tn.readString(), tn.range()); var ret: ImportStatement; - if (members) { - if (!namespaceName) - ret = Node.createImportStatement(members, path, tn.range(startPos, tn.pos)); - else { - assert(false); - return null; - } - } else if (namespaceName) { + if (namespaceName) { + assert(!members); ret = Node.createImportStatementWithWildcard(namespaceName, path, tn.range(startPos, tn.pos)); } else { - assert(false); - return null; + ret = Node.createImportStatement(members, path, tn.range(startPos, tn.pos)); } if (!this.seenlog.has(ret.normalizedPath)) { this.backlog.push(ret.normalizedPath); diff --git a/src/program.ts b/src/program.ts index a35d8f73..d0de37e2 100644 --- a/src/program.ts +++ b/src/program.ts @@ -438,6 +438,7 @@ export class Program extends DiagnosticEmitter { else (propertyElement).setterPrototype = instancePrototype; classPrototype.instanceMembers.set(name, propertyElement); + this.elements.set(internalPropertyName, propertyElement); } } @@ -614,8 +615,7 @@ export class Program extends DiagnosticEmitter { return; } this.error(DiagnosticCode.Operation_not_supported, statement.range); // TODO - } else - throw new Error("imports must either define members or a namespace"); + } } private initializeImport(declaration: ImportDeclaration, internalPath: string, queuedExports: Map, queuedImports: QueuedImport[]): void { @@ -912,26 +912,27 @@ export class Program extends DiagnosticEmitter { var name = identifier.name; var local = contextualFunction.locals.get(name); if (local) - return resolvedElement.set(local); + return (resolvedElement || (resolvedElement = new ResolvedElement())).set(local); var element: Element | null; var namespace: Element | null; - // search parent namespaces if applicable + // search contextual parent namespaces if applicable if (contextualFunction && (namespace = contextualFunction.prototype.namespace)) { do { if (element = this.elements.get(namespace.internalName + STATIC_DELIMITER + name)) - return resolvedElement.set(element); + // if ((namespace.members && (element = namespace.members.get(name))) || (element = this.elements.get(namespace.internalName + STATIC_DELIMITER + name))) + return (resolvedElement || (resolvedElement = new ResolvedElement())).set(element); } while (namespace = namespace.namespace); } // search current file if (element = this.elements.get(identifier.range.source.internalPath + PATH_DELIMITER + name)) - return resolvedElement.set(element); + return (resolvedElement || (resolvedElement = new ResolvedElement())).set(element); // search global scope if (element = this.elements.get(name)) - return resolvedElement.set(element); + return (resolvedElement || (resolvedElement = new ResolvedElement())).set(element); this.error(DiagnosticCode.Cannot_find_name_0, identifier.range, name); return null; @@ -939,13 +940,11 @@ export class Program extends DiagnosticEmitter { /** Resolves a property access to the element it refers to. */ resolvePropertyAccess(propertyAccess: PropertyAccessExpression, contextualFunction: Function): ResolvedElement | null { - var resolved: ResolvedElement | null; - // start by resolving the lhs target (expression before the last dot) var targetExpression = propertyAccess.expression; - if (!(resolved = this.resolveExpression(targetExpression, contextualFunction))) + if (!(resolvedElement = this.resolveExpression(targetExpression, contextualFunction))) return null; - var target = resolved.element; + var target = resolvedElement.element; // at this point we know exactly what the target is, so look up the element within var propertyName = propertyAccess.property.name; @@ -973,16 +972,22 @@ export class Program extends DiagnosticEmitter { } resolveElementAccess(elementAccess: ElementAccessExpression, contextualFunction: Function): ResolvedElement | null { - var resolved: ResolvedElement | null; - // start by resolving the lhs target (expression before the last dot) var targetExpression = elementAccess.expression; - if (!(resolved = this.resolveExpression(targetExpression, contextualFunction))) + if (!(resolvedElement = this.resolveExpression(targetExpression, contextualFunction))) return null; - var target = resolved.element; + var target = resolvedElement.element; - // at this point we know exactly what the target is, so make sure it is an array and look up the element within - throw new Error("not implemented"); + switch (target.kind) { + case ElementKind.CLASS: + var type = (target).type; + if (type.classType) { + // TODO: check if array etc. + } + break; + } + this.error(DiagnosticCode.Operation_not_supported, elementAccess.range); + return null; } resolveExpression(expression: Expression, contextualFunction: Function): ResolvedElement | null { @@ -991,13 +996,13 @@ export class Program extends DiagnosticEmitter { case NodeKind.THIS: // -> Class if (classType = contextualFunction.instanceMethodOf) - return resolvedElement.set(classType); + return (resolvedElement || (resolvedElement = new ResolvedElement())).set(classType); this.error(DiagnosticCode._this_cannot_be_referenced_in_current_location, expression.range); return null; case NodeKind.SUPER: // -> Class if ((classType = contextualFunction.instanceMethodOf) && (classType = classType.base)) - return resolvedElement.set(classType); + return (resolvedElement || (resolvedElement = new ResolvedElement())).set(classType); this.error(DiagnosticCode._super_can_only_be_referenced_in_a_derived_class, expression.range); return null; @@ -1009,11 +1014,9 @@ export class Program extends DiagnosticEmitter { case NodeKind.ELEMENTACCESS: return this.resolveElementAccess(expression, contextualFunction); - - default: - this.error(DiagnosticCode.Operation_not_supported, expression.range); - return null; } + this.error(DiagnosticCode.Operation_not_supported, expression.range); + return null; } } @@ -1022,11 +1025,12 @@ export class ResolvedElement { /** The target element, if a property or element access */ target: Element | null; - /** The target element's sub-expression, if a property or element access. */ + /** The target element's expression, if a property or element access. */ targetExpression: Expression | null; /** The element being accessed. */ element: Element; + /** Clears the target and sets the resolved element. */ set(element: Element): this { this.target = null; this.targetExpression = null; @@ -1034,6 +1038,7 @@ export class ResolvedElement { return this; } + /** Sets the resolved target in addition to the previously set element. */ withTarget(target: Element, targetExpression: Expression): this { this.target = target; this.targetExpression = targetExpression; @@ -1041,7 +1046,8 @@ export class ResolvedElement { } } -var resolvedElement = new ResolvedElement(); +// Cached result structure instance +var resolvedElement: ResolvedElement | null; /** Indicates the specific kind of an {@link Element}. */ export enum ElementKind { @@ -1114,7 +1120,9 @@ export enum ElementFlags { /** Is an abstract member. */ ABSTRACT = 1 << 16, /** Is a struct-like class with limited capabilites. */ - STRUCT = 1 << 17 + STRUCT = 1 << 17, + /** Has already inherited base class static members. */ + HAS_STATIC_BASE_MEMBERS = 1 << 18 } /** Base class of all program elements. */ @@ -1810,11 +1818,22 @@ export class ClassPrototype extends Element { this.program.error(DiagnosticCode.A_class_may_only_extend_another_class, declaration.extendsType.range); return null; } + if ((this.flags & ElementFlags.HAS_STATIC_BASE_MEMBERS) == 0) { // inherit static base members once + this.flags |= ElementFlags.HAS_STATIC_BASE_MEMBERS; + if (baseClass.prototype.members) { + if (!this.members) + this.members = new Map(); + for (var baseMember of baseClass.prototype.members.values()) + if (!baseMember.isInstance) + this.members.set(baseMember.simpleName, baseMember); + } + } if (baseClass.prototype.isStruct != this.isStruct) { this.program.error(DiagnosticCode.Structs_cannot_extend_classes_and_vice_versa, Range.join(declaration.name.range, declaration.extendsType.range)); return null; } - } + } else + this.flags |= ElementFlags.HAS_STATIC_BASE_MEMBERS; // fwiw // override call specific contextual type arguments if provided var i: i32, k: i32; @@ -1880,8 +1899,14 @@ export class ClassPrototype extends Element { instance.members.set(member.simpleName, methodPrototype); break; + case ElementKind.PROPERTY: // instance properties are just copied because there is nothing to partially-resolve + if (!instance.members) + instance.members = new Map(); + instance.members.set(member.simpleName, member); + break; + default: - throw new Error("instance member expected"); + throw new Error("instance member expected: " + member.kind); } } @@ -1931,11 +1956,14 @@ export class Class extends Element { this.type = (prototype.program.target == Target.WASM64 ? Type.usize64 : Type.usize32).asClass(this); this.base = base; - // inherit contextual type arguments from base class - if (base && base.contextualTypeArguments) { - if (!this.contextualTypeArguments) this.contextualTypeArguments = new Map(); - for (var [baseName, baseType] of base.contextualTypeArguments) - this.contextualTypeArguments.set(baseName, baseType); + // inherit static members and contextual type arguments from base class + if (base) { + if (base.contextualTypeArguments) { + if (!this.contextualTypeArguments) + this.contextualTypeArguments = new Map(); + for (var [baseName, baseType] of base.contextualTypeArguments) + this.contextualTypeArguments.set(baseName, baseType); + } } // apply instance-specific contextual type arguments diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 365d59b2..a9e010af 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -46,14 +46,12 @@ export class CArray { private constructor() {} @operator("[]") - get(index: i32): T { - assert(index >= 0); - return load(index * sizeof()); + get(index: usize): T { + return load(changetype(this) + index * sizeof()); } @operator("[]=") - set(index: i32, value: T): void { - assert(index >= 0); - store(index * sizeof(), value); + set(index: usize, value: T): void { + store(changetype(this) + index * sizeof(), value); } } diff --git a/tests/compiler/enum.optimized-inlined.wast b/tests/compiler/enum.optimized-inlined.wast index 8f245598..48f3159b 100644 --- a/tests/compiler/enum.optimized-inlined.wast +++ b/tests/compiler/enum.optimized-inlined.wast @@ -1,9 +1,33 @@ (module (type $i (func (result i32))) (type $v (func)) + (global $enum/Implicit.ZERO i32 (i32.const 0)) + (global $enum/Implicit.ONE i32 (i32.const 1)) + (global $enum/Implicit.TWO i32 (i32.const 2)) + (global $enum/Implicit.THREE i32 (i32.const 3)) + (global $enum/Explicit.ZERO i32 (i32.const 0)) + (global $enum/Explicit.ONE i32 (i32.const 1)) + (global $enum/Explicit.TWO i32 (i32.const 2)) + (global $enum/Explicit.THREE i32 (i32.const 3)) + (global $enum/Mixed.ZERO i32 (i32.const 0)) + (global $enum/Mixed.ONE i32 (i32.const 1)) + (global $enum/Mixed.THREE i32 (i32.const 3)) + (global $enum/Mixed.FOUR i32 (i32.const 4)) (global $enum/NonConstant.ZERO (mut i32) (i32.const 0)) (global $enum/NonConstant.ONE (mut i32) (i32.const 0)) (memory $0 1) + (export "enum/Implicit.ZERO" (global $enum/Implicit.ZERO)) + (export "enum/Implicit.ONE" (global $enum/Implicit.ONE)) + (export "enum/Implicit.TWO" (global $enum/Implicit.TWO)) + (export "enum/Implicit.THREE" (global $enum/Implicit.THREE)) + (export "enum/Explicit.ZERO" (global $enum/Explicit.ZERO)) + (export "enum/Explicit.ONE" (global $enum/Explicit.ONE)) + (export "enum/Explicit.TWO" (global $enum/Explicit.TWO)) + (export "enum/Explicit.THREE" (global $enum/Explicit.THREE)) + (export "enum/Mixed.ZERO" (global $enum/Mixed.ZERO)) + (export "enum/Mixed.ONE" (global $enum/Mixed.ONE)) + (export "enum/Mixed.THREE" (global $enum/Mixed.THREE)) + (export "enum/Mixed.FOUR" (global $enum/Mixed.FOUR)) (export "memory" (memory $0)) (start $start) (func $start (; 0 ;) (type $v) diff --git a/tests/compiler/enum.optimized.wast b/tests/compiler/enum.optimized.wast index dd1b5d01..6056a992 100644 --- a/tests/compiler/enum.optimized.wast +++ b/tests/compiler/enum.optimized.wast @@ -1,9 +1,33 @@ (module (type $i (func (result i32))) (type $v (func)) + (global $enum/Implicit.ZERO i32 (i32.const 0)) + (global $enum/Implicit.ONE i32 (i32.const 1)) + (global $enum/Implicit.TWO i32 (i32.const 2)) + (global $enum/Implicit.THREE i32 (i32.const 3)) + (global $enum/Explicit.ZERO i32 (i32.const 0)) + (global $enum/Explicit.ONE i32 (i32.const 1)) + (global $enum/Explicit.TWO i32 (i32.const 2)) + (global $enum/Explicit.THREE i32 (i32.const 3)) + (global $enum/Mixed.ZERO i32 (i32.const 0)) + (global $enum/Mixed.ONE i32 (i32.const 1)) + (global $enum/Mixed.THREE i32 (i32.const 3)) + (global $enum/Mixed.FOUR i32 (i32.const 4)) (global $enum/NonConstant.ZERO (mut i32) (i32.const 0)) (global $enum/NonConstant.ONE (mut i32) (i32.const 0)) (memory $0 1) + (export "enum/Implicit.ZERO" (global $enum/Implicit.ZERO)) + (export "enum/Implicit.ONE" (global $enum/Implicit.ONE)) + (export "enum/Implicit.TWO" (global $enum/Implicit.TWO)) + (export "enum/Implicit.THREE" (global $enum/Implicit.THREE)) + (export "enum/Explicit.ZERO" (global $enum/Explicit.ZERO)) + (export "enum/Explicit.ONE" (global $enum/Explicit.ONE)) + (export "enum/Explicit.TWO" (global $enum/Explicit.TWO)) + (export "enum/Explicit.THREE" (global $enum/Explicit.THREE)) + (export "enum/Mixed.ZERO" (global $enum/Mixed.ZERO)) + (export "enum/Mixed.ONE" (global $enum/Mixed.ONE)) + (export "enum/Mixed.THREE" (global $enum/Mixed.THREE)) + (export "enum/Mixed.FOUR" (global $enum/Mixed.FOUR)) (export "memory" (memory $0)) (start $start) (func $enum/getZero (; 0 ;) (type $i) (result i32) diff --git a/tests/compiler/enum.wast b/tests/compiler/enum.wast index 2a301b82..4162dc41 100644 --- a/tests/compiler/enum.wast +++ b/tests/compiler/enum.wast @@ -17,6 +17,18 @@ (global $enum/NonConstant.ONE (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 4)) (memory $0 1) + (export "enum/Implicit.ZERO" (global $enum/Implicit.ZERO)) + (export "enum/Implicit.ONE" (global $enum/Implicit.ONE)) + (export "enum/Implicit.TWO" (global $enum/Implicit.TWO)) + (export "enum/Implicit.THREE" (global $enum/Implicit.THREE)) + (export "enum/Explicit.ZERO" (global $enum/Explicit.ZERO)) + (export "enum/Explicit.ONE" (global $enum/Explicit.ONE)) + (export "enum/Explicit.TWO" (global $enum/Explicit.TWO)) + (export "enum/Explicit.THREE" (global $enum/Explicit.THREE)) + (export "enum/Mixed.ZERO" (global $enum/Mixed.ZERO)) + (export "enum/Mixed.ONE" (global $enum/Mixed.ONE)) + (export "enum/Mixed.THREE" (global $enum/Mixed.THREE)) + (export "enum/Mixed.FOUR" (global $enum/Mixed.FOUR)) (export "memory" (memory $0)) (start $start) (func $enum/getZero (; 0 ;) (type $i) (result i32) diff --git a/tests/compiler/showcase.optimized-inlined.wast b/tests/compiler/showcase.optimized-inlined.wast new file mode 100644 index 00000000..2cabb817 --- /dev/null +++ b/tests/compiler/showcase.optimized-inlined.wast @@ -0,0 +1,4337 @@ +(module + (type $ii (func (param i32) (result i32))) + (type $iii (func (param i32 i32) (result i32))) + (type $fff (func (param f32 f32) (result f32))) + (type $FFF (func (param f64 f64) (result f64))) + (type $v (func)) + (type $iiii (func (param i32 i32 i32) (result i32))) + (type $ifv (func (param i32 f32))) + (type $if (func (param i32) (result f32))) + (global $showcase/aConstantGlobal i32 (i32.const 42)) + (global $showcase/anExportedConstantGlobal f32 (f32.const 42)) + (global $showcase/aMutableGlobal (mut i32) (i32.const 42)) + (global $unary/i (mut i32) (i32.const 0)) + (global $unary/I (mut i64) (i64.const 0)) + (global $unary/f (mut f32) (f32.const 0)) + (global $unary/F (mut f64) (f64.const 0)) + (global $binary/b (mut i32) (i32.const 0)) + (global $binary/i (mut i32) (i32.const 0)) + (global $binary/I (mut i64) (i64.const 0)) + (global $binary/f (mut f32) (f32.const 0)) + (global $binary/F (mut f64) (f64.const 0)) + (global $logical/i (mut i32) (i32.const 0)) + (global $logical/I (mut i64) (i64.const 0)) + (global $logical/f (mut f32) (f32.const 0)) + (global $logical/F (mut f64) (f64.const 0)) + (global $builtins/b (mut i32) (i32.const 0)) + (global $builtins/i (mut i32) (i32.const 0)) + (global $builtins/I (mut i64) (i64.const 0)) + (global $builtins/f (mut f32) (f32.const 0)) + (global $builtins/F (mut f64) (f64.const 0)) + (global $builtins/s (mut i32) (i32.const 0)) + (global $showcase/ANamespace.aNamespacedGlobal (mut i32) (i32.const 42)) + (global $showcase/AnEnum.ONE i32 (i32.const 1)) + (global $showcase/AnEnum.TWO i32 (i32.const 2)) + (global $showcase/AnEnum.FOUR i32 (i32.const 4)) + (global $showcase/AnEnum.FIVE i32 (i32.const 5)) + (global $showcase/AnEnum.FOURTYTWO (mut i32) (i32.const 0)) + (global $showcase/AnEnum.FOURTYTHREE (mut i32) (i32.const 0)) + (global $memcpy/dest (mut i32) (i32.const 0)) + (global $showcase/aClassInstance (mut i32) (i32.const 8)) + (global $showcase/AClass.aStaticField (mut i32) (i32.const 0)) + (memory $0 1) + (export "anExportedConstantGlobal" (global $showcase/anExportedConstantGlobal)) + (export "aConstantGlobal" (global $showcase/aConstantGlobal)) + (export "anAliasedConstantGlobal" (global $showcase/anExportedConstantGlobal)) + (export "showcase/AnEnum.ONE" (global $showcase/AnEnum.ONE)) + (export "showcase/AnEnum.TWO" (global $showcase/AnEnum.TWO)) + (export "showcase/AnEnum.FOUR" (global $showcase/AnEnum.FOUR)) + (export "showcase/AnEnum.FIVE" (global $showcase/AnEnum.FIVE)) + (export "anExportedFunction" (func $showcase/anExportedFunction)) + (export "memory" (memory $0)) + (start $start) + (func $showcase/anExportedFunction (; 0 ;) (type $v) + (nop) + ) + (func $memcpy/memcpy (; 1 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (set_local $4 + (get_local $0) + ) + (set_local $3 + (get_local $1) + ) + (loop $continue|0 + (if + (if (result i32) + (get_local $2) + (i32.rem_u + (get_local $3) + (i32.const 4) + ) + (get_local $2) + ) + (block + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + (if + (i32.eqz + (i32.rem_u + (get_local $4) + (i32.const 4) + ) + ) + (block + (loop $continue|1 + (if + (i32.ge_u + (get_local $2) + (i32.const 16) + ) + (block + (i32.store + (get_local $4) + (i32.load + (get_local $3) + ) + ) + (i32.store + (i32.add + (get_local $4) + (i32.const 4) + ) + (i32.load + (i32.add + (get_local $3) + (i32.const 4) + ) + ) + ) + (i32.store + (i32.add + (get_local $4) + (i32.const 8) + ) + (i32.load + (i32.add + (get_local $3) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (get_local $4) + (i32.const 12) + ) + (i32.load + (i32.add + (get_local $3) + (i32.const 12) + ) + ) + ) + (set_local $3 + (i32.add + (get_local $3) + (i32.const 16) + ) + ) + (set_local $4 + (i32.add + (get_local $4) + (i32.const 16) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 16) + ) + ) + (br $continue|1) + ) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 8) + ) + (block + (i32.store + (get_local $4) + (i32.load + (get_local $3) + ) + ) + (i32.store + (i32.add + (get_local $4) + (i32.const 4) + ) + (i32.load + (i32.add + (get_local $3) + (i32.const 4) + ) + ) + ) + (set_local $4 + (i32.add + (get_local $4) + (i32.const 8) + ) + ) + (set_local $3 + (i32.add + (get_local $3) + (i32.const 8) + ) + ) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 4) + ) + (block + (i32.store + (get_local $4) + (i32.load + (get_local $3) + ) + ) + (set_local $4 + (i32.add + (get_local $4) + (i32.const 4) + ) + ) + (set_local $3 + (i32.add + (get_local $3) + (i32.const 4) + ) + ) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 2) + ) + (block + (i32.store16 + (get_local $4) + (i32.load16_u + (get_local $3) + ) + ) + (set_local $4 + (i32.add + (get_local $4) + (i32.const 2) + ) + ) + (set_local $3 + (i32.add + (get_local $3) + (i32.const 2) + ) + ) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 1) + ) + (block + (set_local $1 + (get_local $4) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $1 + (get_local $3) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + ) + ) + (return + (get_local $0) + ) + ) + ) + (if + (i32.ge_u + (get_local $2) + (i32.const 32) + ) + (block $break|2 + (block $case2|2 + (block $case1|2 + (block $case0|2 + (block $tablify|0 + (br_table $case0|2 $case1|2 $case2|2 $tablify|0 + (i32.sub + (i32.rem_u + (get_local $4) + (i32.const 4) + ) + (i32.const 1) + ) + ) + ) + (br $break|2) + ) + (set_local $5 + (i32.load + (get_local $3) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 3) + ) + ) + (loop $continue|3 + (if + (i32.ge_u + (get_local $2) + (i32.const 17) + ) + (block + (i32.store + (get_local $4) + (i32.or + (i32.shr_u + (get_local $5) + (i32.const 24) + ) + (i32.shl + (tee_local $1 + (i32.load + (i32.add + (get_local $3) + (i32.const 1) + ) + ) + ) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (get_local $4) + (i32.const 4) + ) + (i32.or + (i32.shr_u + (get_local $1) + (i32.const 24) + ) + (i32.shl + (tee_local $5 + (i32.load + (i32.add + (get_local $3) + (i32.const 5) + ) + ) + ) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (get_local $4) + (i32.const 8) + ) + (i32.or + (i32.shr_u + (get_local $5) + (i32.const 24) + ) + (i32.shl + (tee_local $1 + (i32.load + (i32.add + (get_local $3) + (i32.const 9) + ) + ) + ) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (get_local $4) + (i32.const 12) + ) + (i32.or + (i32.shr_u + (get_local $1) + (i32.const 24) + ) + (i32.shl + (tee_local $5 + (i32.load + (i32.add + (get_local $3) + (i32.const 13) + ) + ) + ) + (i32.const 8) + ) + ) + ) + (set_local $3 + (i32.add + (get_local $3) + (i32.const 16) + ) + ) + (set_local $4 + (i32.add + (get_local $4) + (i32.const 16) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 16) + ) + ) + (br $continue|3) + ) + ) + ) + (br $break|2) + ) + (set_local $5 + (i32.load + (get_local $3) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 2) + ) + ) + (loop $continue|4 + (if + (i32.ge_u + (get_local $2) + (i32.const 18) + ) + (block + (i32.store + (get_local $4) + (i32.or + (i32.shr_u + (get_local $5) + (i32.const 16) + ) + (i32.shl + (tee_local $1 + (i32.load + (i32.add + (get_local $3) + (i32.const 2) + ) + ) + ) + (i32.const 16) + ) + ) + ) + (i32.store + (i32.add + (get_local $4) + (i32.const 4) + ) + (i32.or + (i32.shr_u + (get_local $1) + (i32.const 16) + ) + (i32.shl + (tee_local $5 + (i32.load + (i32.add + (get_local $3) + (i32.const 6) + ) + ) + ) + (i32.const 16) + ) + ) + ) + (i32.store + (i32.add + (get_local $4) + (i32.const 8) + ) + (i32.or + (i32.shr_u + (get_local $5) + (i32.const 16) + ) + (i32.shl + (tee_local $1 + (i32.load + (i32.add + (get_local $3) + (i32.const 10) + ) + ) + ) + (i32.const 16) + ) + ) + ) + (i32.store + (i32.add + (get_local $4) + (i32.const 12) + ) + (i32.or + (i32.shr_u + (get_local $1) + (i32.const 16) + ) + (i32.shl + (tee_local $5 + (i32.load + (i32.add + (get_local $3) + (i32.const 14) + ) + ) + ) + (i32.const 16) + ) + ) + ) + (set_local $3 + (i32.add + (get_local $3) + (i32.const 16) + ) + ) + (set_local $4 + (i32.add + (get_local $4) + (i32.const 16) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 16) + ) + ) + (br $continue|4) + ) + ) + ) + (br $break|2) + ) + (set_local $5 + (i32.load + (get_local $3) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 1) + ) + ) + (loop $continue|5 + (if + (i32.ge_u + (get_local $2) + (i32.const 19) + ) + (block + (i32.store + (get_local $4) + (i32.or + (i32.shr_u + (get_local $5) + (i32.const 8) + ) + (i32.shl + (tee_local $1 + (i32.load + (i32.add + (get_local $3) + (i32.const 3) + ) + ) + ) + (i32.const 24) + ) + ) + ) + (i32.store + (i32.add + (get_local $4) + (i32.const 4) + ) + (i32.or + (i32.shr_u + (get_local $1) + (i32.const 8) + ) + (i32.shl + (tee_local $5 + (i32.load + (i32.add + (get_local $3) + (i32.const 7) + ) + ) + ) + (i32.const 24) + ) + ) + ) + (i32.store + (i32.add + (get_local $4) + (i32.const 8) + ) + (i32.or + (i32.shr_u + (get_local $5) + (i32.const 8) + ) + (i32.shl + (tee_local $1 + (i32.load + (i32.add + (get_local $3) + (i32.const 11) + ) + ) + ) + (i32.const 24) + ) + ) + ) + (i32.store + (i32.add + (get_local $4) + (i32.const 12) + ) + (i32.or + (i32.shr_u + (get_local $1) + (i32.const 8) + ) + (i32.shl + (tee_local $5 + (i32.load + (i32.add + (get_local $3) + (i32.const 15) + ) + ) + ) + (i32.const 24) + ) + ) + ) + (set_local $3 + (i32.add + (get_local $3) + (i32.const 16) + ) + ) + (set_local $4 + (i32.add + (get_local $4) + (i32.const 16) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 16) + ) + ) + (br $continue|5) + ) + ) + ) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 16) + ) + (block + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 8) + ) + (block + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 4) + ) + (block + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 2) + ) + (block + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 1) + ) + (block + (set_local $1 + (get_local $4) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $1 + (get_local $3) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + ) + ) + (get_local $0) + ) + (func $fmod/fmod (; 2 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) + (local $2 i64) + (local $3 i32) + (local $4 i64) + (local $5 i64) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 f64) + (set_local $3 + (i32.wrap/i64 + (i64.and + (i64.shr_u + (tee_local $2 + (i64.reinterpret/f64 + (get_local $0) + ) + ) + (i64.const 52) + ) + (i64.const 2047) + ) + ) + ) + (set_local $6 + (i32.wrap/i64 + (i64.and + (i64.shr_u + (tee_local $5 + (i64.reinterpret/f64 + (get_local $1) + ) + ) + (i64.const 52) + ) + (i64.const 2047) + ) + ) + ) + (set_local $8 + (i32.wrap/i64 + (i64.shr_u + (get_local $2) + (i64.const 63) + ) + ) + ) + (if + (if (result i32) + (if (result i32) + (tee_local $7 + (i64.eq + (i64.shl + (get_local $5) + (i64.const 1) + ) + (i64.const 0) + ) + ) + (get_local $7) + (tee_local $7 + (f64.ne + (tee_local $9 + (get_local $1) + ) + (get_local $9) + ) + ) + ) + (get_local $7) + (i32.eq + (get_local $3) + (i32.const 2047) + ) + ) + (return + (f64.div + (f64.mul + (get_local $0) + (get_local $1) + ) + (f64.mul + (get_local $0) + (get_local $1) + ) + ) + ) + ) + (if + (i64.le_u + (i64.shl + (get_local $2) + (i64.const 1) + ) + (i64.shl + (get_local $5) + (i64.const 1) + ) + ) + (block + (if + (i64.eq + (i64.shl + (get_local $2) + (i64.const 1) + ) + (i64.shl + (get_local $5) + (i64.const 1) + ) + ) + (return + (f64.mul + (f64.const 0) + (get_local $0) + ) + ) + ) + (return + (get_local $0) + ) + ) + ) + (set_local $2 + (if (result i64) + (get_local $3) + (i64.or + (i64.and + (get_local $2) + (i64.const 4503599627370495) + ) + (i64.const 4503599627370496) + ) + (block (result i64) + (set_local $4 + (i64.shl + (get_local $2) + (i64.const 12) + ) + ) + (loop $continue|0 + (if + (i64.eqz + (i64.shr_u + (get_local $4) + (i64.const 63) + ) + ) + (block + (set_local $3 + (i32.sub + (get_local $3) + (i32.const 1) + ) + ) + (set_local $4 + (i64.shl + (get_local $4) + (i64.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + (i64.shl + (get_local $2) + (i64.add + (i64.sub + (i64.const 0) + (i64.extend_u/i32 + (get_local $3) + ) + ) + (i64.const 1) + ) + ) + ) + ) + ) + (set_local $5 + (if (result i64) + (get_local $6) + (i64.or + (i64.and + (get_local $5) + (i64.const 4503599627370495) + ) + (i64.const 4503599627370496) + ) + (block (result i64) + (set_local $4 + (i64.shl + (get_local $5) + (i64.const 12) + ) + ) + (loop $continue|1 + (if + (i64.eqz + (i64.shr_u + (get_local $4) + (i64.const 63) + ) + ) + (block + (set_local $6 + (i32.sub + (get_local $6) + (i32.const 1) + ) + ) + (set_local $4 + (i64.shl + (get_local $4) + (i64.const 1) + ) + ) + (br $continue|1) + ) + ) + ) + (i64.shl + (get_local $5) + (i64.add + (i64.sub + (i64.const 0) + (i64.extend_u/i32 + (get_local $6) + ) + ) + (i64.const 1) + ) + ) + ) + ) + ) + (loop $continue|2 + (if + (i32.gt_s + (get_local $3) + (get_local $6) + ) + (block + (if + (i64.eqz + (i64.shr_u + (tee_local $4 + (i64.sub + (get_local $2) + (get_local $5) + ) + ) + (i64.const 63) + ) + ) + (block + (if + (i64.eqz + (get_local $4) + ) + (return + (f64.mul + (f64.const 0) + (get_local $0) + ) + ) + ) + (set_local $2 + (get_local $4) + ) + ) + ) + (set_local $2 + (i64.shl + (get_local $2) + (i64.const 1) + ) + ) + (set_local $3 + (i32.sub + (get_local $3) + (i32.const 1) + ) + ) + (br $continue|2) + ) + ) + ) + (if + (i64.eqz + (i64.shr_u + (tee_local $4 + (i64.sub + (get_local $2) + (get_local $5) + ) + ) + (i64.const 63) + ) + ) + (block + (if + (i64.eqz + (get_local $4) + ) + (return + (f64.mul + (f64.const 0) + (get_local $0) + ) + ) + ) + (set_local $2 + (get_local $4) + ) + ) + ) + (loop $continue|3 + (if + (i64.eqz + (i64.shr_u + (get_local $2) + (i64.const 52) + ) + ) + (block + (set_local $3 + (i32.sub + (get_local $3) + (i32.const 1) + ) + ) + (set_local $2 + (i64.shl + (get_local $2) + (i64.const 1) + ) + ) + (br $continue|3) + ) + ) + ) + (f64.reinterpret/i64 + (i64.or + (tee_local $2 + (if (result i64) + (i32.gt_s + (get_local $3) + (i32.const 0) + ) + (i64.or + (i64.sub + (get_local $2) + (i64.const 4503599627370496) + ) + (i64.shl + (i64.extend_u/i32 + (get_local $3) + ) + (i64.const 52) + ) + ) + (i64.shr_u + (get_local $2) + (i64.add + (i64.sub + (i64.const 0) + (i64.extend_u/i32 + (get_local $3) + ) + ) + (i64.const 1) + ) + ) + ) + ) + (i64.shl + (i64.extend_u/i32 + (get_local $8) + ) + (i64.const 63) + ) + ) + ) + ) + (func $fmod/fmodf (; 3 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 f32) + (set_local $4 + (i32.and + (i32.shr_u + (tee_local $2 + (i32.reinterpret/f32 + (get_local $0) + ) + ) + (i32.const 23) + ) + (i32.const 255) + ) + ) + (set_local $6 + (i32.and + (i32.shr_u + (tee_local $5 + (i32.reinterpret/f32 + (get_local $1) + ) + ) + (i32.const 23) + ) + (i32.const 255) + ) + ) + (set_local $7 + (i32.and + (get_local $2) + (i32.const -2147483648) + ) + ) + (if + (if (result i32) + (if (result i32) + (tee_local $3 + (i32.eqz + (i32.shl + (get_local $5) + (i32.const 1) + ) + ) + ) + (get_local $3) + (tee_local $3 + (f32.ne + (tee_local $8 + (get_local $1) + ) + (get_local $8) + ) + ) + ) + (get_local $3) + (i32.eq + (get_local $4) + (i32.const 255) + ) + ) + (return + (f32.div + (f32.mul + (get_local $0) + (get_local $1) + ) + (f32.mul + (get_local $0) + (get_local $1) + ) + ) + ) + ) + (if + (i32.le_u + (i32.shl + (get_local $2) + (i32.const 1) + ) + (i32.shl + (get_local $5) + (i32.const 1) + ) + ) + (block + (if + (i32.eq + (i32.shl + (get_local $2) + (i32.const 1) + ) + (i32.shl + (get_local $5) + (i32.const 1) + ) + ) + (return + (f32.mul + (f32.const 0) + (get_local $0) + ) + ) + ) + (return + (get_local $0) + ) + ) + ) + (set_local $2 + (if (result i32) + (get_local $4) + (i32.or + (i32.and + (get_local $2) + (i32.const 8388607) + ) + (i32.const 8388608) + ) + (block (result i32) + (set_local $3 + (i32.shl + (get_local $2) + (i32.const 9) + ) + ) + (loop $continue|0 + (if + (i32.eqz + (i32.shr_u + (get_local $3) + (i32.const 31) + ) + ) + (block + (set_local $4 + (i32.sub + (get_local $4) + (i32.const 1) + ) + ) + (set_local $3 + (i32.shl + (get_local $3) + (i32.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + (i32.shl + (get_local $2) + (i32.add + (i32.sub + (i32.const 0) + (get_local $4) + ) + (i32.const 1) + ) + ) + ) + ) + ) + (set_local $5 + (if (result i32) + (get_local $6) + (i32.or + (i32.and + (get_local $5) + (i32.const 8388607) + ) + (i32.const 8388608) + ) + (block (result i32) + (set_local $3 + (i32.shl + (get_local $5) + (i32.const 9) + ) + ) + (loop $continue|1 + (if + (i32.eqz + (i32.shr_u + (get_local $3) + (i32.const 31) + ) + ) + (block + (set_local $6 + (i32.sub + (get_local $6) + (i32.const 1) + ) + ) + (set_local $3 + (i32.shl + (get_local $3) + (i32.const 1) + ) + ) + (br $continue|1) + ) + ) + ) + (i32.shl + (get_local $5) + (i32.add + (i32.sub + (i32.const 0) + (get_local $6) + ) + (i32.const 1) + ) + ) + ) + ) + ) + (loop $continue|2 + (if + (i32.gt_s + (get_local $4) + (get_local $6) + ) + (block + (if + (i32.eqz + (i32.shr_u + (tee_local $3 + (i32.sub + (get_local $2) + (get_local $5) + ) + ) + (i32.const 31) + ) + ) + (block + (if + (i32.eqz + (get_local $3) + ) + (return + (f32.mul + (f32.const 0) + (get_local $0) + ) + ) + ) + (set_local $2 + (get_local $3) + ) + ) + ) + (set_local $2 + (i32.shl + (get_local $2) + (i32.const 1) + ) + ) + (set_local $4 + (i32.sub + (get_local $4) + (i32.const 1) + ) + ) + (br $continue|2) + ) + ) + ) + (if + (i32.eqz + (i32.shr_u + (tee_local $3 + (i32.sub + (get_local $2) + (get_local $5) + ) + ) + (i32.const 31) + ) + ) + (block + (if + (i32.eqz + (get_local $3) + ) + (return + (f32.mul + (f32.const 0) + (get_local $0) + ) + ) + ) + (set_local $2 + (get_local $3) + ) + ) + ) + (loop $continue|3 + (if + (i32.eqz + (i32.shr_u + (get_local $2) + (i32.const 23) + ) + ) + (block + (set_local $4 + (i32.sub + (get_local $4) + (i32.const 1) + ) + ) + (set_local $2 + (i32.shl + (get_local $2) + (i32.const 1) + ) + ) + (br $continue|3) + ) + ) + ) + (f32.reinterpret/i32 + (i32.or + (tee_local $2 + (if (result i32) + (i32.gt_s + (get_local $4) + (i32.const 0) + ) + (i32.or + (i32.sub + (get_local $2) + (i32.const 8388608) + ) + (i32.shl + (get_local $4) + (i32.const 23) + ) + ) + (i32.shr_u + (get_local $2) + (i32.add + (i32.sub + (i32.const 0) + (get_local $4) + ) + (i32.const 1) + ) + ) + ) + ) + (get_local $7) + ) + ) + ) + (func $start (; 4 ;) (type $v) + (local $0 f64) + (local $1 f32) + (local $2 i32) + (local $3 i64) + (local $4 i32) + (local $5 i64) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 f32) + (local $10 f32) + (local $11 f64) + (local $12 f64) + (local $13 i32) + (local $14 f32) + (local $15 i32) + (set_global $unary/i + (i32.add + (get_global $unary/i) + (i32.const 1) + ) + ) + (set_global $unary/i + (i32.sub + (get_global $unary/i) + (i32.const 1) + ) + ) + (set_global $unary/i + (i32.add + (get_global $unary/i) + (i32.const 1) + ) + ) + (set_global $unary/i + (i32.sub + (get_global $unary/i) + (i32.const 1) + ) + ) + (set_global $unary/i + (i32.const 1) + ) + (set_global $unary/i + (i32.const -1) + ) + (set_global $unary/i + (i32.const 0) + ) + (set_global $unary/i + (i32.const -2) + ) + (set_global $unary/i + (i32.sub + (i32.const 0) + (get_global $unary/i) + ) + ) + (set_global $unary/i + (i32.eqz + (get_global $unary/i) + ) + ) + (set_global $unary/i + (i32.xor + (get_global $unary/i) + (i32.const -1) + ) + ) + (set_global $unary/i + (block (result i32) + (set_global $unary/i + (i32.add + (get_global $unary/i) + (i32.const 1) + ) + ) + (get_global $unary/i) + ) + ) + (set_global $unary/i + (block (result i32) + (set_global $unary/i + (i32.sub + (get_global $unary/i) + (i32.const 1) + ) + ) + (get_global $unary/i) + ) + ) + (set_global $unary/i + (block (result i32) + (set_global $unary/i + (i32.add + (tee_local $2 + (get_global $unary/i) + ) + (i32.const 1) + ) + ) + (get_local $2) + ) + ) + (set_global $unary/i + (block (result i32) + (set_global $unary/i + (i32.sub + (tee_local $2 + (get_global $unary/i) + ) + (i32.const 1) + ) + ) + (get_local $2) + ) + ) + (set_global $unary/I + (i64.add + (get_global $unary/I) + (i64.const 1) + ) + ) + (set_global $unary/I + (i64.sub + (get_global $unary/I) + (i64.const 1) + ) + ) + (set_global $unary/I + (i64.add + (get_global $unary/I) + (i64.const 1) + ) + ) + (set_global $unary/I + (i64.sub + (get_global $unary/I) + (i64.const 1) + ) + ) + (set_global $unary/I + (i64.const 1) + ) + (set_global $unary/I + (i64.const -1) + ) + (set_global $unary/I + (i64.const 0) + ) + (set_global $unary/I + (i64.const -2) + ) + (set_global $unary/I + (i64.sub + (i64.const 0) + (get_global $unary/I) + ) + ) + (set_global $unary/I + (i64.extend_s/i32 + (i64.eqz + (get_global $unary/I) + ) + ) + ) + (set_global $unary/I + (i64.xor + (get_global $unary/I) + (i64.const -1) + ) + ) + (set_global $unary/I + (block (result i64) + (set_global $unary/I + (i64.add + (get_global $unary/I) + (i64.const 1) + ) + ) + (get_global $unary/I) + ) + ) + (set_global $unary/I + (block (result i64) + (set_global $unary/I + (i64.sub + (get_global $unary/I) + (i64.const 1) + ) + ) + (get_global $unary/I) + ) + ) + (set_global $unary/I + (block (result i64) + (set_global $unary/I + (i64.add + (tee_local $3 + (get_global $unary/I) + ) + (i64.const 1) + ) + ) + (get_local $3) + ) + ) + (set_global $unary/I + (block (result i64) + (set_global $unary/I + (i64.sub + (tee_local $3 + (get_global $unary/I) + ) + (i64.const 1) + ) + ) + (get_local $3) + ) + ) + (set_global $unary/f + (f32.add + (get_global $unary/f) + (f32.const 1) + ) + ) + (set_global $unary/f + (f32.sub + (get_global $unary/f) + (f32.const 1) + ) + ) + (set_global $unary/f + (f32.add + (get_global $unary/f) + (f32.const 1) + ) + ) + (set_global $unary/f + (f32.sub + (get_global $unary/f) + (f32.const 1) + ) + ) + (set_global $unary/f + (f32.const 1.25) + ) + (set_global $unary/f + (f32.const -1.25) + ) + (set_global $unary/i + (i32.const 0) + ) + (set_global $unary/f + (f32.neg + (get_global $unary/f) + ) + ) + (set_global $unary/i + (f32.eq + (get_global $unary/f) + (f32.const 0) + ) + ) + (set_global $unary/f + (block (result f32) + (set_global $unary/f + (f32.add + (get_global $unary/f) + (f32.const 1) + ) + ) + (get_global $unary/f) + ) + ) + (set_global $unary/f + (block (result f32) + (set_global $unary/f + (f32.sub + (get_global $unary/f) + (f32.const 1) + ) + ) + (get_global $unary/f) + ) + ) + (set_global $unary/f + (block (result f32) + (set_global $unary/f + (f32.add + (tee_local $1 + (get_global $unary/f) + ) + (f32.const 1) + ) + ) + (get_local $1) + ) + ) + (set_global $unary/f + (block (result f32) + (set_global $unary/f + (f32.sub + (tee_local $1 + (get_global $unary/f) + ) + (f32.const 1) + ) + ) + (get_local $1) + ) + ) + (set_global $unary/F + (f64.add + (get_global $unary/F) + (f64.const 1) + ) + ) + (set_global $unary/F + (f64.sub + (get_global $unary/F) + (f64.const 1) + ) + ) + (set_global $unary/F + (f64.add + (get_global $unary/F) + (f64.const 1) + ) + ) + (set_global $unary/F + (f64.sub + (get_global $unary/F) + (f64.const 1) + ) + ) + (set_global $unary/F + (f64.const 1.25) + ) + (set_global $unary/F + (f64.const -1.25) + ) + (set_global $unary/I + (i64.const 0) + ) + (set_global $unary/F + (f64.neg + (get_global $unary/F) + ) + ) + (set_global $unary/I + (i64.extend_s/i32 + (f64.eq + (get_global $unary/F) + (f64.const 0) + ) + ) + ) + (set_global $unary/F + (block (result f64) + (set_global $unary/F + (f64.add + (get_global $unary/F) + (f64.const 1) + ) + ) + (get_global $unary/F) + ) + ) + (set_global $unary/F + (block (result f64) + (set_global $unary/F + (f64.sub + (get_global $unary/F) + (f64.const 1) + ) + ) + (get_global $unary/F) + ) + ) + (set_global $unary/F + (block (result f64) + (set_global $unary/F + (f64.add + (tee_local $0 + (get_global $unary/F) + ) + (f64.const 1) + ) + ) + (get_local $0) + ) + ) + (set_global $unary/F + (block (result f64) + (set_global $unary/F + (f64.sub + (tee_local $0 + (get_global $unary/F) + ) + (f64.const 1) + ) + ) + (get_local $0) + ) + ) + (drop + (i32.div_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (drop + (i32.rem_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/b + (i32.lt_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/b + (i32.gt_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/b + (i32.le_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/b + (i32.ge_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/b + (i32.eq + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/b + (i32.eq + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.add + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.sub + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.mul + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.div_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.rem_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.shl + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.shr_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.shr_u + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.and + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.or + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.xor + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.add + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.sub + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.mul + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.rem_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.shl + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.shr_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.shr_u + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.and + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.or + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.xor + (get_global $binary/i) + (i32.const 1) + ) + ) + (drop + (i64.div_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (drop + (i64.rem_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/b + (i64.lt_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/b + (i64.gt_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/b + (i64.le_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/b + (i64.ge_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/b + (i64.eq + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/b + (i64.eq + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.add + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.sub + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.mul + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.div_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.rem_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.shl + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.shr_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.shr_u + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.and + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.or + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.xor + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.add + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.sub + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.mul + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.rem_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.shl + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.shr_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.shr_u + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.and + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.or + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.xor + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/b + (f32.lt + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/b + (f32.gt + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/b + (f32.le + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/b + (f32.ge + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/b + (f32.eq + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/b + (f32.eq + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/f + (f32.add + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/f + (f32.sub + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/f + (f32.mul + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/f + (f32.div + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/f + (f32.add + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/f + (f32.sub + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/f + (f32.mul + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/b + (f64.lt + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/b + (f64.gt + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/b + (f64.le + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/b + (f64.ge + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/b + (f64.eq + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/b + (f64.eq + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/F + (f64.add + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/F + (f64.sub + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/F + (f64.mul + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/F + (f64.div + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/F + (f64.add + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/F + (f64.sub + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/F + (f64.mul + (get_global $binary/F) + (f64.const 1) + ) + ) + (if + (i32.eqz + (tee_local $2 + (i32.const 2) + ) + ) + (unreachable) + ) + (if + (f64.eq + (tee_local $0 + (f64.const 2) + ) + (f64.const 0) + ) + (unreachable) + ) + (set_global $logical/i + (i32.const 2) + ) + (if + (i32.ne + (get_global $logical/i) + (i32.const 2) + ) + (unreachable) + ) + (set_global $logical/i + (i32.const 1) + ) + (if + (i32.ne + (get_global $logical/i) + (i32.const 1) + ) + (unreachable) + ) + (set_global $logical/I + (i64.const 2) + ) + (if + (i64.ne + (get_global $logical/I) + (i64.const 2) + ) + (unreachable) + ) + (set_global $logical/I + (i64.const 1) + ) + (if + (i64.ne + (get_global $logical/I) + (i64.const 1) + ) + (unreachable) + ) + (set_global $logical/f + (f32.const 2) + ) + (if + (f32.ne + (get_global $logical/f) + (f32.const 2) + ) + (unreachable) + ) + (set_global $logical/f + (f32.const 1) + ) + (if + (f32.ne + (get_global $logical/f) + (f32.const 1) + ) + (unreachable) + ) + (set_global $logical/F + (f64.const 2) + ) + (if + (f64.ne + (get_global $logical/F) + (f64.const 2) + ) + (unreachable) + ) + (set_global $logical/F + (f64.const 1) + ) + (if + (f64.ne + (get_global $logical/F) + (f64.const 1) + ) + (unreachable) + ) + (drop + (select + (tee_local $2 + (i32.const 1) + ) + (tee_local $4 + (i32.const 2) + ) + (i32.gt_s + (get_local $2) + (get_local $4) + ) + ) + ) + (drop + (select + (tee_local $2 + (i32.const 1) + ) + (tee_local $4 + (i32.const 2) + ) + (i32.lt_s + (get_local $2) + (get_local $4) + ) + ) + ) + (set_global $builtins/i + (i32.const 31) + ) + (set_global $builtins/i + (i32.const 0) + ) + (set_global $builtins/i + (i32.const 1) + ) + (set_global $builtins/i + (i32.const 2) + ) + (set_global $builtins/i + (i32.const -2147483648) + ) + (set_global $builtins/i + (select + (i32.sub + (i32.const 0) + (tee_local $2 + (i32.const -42) + ) + ) + (get_local $2) + (i32.lt_s + (get_local $2) + (i32.const 0) + ) + ) + ) + (if + (i32.ne + (get_global $builtins/i) + (i32.const 42) + ) + (unreachable) + ) + (set_global $builtins/i + (select + (tee_local $2 + (i32.const 1) + ) + (tee_local $4 + (i32.const 2) + ) + (i32.gt_s + (get_local $2) + (get_local $4) + ) + ) + ) + (if + (i32.ne + (get_global $builtins/i) + (i32.const 2) + ) + (unreachable) + ) + (set_global $builtins/i + (select + (tee_local $2 + (i32.const 1) + ) + (tee_local $4 + (i32.const 2) + ) + (i32.lt_s + (get_local $2) + (get_local $4) + ) + ) + ) + (if + (i32.ne + (get_global $builtins/i) + (i32.const 1) + ) + (unreachable) + ) + (set_global $builtins/I + (i64.const 63) + ) + (set_global $builtins/I + (i64.const 0) + ) + (set_global $builtins/I + (i64.const 1) + ) + (set_global $builtins/I + (i64.const 2) + ) + (set_global $builtins/I + (i64.const -9223372036854775808) + ) + (set_global $builtins/I + (select + (i64.sub + (i64.const 0) + (tee_local $3 + (i64.const -42) + ) + ) + (get_local $3) + (i64.lt_s + (get_local $3) + (i64.const 0) + ) + ) + ) + (if + (i64.ne + (get_global $builtins/I) + (i64.const 42) + ) + (unreachable) + ) + (set_global $builtins/I + (select + (tee_local $3 + (i64.const 1) + ) + (tee_local $5 + (i64.const 2) + ) + (i64.gt_s + (get_local $3) + (get_local $5) + ) + ) + ) + (if + (i64.ne + (get_global $builtins/I) + (i64.const 2) + ) + (unreachable) + ) + (set_global $builtins/I + (select + (tee_local $3 + (i64.const 1) + ) + (tee_local $5 + (i64.const 2) + ) + (i64.lt_s + (get_local $3) + (get_local $5) + ) + ) + ) + (if + (i32.ne + (get_global $builtins/i) + (i32.const 1) + ) + (unreachable) + ) + (set_global $builtins/f + (f32.const nan:0x400000) + ) + (set_global $builtins/f + (f32.const inf) + ) + (set_global $builtins/f + (f32.const 1.25) + ) + (set_global $builtins/f + (f32.const 2) + ) + (set_global $builtins/f + (f32.const 1.25) + ) + (set_global $builtins/f + (f32.const 1) + ) + (set_global $builtins/f + (f32.const 2.5) + ) + (set_global $builtins/f + (f32.const 1.25) + ) + (set_global $builtins/f + (f32.const 1.25) + ) + (set_global $builtins/f + (f32.const 1.1180340051651) + ) + (set_global $builtins/f + (f32.const 1) + ) + (set_global $builtins/b + (f32.ne + (tee_local $1 + (f32.const 1.25) + ) + (get_local $1) + ) + ) + (set_global $builtins/b + (select + (f32.ne + (f32.abs + (tee_local $1 + (f32.const 1.25) + ) + ) + (f32.const inf) + ) + (i32.const 0) + (f32.eq + (get_local $1) + (get_local $1) + ) + ) + ) + (set_global $builtins/F + (f64.const nan:0x8000000000000) + ) + (set_global $builtins/F + (f64.const inf) + ) + (set_global $builtins/F + (f64.const 1.25) + ) + (set_global $builtins/F + (f64.const 2) + ) + (set_global $builtins/F + (f64.const 1.25) + ) + (set_global $builtins/F + (f64.const 1) + ) + (set_global $builtins/F + (f64.const 2.5) + ) + (set_global $builtins/F + (f64.const 1.25) + ) + (set_global $builtins/F + (f64.const 1) + ) + (set_global $builtins/F + (f64.const 1.118033988749895) + ) + (set_global $builtins/F + (f64.const 1) + ) + (set_global $builtins/b + (f64.ne + (tee_local $0 + (f64.const 1.25) + ) + (get_local $0) + ) + ) + (set_global $builtins/b + (select + (f64.ne + (f64.abs + (tee_local $0 + (f64.const 1.25) + ) + ) + (f64.const inf) + ) + (i32.const 0) + (f64.eq + (get_local $0) + (get_local $0) + ) + ) + ) + (set_global $builtins/i + (i32.load + (i32.const 8) + ) + ) + (i32.store + (i32.const 8) + (get_global $builtins/i) + ) + (i32.store + (i32.const 8) + (i32.load + (i32.const 8) + ) + ) + (set_global $builtins/I + (i64.load + (i32.const 8) + ) + ) + (i64.store + (i32.const 8) + (get_global $builtins/I) + ) + (i64.store + (i32.const 8) + (i64.load + (i32.const 8) + ) + ) + (set_global $builtins/f + (f32.load + (i32.const 8) + ) + ) + (f32.store + (i32.const 8) + (get_global $builtins/f) + ) + (f32.store + (i32.const 8) + (f32.load + (i32.const 8) + ) + ) + (set_global $builtins/F + (f64.load + (i32.const 8) + ) + ) + (f64.store + (i32.const 8) + (get_global $builtins/F) + ) + (f64.store + (i32.const 8) + (f64.load + (i32.const 8) + ) + ) + (set_global $builtins/i + (i32.const 1067450368) + ) + (set_global $builtins/f + (f32.const 3.5032461608120427e-44) + ) + (set_global $builtins/I + (i64.const 4608308318706860032) + ) + (set_global $builtins/F + (f64.const 1.24e-322) + ) + (drop + (current_memory) + ) + (drop + (grow_memory + (i32.const 1) + ) + ) + (set_global $builtins/s + (current_memory) + ) + (set_global $builtins/s + (grow_memory + (i32.const 1) + ) + ) + (set_global $builtins/i + (i32.const 10) + ) + (set_global $builtins/I + (i64.const 200) + ) + (set_global $builtins/f + (f32.const 1.25) + ) + (set_global $builtins/F + (f64.const 25) + ) + (if + (f32.eq + (tee_local $1 + (f32.const nan:0x400000) + ) + (get_local $1) + ) + (unreachable) + ) + (if + (f64.eq + (tee_local $0 + (f64.const nan:0x8000000000000) + ) + (get_local $0) + ) + (unreachable) + ) + (if + (select + (f32.ne + (f32.abs + (tee_local $1 + (f32.const nan:0x400000) + ) + ) + (f32.const inf) + ) + (i32.const 0) + (f32.eq + (get_local $1) + (get_local $1) + ) + ) + (unreachable) + ) + (if + (select + (f32.ne + (f32.abs + (tee_local $1 + (f32.const inf) + ) + ) + (f32.const inf) + ) + (i32.const 0) + (f32.eq + (get_local $1) + (get_local $1) + ) + ) + (unreachable) + ) + (if + (select + (f64.ne + (f64.abs + (tee_local $0 + (f64.const nan:0x8000000000000) + ) + ) + (f64.const inf) + ) + (i32.const 0) + (f64.eq + (get_local $0) + (get_local $0) + ) + ) + (unreachable) + ) + (if + (select + (f64.ne + (f64.abs + (tee_local $0 + (f64.const inf) + ) + ) + (f64.const inf) + ) + (i32.const 0) + (f64.eq + (get_local $0) + (get_local $0) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (select + (f32.ne + (f32.abs + (tee_local $1 + (f32.const 0) + ) + ) + (f32.const inf) + ) + (i32.const 0) + (f32.eq + (get_local $1) + (get_local $1) + ) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (select + (f64.ne + (f64.abs + (tee_local $0 + (f64.const 0) + ) + ) + (f64.const inf) + ) + (i32.const 0) + (f64.eq + (get_local $0) + (get_local $0) + ) + ) + ) + (unreachable) + ) + (if + (i32.ne + (block (result i32) + (block $__inlined_func$showcase/ANamespace.aNamespacedFunction (result i32) + (set_local $6 + (get_global $showcase/ANamespace.aNamespacedGlobal) + ) + (get_local $6) + ) + ) + (i32.const 42) + ) + (unreachable) + ) + (set_global $showcase/AnEnum.FOURTYTWO + (get_global $showcase/aMutableGlobal) + ) + (set_global $showcase/AnEnum.FOURTYTHREE + (i32.add + (get_global $showcase/AnEnum.FOURTYTWO) + (i32.const 1) + ) + ) + (if + (i32.ne + (get_global $showcase/AnEnum.FOURTYTWO) + (i32.const 42) + ) + (unreachable) + ) + (if + (i32.ne + (get_global $showcase/AnEnum.FOURTYTHREE) + (i32.const 43) + ) + (unreachable) + ) + (drop + (block (result i32) + (block $__inlined_func$showcase/addGeneric (result i32) + (set_local $7 + (i32.const 1) + ) + (set_local $8 + (i32.const 2) + ) + (i32.add + (get_local $7) + (get_local $8) + ) + ) + ) + ) + (drop + (block (result f32) + (block $__inlined_func$showcase/addGeneric (result f32) + (set_local $9 + (f32.const 1) + ) + (set_local $10 + (f32.const 2) + ) + (f32.add + (get_local $9) + (get_local $10) + ) + ) + ) + ) + (drop + (block (result f64) + (block $__inlined_func$showcase/addGeneric (result f64) + (set_local $11 + (f64.const 1) + ) + (set_local $12 + (f64.const 2) + ) + (f64.add + (get_local $11) + (get_local $12) + ) + ) + ) + ) + (i64.store + (i32.const 8) + (i64.const 1229782938247303441) + ) + (i64.store + (i32.const 16) + (i64.const 2459565876494606882) + ) + (i64.store + (i32.const 24) + (i64.const 3689348814741910323) + ) + (i64.store + (i32.const 32) + (i64.const 4919131752989213764) + ) + (set_global $memcpy/dest + (call $memcpy/memcpy + (i32.const 9) + (i32.const 24) + (i32.const 4) + ) + ) + (if + (i32.ne + (get_global $memcpy/dest) + (i32.const 9) + ) + (unreachable) + ) + (if + (i64.ne + (i64.load + (i32.const 8) + ) + (i64.const 1229783084848853777) + ) + (unreachable) + ) + (set_global $memcpy/dest + (call $memcpy/memcpy + (i32.const 8) + (i32.const 8) + (i32.const 32) + ) + ) + (if + (i32.ne + (get_global $memcpy/dest) + (i32.const 8) + ) + (unreachable) + ) + (if + (i64.ne + (i64.load + (i32.const 8) + ) + (i64.const 1229783084848853777) + ) + (unreachable) + ) + (if + (i64.ne + (i64.load + (i32.const 16) + ) + (i64.const 2459565876494606882) + ) + (unreachable) + ) + (if + (i64.ne + (i64.load + (i32.const 24) + ) + (i64.const 3689348814741910323) + ) + (unreachable) + ) + (if + (i64.ne + (i64.load + (i32.const 32) + ) + (i64.const 4919131752989213764) + ) + (unreachable) + ) + (set_global $memcpy/dest + (call $memcpy/memcpy + (i32.const 13) + (i32.const 36) + (i32.const 3) + ) + ) + (if + (i64.ne + (i64.load + (i32.const 8) + ) + (i64.const 4919131679688438545) + ) + (unreachable) + ) + (set_global $memcpy/dest + (call $memcpy/memcpy + (i32.const 16) + (i32.const 24) + (i32.const 15) + ) + ) + (if + (i64.ne + (i64.load + (i32.const 8) + ) + (i64.const 4919131679688438545) + ) + (unreachable) + ) + (if + (i64.ne + (i64.load + (i32.const 16) + ) + (i64.const 3689348814741910323) + ) + (unreachable) + ) + (if + (i64.ne + (i64.load + (i32.const 24) + ) + (i64.const 3694152654344438852) + ) + (unreachable) + ) + (if + (i64.ne + (i64.load + (i32.const 32) + ) + (i64.const 4919131752989213764) + ) + (unreachable) + ) + (if + (f64.eq + (tee_local $0 + (call $fmod/fmod + (f64.const 1) + (f64.const nan:0x8000000000000) + ) + ) + (get_local $0) + ) + (unreachable) + ) + (if + (f64.ne + (call $fmod/fmod + (f64.const 1.5) + (f64.const 1) + ) + (f64.const 0.5) + ) + (unreachable) + ) + (if + (i32.eqz + (f64.lt + (f64.sub + (call $fmod/fmod + (f64.const 9.2) + (f64.const 2) + ) + (f64.const 1.2) + ) + (f64.const 2.220446049250313e-16) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (f64.lt + (f64.sub + (call $fmod/fmod + (f64.const 9.2) + (f64.const 3.7) + ) + (f64.const 1.8) + ) + (f64.const 2.220446049250313e-16) + ) + ) + (unreachable) + ) + (if + (f32.eq + (tee_local $1 + (call $fmod/fmodf + (f32.const 1) + (f32.const nan:0x400000) + ) + ) + (get_local $1) + ) + (unreachable) + ) + (if + (f32.ne + (call $fmod/fmodf + (f32.const 1.5) + (f32.const 1) + ) + (f32.const 0.5) + ) + (unreachable) + ) + (if + (i32.eqz + (f32.lt + (f32.sub + (call $fmod/fmodf + (f32.const 9.199999809265137) + (f32.const 2) + ) + (f32.const 1.2000000476837158) + ) + (f32.const 1.1920928955078125e-07) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (f32.lt + (f32.sub + (call $fmod/fmodf + (f32.const 9.199999809265137) + (f32.const 3.700000047683716) + ) + (f32.const 1.7999999523162842) + ) + (f32.const 1.1920928955078125e-07) + ) + ) + (unreachable) + ) + (i32.store + (get_global $showcase/aClassInstance) + (i32.const 42) + ) + (f32.store offset=4 + (get_global $showcase/aClassInstance) + (f32.const 9e3) + ) + (if + (i32.ne + (i32.load + (i32.const 8) + ) + (i32.const 42) + ) + (unreachable) + ) + (if + (f32.ne + (f32.load + (i32.const 12) + ) + (f32.const 9e3) + ) + (unreachable) + ) + (block + (block $__inlined_func$showcase/ADerivedClass#set:aWildAccessorAppears + (set_local $13 + (get_global $showcase/aClassInstance) + ) + (set_local $14 + (f32.const 123) + ) + (f32.store offset=4 + (get_local $13) + (get_local $14) + ) + ) + ) + (if + (f32.ne + (block (result f32) + (block $__inlined_func$showcase/ADerivedClass#get:aWildAccessorAppears (result f32) + (set_local $15 + (get_global $showcase/aClassInstance) + ) + (f32.load offset=4 + (get_local $15) + ) + ) + ) + (f32.const 123) + ) + (unreachable) + ) + (set_global $showcase/AClass.aStaticField + (get_global $showcase/aClassInstance) + ) + (if + (i32.ne + (get_global $showcase/AClass.aStaticField) + (get_global $showcase/aClassInstance) + ) + (unreachable) + ) + ) +) diff --git a/tests/compiler/showcase.optimized.wast b/tests/compiler/showcase.optimized.wast new file mode 100644 index 00000000..26b8e789 --- /dev/null +++ b/tests/compiler/showcase.optimized.wast @@ -0,0 +1,4307 @@ +(module + (type $ii (func (param i32) (result i32))) + (type $iii (func (param i32 i32) (result i32))) + (type $fff (func (param f32 f32) (result f32))) + (type $FFF (func (param f64 f64) (result f64))) + (type $v (func)) + (type $iiii (func (param i32 i32 i32) (result i32))) + (type $ifv (func (param i32 f32))) + (type $if (func (param i32) (result f32))) + (global $showcase/aConstantGlobal i32 (i32.const 42)) + (global $showcase/anExportedConstantGlobal f32 (f32.const 42)) + (global $showcase/aMutableGlobal (mut i32) (i32.const 42)) + (global $unary/i (mut i32) (i32.const 0)) + (global $unary/I (mut i64) (i64.const 0)) + (global $unary/f (mut f32) (f32.const 0)) + (global $unary/F (mut f64) (f64.const 0)) + (global $binary/b (mut i32) (i32.const 0)) + (global $binary/i (mut i32) (i32.const 0)) + (global $binary/I (mut i64) (i64.const 0)) + (global $binary/f (mut f32) (f32.const 0)) + (global $binary/F (mut f64) (f64.const 0)) + (global $logical/i (mut i32) (i32.const 0)) + (global $logical/I (mut i64) (i64.const 0)) + (global $logical/f (mut f32) (f32.const 0)) + (global $logical/F (mut f64) (f64.const 0)) + (global $builtins/b (mut i32) (i32.const 0)) + (global $builtins/i (mut i32) (i32.const 0)) + (global $builtins/I (mut i64) (i64.const 0)) + (global $builtins/f (mut f32) (f32.const 0)) + (global $builtins/F (mut f64) (f64.const 0)) + (global $builtins/s (mut i32) (i32.const 0)) + (global $showcase/ANamespace.aNamespacedGlobal (mut i32) (i32.const 42)) + (global $showcase/AnEnum.ONE i32 (i32.const 1)) + (global $showcase/AnEnum.TWO i32 (i32.const 2)) + (global $showcase/AnEnum.FOUR i32 (i32.const 4)) + (global $showcase/AnEnum.FIVE i32 (i32.const 5)) + (global $showcase/AnEnum.FOURTYTWO (mut i32) (i32.const 0)) + (global $showcase/AnEnum.FOURTYTHREE (mut i32) (i32.const 0)) + (global $memcpy/dest (mut i32) (i32.const 0)) + (global $showcase/aClassInstance (mut i32) (i32.const 8)) + (global $showcase/AClass.aStaticField (mut i32) (i32.const 0)) + (memory $0 1) + (export "anExportedConstantGlobal" (global $showcase/anExportedConstantGlobal)) + (export "aConstantGlobal" (global $showcase/aConstantGlobal)) + (export "anAliasedConstantGlobal" (global $showcase/anExportedConstantGlobal)) + (export "showcase/AnEnum.ONE" (global $showcase/AnEnum.ONE)) + (export "showcase/AnEnum.TWO" (global $showcase/AnEnum.TWO)) + (export "showcase/AnEnum.FOUR" (global $showcase/AnEnum.FOUR)) + (export "showcase/AnEnum.FIVE" (global $showcase/AnEnum.FIVE)) + (export "anExportedFunction" (func $showcase/anExportedFunction)) + (export "memory" (memory $0)) + (start $start) + (func $showcase/ANamespace.aNamespacedFunction (; 0 ;) (type $ii) (param $0 i32) (result i32) + (get_local $0) + ) + (func $showcase/addGeneric (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (i32.add + (get_local $0) + (get_local $1) + ) + ) + (func $showcase/addGeneric (; 2 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32) + (f32.add + (get_local $0) + (get_local $1) + ) + ) + (func $showcase/addGeneric (; 3 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) + (f64.add + (get_local $0) + (get_local $1) + ) + ) + (func $showcase/anExportedFunction (; 4 ;) (type $v) + (nop) + ) + (func $memcpy/memcpy (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (set_local $4 + (get_local $0) + ) + (set_local $3 + (get_local $1) + ) + (loop $continue|0 + (if + (if (result i32) + (get_local $2) + (i32.rem_u + (get_local $3) + (i32.const 4) + ) + (get_local $2) + ) + (block + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + (if + (i32.eqz + (i32.rem_u + (get_local $4) + (i32.const 4) + ) + ) + (block + (loop $continue|1 + (if + (i32.ge_u + (get_local $2) + (i32.const 16) + ) + (block + (i32.store + (get_local $4) + (i32.load + (get_local $3) + ) + ) + (i32.store + (i32.add + (get_local $4) + (i32.const 4) + ) + (i32.load + (i32.add + (get_local $3) + (i32.const 4) + ) + ) + ) + (i32.store + (i32.add + (get_local $4) + (i32.const 8) + ) + (i32.load + (i32.add + (get_local $3) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (get_local $4) + (i32.const 12) + ) + (i32.load + (i32.add + (get_local $3) + (i32.const 12) + ) + ) + ) + (set_local $3 + (i32.add + (get_local $3) + (i32.const 16) + ) + ) + (set_local $4 + (i32.add + (get_local $4) + (i32.const 16) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 16) + ) + ) + (br $continue|1) + ) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 8) + ) + (block + (i32.store + (get_local $4) + (i32.load + (get_local $3) + ) + ) + (i32.store + (i32.add + (get_local $4) + (i32.const 4) + ) + (i32.load + (i32.add + (get_local $3) + (i32.const 4) + ) + ) + ) + (set_local $4 + (i32.add + (get_local $4) + (i32.const 8) + ) + ) + (set_local $3 + (i32.add + (get_local $3) + (i32.const 8) + ) + ) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 4) + ) + (block + (i32.store + (get_local $4) + (i32.load + (get_local $3) + ) + ) + (set_local $4 + (i32.add + (get_local $4) + (i32.const 4) + ) + ) + (set_local $3 + (i32.add + (get_local $3) + (i32.const 4) + ) + ) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 2) + ) + (block + (i32.store16 + (get_local $4) + (i32.load16_u + (get_local $3) + ) + ) + (set_local $4 + (i32.add + (get_local $4) + (i32.const 2) + ) + ) + (set_local $3 + (i32.add + (get_local $3) + (i32.const 2) + ) + ) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 1) + ) + (block + (set_local $1 + (get_local $4) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $1 + (get_local $3) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + ) + ) + (return + (get_local $0) + ) + ) + ) + (if + (i32.ge_u + (get_local $2) + (i32.const 32) + ) + (block $break|2 + (block $case2|2 + (block $case1|2 + (block $case0|2 + (block $tablify|0 + (br_table $case0|2 $case1|2 $case2|2 $tablify|0 + (i32.sub + (i32.rem_u + (get_local $4) + (i32.const 4) + ) + (i32.const 1) + ) + ) + ) + (br $break|2) + ) + (set_local $5 + (i32.load + (get_local $3) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 3) + ) + ) + (loop $continue|3 + (if + (i32.ge_u + (get_local $2) + (i32.const 17) + ) + (block + (i32.store + (get_local $4) + (i32.or + (i32.shr_u + (get_local $5) + (i32.const 24) + ) + (i32.shl + (tee_local $1 + (i32.load + (i32.add + (get_local $3) + (i32.const 1) + ) + ) + ) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (get_local $4) + (i32.const 4) + ) + (i32.or + (i32.shr_u + (get_local $1) + (i32.const 24) + ) + (i32.shl + (tee_local $5 + (i32.load + (i32.add + (get_local $3) + (i32.const 5) + ) + ) + ) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (get_local $4) + (i32.const 8) + ) + (i32.or + (i32.shr_u + (get_local $5) + (i32.const 24) + ) + (i32.shl + (tee_local $1 + (i32.load + (i32.add + (get_local $3) + (i32.const 9) + ) + ) + ) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (get_local $4) + (i32.const 12) + ) + (i32.or + (i32.shr_u + (get_local $1) + (i32.const 24) + ) + (i32.shl + (tee_local $5 + (i32.load + (i32.add + (get_local $3) + (i32.const 13) + ) + ) + ) + (i32.const 8) + ) + ) + ) + (set_local $3 + (i32.add + (get_local $3) + (i32.const 16) + ) + ) + (set_local $4 + (i32.add + (get_local $4) + (i32.const 16) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 16) + ) + ) + (br $continue|3) + ) + ) + ) + (br $break|2) + ) + (set_local $5 + (i32.load + (get_local $3) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 2) + ) + ) + (loop $continue|4 + (if + (i32.ge_u + (get_local $2) + (i32.const 18) + ) + (block + (i32.store + (get_local $4) + (i32.or + (i32.shr_u + (get_local $5) + (i32.const 16) + ) + (i32.shl + (tee_local $1 + (i32.load + (i32.add + (get_local $3) + (i32.const 2) + ) + ) + ) + (i32.const 16) + ) + ) + ) + (i32.store + (i32.add + (get_local $4) + (i32.const 4) + ) + (i32.or + (i32.shr_u + (get_local $1) + (i32.const 16) + ) + (i32.shl + (tee_local $5 + (i32.load + (i32.add + (get_local $3) + (i32.const 6) + ) + ) + ) + (i32.const 16) + ) + ) + ) + (i32.store + (i32.add + (get_local $4) + (i32.const 8) + ) + (i32.or + (i32.shr_u + (get_local $5) + (i32.const 16) + ) + (i32.shl + (tee_local $1 + (i32.load + (i32.add + (get_local $3) + (i32.const 10) + ) + ) + ) + (i32.const 16) + ) + ) + ) + (i32.store + (i32.add + (get_local $4) + (i32.const 12) + ) + (i32.or + (i32.shr_u + (get_local $1) + (i32.const 16) + ) + (i32.shl + (tee_local $5 + (i32.load + (i32.add + (get_local $3) + (i32.const 14) + ) + ) + ) + (i32.const 16) + ) + ) + ) + (set_local $3 + (i32.add + (get_local $3) + (i32.const 16) + ) + ) + (set_local $4 + (i32.add + (get_local $4) + (i32.const 16) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 16) + ) + ) + (br $continue|4) + ) + ) + ) + (br $break|2) + ) + (set_local $5 + (i32.load + (get_local $3) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 1) + ) + ) + (loop $continue|5 + (if + (i32.ge_u + (get_local $2) + (i32.const 19) + ) + (block + (i32.store + (get_local $4) + (i32.or + (i32.shr_u + (get_local $5) + (i32.const 8) + ) + (i32.shl + (tee_local $1 + (i32.load + (i32.add + (get_local $3) + (i32.const 3) + ) + ) + ) + (i32.const 24) + ) + ) + ) + (i32.store + (i32.add + (get_local $4) + (i32.const 4) + ) + (i32.or + (i32.shr_u + (get_local $1) + (i32.const 8) + ) + (i32.shl + (tee_local $5 + (i32.load + (i32.add + (get_local $3) + (i32.const 7) + ) + ) + ) + (i32.const 24) + ) + ) + ) + (i32.store + (i32.add + (get_local $4) + (i32.const 8) + ) + (i32.or + (i32.shr_u + (get_local $5) + (i32.const 8) + ) + (i32.shl + (tee_local $1 + (i32.load + (i32.add + (get_local $3) + (i32.const 11) + ) + ) + ) + (i32.const 24) + ) + ) + ) + (i32.store + (i32.add + (get_local $4) + (i32.const 12) + ) + (i32.or + (i32.shr_u + (get_local $1) + (i32.const 8) + ) + (i32.shl + (tee_local $5 + (i32.load + (i32.add + (get_local $3) + (i32.const 15) + ) + ) + ) + (i32.const 24) + ) + ) + ) + (set_local $3 + (i32.add + (get_local $3) + (i32.const 16) + ) + ) + (set_local $4 + (i32.add + (get_local $4) + (i32.const 16) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 16) + ) + ) + (br $continue|5) + ) + ) + ) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 16) + ) + (block + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 8) + ) + (block + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 4) + ) + (block + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 2) + ) + (block + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + (set_local $4 + (i32.add + (tee_local $1 + (get_local $4) + ) + (i32.const 1) + ) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $3 + (i32.add + (tee_local $1 + (get_local $3) + ) + (i32.const 1) + ) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 1) + ) + (block + (set_local $1 + (get_local $4) + ) + (i32.store8 + (get_local $1) + (block (result i32) + (set_local $1 + (get_local $3) + ) + (i32.load8_u + (get_local $1) + ) + ) + ) + ) + ) + (get_local $0) + ) + (func $fmod/fmod (; 6 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) + (local $2 i64) + (local $3 i32) + (local $4 i64) + (local $5 i64) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 f64) + (set_local $3 + (i32.wrap/i64 + (i64.and + (i64.shr_u + (tee_local $2 + (i64.reinterpret/f64 + (get_local $0) + ) + ) + (i64.const 52) + ) + (i64.const 2047) + ) + ) + ) + (set_local $6 + (i32.wrap/i64 + (i64.and + (i64.shr_u + (tee_local $5 + (i64.reinterpret/f64 + (get_local $1) + ) + ) + (i64.const 52) + ) + (i64.const 2047) + ) + ) + ) + (set_local $8 + (i32.wrap/i64 + (i64.shr_u + (get_local $2) + (i64.const 63) + ) + ) + ) + (if + (if (result i32) + (if (result i32) + (tee_local $7 + (i64.eq + (i64.shl + (get_local $5) + (i64.const 1) + ) + (i64.const 0) + ) + ) + (get_local $7) + (tee_local $7 + (f64.ne + (tee_local $9 + (get_local $1) + ) + (get_local $9) + ) + ) + ) + (get_local $7) + (i32.eq + (get_local $3) + (i32.const 2047) + ) + ) + (return + (f64.div + (f64.mul + (get_local $0) + (get_local $1) + ) + (f64.mul + (get_local $0) + (get_local $1) + ) + ) + ) + ) + (if + (i64.le_u + (i64.shl + (get_local $2) + (i64.const 1) + ) + (i64.shl + (get_local $5) + (i64.const 1) + ) + ) + (block + (if + (i64.eq + (i64.shl + (get_local $2) + (i64.const 1) + ) + (i64.shl + (get_local $5) + (i64.const 1) + ) + ) + (return + (f64.mul + (f64.const 0) + (get_local $0) + ) + ) + ) + (return + (get_local $0) + ) + ) + ) + (set_local $2 + (if (result i64) + (get_local $3) + (i64.or + (i64.and + (get_local $2) + (i64.const 4503599627370495) + ) + (i64.const 4503599627370496) + ) + (block (result i64) + (set_local $4 + (i64.shl + (get_local $2) + (i64.const 12) + ) + ) + (loop $continue|0 + (if + (i64.eqz + (i64.shr_u + (get_local $4) + (i64.const 63) + ) + ) + (block + (set_local $3 + (i32.sub + (get_local $3) + (i32.const 1) + ) + ) + (set_local $4 + (i64.shl + (get_local $4) + (i64.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + (i64.shl + (get_local $2) + (i64.add + (i64.sub + (i64.const 0) + (i64.extend_u/i32 + (get_local $3) + ) + ) + (i64.const 1) + ) + ) + ) + ) + ) + (set_local $5 + (if (result i64) + (get_local $6) + (i64.or + (i64.and + (get_local $5) + (i64.const 4503599627370495) + ) + (i64.const 4503599627370496) + ) + (block (result i64) + (set_local $4 + (i64.shl + (get_local $5) + (i64.const 12) + ) + ) + (loop $continue|1 + (if + (i64.eqz + (i64.shr_u + (get_local $4) + (i64.const 63) + ) + ) + (block + (set_local $6 + (i32.sub + (get_local $6) + (i32.const 1) + ) + ) + (set_local $4 + (i64.shl + (get_local $4) + (i64.const 1) + ) + ) + (br $continue|1) + ) + ) + ) + (i64.shl + (get_local $5) + (i64.add + (i64.sub + (i64.const 0) + (i64.extend_u/i32 + (get_local $6) + ) + ) + (i64.const 1) + ) + ) + ) + ) + ) + (loop $continue|2 + (if + (i32.gt_s + (get_local $3) + (get_local $6) + ) + (block + (if + (i64.eqz + (i64.shr_u + (tee_local $4 + (i64.sub + (get_local $2) + (get_local $5) + ) + ) + (i64.const 63) + ) + ) + (block + (if + (i64.eqz + (get_local $4) + ) + (return + (f64.mul + (f64.const 0) + (get_local $0) + ) + ) + ) + (set_local $2 + (get_local $4) + ) + ) + ) + (set_local $2 + (i64.shl + (get_local $2) + (i64.const 1) + ) + ) + (set_local $3 + (i32.sub + (get_local $3) + (i32.const 1) + ) + ) + (br $continue|2) + ) + ) + ) + (if + (i64.eqz + (i64.shr_u + (tee_local $4 + (i64.sub + (get_local $2) + (get_local $5) + ) + ) + (i64.const 63) + ) + ) + (block + (if + (i64.eqz + (get_local $4) + ) + (return + (f64.mul + (f64.const 0) + (get_local $0) + ) + ) + ) + (set_local $2 + (get_local $4) + ) + ) + ) + (loop $continue|3 + (if + (i64.eqz + (i64.shr_u + (get_local $2) + (i64.const 52) + ) + ) + (block + (set_local $3 + (i32.sub + (get_local $3) + (i32.const 1) + ) + ) + (set_local $2 + (i64.shl + (get_local $2) + (i64.const 1) + ) + ) + (br $continue|3) + ) + ) + ) + (f64.reinterpret/i64 + (i64.or + (tee_local $2 + (if (result i64) + (i32.gt_s + (get_local $3) + (i32.const 0) + ) + (i64.or + (i64.sub + (get_local $2) + (i64.const 4503599627370496) + ) + (i64.shl + (i64.extend_u/i32 + (get_local $3) + ) + (i64.const 52) + ) + ) + (i64.shr_u + (get_local $2) + (i64.add + (i64.sub + (i64.const 0) + (i64.extend_u/i32 + (get_local $3) + ) + ) + (i64.const 1) + ) + ) + ) + ) + (i64.shl + (i64.extend_u/i32 + (get_local $8) + ) + (i64.const 63) + ) + ) + ) + ) + (func $fmod/fmodf (; 7 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 f32) + (set_local $4 + (i32.and + (i32.shr_u + (tee_local $2 + (i32.reinterpret/f32 + (get_local $0) + ) + ) + (i32.const 23) + ) + (i32.const 255) + ) + ) + (set_local $6 + (i32.and + (i32.shr_u + (tee_local $5 + (i32.reinterpret/f32 + (get_local $1) + ) + ) + (i32.const 23) + ) + (i32.const 255) + ) + ) + (set_local $7 + (i32.and + (get_local $2) + (i32.const -2147483648) + ) + ) + (if + (if (result i32) + (if (result i32) + (tee_local $3 + (i32.eqz + (i32.shl + (get_local $5) + (i32.const 1) + ) + ) + ) + (get_local $3) + (tee_local $3 + (f32.ne + (tee_local $8 + (get_local $1) + ) + (get_local $8) + ) + ) + ) + (get_local $3) + (i32.eq + (get_local $4) + (i32.const 255) + ) + ) + (return + (f32.div + (f32.mul + (get_local $0) + (get_local $1) + ) + (f32.mul + (get_local $0) + (get_local $1) + ) + ) + ) + ) + (if + (i32.le_u + (i32.shl + (get_local $2) + (i32.const 1) + ) + (i32.shl + (get_local $5) + (i32.const 1) + ) + ) + (block + (if + (i32.eq + (i32.shl + (get_local $2) + (i32.const 1) + ) + (i32.shl + (get_local $5) + (i32.const 1) + ) + ) + (return + (f32.mul + (f32.const 0) + (get_local $0) + ) + ) + ) + (return + (get_local $0) + ) + ) + ) + (set_local $2 + (if (result i32) + (get_local $4) + (i32.or + (i32.and + (get_local $2) + (i32.const 8388607) + ) + (i32.const 8388608) + ) + (block (result i32) + (set_local $3 + (i32.shl + (get_local $2) + (i32.const 9) + ) + ) + (loop $continue|0 + (if + (i32.eqz + (i32.shr_u + (get_local $3) + (i32.const 31) + ) + ) + (block + (set_local $4 + (i32.sub + (get_local $4) + (i32.const 1) + ) + ) + (set_local $3 + (i32.shl + (get_local $3) + (i32.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + (i32.shl + (get_local $2) + (i32.add + (i32.sub + (i32.const 0) + (get_local $4) + ) + (i32.const 1) + ) + ) + ) + ) + ) + (set_local $5 + (if (result i32) + (get_local $6) + (i32.or + (i32.and + (get_local $5) + (i32.const 8388607) + ) + (i32.const 8388608) + ) + (block (result i32) + (set_local $3 + (i32.shl + (get_local $5) + (i32.const 9) + ) + ) + (loop $continue|1 + (if + (i32.eqz + (i32.shr_u + (get_local $3) + (i32.const 31) + ) + ) + (block + (set_local $6 + (i32.sub + (get_local $6) + (i32.const 1) + ) + ) + (set_local $3 + (i32.shl + (get_local $3) + (i32.const 1) + ) + ) + (br $continue|1) + ) + ) + ) + (i32.shl + (get_local $5) + (i32.add + (i32.sub + (i32.const 0) + (get_local $6) + ) + (i32.const 1) + ) + ) + ) + ) + ) + (loop $continue|2 + (if + (i32.gt_s + (get_local $4) + (get_local $6) + ) + (block + (if + (i32.eqz + (i32.shr_u + (tee_local $3 + (i32.sub + (get_local $2) + (get_local $5) + ) + ) + (i32.const 31) + ) + ) + (block + (if + (i32.eqz + (get_local $3) + ) + (return + (f32.mul + (f32.const 0) + (get_local $0) + ) + ) + ) + (set_local $2 + (get_local $3) + ) + ) + ) + (set_local $2 + (i32.shl + (get_local $2) + (i32.const 1) + ) + ) + (set_local $4 + (i32.sub + (get_local $4) + (i32.const 1) + ) + ) + (br $continue|2) + ) + ) + ) + (if + (i32.eqz + (i32.shr_u + (tee_local $3 + (i32.sub + (get_local $2) + (get_local $5) + ) + ) + (i32.const 31) + ) + ) + (block + (if + (i32.eqz + (get_local $3) + ) + (return + (f32.mul + (f32.const 0) + (get_local $0) + ) + ) + ) + (set_local $2 + (get_local $3) + ) + ) + ) + (loop $continue|3 + (if + (i32.eqz + (i32.shr_u + (get_local $2) + (i32.const 23) + ) + ) + (block + (set_local $4 + (i32.sub + (get_local $4) + (i32.const 1) + ) + ) + (set_local $2 + (i32.shl + (get_local $2) + (i32.const 1) + ) + ) + (br $continue|3) + ) + ) + ) + (f32.reinterpret/i32 + (i32.or + (tee_local $2 + (if (result i32) + (i32.gt_s + (get_local $4) + (i32.const 0) + ) + (i32.or + (i32.sub + (get_local $2) + (i32.const 8388608) + ) + (i32.shl + (get_local $4) + (i32.const 23) + ) + ) + (i32.shr_u + (get_local $2) + (i32.add + (i32.sub + (i32.const 0) + (get_local $4) + ) + (i32.const 1) + ) + ) + ) + ) + (get_local $7) + ) + ) + ) + (func $showcase/ADerivedClass#set:aWildAccessorAppears (; 8 ;) (type $ifv) (param $0 i32) (param $1 f32) + (f32.store offset=4 + (get_local $0) + (get_local $1) + ) + ) + (func $showcase/ADerivedClass#get:aWildAccessorAppears (; 9 ;) (type $if) (param $0 i32) (result f32) + (f32.load offset=4 + (get_local $0) + ) + ) + (func $start (; 10 ;) (type $v) + (local $0 f64) + (local $1 f32) + (local $2 i32) + (local $3 i64) + (local $4 i32) + (local $5 i64) + (set_global $unary/i + (i32.add + (get_global $unary/i) + (i32.const 1) + ) + ) + (set_global $unary/i + (i32.sub + (get_global $unary/i) + (i32.const 1) + ) + ) + (set_global $unary/i + (i32.add + (get_global $unary/i) + (i32.const 1) + ) + ) + (set_global $unary/i + (i32.sub + (get_global $unary/i) + (i32.const 1) + ) + ) + (set_global $unary/i + (i32.const 1) + ) + (set_global $unary/i + (i32.const -1) + ) + (set_global $unary/i + (i32.const 0) + ) + (set_global $unary/i + (i32.const -2) + ) + (set_global $unary/i + (i32.sub + (i32.const 0) + (get_global $unary/i) + ) + ) + (set_global $unary/i + (i32.eqz + (get_global $unary/i) + ) + ) + (set_global $unary/i + (i32.xor + (get_global $unary/i) + (i32.const -1) + ) + ) + (set_global $unary/i + (block (result i32) + (set_global $unary/i + (i32.add + (get_global $unary/i) + (i32.const 1) + ) + ) + (get_global $unary/i) + ) + ) + (set_global $unary/i + (block (result i32) + (set_global $unary/i + (i32.sub + (get_global $unary/i) + (i32.const 1) + ) + ) + (get_global $unary/i) + ) + ) + (set_global $unary/i + (block (result i32) + (set_global $unary/i + (i32.add + (tee_local $2 + (get_global $unary/i) + ) + (i32.const 1) + ) + ) + (get_local $2) + ) + ) + (set_global $unary/i + (block (result i32) + (set_global $unary/i + (i32.sub + (tee_local $2 + (get_global $unary/i) + ) + (i32.const 1) + ) + ) + (get_local $2) + ) + ) + (set_global $unary/I + (i64.add + (get_global $unary/I) + (i64.const 1) + ) + ) + (set_global $unary/I + (i64.sub + (get_global $unary/I) + (i64.const 1) + ) + ) + (set_global $unary/I + (i64.add + (get_global $unary/I) + (i64.const 1) + ) + ) + (set_global $unary/I + (i64.sub + (get_global $unary/I) + (i64.const 1) + ) + ) + (set_global $unary/I + (i64.const 1) + ) + (set_global $unary/I + (i64.const -1) + ) + (set_global $unary/I + (i64.const 0) + ) + (set_global $unary/I + (i64.const -2) + ) + (set_global $unary/I + (i64.sub + (i64.const 0) + (get_global $unary/I) + ) + ) + (set_global $unary/I + (i64.extend_s/i32 + (i64.eqz + (get_global $unary/I) + ) + ) + ) + (set_global $unary/I + (i64.xor + (get_global $unary/I) + (i64.const -1) + ) + ) + (set_global $unary/I + (block (result i64) + (set_global $unary/I + (i64.add + (get_global $unary/I) + (i64.const 1) + ) + ) + (get_global $unary/I) + ) + ) + (set_global $unary/I + (block (result i64) + (set_global $unary/I + (i64.sub + (get_global $unary/I) + (i64.const 1) + ) + ) + (get_global $unary/I) + ) + ) + (set_global $unary/I + (block (result i64) + (set_global $unary/I + (i64.add + (tee_local $3 + (get_global $unary/I) + ) + (i64.const 1) + ) + ) + (get_local $3) + ) + ) + (set_global $unary/I + (block (result i64) + (set_global $unary/I + (i64.sub + (tee_local $3 + (get_global $unary/I) + ) + (i64.const 1) + ) + ) + (get_local $3) + ) + ) + (set_global $unary/f + (f32.add + (get_global $unary/f) + (f32.const 1) + ) + ) + (set_global $unary/f + (f32.sub + (get_global $unary/f) + (f32.const 1) + ) + ) + (set_global $unary/f + (f32.add + (get_global $unary/f) + (f32.const 1) + ) + ) + (set_global $unary/f + (f32.sub + (get_global $unary/f) + (f32.const 1) + ) + ) + (set_global $unary/f + (f32.const 1.25) + ) + (set_global $unary/f + (f32.const -1.25) + ) + (set_global $unary/i + (i32.const 0) + ) + (set_global $unary/f + (f32.neg + (get_global $unary/f) + ) + ) + (set_global $unary/i + (f32.eq + (get_global $unary/f) + (f32.const 0) + ) + ) + (set_global $unary/f + (block (result f32) + (set_global $unary/f + (f32.add + (get_global $unary/f) + (f32.const 1) + ) + ) + (get_global $unary/f) + ) + ) + (set_global $unary/f + (block (result f32) + (set_global $unary/f + (f32.sub + (get_global $unary/f) + (f32.const 1) + ) + ) + (get_global $unary/f) + ) + ) + (set_global $unary/f + (block (result f32) + (set_global $unary/f + (f32.add + (tee_local $1 + (get_global $unary/f) + ) + (f32.const 1) + ) + ) + (get_local $1) + ) + ) + (set_global $unary/f + (block (result f32) + (set_global $unary/f + (f32.sub + (tee_local $1 + (get_global $unary/f) + ) + (f32.const 1) + ) + ) + (get_local $1) + ) + ) + (set_global $unary/F + (f64.add + (get_global $unary/F) + (f64.const 1) + ) + ) + (set_global $unary/F + (f64.sub + (get_global $unary/F) + (f64.const 1) + ) + ) + (set_global $unary/F + (f64.add + (get_global $unary/F) + (f64.const 1) + ) + ) + (set_global $unary/F + (f64.sub + (get_global $unary/F) + (f64.const 1) + ) + ) + (set_global $unary/F + (f64.const 1.25) + ) + (set_global $unary/F + (f64.const -1.25) + ) + (set_global $unary/I + (i64.const 0) + ) + (set_global $unary/F + (f64.neg + (get_global $unary/F) + ) + ) + (set_global $unary/I + (i64.extend_s/i32 + (f64.eq + (get_global $unary/F) + (f64.const 0) + ) + ) + ) + (set_global $unary/F + (block (result f64) + (set_global $unary/F + (f64.add + (get_global $unary/F) + (f64.const 1) + ) + ) + (get_global $unary/F) + ) + ) + (set_global $unary/F + (block (result f64) + (set_global $unary/F + (f64.sub + (get_global $unary/F) + (f64.const 1) + ) + ) + (get_global $unary/F) + ) + ) + (set_global $unary/F + (block (result f64) + (set_global $unary/F + (f64.add + (tee_local $0 + (get_global $unary/F) + ) + (f64.const 1) + ) + ) + (get_local $0) + ) + ) + (set_global $unary/F + (block (result f64) + (set_global $unary/F + (f64.sub + (tee_local $0 + (get_global $unary/F) + ) + (f64.const 1) + ) + ) + (get_local $0) + ) + ) + (drop + (i32.div_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (drop + (i32.rem_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/b + (i32.lt_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/b + (i32.gt_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/b + (i32.le_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/b + (i32.ge_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/b + (i32.eq + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/b + (i32.eq + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.add + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.sub + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.mul + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.div_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.rem_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.shl + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.shr_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.shr_u + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.and + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.or + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.xor + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.add + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.sub + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.mul + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.rem_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.shl + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.shr_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.shr_u + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.and + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.or + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.xor + (get_global $binary/i) + (i32.const 1) + ) + ) + (drop + (i64.div_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (drop + (i64.rem_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/b + (i64.lt_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/b + (i64.gt_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/b + (i64.le_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/b + (i64.ge_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/b + (i64.eq + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/b + (i64.eq + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.add + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.sub + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.mul + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.div_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.rem_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.shl + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.shr_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.shr_u + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.and + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.or + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.xor + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.add + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.sub + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.mul + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.rem_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.shl + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.shr_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.shr_u + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.and + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.or + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.xor + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/b + (f32.lt + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/b + (f32.gt + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/b + (f32.le + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/b + (f32.ge + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/b + (f32.eq + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/b + (f32.eq + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/f + (f32.add + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/f + (f32.sub + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/f + (f32.mul + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/f + (f32.div + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/f + (f32.add + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/f + (f32.sub + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/f + (f32.mul + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/b + (f64.lt + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/b + (f64.gt + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/b + (f64.le + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/b + (f64.ge + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/b + (f64.eq + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/b + (f64.eq + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/F + (f64.add + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/F + (f64.sub + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/F + (f64.mul + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/F + (f64.div + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/F + (f64.add + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/F + (f64.sub + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/F + (f64.mul + (get_global $binary/F) + (f64.const 1) + ) + ) + (if + (i32.eqz + (tee_local $2 + (i32.const 2) + ) + ) + (unreachable) + ) + (if + (f64.eq + (tee_local $0 + (f64.const 2) + ) + (f64.const 0) + ) + (unreachable) + ) + (set_global $logical/i + (i32.const 2) + ) + (if + (i32.ne + (get_global $logical/i) + (i32.const 2) + ) + (unreachable) + ) + (set_global $logical/i + (i32.const 1) + ) + (if + (i32.ne + (get_global $logical/i) + (i32.const 1) + ) + (unreachable) + ) + (set_global $logical/I + (i64.const 2) + ) + (if + (i64.ne + (get_global $logical/I) + (i64.const 2) + ) + (unreachable) + ) + (set_global $logical/I + (i64.const 1) + ) + (if + (i64.ne + (get_global $logical/I) + (i64.const 1) + ) + (unreachable) + ) + (set_global $logical/f + (f32.const 2) + ) + (if + (f32.ne + (get_global $logical/f) + (f32.const 2) + ) + (unreachable) + ) + (set_global $logical/f + (f32.const 1) + ) + (if + (f32.ne + (get_global $logical/f) + (f32.const 1) + ) + (unreachable) + ) + (set_global $logical/F + (f64.const 2) + ) + (if + (f64.ne + (get_global $logical/F) + (f64.const 2) + ) + (unreachable) + ) + (set_global $logical/F + (f64.const 1) + ) + (if + (f64.ne + (get_global $logical/F) + (f64.const 1) + ) + (unreachable) + ) + (drop + (select + (tee_local $2 + (i32.const 1) + ) + (tee_local $4 + (i32.const 2) + ) + (i32.gt_s + (get_local $2) + (get_local $4) + ) + ) + ) + (drop + (select + (tee_local $2 + (i32.const 1) + ) + (tee_local $4 + (i32.const 2) + ) + (i32.lt_s + (get_local $2) + (get_local $4) + ) + ) + ) + (set_global $builtins/i + (i32.const 31) + ) + (set_global $builtins/i + (i32.const 0) + ) + (set_global $builtins/i + (i32.const 1) + ) + (set_global $builtins/i + (i32.const 2) + ) + (set_global $builtins/i + (i32.const -2147483648) + ) + (set_global $builtins/i + (select + (i32.sub + (i32.const 0) + (tee_local $2 + (i32.const -42) + ) + ) + (get_local $2) + (i32.lt_s + (get_local $2) + (i32.const 0) + ) + ) + ) + (if + (i32.ne + (get_global $builtins/i) + (i32.const 42) + ) + (unreachable) + ) + (set_global $builtins/i + (select + (tee_local $2 + (i32.const 1) + ) + (tee_local $4 + (i32.const 2) + ) + (i32.gt_s + (get_local $2) + (get_local $4) + ) + ) + ) + (if + (i32.ne + (get_global $builtins/i) + (i32.const 2) + ) + (unreachable) + ) + (set_global $builtins/i + (select + (tee_local $2 + (i32.const 1) + ) + (tee_local $4 + (i32.const 2) + ) + (i32.lt_s + (get_local $2) + (get_local $4) + ) + ) + ) + (if + (i32.ne + (get_global $builtins/i) + (i32.const 1) + ) + (unreachable) + ) + (set_global $builtins/I + (i64.const 63) + ) + (set_global $builtins/I + (i64.const 0) + ) + (set_global $builtins/I + (i64.const 1) + ) + (set_global $builtins/I + (i64.const 2) + ) + (set_global $builtins/I + (i64.const -9223372036854775808) + ) + (set_global $builtins/I + (select + (i64.sub + (i64.const 0) + (tee_local $3 + (i64.const -42) + ) + ) + (get_local $3) + (i64.lt_s + (get_local $3) + (i64.const 0) + ) + ) + ) + (if + (i64.ne + (get_global $builtins/I) + (i64.const 42) + ) + (unreachable) + ) + (set_global $builtins/I + (select + (tee_local $3 + (i64.const 1) + ) + (tee_local $5 + (i64.const 2) + ) + (i64.gt_s + (get_local $3) + (get_local $5) + ) + ) + ) + (if + (i64.ne + (get_global $builtins/I) + (i64.const 2) + ) + (unreachable) + ) + (set_global $builtins/I + (select + (tee_local $3 + (i64.const 1) + ) + (tee_local $5 + (i64.const 2) + ) + (i64.lt_s + (get_local $3) + (get_local $5) + ) + ) + ) + (if + (i32.ne + (get_global $builtins/i) + (i32.const 1) + ) + (unreachable) + ) + (set_global $builtins/f + (f32.const nan:0x400000) + ) + (set_global $builtins/f + (f32.const inf) + ) + (set_global $builtins/f + (f32.const 1.25) + ) + (set_global $builtins/f + (f32.const 2) + ) + (set_global $builtins/f + (f32.const 1.25) + ) + (set_global $builtins/f + (f32.const 1) + ) + (set_global $builtins/f + (f32.const 2.5) + ) + (set_global $builtins/f + (f32.const 1.25) + ) + (set_global $builtins/f + (f32.const 1.25) + ) + (set_global $builtins/f + (f32.const 1.1180340051651) + ) + (set_global $builtins/f + (f32.const 1) + ) + (set_global $builtins/b + (f32.ne + (tee_local $1 + (f32.const 1.25) + ) + (get_local $1) + ) + ) + (set_global $builtins/b + (select + (f32.ne + (f32.abs + (tee_local $1 + (f32.const 1.25) + ) + ) + (f32.const inf) + ) + (i32.const 0) + (f32.eq + (get_local $1) + (get_local $1) + ) + ) + ) + (set_global $builtins/F + (f64.const nan:0x8000000000000) + ) + (set_global $builtins/F + (f64.const inf) + ) + (set_global $builtins/F + (f64.const 1.25) + ) + (set_global $builtins/F + (f64.const 2) + ) + (set_global $builtins/F + (f64.const 1.25) + ) + (set_global $builtins/F + (f64.const 1) + ) + (set_global $builtins/F + (f64.const 2.5) + ) + (set_global $builtins/F + (f64.const 1.25) + ) + (set_global $builtins/F + (f64.const 1) + ) + (set_global $builtins/F + (f64.const 1.118033988749895) + ) + (set_global $builtins/F + (f64.const 1) + ) + (set_global $builtins/b + (f64.ne + (tee_local $0 + (f64.const 1.25) + ) + (get_local $0) + ) + ) + (set_global $builtins/b + (select + (f64.ne + (f64.abs + (tee_local $0 + (f64.const 1.25) + ) + ) + (f64.const inf) + ) + (i32.const 0) + (f64.eq + (get_local $0) + (get_local $0) + ) + ) + ) + (set_global $builtins/i + (i32.load + (i32.const 8) + ) + ) + (i32.store + (i32.const 8) + (get_global $builtins/i) + ) + (i32.store + (i32.const 8) + (i32.load + (i32.const 8) + ) + ) + (set_global $builtins/I + (i64.load + (i32.const 8) + ) + ) + (i64.store + (i32.const 8) + (get_global $builtins/I) + ) + (i64.store + (i32.const 8) + (i64.load + (i32.const 8) + ) + ) + (set_global $builtins/f + (f32.load + (i32.const 8) + ) + ) + (f32.store + (i32.const 8) + (get_global $builtins/f) + ) + (f32.store + (i32.const 8) + (f32.load + (i32.const 8) + ) + ) + (set_global $builtins/F + (f64.load + (i32.const 8) + ) + ) + (f64.store + (i32.const 8) + (get_global $builtins/F) + ) + (f64.store + (i32.const 8) + (f64.load + (i32.const 8) + ) + ) + (set_global $builtins/i + (i32.const 1067450368) + ) + (set_global $builtins/f + (f32.const 3.5032461608120427e-44) + ) + (set_global $builtins/I + (i64.const 4608308318706860032) + ) + (set_global $builtins/F + (f64.const 1.24e-322) + ) + (drop + (current_memory) + ) + (drop + (grow_memory + (i32.const 1) + ) + ) + (set_global $builtins/s + (current_memory) + ) + (set_global $builtins/s + (grow_memory + (i32.const 1) + ) + ) + (set_global $builtins/i + (i32.const 10) + ) + (set_global $builtins/I + (i64.const 200) + ) + (set_global $builtins/f + (f32.const 1.25) + ) + (set_global $builtins/F + (f64.const 25) + ) + (if + (f32.eq + (tee_local $1 + (f32.const nan:0x400000) + ) + (get_local $1) + ) + (unreachable) + ) + (if + (f64.eq + (tee_local $0 + (f64.const nan:0x8000000000000) + ) + (get_local $0) + ) + (unreachable) + ) + (if + (select + (f32.ne + (f32.abs + (tee_local $1 + (f32.const nan:0x400000) + ) + ) + (f32.const inf) + ) + (i32.const 0) + (f32.eq + (get_local $1) + (get_local $1) + ) + ) + (unreachable) + ) + (if + (select + (f32.ne + (f32.abs + (tee_local $1 + (f32.const inf) + ) + ) + (f32.const inf) + ) + (i32.const 0) + (f32.eq + (get_local $1) + (get_local $1) + ) + ) + (unreachable) + ) + (if + (select + (f64.ne + (f64.abs + (tee_local $0 + (f64.const nan:0x8000000000000) + ) + ) + (f64.const inf) + ) + (i32.const 0) + (f64.eq + (get_local $0) + (get_local $0) + ) + ) + (unreachable) + ) + (if + (select + (f64.ne + (f64.abs + (tee_local $0 + (f64.const inf) + ) + ) + (f64.const inf) + ) + (i32.const 0) + (f64.eq + (get_local $0) + (get_local $0) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (select + (f32.ne + (f32.abs + (tee_local $1 + (f32.const 0) + ) + ) + (f32.const inf) + ) + (i32.const 0) + (f32.eq + (get_local $1) + (get_local $1) + ) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (select + (f64.ne + (f64.abs + (tee_local $0 + (f64.const 0) + ) + ) + (f64.const inf) + ) + (i32.const 0) + (f64.eq + (get_local $0) + (get_local $0) + ) + ) + ) + (unreachable) + ) + (if + (i32.ne + (call $showcase/ANamespace.aNamespacedFunction + (get_global $showcase/ANamespace.aNamespacedGlobal) + ) + (i32.const 42) + ) + (unreachable) + ) + (set_global $showcase/AnEnum.FOURTYTWO + (get_global $showcase/aMutableGlobal) + ) + (set_global $showcase/AnEnum.FOURTYTHREE + (i32.add + (get_global $showcase/AnEnum.FOURTYTWO) + (i32.const 1) + ) + ) + (if + (i32.ne + (get_global $showcase/AnEnum.FOURTYTWO) + (i32.const 42) + ) + (unreachable) + ) + (if + (i32.ne + (get_global $showcase/AnEnum.FOURTYTHREE) + (i32.const 43) + ) + (unreachable) + ) + (drop + (call $showcase/addGeneric + (i32.const 1) + (i32.const 2) + ) + ) + (drop + (call $showcase/addGeneric + (f32.const 1) + (f32.const 2) + ) + ) + (drop + (call $showcase/addGeneric + (f64.const 1) + (f64.const 2) + ) + ) + (i64.store + (i32.const 8) + (i64.const 1229782938247303441) + ) + (i64.store + (i32.const 16) + (i64.const 2459565876494606882) + ) + (i64.store + (i32.const 24) + (i64.const 3689348814741910323) + ) + (i64.store + (i32.const 32) + (i64.const 4919131752989213764) + ) + (set_global $memcpy/dest + (call $memcpy/memcpy + (i32.const 9) + (i32.const 24) + (i32.const 4) + ) + ) + (if + (i32.ne + (get_global $memcpy/dest) + (i32.const 9) + ) + (unreachable) + ) + (if + (i64.ne + (i64.load + (i32.const 8) + ) + (i64.const 1229783084848853777) + ) + (unreachable) + ) + (set_global $memcpy/dest + (call $memcpy/memcpy + (i32.const 8) + (i32.const 8) + (i32.const 32) + ) + ) + (if + (i32.ne + (get_global $memcpy/dest) + (i32.const 8) + ) + (unreachable) + ) + (if + (i64.ne + (i64.load + (i32.const 8) + ) + (i64.const 1229783084848853777) + ) + (unreachable) + ) + (if + (i64.ne + (i64.load + (i32.const 16) + ) + (i64.const 2459565876494606882) + ) + (unreachable) + ) + (if + (i64.ne + (i64.load + (i32.const 24) + ) + (i64.const 3689348814741910323) + ) + (unreachable) + ) + (if + (i64.ne + (i64.load + (i32.const 32) + ) + (i64.const 4919131752989213764) + ) + (unreachable) + ) + (set_global $memcpy/dest + (call $memcpy/memcpy + (i32.const 13) + (i32.const 36) + (i32.const 3) + ) + ) + (if + (i64.ne + (i64.load + (i32.const 8) + ) + (i64.const 4919131679688438545) + ) + (unreachable) + ) + (set_global $memcpy/dest + (call $memcpy/memcpy + (i32.const 16) + (i32.const 24) + (i32.const 15) + ) + ) + (if + (i64.ne + (i64.load + (i32.const 8) + ) + (i64.const 4919131679688438545) + ) + (unreachable) + ) + (if + (i64.ne + (i64.load + (i32.const 16) + ) + (i64.const 3689348814741910323) + ) + (unreachable) + ) + (if + (i64.ne + (i64.load + (i32.const 24) + ) + (i64.const 3694152654344438852) + ) + (unreachable) + ) + (if + (i64.ne + (i64.load + (i32.const 32) + ) + (i64.const 4919131752989213764) + ) + (unreachable) + ) + (if + (f64.eq + (tee_local $0 + (call $fmod/fmod + (f64.const 1) + (f64.const nan:0x8000000000000) + ) + ) + (get_local $0) + ) + (unreachable) + ) + (if + (f64.ne + (call $fmod/fmod + (f64.const 1.5) + (f64.const 1) + ) + (f64.const 0.5) + ) + (unreachable) + ) + (if + (i32.eqz + (f64.lt + (f64.sub + (call $fmod/fmod + (f64.const 9.2) + (f64.const 2) + ) + (f64.const 1.2) + ) + (f64.const 2.220446049250313e-16) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (f64.lt + (f64.sub + (call $fmod/fmod + (f64.const 9.2) + (f64.const 3.7) + ) + (f64.const 1.8) + ) + (f64.const 2.220446049250313e-16) + ) + ) + (unreachable) + ) + (if + (f32.eq + (tee_local $1 + (call $fmod/fmodf + (f32.const 1) + (f32.const nan:0x400000) + ) + ) + (get_local $1) + ) + (unreachable) + ) + (if + (f32.ne + (call $fmod/fmodf + (f32.const 1.5) + (f32.const 1) + ) + (f32.const 0.5) + ) + (unreachable) + ) + (if + (i32.eqz + (f32.lt + (f32.sub + (call $fmod/fmodf + (f32.const 9.199999809265137) + (f32.const 2) + ) + (f32.const 1.2000000476837158) + ) + (f32.const 1.1920928955078125e-07) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (f32.lt + (f32.sub + (call $fmod/fmodf + (f32.const 9.199999809265137) + (f32.const 3.700000047683716) + ) + (f32.const 1.7999999523162842) + ) + (f32.const 1.1920928955078125e-07) + ) + ) + (unreachable) + ) + (i32.store + (get_global $showcase/aClassInstance) + (i32.const 42) + ) + (f32.store offset=4 + (get_global $showcase/aClassInstance) + (f32.const 9e3) + ) + (if + (i32.ne + (i32.load + (i32.const 8) + ) + (i32.const 42) + ) + (unreachable) + ) + (if + (f32.ne + (f32.load + (i32.const 12) + ) + (f32.const 9e3) + ) + (unreachable) + ) + (call $showcase/ADerivedClass#set:aWildAccessorAppears + (get_global $showcase/aClassInstance) + (f32.const 123) + ) + (if + (f32.ne + (call $showcase/ADerivedClass#get:aWildAccessorAppears + (get_global $showcase/aClassInstance) + ) + (f32.const 123) + ) + (unreachable) + ) + (set_global $showcase/AClass.aStaticField + (get_global $showcase/aClassInstance) + ) + (if + (i32.ne + (get_global $showcase/AClass.aStaticField) + (get_global $showcase/aClassInstance) + ) + (unreachable) + ) + ) +) diff --git a/tests/compiler/showcase.ts b/tests/compiler/showcase.ts new file mode 100644 index 00000000..f2101231 --- /dev/null +++ b/tests/compiler/showcase.ts @@ -0,0 +1,127 @@ +// This test case compiles to WebAssembly today, highlights some of the features that have been +// implemented already and gives a quick outlook on the road ahead. + +// Global variables can be constant +const aConstantGlobal: i32 = 42; + +// Constant globals can be exported to JS from the entry file +export const anExportedConstantGlobal: f32 = 42.0; + +// Global variables can be mutable +var aMutableGlobal: i32 = 42; + +// Variables can infer their type +var anInferredI32 = 42; // infers i32 by default +var anInferredI64 = 0x100000000; // infers i64 because the value doesn't fit in 32 bits +var anInferredF64 = 42.0; // infers f64 because it is notated as a float +var anInferredF32 = 42.0; // infers f32 by evaluating its initializer + +// Unary expressions just work +import "./unary"; + +// Binary expressions just work +import "./binary"; + +// Logical expressions just work +import "./logical"; + +// Several WebAssembly and some common JavaScript built-ins are supported and compile to opcodes directly +import "./builtins"; + +// Speaking of imports: Exports and re-exports are supported as well +export { aConstantGlobal }; +export { anExportedConstantGlobal as anAliasedConstantGlobal } from "./showcase"; + +// Elements can be arranged in namespaces +namespace ANamespace { + export var aNamespacedGlobal: i32 = 42; + export function aNamespacedFunction(a: i32): i32 { return a; } // functions just work +} + +// The compiler supports built-in assertions (--noAssert disables them globally) +assert(ANamespace.aNamespacedFunction(ANamespace.aNamespacedGlobal) == 42); + +// Enums become constant globals and thus can be exported from the entry file +export enum AnEnum { + ONE = 1, // values can use explicit initializers + TWO, // or assume the previous value + 1 + // or be omitted + FOUR = AnEnum.TWO + 2, // or reference other values (and remain constant through precomputation) + FIVE, // and continue from there + FOURTYTWO = aMutableGlobal, // or reference mutable values but then can't be exported + FOURTYTHREE // and even continue from there without being exported (tsc doesn't allow this) +} +assert(AnEnum.ONE == 1); +assert(AnEnum.TWO == 2); +assert(AnEnum.FOUR == 4); +assert(AnEnum.FIVE == 5); +assert(AnEnum.FOURTYTWO == 42); +assert(AnEnum.FOURTYTHREE == 43); + +// In fact, there are a couple of things asc just waves through where tsc refuses to +1, 2, 3; // for example not-so-useful comma expressions +function addGeneric(left: T, right: T): T { + return left + right; // or maybe-useful generic math +} + +// Speaking of generics: While there is no type inference yet, it just works +addGeneric(1, 2); // compiles and calls the i32 version +addGeneric(1, 2); // compiles and calls the f32 version +clz(0x8000); // most built-ins are generic as well + +// Type aliases work but must be declared in the global scope for now +type double = f64; +addGeneric(1, 2); // compiles and calls the f64 version + +// Speaking of lazy compilation: Stuff that's not used is considered dead code and not compiled by default +function anUnusedFunction(): void { } + +// That is, unless exported from the entry file, so it is considered reachable +export function anExportedFunction(): void { } + +// Or, of course, `--noTreeShaking` is specified + +// As you see, while classes, strings and arrays are still in the works, pretty much everything can +// be implemented already. Here are a few more sophisitcated examples of code that'll most likely +// make it into the standard library eventually: +import "./memcpy"; // until replaced by the proposed `move_memory` intrinsic (sic.) +import "./fmod"; // for floating point modulus support, e.g., `1.5 % 1.0` + +// Speaking of classes: Some preliminary work has already been done, so while we can't properly +// instantiate them yet, we can point them at some raw memory +class AClass { + static aStaticField: AClass | null = null; + aField: i32; +} +class ADerivedClass extends AClass { + aNotherField: f32; + get aWildAccessorAppears(): f32 { return this.aNotherField; } + set aWildAccessorAppears(val: f32) { this.aNotherField = val; } +} +var aClassInstance = changetype(8); +aClassInstance.aField = 42; +aClassInstance.aNotherField = 9000; +assert(load(8) == 42); +assert(load(12) == 9000); + +aClassInstance.aWildAccessorAppears = 123; +assert(aClassInstance.aWildAccessorAppears == 123); + +AClass.aStaticField = aClassInstance; +assert(ADerivedClass.aStaticField == aClassInstance); + +// yet that's pretty much a work in progress, until... + +// Speaking of the standard library: + +// Ultimately, a memory manager should still be present regardless of the GC spec because making +// everything a GC-managed object impacts performance where GC isn't necessary. TLSF appears to +// be a viable candidate because it's relatively fast and small and an ARC-variant seems like a +// good internal alternative to a general-purpose GC if we can figure out reference cycles. + +// With GC (and earlier: host-bindings) it will technically be possible to declare classes whose +// instances can cross the JS/WASM boundary natively, but then aren't stored in linear memory. + +// Have a nice day! + +// P.S: Interested in compilers? Nothing cooler to do with your spare time? Say hi! diff --git a/tests/compiler/showcase.wast b/tests/compiler/showcase.wast new file mode 100644 index 00000000..9ed8bc83 --- /dev/null +++ b/tests/compiler/showcase.wast @@ -0,0 +1,6394 @@ +(module + (type $ii (func (param i32) (result i32))) + (type $i (func (result i32))) + (type $iii (func (param i32 i32) (result i32))) + (type $fff (func (param f32 f32) (result f32))) + (type $FFF (func (param f64 f64) (result f64))) + (type $v (func)) + (type $iiii (func (param i32 i32 i32) (result i32))) + (type $ifv (func (param i32 f32))) + (type $if (func (param i32) (result f32))) + (global $showcase/aConstantGlobal i32 (i32.const 42)) + (global $showcase/anExportedConstantGlobal f32 (f32.const 42)) + (global $showcase/aMutableGlobal (mut i32) (i32.const 42)) + (global $showcase/anInferredI32 (mut i32) (i32.const 42)) + (global $showcase/anInferredI64 (mut i64) (i64.const 4294967296)) + (global $showcase/anInferredF64 (mut f64) (f64.const 42)) + (global $showcase/anInferredF32 (mut f32) (f32.const 42)) + (global $unary/i (mut i32) (i32.const 0)) + (global $unary/I (mut i64) (i64.const 0)) + (global $unary/f (mut f32) (f32.const 0)) + (global $unary/F (mut f64) (f64.const 0)) + (global $binary/b (mut i32) (i32.const 0)) + (global $binary/i (mut i32) (i32.const 0)) + (global $binary/I (mut i64) (i64.const 0)) + (global $binary/f (mut f32) (f32.const 0)) + (global $binary/F (mut f64) (f64.const 0)) + (global $logical/i (mut i32) (i32.const 0)) + (global $logical/I (mut i64) (i64.const 0)) + (global $logical/f (mut f32) (f32.const 0)) + (global $logical/F (mut f64) (f64.const 0)) + (global $builtins/b (mut i32) (i32.const 0)) + (global $builtins/i (mut i32) (i32.const 0)) + (global $builtins/I (mut i64) (i64.const 0)) + (global $builtins/f (mut f32) (f32.const 0)) + (global $builtins/F (mut f64) (f64.const 0)) + (global $builtins/s (mut i32) (i32.const 0)) + (global $i8.MIN_VALUE i32 (i32.const -128)) + (global $i8.MAX_VALUE i32 (i32.const 127)) + (global $i16.MIN_VALUE i32 (i32.const -32768)) + (global $i16.MAX_VALUE i32 (i32.const 32767)) + (global $i32.MIN_VALUE i32 (i32.const -2147483648)) + (global $i32.MAX_VALUE i32 (i32.const 2147483647)) + (global $i64.MIN_VALUE i64 (i64.const -9223372036854775808)) + (global $i64.MAX_VALUE i64 (i64.const 9223372036854775807)) + (global $u8.MIN_VALUE i32 (i32.const 0)) + (global $u8.MAX_VALUE i32 (i32.const 255)) + (global $u16.MIN_VALUE i32 (i32.const 0)) + (global $u16.MAX_VALUE i32 (i32.const 65535)) + (global $u32.MIN_VALUE i32 (i32.const 0)) + (global $u32.MAX_VALUE i32 (i32.const -1)) + (global $u64.MIN_VALUE i64 (i64.const 0)) + (global $u64.MAX_VALUE i64 (i64.const -1)) + (global $bool.MIN_VALUE i32 (i32.const 0)) + (global $bool.MAX_VALUE i32 (i32.const 1)) + (global $f32.MIN_VALUE f32 (f32.const -3402823466385288598117041e14)) + (global $f32.MAX_VALUE f32 (f32.const 3402823466385288598117041e14)) + (global $f32.MIN_SAFE_INTEGER f32 (f32.const -16777215)) + (global $f32.MAX_SAFE_INTEGER f32 (f32.const 16777215)) + (global $f32.EPSILON f32 (f32.const 1.1920928955078125e-07)) + (global $f64.MIN_VALUE f64 (f64.const -1797693134862315708145274e284)) + (global $f64.MAX_VALUE f64 (f64.const 1797693134862315708145274e284)) + (global $f64.MIN_SAFE_INTEGER f64 (f64.const -9007199254740991)) + (global $f64.MAX_SAFE_INTEGER f64 (f64.const 9007199254740991)) + (global $f64.EPSILON f64 (f64.const 2.220446049250313e-16)) + (global $showcase/ANamespace.aNamespacedGlobal (mut i32) (i32.const 42)) + (global $showcase/AnEnum.ONE i32 (i32.const 1)) + (global $showcase/AnEnum.TWO i32 (i32.const 2)) + (global $showcase/AnEnum.FOUR i32 (i32.const 4)) + (global $showcase/AnEnum.FIVE i32 (i32.const 5)) + (global $showcase/AnEnum.FOURTYTWO (mut i32) (i32.const 0)) + (global $showcase/AnEnum.FOURTYTHREE (mut i32) (i32.const 0)) + (global $memcpy/base i32 (i32.const 8)) + (global $memcpy/dest (mut i32) (i32.const 0)) + (global $showcase/aClassInstance (mut i32) (i32.const 8)) + (global $showcase/AClass.aStaticField (mut i32) (i32.const 0)) + (global $HEAP_BASE i32 (i32.const 4)) + (memory $0 1) + (export "anExportedConstantGlobal" (global $showcase/anExportedConstantGlobal)) + (export "aConstantGlobal" (global $showcase/aConstantGlobal)) + (export "anAliasedConstantGlobal" (global $showcase/anExportedConstantGlobal)) + (export "showcase/AnEnum.ONE" (global $showcase/AnEnum.ONE)) + (export "showcase/AnEnum.TWO" (global $showcase/AnEnum.TWO)) + (export "showcase/AnEnum.FOUR" (global $showcase/AnEnum.FOUR)) + (export "showcase/AnEnum.FIVE" (global $showcase/AnEnum.FIVE)) + (export "anExportedFunction" (func $showcase/anExportedFunction)) + (export "memory" (memory $0)) + (start $start) + (func $showcase/ANamespace.aNamespacedFunction (; 0 ;) (type $ii) (param $0 i32) (result i32) + (return + (get_local $0) + ) + ) + (func $showcase/addGeneric (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (return + (i32.add + (get_local $0) + (get_local $1) + ) + ) + ) + (func $showcase/addGeneric (; 2 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32) + (return + (f32.add + (get_local $0) + (get_local $1) + ) + ) + ) + (func $showcase/addGeneric (; 3 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) + (return + (f64.add + (get_local $0) + (get_local $1) + ) + ) + ) + (func $showcase/anExportedFunction (; 4 ;) (type $v) + ) + (func $memcpy/memcpy (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (block + (set_local $3 + (get_local $0) + ) + (set_local $4 + (get_local $1) + ) + ) + (nop) + (block $break|0 + (loop $continue|0 + (if + (if (result i32) + (get_local $2) + (i32.rem_u + (get_local $4) + (i32.const 4) + ) + (get_local $2) + ) + (block + (block + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (drop + (block (result i32) + (set_local $7 + (get_local $2) + ) + (set_local $2 + (i32.sub + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (br $continue|0) + ) + ) + ) + ) + (if + (i32.eq + (i32.rem_u + (get_local $3) + (i32.const 4) + ) + (i32.const 0) + ) + (block + (block $break|1 + (loop $continue|1 + (if + (i32.ge_u + (get_local $2) + (i32.const 16) + ) + (block + (block + (i32.store + (get_local $3) + (i32.load + (get_local $4) + ) + ) + (i32.store + (i32.add + (get_local $3) + (i32.const 4) + ) + (i32.load + (i32.add + (get_local $4) + (i32.const 4) + ) + ) + ) + (i32.store + (i32.add + (get_local $3) + (i32.const 8) + ) + (i32.load + (i32.add + (get_local $4) + (i32.const 8) + ) + ) + ) + (i32.store + (i32.add + (get_local $3) + (i32.const 12) + ) + (i32.load + (i32.add + (get_local $4) + (i32.const 12) + ) + ) + ) + (set_local $4 + (i32.add + (get_local $4) + (i32.const 16) + ) + ) + (set_local $3 + (i32.add + (get_local $3) + (i32.const 16) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 16) + ) + ) + ) + (br $continue|1) + ) + ) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 8) + ) + (block + (i32.store + (get_local $3) + (i32.load + (get_local $4) + ) + ) + (i32.store + (i32.add + (get_local $3) + (i32.const 4) + ) + (i32.load + (i32.add + (get_local $4) + (i32.const 4) + ) + ) + ) + (set_local $3 + (i32.add + (get_local $3) + (i32.const 8) + ) + ) + (set_local $4 + (i32.add + (get_local $4) + (i32.const 8) + ) + ) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 4) + ) + (block + (i32.store + (get_local $3) + (i32.load + (get_local $4) + ) + ) + (set_local $3 + (i32.add + (get_local $3) + (i32.const 4) + ) + ) + (set_local $4 + (i32.add + (get_local $4) + (i32.const 4) + ) + ) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 2) + ) + (block + (i32.store16 + (get_local $3) + (i32.load16_u + (get_local $4) + ) + ) + (set_local $3 + (i32.add + (get_local $3) + (i32.const 2) + ) + ) + (set_local $4 + (i32.add + (get_local $4) + (i32.const 2) + ) + ) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 1) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + ) + (return + (get_local $0) + ) + ) + ) + (if + (i32.ge_u + (get_local $2) + (i32.const 32) + ) + (block $break|2 + (block $case2|2 + (block $case1|2 + (block $case0|2 + (set_local $7 + (i32.rem_u + (get_local $3) + (i32.const 4) + ) + ) + (br_if $case0|2 + (i32.eq + (get_local $7) + (i32.const 1) + ) + ) + (br_if $case1|2 + (i32.eq + (get_local $7) + (i32.const 2) + ) + ) + (br_if $case2|2 + (i32.eq + (get_local $7) + (i32.const 3) + ) + ) + (br $break|2) + ) + (set_local $5 + (i32.load + (get_local $4) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 3) + ) + ) + (block $break|3 + (loop $continue|3 + (if + (i32.ge_u + (get_local $2) + (i32.const 17) + ) + (block + (block + (set_local $6 + (i32.load + (i32.add + (get_local $4) + (i32.const 1) + ) + ) + ) + (i32.store + (get_local $3) + (i32.or + (i32.shr_u + (get_local $5) + (i32.const 24) + ) + (i32.shl + (get_local $6) + (i32.const 8) + ) + ) + ) + (set_local $5 + (i32.load + (i32.add + (get_local $4) + (i32.const 5) + ) + ) + ) + (i32.store + (i32.add + (get_local $3) + (i32.const 4) + ) + (i32.or + (i32.shr_u + (get_local $6) + (i32.const 24) + ) + (i32.shl + (get_local $5) + (i32.const 8) + ) + ) + ) + (set_local $6 + (i32.load + (i32.add + (get_local $4) + (i32.const 9) + ) + ) + ) + (i32.store + (i32.add + (get_local $3) + (i32.const 8) + ) + (i32.or + (i32.shr_u + (get_local $5) + (i32.const 24) + ) + (i32.shl + (get_local $6) + (i32.const 8) + ) + ) + ) + (set_local $5 + (i32.load + (i32.add + (get_local $4) + (i32.const 13) + ) + ) + ) + (i32.store + (i32.add + (get_local $3) + (i32.const 12) + ) + (i32.or + (i32.shr_u + (get_local $6) + (i32.const 24) + ) + (i32.shl + (get_local $5) + (i32.const 8) + ) + ) + ) + (set_local $4 + (i32.add + (get_local $4) + (i32.const 16) + ) + ) + (set_local $3 + (i32.add + (get_local $3) + (i32.const 16) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 16) + ) + ) + ) + (br $continue|3) + ) + ) + ) + ) + (br $break|2) + ) + (set_local $5 + (i32.load + (get_local $4) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 2) + ) + ) + (block $break|4 + (loop $continue|4 + (if + (i32.ge_u + (get_local $2) + (i32.const 18) + ) + (block + (block + (set_local $6 + (i32.load + (i32.add + (get_local $4) + (i32.const 2) + ) + ) + ) + (i32.store + (get_local $3) + (i32.or + (i32.shr_u + (get_local $5) + (i32.const 16) + ) + (i32.shl + (get_local $6) + (i32.const 16) + ) + ) + ) + (set_local $5 + (i32.load + (i32.add + (get_local $4) + (i32.const 6) + ) + ) + ) + (i32.store + (i32.add + (get_local $3) + (i32.const 4) + ) + (i32.or + (i32.shr_u + (get_local $6) + (i32.const 16) + ) + (i32.shl + (get_local $5) + (i32.const 16) + ) + ) + ) + (set_local $6 + (i32.load + (i32.add + (get_local $4) + (i32.const 10) + ) + ) + ) + (i32.store + (i32.add + (get_local $3) + (i32.const 8) + ) + (i32.or + (i32.shr_u + (get_local $5) + (i32.const 16) + ) + (i32.shl + (get_local $6) + (i32.const 16) + ) + ) + ) + (set_local $5 + (i32.load + (i32.add + (get_local $4) + (i32.const 14) + ) + ) + ) + (i32.store + (i32.add + (get_local $3) + (i32.const 12) + ) + (i32.or + (i32.shr_u + (get_local $6) + (i32.const 16) + ) + (i32.shl + (get_local $5) + (i32.const 16) + ) + ) + ) + (set_local $4 + (i32.add + (get_local $4) + (i32.const 16) + ) + ) + (set_local $3 + (i32.add + (get_local $3) + (i32.const 16) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 16) + ) + ) + ) + (br $continue|4) + ) + ) + ) + ) + (br $break|2) + ) + (set_local $5 + (i32.load + (get_local $4) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 1) + ) + ) + (block $break|5 + (loop $continue|5 + (if + (i32.ge_u + (get_local $2) + (i32.const 19) + ) + (block + (block + (set_local $6 + (i32.load + (i32.add + (get_local $4) + (i32.const 3) + ) + ) + ) + (i32.store + (get_local $3) + (i32.or + (i32.shr_u + (get_local $5) + (i32.const 8) + ) + (i32.shl + (get_local $6) + (i32.const 24) + ) + ) + ) + (set_local $5 + (i32.load + (i32.add + (get_local $4) + (i32.const 7) + ) + ) + ) + (i32.store + (i32.add + (get_local $3) + (i32.const 4) + ) + (i32.or + (i32.shr_u + (get_local $6) + (i32.const 8) + ) + (i32.shl + (get_local $5) + (i32.const 24) + ) + ) + ) + (set_local $6 + (i32.load + (i32.add + (get_local $4) + (i32.const 11) + ) + ) + ) + (i32.store + (i32.add + (get_local $3) + (i32.const 8) + ) + (i32.or + (i32.shr_u + (get_local $5) + (i32.const 8) + ) + (i32.shl + (get_local $6) + (i32.const 24) + ) + ) + ) + (set_local $5 + (i32.load + (i32.add + (get_local $4) + (i32.const 15) + ) + ) + ) + (i32.store + (i32.add + (get_local $3) + (i32.const 12) + ) + (i32.or + (i32.shr_u + (get_local $6) + (i32.const 8) + ) + (i32.shl + (get_local $5) + (i32.const 24) + ) + ) + ) + (set_local $4 + (i32.add + (get_local $4) + (i32.const 16) + ) + ) + (set_local $3 + (i32.add + (get_local $3) + (i32.const 16) + ) + ) + (set_local $2 + (i32.sub + (get_local $2) + (i32.const 16) + ) + ) + ) + (br $continue|5) + ) + ) + ) + ) + (br $break|2) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 16) + ) + (block + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 8) + ) + (block + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 4) + ) + (block + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 2) + ) + (block + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + ) + ) + (if + (i32.and + (get_local $2) + (i32.const 1) + ) + (i32.store8 + (block (result i32) + (set_local $7 + (get_local $3) + ) + (set_local $3 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + (i32.load8_u + (block (result i32) + (set_local $7 + (get_local $4) + ) + (set_local $4 + (i32.add + (get_local $7) + (i32.const 1) + ) + ) + (get_local $7) + ) + ) + ) + ) + (return + (get_local $0) + ) + ) + (func $fmod/fmod (; 6 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) + (local $2 i64) + (local $3 i64) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 f64) + (local $8 i32) + (local $9 i64) + (block + (set_local $2 + (i64.reinterpret/f64 + (get_local $0) + ) + ) + ) + (block + (set_local $3 + (i64.reinterpret/f64 + (get_local $1) + ) + ) + ) + (block + (set_local $4 + (i32.wrap/i64 + (i64.and + (i64.shr_u + (get_local $2) + (i64.const 52) + ) + (i64.const 2047) + ) + ) + ) + ) + (block + (set_local $5 + (i32.wrap/i64 + (i64.and + (i64.shr_u + (get_local $3) + (i64.const 52) + ) + (i64.const 2047) + ) + ) + ) + ) + (block + (set_local $6 + (i32.wrap/i64 + (i64.shr_u + (get_local $2) + (i64.const 63) + ) + ) + ) + ) + (if + (if (result i32) + (tee_local $8 + (if (result i32) + (tee_local $8 + (i64.eq + (i64.shl + (get_local $3) + (i64.const 1) + ) + (i64.const 0) + ) + ) + (get_local $8) + (f64.ne + (tee_local $7 + (get_local $1) + ) + (get_local $7) + ) + ) + ) + (get_local $8) + (i32.eq + (get_local $4) + (i32.const 2047) + ) + ) + (return + (f64.div + (f64.mul + (get_local $0) + (get_local $1) + ) + (f64.mul + (get_local $0) + (get_local $1) + ) + ) + ) + ) + (if + (i64.le_u + (i64.shl + (get_local $2) + (i64.const 1) + ) + (i64.shl + (get_local $3) + (i64.const 1) + ) + ) + (block + (if + (i64.eq + (i64.shl + (get_local $2) + (i64.const 1) + ) + (i64.shl + (get_local $3) + (i64.const 1) + ) + ) + (return + (f64.mul + (f64.const 0) + (get_local $0) + ) + ) + ) + (return + (get_local $0) + ) + ) + ) + (if + (i32.eqz + (get_local $4) + ) + (block + (block $break|0 + (block + (set_local $9 + (i64.shl + (get_local $2) + (i64.const 12) + ) + ) + ) + (loop $continue|0 + (if + (i64.eqz + (i64.shr_u + (get_local $9) + (i64.const 63) + ) + ) + (block + (set_local $4 + (i32.sub + (get_local $4) + (i32.const 1) + ) + ) + (set_local $9 + (i64.shl + (get_local $9) + (i64.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + ) + (set_local $2 + (i64.shl + (get_local $2) + (i64.add + (i64.sub + (i64.const 0) + (i64.extend_u/i32 + (get_local $4) + ) + ) + (i64.const 1) + ) + ) + ) + ) + (block + (set_local $2 + (i64.and + (get_local $2) + (i64.shr_u + (i64.sub + (i64.const 0) + (i64.const 1) + ) + (i64.const 12) + ) + ) + ) + (set_local $2 + (i64.or + (get_local $2) + (i64.shl + (i64.const 1) + (i64.const 52) + ) + ) + ) + ) + ) + (if + (i32.eqz + (get_local $5) + ) + (block + (block $break|1 + (set_local $9 + (i64.shl + (get_local $3) + (i64.const 12) + ) + ) + (loop $continue|1 + (if + (i64.eqz + (i64.shr_u + (get_local $9) + (i64.const 63) + ) + ) + (block + (set_local $5 + (i32.sub + (get_local $5) + (i32.const 1) + ) + ) + (set_local $9 + (i64.shl + (get_local $9) + (i64.const 1) + ) + ) + (br $continue|1) + ) + ) + ) + ) + (set_local $3 + (i64.shl + (get_local $3) + (i64.add + (i64.sub + (i64.const 0) + (i64.extend_u/i32 + (get_local $5) + ) + ) + (i64.const 1) + ) + ) + ) + ) + (block + (set_local $3 + (i64.and + (get_local $3) + (i64.shr_u + (i64.sub + (i64.const 0) + (i64.const 1) + ) + (i64.const 12) + ) + ) + ) + (set_local $3 + (i64.or + (get_local $3) + (i64.shl + (i64.const 1) + (i64.const 52) + ) + ) + ) + ) + ) + (block $break|2 + (nop) + (loop $continue|2 + (if + (i32.gt_s + (get_local $4) + (get_local $5) + ) + (block + (block + (set_local $9 + (i64.sub + (get_local $2) + (get_local $3) + ) + ) + (if + (i64.eqz + (i64.shr_u + (get_local $9) + (i64.const 63) + ) + ) + (block + (if + (i64.eqz + (get_local $9) + ) + (return + (f64.mul + (f64.const 0) + (get_local $0) + ) + ) + ) + (set_local $2 + (get_local $9) + ) + ) + ) + (set_local $2 + (i64.shl + (get_local $2) + (i64.const 1) + ) + ) + ) + (drop + (block (result i32) + (set_local $8 + (get_local $4) + ) + (set_local $4 + (i32.sub + (get_local $8) + (i32.const 1) + ) + ) + (get_local $8) + ) + ) + (br $continue|2) + ) + ) + ) + ) + (set_local $9 + (i64.sub + (get_local $2) + (get_local $3) + ) + ) + (if + (i64.eqz + (i64.shr_u + (get_local $9) + (i64.const 63) + ) + ) + (block + (if + (i64.eqz + (get_local $9) + ) + (return + (f64.mul + (f64.const 0) + (get_local $0) + ) + ) + ) + (set_local $2 + (get_local $9) + ) + ) + ) + (block $break|3 + (nop) + (loop $continue|3 + (if + (i64.eqz + (i64.shr_u + (get_local $2) + (i64.const 52) + ) + ) + (block + (set_local $4 + (i32.sub + (get_local $4) + (i32.const 1) + ) + ) + (set_local $2 + (i64.shl + (get_local $2) + (i64.const 1) + ) + ) + (br $continue|3) + ) + ) + ) + ) + (if + (i32.gt_s + (get_local $4) + (i32.const 0) + ) + (block + (set_local $2 + (i64.sub + (get_local $2) + (i64.shl + (i64.const 1) + (i64.const 52) + ) + ) + ) + (set_local $2 + (i64.or + (get_local $2) + (i64.shl + (i64.extend_u/i32 + (get_local $4) + ) + (i64.const 52) + ) + ) + ) + ) + (set_local $2 + (i64.shr_u + (get_local $2) + (i64.add + (i64.sub + (i64.const 0) + (i64.extend_u/i32 + (get_local $4) + ) + ) + (i64.const 1) + ) + ) + ) + ) + (set_local $2 + (i64.or + (get_local $2) + (i64.shl + (i64.extend_u/i32 + (get_local $6) + ) + (i64.const 63) + ) + ) + ) + (return + (f64.reinterpret/i64 + (get_local $2) + ) + ) + ) + (func $fmod/fmodf (; 7 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 f32) + (local $8 i32) + (local $9 i32) + (block + (set_local $2 + (i32.reinterpret/f32 + (get_local $0) + ) + ) + ) + (block + (set_local $3 + (i32.reinterpret/f32 + (get_local $1) + ) + ) + ) + (block + (set_local $4 + (i32.and + (i32.shr_u + (get_local $2) + (i32.const 23) + ) + (i32.const 255) + ) + ) + ) + (block + (set_local $5 + (i32.and + (i32.shr_u + (get_local $3) + (i32.const 23) + ) + (i32.const 255) + ) + ) + ) + (block + (set_local $6 + (i32.and + (get_local $2) + (i32.const -2147483648) + ) + ) + ) + (if + (if (result i32) + (tee_local $8 + (if (result i32) + (tee_local $8 + (i32.eq + (i32.shl + (get_local $3) + (i32.const 1) + ) + (i32.const 0) + ) + ) + (get_local $8) + (f32.ne + (tee_local $7 + (get_local $1) + ) + (get_local $7) + ) + ) + ) + (get_local $8) + (i32.eq + (get_local $4) + (i32.const 255) + ) + ) + (return + (f32.div + (f32.mul + (get_local $0) + (get_local $1) + ) + (f32.mul + (get_local $0) + (get_local $1) + ) + ) + ) + ) + (if + (i32.le_u + (i32.shl + (get_local $2) + (i32.const 1) + ) + (i32.shl + (get_local $3) + (i32.const 1) + ) + ) + (block + (if + (i32.eq + (i32.shl + (get_local $2) + (i32.const 1) + ) + (i32.shl + (get_local $3) + (i32.const 1) + ) + ) + (return + (f32.mul + (f32.const 0) + (get_local $0) + ) + ) + ) + (return + (get_local $0) + ) + ) + ) + (if + (i32.eqz + (get_local $4) + ) + (block + (block $break|0 + (block + (set_local $9 + (i32.shl + (get_local $2) + (i32.const 9) + ) + ) + ) + (loop $continue|0 + (if + (i32.eqz + (i32.shr_u + (get_local $9) + (i32.const 31) + ) + ) + (block + (set_local $4 + (i32.sub + (get_local $4) + (i32.const 1) + ) + ) + (set_local $9 + (i32.shl + (get_local $9) + (i32.const 1) + ) + ) + (br $continue|0) + ) + ) + ) + ) + (set_local $2 + (i32.shl + (get_local $2) + (i32.add + (i32.sub + (i32.const 0) + (get_local $4) + ) + (i32.const 1) + ) + ) + ) + ) + (block + (set_local $2 + (i32.and + (get_local $2) + (i32.shr_u + (i32.sub + (i32.const 0) + (i32.const 1) + ) + (i32.const 9) + ) + ) + ) + (set_local $2 + (i32.or + (get_local $2) + (i32.shl + (i32.const 1) + (i32.const 23) + ) + ) + ) + ) + ) + (if + (i32.eqz + (get_local $5) + ) + (block + (block $break|1 + (set_local $9 + (i32.shl + (get_local $3) + (i32.const 9) + ) + ) + (loop $continue|1 + (if + (i32.eqz + (i32.shr_u + (get_local $9) + (i32.const 31) + ) + ) + (block + (set_local $5 + (i32.sub + (get_local $5) + (i32.const 1) + ) + ) + (set_local $9 + (i32.shl + (get_local $9) + (i32.const 1) + ) + ) + (br $continue|1) + ) + ) + ) + ) + (set_local $3 + (i32.shl + (get_local $3) + (i32.add + (i32.sub + (i32.const 0) + (get_local $5) + ) + (i32.const 1) + ) + ) + ) + ) + (block + (set_local $3 + (i32.and + (get_local $3) + (i32.shr_u + (i32.sub + (i32.const 0) + (i32.const 1) + ) + (i32.const 9) + ) + ) + ) + (set_local $3 + (i32.or + (get_local $3) + (i32.shl + (i32.const 1) + (i32.const 23) + ) + ) + ) + ) + ) + (block $break|2 + (nop) + (loop $continue|2 + (if + (i32.gt_s + (get_local $4) + (get_local $5) + ) + (block + (block + (set_local $9 + (i32.sub + (get_local $2) + (get_local $3) + ) + ) + (if + (i32.eqz + (i32.shr_u + (get_local $9) + (i32.const 31) + ) + ) + (block + (if + (i32.eqz + (get_local $9) + ) + (return + (f32.mul + (f32.const 0) + (get_local $0) + ) + ) + ) + (set_local $2 + (get_local $9) + ) + ) + ) + (set_local $2 + (i32.shl + (get_local $2) + (i32.const 1) + ) + ) + ) + (set_local $4 + (i32.sub + (get_local $4) + (i32.const 1) + ) + ) + (br $continue|2) + ) + ) + ) + ) + (set_local $9 + (i32.sub + (get_local $2) + (get_local $3) + ) + ) + (if + (i32.eqz + (i32.shr_u + (get_local $9) + (i32.const 31) + ) + ) + (block + (if + (i32.eqz + (get_local $9) + ) + (return + (f32.mul + (f32.const 0) + (get_local $0) + ) + ) + ) + (set_local $2 + (get_local $9) + ) + ) + ) + (block $break|3 + (nop) + (loop $continue|3 + (if + (i32.eqz + (i32.shr_u + (get_local $2) + (i32.const 23) + ) + ) + (block + (set_local $4 + (i32.sub + (get_local $4) + (i32.const 1) + ) + ) + (set_local $2 + (i32.shl + (get_local $2) + (i32.const 1) + ) + ) + (br $continue|3) + ) + ) + ) + ) + (if + (i32.gt_s + (get_local $4) + (i32.const 0) + ) + (block + (set_local $2 + (i32.sub + (get_local $2) + (i32.shl + (i32.const 1) + (i32.const 23) + ) + ) + ) + (set_local $2 + (i32.or + (get_local $2) + (i32.shl + (get_local $4) + (i32.const 23) + ) + ) + ) + ) + (set_local $2 + (i32.shr_u + (get_local $2) + (i32.add + (i32.sub + (i32.const 0) + (get_local $4) + ) + (i32.const 1) + ) + ) + ) + ) + (set_local $2 + (i32.or + (get_local $2) + (get_local $6) + ) + ) + (return + (f32.reinterpret/i32 + (get_local $2) + ) + ) + ) + (func $showcase/ADerivedClass#set:aWildAccessorAppears (; 8 ;) (type $ifv) (param $0 i32) (param $1 f32) + (f32.store offset=4 + (get_local $0) + (get_local $1) + ) + ) + (func $showcase/ADerivedClass#get:aWildAccessorAppears (; 9 ;) (type $if) (param $0 i32) (result f32) + (return + (f32.load offset=4 + (get_local $0) + ) + ) + ) + (func $start (; 10 ;) (type $v) + (local $0 i32) + (local $1 i64) + (local $2 f32) + (local $3 f64) + (local $4 i32) + (local $5 i64) + (drop + (i32.const 1) + ) + (drop + (i32.sub + (i32.const 0) + (i32.const 1) + ) + ) + (drop + (i32.eqz + (i32.const 1) + ) + ) + (drop + (i32.xor + (i32.const 1) + (i32.const -1) + ) + ) + (drop + (f64.const 1.25) + ) + (drop + (f64.neg + (f64.const 1.25) + ) + ) + (drop + (f64.eq + (f64.const 1.25) + (f64.const 0) + ) + ) + (drop + (get_global $unary/i) + ) + (drop + (i32.sub + (i32.const 0) + (get_global $unary/i) + ) + ) + (drop + (i32.eqz + (get_global $unary/i) + ) + ) + (drop + (i32.xor + (get_global $unary/i) + (i32.const -1) + ) + ) + (set_global $unary/i + (i32.add + (get_global $unary/i) + (i32.const 1) + ) + ) + (set_global $unary/i + (i32.sub + (get_global $unary/i) + (i32.const 1) + ) + ) + (drop + (block (result i32) + (set_local $0 + (get_global $unary/i) + ) + (set_global $unary/i + (i32.add + (get_local $0) + (i32.const 1) + ) + ) + (get_local $0) + ) + ) + (drop + (block (result i32) + (set_local $0 + (get_global $unary/i) + ) + (set_global $unary/i + (i32.sub + (get_local $0) + (i32.const 1) + ) + ) + (get_local $0) + ) + ) + (set_global $unary/i + (i32.const 1) + ) + (set_global $unary/i + (i32.sub + (i32.const 0) + (i32.const 1) + ) + ) + (set_global $unary/i + (i32.eqz + (i32.const 1) + ) + ) + (set_global $unary/i + (i32.xor + (i32.const 1) + (i32.const -1) + ) + ) + (set_global $unary/i + (get_global $unary/i) + ) + (set_global $unary/i + (i32.sub + (i32.const 0) + (get_global $unary/i) + ) + ) + (set_global $unary/i + (i32.eqz + (get_global $unary/i) + ) + ) + (set_global $unary/i + (i32.xor + (get_global $unary/i) + (i32.const -1) + ) + ) + (set_global $unary/i + (block (result i32) + (set_global $unary/i + (i32.add + (get_global $unary/i) + (i32.const 1) + ) + ) + (get_global $unary/i) + ) + ) + (set_global $unary/i + (block (result i32) + (set_global $unary/i + (i32.sub + (get_global $unary/i) + (i32.const 1) + ) + ) + (get_global $unary/i) + ) + ) + (set_global $unary/i + (block (result i32) + (set_local $0 + (get_global $unary/i) + ) + (set_global $unary/i + (i32.add + (get_local $0) + (i32.const 1) + ) + ) + (get_local $0) + ) + ) + (set_global $unary/i + (block (result i32) + (set_local $0 + (get_global $unary/i) + ) + (set_global $unary/i + (i32.sub + (get_local $0) + (i32.const 1) + ) + ) + (get_local $0) + ) + ) + (drop + (get_global $unary/I) + ) + (drop + (i64.sub + (i64.const 0) + (get_global $unary/I) + ) + ) + (drop + (i64.eqz + (get_global $unary/I) + ) + ) + (drop + (i64.xor + (get_global $unary/I) + (i64.const -1) + ) + ) + (set_global $unary/I + (i64.add + (get_global $unary/I) + (i64.const 1) + ) + ) + (set_global $unary/I + (i64.sub + (get_global $unary/I) + (i64.const 1) + ) + ) + (drop + (block (result i64) + (set_local $1 + (get_global $unary/I) + ) + (set_global $unary/I + (i64.add + (get_local $1) + (i64.const 1) + ) + ) + (get_local $1) + ) + ) + (drop + (block (result i64) + (set_local $1 + (get_global $unary/I) + ) + (set_global $unary/I + (i64.sub + (get_local $1) + (i64.const 1) + ) + ) + (get_local $1) + ) + ) + (set_global $unary/I + (i64.const 1) + ) + (set_global $unary/I + (i64.sub + (i64.const 0) + (i64.const 1) + ) + ) + (set_global $unary/I + (i64.extend_s/i32 + (i32.eqz + (i32.const 1) + ) + ) + ) + (set_global $unary/I + (i64.xor + (i64.const 1) + (i64.const -1) + ) + ) + (set_global $unary/I + (get_global $unary/I) + ) + (set_global $unary/I + (i64.sub + (i64.const 0) + (get_global $unary/I) + ) + ) + (set_global $unary/I + (i64.extend_s/i32 + (i64.eqz + (get_global $unary/I) + ) + ) + ) + (set_global $unary/I + (i64.xor + (get_global $unary/I) + (i64.const -1) + ) + ) + (set_global $unary/I + (block (result i64) + (set_global $unary/I + (i64.add + (get_global $unary/I) + (i64.const 1) + ) + ) + (get_global $unary/I) + ) + ) + (set_global $unary/I + (block (result i64) + (set_global $unary/I + (i64.sub + (get_global $unary/I) + (i64.const 1) + ) + ) + (get_global $unary/I) + ) + ) + (set_global $unary/I + (block (result i64) + (set_local $1 + (get_global $unary/I) + ) + (set_global $unary/I + (i64.add + (get_local $1) + (i64.const 1) + ) + ) + (get_local $1) + ) + ) + (set_global $unary/I + (block (result i64) + (set_local $1 + (get_global $unary/I) + ) + (set_global $unary/I + (i64.sub + (get_local $1) + (i64.const 1) + ) + ) + (get_local $1) + ) + ) + (drop + (get_global $unary/f) + ) + (drop + (f32.neg + (get_global $unary/f) + ) + ) + (drop + (f32.eq + (get_global $unary/f) + (f32.const 0) + ) + ) + (set_global $unary/f + (f32.add + (get_global $unary/f) + (f32.const 1) + ) + ) + (set_global $unary/f + (f32.sub + (get_global $unary/f) + (f32.const 1) + ) + ) + (drop + (block (result f32) + (set_local $2 + (get_global $unary/f) + ) + (set_global $unary/f + (f32.add + (get_local $2) + (f32.const 1) + ) + ) + (get_local $2) + ) + ) + (drop + (block (result f32) + (set_local $2 + (get_global $unary/f) + ) + (set_global $unary/f + (f32.sub + (get_local $2) + (f32.const 1) + ) + ) + (get_local $2) + ) + ) + (set_global $unary/f + (f32.const 1.25) + ) + (set_global $unary/f + (f32.neg + (f32.const 1.25) + ) + ) + (set_global $unary/i + (f64.eq + (f64.const 1.25) + (f64.const 0) + ) + ) + (set_global $unary/f + (get_global $unary/f) + ) + (set_global $unary/f + (f32.neg + (get_global $unary/f) + ) + ) + (set_global $unary/i + (f32.eq + (get_global $unary/f) + (f32.const 0) + ) + ) + (set_global $unary/f + (block (result f32) + (set_global $unary/f + (f32.add + (get_global $unary/f) + (f32.const 1) + ) + ) + (get_global $unary/f) + ) + ) + (set_global $unary/f + (block (result f32) + (set_global $unary/f + (f32.sub + (get_global $unary/f) + (f32.const 1) + ) + ) + (get_global $unary/f) + ) + ) + (set_global $unary/f + (block (result f32) + (set_local $2 + (get_global $unary/f) + ) + (set_global $unary/f + (f32.add + (get_local $2) + (f32.const 1) + ) + ) + (get_local $2) + ) + ) + (set_global $unary/f + (block (result f32) + (set_local $2 + (get_global $unary/f) + ) + (set_global $unary/f + (f32.sub + (get_local $2) + (f32.const 1) + ) + ) + (get_local $2) + ) + ) + (drop + (get_global $unary/F) + ) + (drop + (f64.neg + (get_global $unary/F) + ) + ) + (drop + (f64.eq + (get_global $unary/F) + (f64.const 0) + ) + ) + (set_global $unary/F + (f64.add + (get_global $unary/F) + (f64.const 1) + ) + ) + (set_global $unary/F + (f64.sub + (get_global $unary/F) + (f64.const 1) + ) + ) + (drop + (block (result f64) + (set_local $3 + (get_global $unary/F) + ) + (set_global $unary/F + (f64.add + (get_local $3) + (f64.const 1) + ) + ) + (get_local $3) + ) + ) + (drop + (block (result f64) + (set_local $3 + (get_global $unary/F) + ) + (set_global $unary/F + (f64.sub + (get_local $3) + (f64.const 1) + ) + ) + (get_local $3) + ) + ) + (set_global $unary/F + (f64.const 1.25) + ) + (set_global $unary/F + (f64.neg + (f64.const 1.25) + ) + ) + (set_global $unary/I + (i64.extend_s/i32 + (f64.eq + (f64.const 1.25) + (f64.const 0) + ) + ) + ) + (set_global $unary/F + (get_global $unary/F) + ) + (set_global $unary/F + (f64.neg + (get_global $unary/F) + ) + ) + (set_global $unary/I + (i64.extend_s/i32 + (f64.eq + (get_global $unary/F) + (f64.const 0) + ) + ) + ) + (set_global $unary/F + (block (result f64) + (set_global $unary/F + (f64.add + (get_global $unary/F) + (f64.const 1) + ) + ) + (get_global $unary/F) + ) + ) + (set_global $unary/F + (block (result f64) + (set_global $unary/F + (f64.sub + (get_global $unary/F) + (f64.const 1) + ) + ) + (get_global $unary/F) + ) + ) + (set_global $unary/F + (block (result f64) + (set_local $3 + (get_global $unary/F) + ) + (set_global $unary/F + (f64.add + (get_local $3) + (f64.const 1) + ) + ) + (get_local $3) + ) + ) + (set_global $unary/F + (block (result f64) + (set_local $3 + (get_global $unary/F) + ) + (set_global $unary/F + (f64.sub + (get_local $3) + (f64.const 1) + ) + ) + (get_local $3) + ) + ) + (drop + (i32.lt_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (drop + (i32.gt_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (drop + (i32.le_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (drop + (i32.ge_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (drop + (i32.eq + (get_global $binary/i) + (i32.const 1) + ) + ) + (drop + (i32.eq + (get_global $binary/i) + (i32.const 1) + ) + ) + (drop + (i32.add + (get_global $binary/i) + (i32.const 1) + ) + ) + (drop + (i32.sub + (get_global $binary/i) + (i32.const 1) + ) + ) + (drop + (i32.mul + (get_global $binary/i) + (i32.const 1) + ) + ) + (drop + (i32.div_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (drop + (i32.rem_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (drop + (i32.shl + (get_global $binary/i) + (i32.const 1) + ) + ) + (drop + (i32.shr_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (drop + (i32.shr_u + (get_global $binary/i) + (i32.const 1) + ) + ) + (drop + (i32.and + (get_global $binary/i) + (i32.const 1) + ) + ) + (drop + (i32.or + (get_global $binary/i) + (i32.const 1) + ) + ) + (drop + (i32.xor + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/b + (i32.lt_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/b + (i32.gt_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/b + (i32.le_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/b + (i32.ge_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/b + (i32.eq + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/b + (i32.eq + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.add + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.sub + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.mul + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.div_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.rem_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.shl + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.shr_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.shr_u + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.and + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.or + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.xor + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.add + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.sub + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.mul + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.rem_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.shl + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.shr_s + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.shr_u + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.and + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.or + (get_global $binary/i) + (i32.const 1) + ) + ) + (set_global $binary/i + (i32.xor + (get_global $binary/i) + (i32.const 1) + ) + ) + (drop + (i64.lt_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (drop + (i64.gt_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (drop + (i64.le_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (drop + (i64.ge_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (drop + (i64.eq + (get_global $binary/I) + (i64.const 1) + ) + ) + (drop + (i64.eq + (get_global $binary/I) + (i64.const 1) + ) + ) + (drop + (i64.add + (get_global $binary/I) + (i64.const 1) + ) + ) + (drop + (i64.sub + (get_global $binary/I) + (i64.const 1) + ) + ) + (drop + (i64.mul + (get_global $binary/I) + (i64.const 1) + ) + ) + (drop + (i64.div_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (drop + (i64.rem_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (drop + (i64.shl + (get_global $binary/I) + (i64.const 1) + ) + ) + (drop + (i64.shr_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (drop + (i64.shr_u + (get_global $binary/I) + (i64.const 1) + ) + ) + (drop + (i64.and + (get_global $binary/I) + (i64.const 1) + ) + ) + (drop + (i64.or + (get_global $binary/I) + (i64.const 1) + ) + ) + (drop + (i64.xor + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/b + (i64.lt_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/b + (i64.gt_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/b + (i64.le_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/b + (i64.ge_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/b + (i64.eq + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/b + (i64.eq + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.add + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.sub + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.mul + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.div_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.rem_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.shl + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.shr_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.shr_u + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.and + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.or + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.xor + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.add + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.sub + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.mul + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.rem_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.shl + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.shr_s + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.shr_u + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.and + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.or + (get_global $binary/I) + (i64.const 1) + ) + ) + (set_global $binary/I + (i64.xor + (get_global $binary/I) + (i64.const 1) + ) + ) + (drop + (f32.lt + (get_global $binary/f) + (f32.const 1) + ) + ) + (drop + (f32.gt + (get_global $binary/f) + (f32.const 1) + ) + ) + (drop + (f32.le + (get_global $binary/f) + (f32.const 1) + ) + ) + (drop + (f32.ge + (get_global $binary/f) + (f32.const 1) + ) + ) + (drop + (f32.eq + (get_global $binary/f) + (f32.const 1) + ) + ) + (drop + (f32.eq + (get_global $binary/f) + (f32.const 1) + ) + ) + (drop + (f32.add + (get_global $binary/f) + (f32.const 1) + ) + ) + (drop + (f32.sub + (get_global $binary/f) + (f32.const 1) + ) + ) + (drop + (f32.mul + (get_global $binary/f) + (f32.const 1) + ) + ) + (drop + (f32.div + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/b + (f32.lt + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/b + (f32.gt + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/b + (f32.le + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/b + (f32.ge + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/b + (f32.eq + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/b + (f32.eq + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/f + (f32.add + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/f + (f32.sub + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/f + (f32.mul + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/f + (f32.div + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/f + (f32.add + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/f + (f32.sub + (get_global $binary/f) + (f32.const 1) + ) + ) + (set_global $binary/f + (f32.mul + (get_global $binary/f) + (f32.const 1) + ) + ) + (drop + (f64.lt + (get_global $binary/F) + (f64.const 1) + ) + ) + (drop + (f64.gt + (get_global $binary/F) + (f64.const 1) + ) + ) + (drop + (f64.le + (get_global $binary/F) + (f64.const 1) + ) + ) + (drop + (f64.ge + (get_global $binary/F) + (f64.const 1) + ) + ) + (drop + (f64.eq + (get_global $binary/F) + (f64.const 1) + ) + ) + (drop + (f64.eq + (get_global $binary/F) + (f64.const 1) + ) + ) + (drop + (f64.add + (get_global $binary/F) + (f64.const 1) + ) + ) + (drop + (f64.sub + (get_global $binary/F) + (f64.const 1) + ) + ) + (drop + (f64.mul + (get_global $binary/F) + (f64.const 1) + ) + ) + (drop + (f64.div + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/b + (f64.lt + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/b + (f64.gt + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/b + (f64.le + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/b + (f64.ge + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/b + (f64.eq + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/b + (f64.eq + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/F + (f64.add + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/F + (f64.sub + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/F + (f64.mul + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/F + (f64.div + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/F + (f64.add + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/F + (f64.sub + (get_global $binary/F) + (f64.const 1) + ) + ) + (set_global $binary/F + (f64.mul + (get_global $binary/F) + (f64.const 1) + ) + ) + (drop + (if (result i32) + (i32.const 0) + (unreachable) + (i32.const 0) + ) + ) + (drop + (if (result f64) + (f64.ne + (f64.const 0) + (f64.const 0) + ) + (unreachable) + (f64.const 0) + ) + ) + (drop + (if (result i32) + (i32.const 1) + (i32.const 1) + (unreachable) + ) + ) + (drop + (if (result f64) + (f64.ne + (f64.const 1) + (f64.const 0) + ) + (f64.const 1) + (unreachable) + ) + ) + (drop + (if (result i32) + (tee_local $0 + (if (result i32) + (i32.const 1) + (i32.const 2) + (i32.const 1) + ) + ) + (get_local $0) + (unreachable) + ) + ) + (drop + (if (result f64) + (f64.ne + (tee_local $3 + (if (result f64) + (f64.ne + (f64.const 1) + (f64.const 0) + ) + (f64.const 2) + (f64.const 1) + ) + ) + (f64.const 0) + ) + (get_local $3) + (unreachable) + ) + ) + (set_global $logical/i + (if (result i32) + (i32.const 1) + (i32.const 2) + (i32.const 1) + ) + ) + (if + (i32.eqz + (i32.eq + (get_global $logical/i) + (i32.const 2) + ) + ) + (unreachable) + ) + (set_global $logical/i + (if (result i32) + (i32.const 0) + (i32.const 0) + (i32.const 1) + ) + ) + (if + (i32.eqz + (i32.eq + (get_global $logical/i) + (i32.const 1) + ) + ) + (unreachable) + ) + (set_global $logical/I + (if (result i64) + (i64.ne + (i64.const 1) + (i64.const 0) + ) + (i64.const 2) + (i64.const 1) + ) + ) + (if + (i32.eqz + (i64.eq + (get_global $logical/I) + (i64.const 2) + ) + ) + (unreachable) + ) + (set_global $logical/I + (if (result i64) + (i64.ne + (i64.const 0) + (i64.const 0) + ) + (i64.const 0) + (i64.const 1) + ) + ) + (if + (i32.eqz + (i64.eq + (get_global $logical/I) + (i64.const 1) + ) + ) + (unreachable) + ) + (set_global $logical/f + (if (result f32) + (f32.ne + (f32.const 1) + (f32.const 0) + ) + (f32.const 2) + (f32.const 1) + ) + ) + (if + (i32.eqz + (f32.eq + (get_global $logical/f) + (f32.const 2) + ) + ) + (unreachable) + ) + (set_global $logical/f + (if (result f32) + (f32.ne + (f32.const 0) + (f32.const 0) + ) + (f32.const 0) + (f32.const 1) + ) + ) + (if + (i32.eqz + (f32.eq + (get_global $logical/f) + (f32.const 1) + ) + ) + (unreachable) + ) + (set_global $logical/F + (if (result f64) + (f64.ne + (f64.const 1) + (f64.const 0) + ) + (f64.const 2) + (f64.const 1) + ) + ) + (if + (i32.eqz + (f64.eq + (get_global $logical/F) + (f64.const 2) + ) + ) + (unreachable) + ) + (set_global $logical/F + (if (result f64) + (f64.ne + (f64.const 0) + (f64.const 0) + ) + (f64.const 0) + (f64.const 1) + ) + ) + (if + (i32.eqz + (f64.eq + (get_global $logical/F) + (f64.const 1) + ) + ) + (unreachable) + ) + (drop + (i32.clz + (i32.const 1) + ) + ) + (drop + (i32.ctz + (i32.const 1) + ) + ) + (drop + (i32.popcnt + (i32.const 1) + ) + ) + (drop + (i32.rotl + (i32.const 1) + (i32.const 1) + ) + ) + (drop + (i32.rotr + (i32.const 1) + (i32.const 1) + ) + ) + (drop + (select + (i32.sub + (i32.const 0) + (tee_local $0 + (i32.sub + (i32.const 0) + (i32.const 42) + ) + ) + ) + (get_local $0) + (i32.lt_s + (get_local $0) + (i32.const 0) + ) + ) + ) + (drop + (select + (tee_local $0 + (i32.const 1) + ) + (tee_local $4 + (i32.const 2) + ) + (i32.gt_s + (get_local $0) + (get_local $4) + ) + ) + ) + (drop + (select + (tee_local $0 + (i32.const 1) + ) + (tee_local $4 + (i32.const 2) + ) + (i32.lt_s + (get_local $0) + (get_local $4) + ) + ) + ) + (set_global $builtins/i + (i32.clz + (i32.const 1) + ) + ) + (set_global $builtins/i + (i32.ctz + (i32.const 1) + ) + ) + (set_global $builtins/i + (i32.popcnt + (i32.const 1) + ) + ) + (set_global $builtins/i + (i32.rotl + (i32.const 1) + (i32.const 1) + ) + ) + (set_global $builtins/i + (i32.rotr + (i32.const 1) + (i32.const 1) + ) + ) + (set_global $builtins/i + (select + (i32.sub + (i32.const 0) + (tee_local $0 + (i32.sub + (i32.const 0) + (i32.const 42) + ) + ) + ) + (get_local $0) + (i32.lt_s + (get_local $0) + (i32.const 0) + ) + ) + ) + (if + (i32.eqz + (i32.eq + (get_global $builtins/i) + (i32.const 42) + ) + ) + (unreachable) + ) + (set_global $builtins/i + (select + (tee_local $0 + (i32.const 1) + ) + (tee_local $4 + (i32.const 2) + ) + (i32.gt_s + (get_local $0) + (get_local $4) + ) + ) + ) + (if + (i32.eqz + (i32.eq + (get_global $builtins/i) + (i32.const 2) + ) + ) + (unreachable) + ) + (set_global $builtins/i + (select + (tee_local $0 + (i32.const 1) + ) + (tee_local $4 + (i32.const 2) + ) + (i32.lt_s + (get_local $0) + (get_local $4) + ) + ) + ) + (if + (i32.eqz + (i32.eq + (get_global $builtins/i) + (i32.const 1) + ) + ) + (unreachable) + ) + (drop + (i64.clz + (i64.const 1) + ) + ) + (drop + (i64.ctz + (i64.const 1) + ) + ) + (drop + (i64.popcnt + (i64.const 1) + ) + ) + (drop + (i64.rotl + (i64.const 1) + (i64.const 1) + ) + ) + (drop + (i64.rotr + (i64.const 1) + (i64.const 1) + ) + ) + (drop + (select + (i64.sub + (i64.const 0) + (tee_local $1 + (i64.sub + (i64.const 0) + (i64.const 42) + ) + ) + ) + (get_local $1) + (i64.lt_s + (get_local $1) + (i64.const 0) + ) + ) + ) + (set_global $builtins/I + (i64.clz + (i64.const 1) + ) + ) + (set_global $builtins/I + (i64.ctz + (i64.const 1) + ) + ) + (set_global $builtins/I + (i64.popcnt + (i64.const 1) + ) + ) + (set_global $builtins/I + (i64.rotl + (i64.const 1) + (i64.const 1) + ) + ) + (set_global $builtins/I + (i64.rotr + (i64.const 1) + (i64.const 1) + ) + ) + (set_global $builtins/I + (select + (i64.sub + (i64.const 0) + (tee_local $1 + (i64.sub + (i64.const 0) + (i64.const 42) + ) + ) + ) + (get_local $1) + (i64.lt_s + (get_local $1) + (i64.const 0) + ) + ) + ) + (if + (i32.eqz + (i64.eq + (get_global $builtins/I) + (i64.const 42) + ) + ) + (unreachable) + ) + (set_global $builtins/I + (select + (tee_local $1 + (i64.const 1) + ) + (tee_local $5 + (i64.const 2) + ) + (i64.gt_s + (get_local $1) + (get_local $5) + ) + ) + ) + (if + (i32.eqz + (i64.eq + (get_global $builtins/I) + (i64.const 2) + ) + ) + (unreachable) + ) + (set_global $builtins/I + (select + (tee_local $1 + (i64.const 1) + ) + (tee_local $5 + (i64.const 2) + ) + (i64.lt_s + (get_local $1) + (get_local $5) + ) + ) + ) + (if + (i32.eqz + (i32.eq + (get_global $builtins/i) + (i32.const 1) + ) + ) + (unreachable) + ) + (drop + (f32.const nan:0x400000) + ) + (drop + (f32.const inf) + ) + (drop + (f32.abs + (f32.const 1.25) + ) + ) + (drop + (f32.ceil + (f32.const 1.25) + ) + ) + (drop + (f32.copysign + (f32.const 1.25) + (f32.const 2.5) + ) + ) + (drop + (f32.floor + (f32.const 1.25) + ) + ) + (drop + (f32.max + (f32.const 1.25) + (f32.const 2.5) + ) + ) + (drop + (f32.min + (f32.const 1.25) + (f32.const 2.5) + ) + ) + (drop + (f32.nearest + (f32.const 1.25) + ) + ) + (drop + (f32.sqrt + (f32.const 1.25) + ) + ) + (drop + (f32.trunc + (f32.const 1.25) + ) + ) + (drop + (f32.ne + (tee_local $2 + (f32.const 1.25) + ) + (get_local $2) + ) + ) + (drop + (select + (f32.ne + (f32.abs + (tee_local $2 + (f32.const 1.25) + ) + ) + (f32.const inf) + ) + (i32.const 0) + (f32.eq + (get_local $2) + (get_local $2) + ) + ) + ) + (set_global $builtins/f + (f32.const nan:0x400000) + ) + (set_global $builtins/f + (f32.const inf) + ) + (set_global $builtins/f + (f32.abs + (f32.const 1.25) + ) + ) + (set_global $builtins/f + (f32.ceil + (f32.const 1.25) + ) + ) + (set_global $builtins/f + (f32.copysign + (f32.const 1.25) + (f32.const 2.5) + ) + ) + (set_global $builtins/f + (f32.floor + (f32.const 1.25) + ) + ) + (set_global $builtins/f + (f32.max + (f32.const 1.25) + (f32.const 2.5) + ) + ) + (set_global $builtins/f + (f32.min + (f32.const 1.25) + (f32.const 2.5) + ) + ) + (set_global $builtins/f + (f32.nearest + (f32.const 1.25) + ) + ) + (set_global $builtins/f + (f32.sqrt + (f32.const 1.25) + ) + ) + (set_global $builtins/f + (f32.trunc + (f32.const 1.25) + ) + ) + (set_global $builtins/b + (f32.ne + (tee_local $2 + (f32.const 1.25) + ) + (get_local $2) + ) + ) + (set_global $builtins/b + (select + (f32.ne + (f32.abs + (tee_local $2 + (f32.const 1.25) + ) + ) + (f32.const inf) + ) + (i32.const 0) + (f32.eq + (get_local $2) + (get_local $2) + ) + ) + ) + (drop + (f64.const nan:0x8000000000000) + ) + (drop + (f64.const inf) + ) + (drop + (f64.const nan:0x8000000000000) + ) + (drop + (f64.const inf) + ) + (drop + (f64.abs + (f64.const 1.25) + ) + ) + (drop + (f64.ceil + (f64.const 1.25) + ) + ) + (drop + (f64.copysign + (f64.const 1.25) + (f64.const 2.5) + ) + ) + (drop + (f64.floor + (f64.const 1.25) + ) + ) + (drop + (f64.max + (f64.const 1.25) + (f64.const 2.5) + ) + ) + (drop + (f64.min + (f64.const 1.25) + (f64.const 2.5) + ) + ) + (drop + (f64.nearest + (f64.const 1.25) + ) + ) + (drop + (f64.sqrt + (f64.const 1.25) + ) + ) + (drop + (f64.trunc + (f64.const 1.25) + ) + ) + (drop + (f64.ne + (tee_local $3 + (f64.const 1.25) + ) + (get_local $3) + ) + ) + (drop + (select + (f64.ne + (f64.abs + (tee_local $3 + (f64.const 1.25) + ) + ) + (f64.const inf) + ) + (i32.const 0) + (f64.eq + (get_local $3) + (get_local $3) + ) + ) + ) + (set_global $builtins/F + (f64.const nan:0x8000000000000) + ) + (set_global $builtins/F + (f64.const inf) + ) + (set_global $builtins/F + (f64.abs + (f64.const 1.25) + ) + ) + (set_global $builtins/F + (f64.ceil + (f64.const 1.25) + ) + ) + (set_global $builtins/F + (f64.copysign + (f64.const 1.25) + (f64.const 2.5) + ) + ) + (set_global $builtins/F + (f64.floor + (f64.const 1.25) + ) + ) + (set_global $builtins/F + (f64.max + (f64.const 1.25) + (f64.const 2.5) + ) + ) + (set_global $builtins/F + (f64.min + (f64.const 1.25) + (f64.const 2.5) + ) + ) + (set_global $builtins/F + (f64.nearest + (f64.const 1.25) + ) + ) + (set_global $builtins/F + (f64.sqrt + (f64.const 1.25) + ) + ) + (set_global $builtins/F + (f64.trunc + (f64.const 1.25) + ) + ) + (set_global $builtins/b + (f64.ne + (tee_local $3 + (f64.const 1.25) + ) + (get_local $3) + ) + ) + (set_global $builtins/b + (select + (f64.ne + (f64.abs + (tee_local $3 + (f64.const 1.25) + ) + ) + (f64.const inf) + ) + (i32.const 0) + (f64.eq + (get_local $3) + (get_local $3) + ) + ) + ) + (set_global $builtins/i + (i32.load + (i32.const 8) + ) + ) + (i32.store + (i32.const 8) + (get_global $builtins/i) + ) + (i32.store + (i32.const 8) + (i32.load + (i32.const 8) + ) + ) + (set_global $builtins/I + (i64.load + (i32.const 8) + ) + ) + (i64.store + (i32.const 8) + (get_global $builtins/I) + ) + (i64.store + (i32.const 8) + (i64.load + (i32.const 8) + ) + ) + (set_global $builtins/f + (f32.load + (i32.const 8) + ) + ) + (f32.store + (i32.const 8) + (get_global $builtins/f) + ) + (f32.store + (i32.const 8) + (f32.load + (i32.const 8) + ) + ) + (set_global $builtins/F + (f64.load + (i32.const 8) + ) + ) + (f64.store + (i32.const 8) + (get_global $builtins/F) + ) + (f64.store + (i32.const 8) + (f64.load + (i32.const 8) + ) + ) + (drop + (i32.reinterpret/f32 + (f32.const 1.25) + ) + ) + (drop + (f32.reinterpret/i32 + (i32.const 25) + ) + ) + (drop + (i64.reinterpret/f64 + (f64.const 1.25) + ) + ) + (drop + (f64.reinterpret/i64 + (i64.const 25) + ) + ) + (set_global $builtins/i + (i32.reinterpret/f32 + (f32.const 1.25) + ) + ) + (set_global $builtins/f + (f32.reinterpret/i32 + (i32.const 25) + ) + ) + (set_global $builtins/I + (i64.reinterpret/f64 + (f64.const 1.25) + ) + ) + (set_global $builtins/F + (f64.reinterpret/i64 + (i64.const 25) + ) + ) + (drop + (current_memory) + ) + (drop + (grow_memory + (i32.const 1) + ) + ) + (set_global $builtins/s + (current_memory) + ) + (set_global $builtins/s + (grow_memory + (i32.const 1) + ) + ) + (drop + (select + (i32.const 10) + (i32.const 20) + (i32.const 1) + ) + ) + (drop + (select + (i64.const 100) + (i64.const 200) + (i32.const 0) + ) + ) + (drop + (select + (f32.const 1.25) + (f32.const 2.5) + (i32.const 1) + ) + ) + (drop + (select + (f64.const 12.5) + (f64.const 25) + (i32.const 0) + ) + ) + (set_global $builtins/i + (select + (i32.const 10) + (i32.const 20) + (i32.const 1) + ) + ) + (set_global $builtins/I + (select + (i64.const 100) + (i64.const 200) + (i32.const 0) + ) + ) + (set_global $builtins/f + (select + (f32.const 1.25) + (f32.const 2.5) + (i32.const 1) + ) + ) + (set_global $builtins/F + (select + (f64.const 12.5) + (f64.const 25) + (i32.const 0) + ) + ) + (if + (i32.const 0) + (unreachable) + ) + (drop + (i32.const 1) + ) + (drop + (i32.const 2) + ) + (drop + (i32.const 4) + ) + (drop + (i32.const 8) + ) + (drop + (i32.const 4) + ) + (drop + (i32.const 1) + ) + (drop + (i32.const 1) + ) + (drop + (i32.const 2) + ) + (drop + (i32.const 4) + ) + (drop + (i32.const 8) + ) + (drop + (i32.const 4) + ) + (drop + (i32.const 4) + ) + (drop + (i32.const 8) + ) + (if + (i32.eqz + (f64.ne + (f64.const nan:0x8000000000000) + (f64.const nan:0x8000000000000) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (f32.ne + (tee_local $2 + (f32.const nan:0x400000) + ) + (get_local $2) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (f64.ne + (tee_local $3 + (f64.const nan:0x8000000000000) + ) + (get_local $3) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i32.eqz + (select + (f32.ne + (f32.abs + (tee_local $2 + (f32.const nan:0x400000) + ) + ) + (f32.const inf) + ) + (i32.const 0) + (f32.eq + (get_local $2) + (get_local $2) + ) + ) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i32.eqz + (select + (f32.ne + (f32.abs + (tee_local $2 + (f32.const inf) + ) + ) + (f32.const inf) + ) + (i32.const 0) + (f32.eq + (get_local $2) + (get_local $2) + ) + ) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i32.eqz + (select + (f64.ne + (f64.abs + (tee_local $3 + (f64.const nan:0x8000000000000) + ) + ) + (f64.const inf) + ) + (i32.const 0) + (f64.eq + (get_local $3) + (get_local $3) + ) + ) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i32.eqz + (select + (f64.ne + (f64.abs + (tee_local $3 + (f64.const inf) + ) + ) + (f64.const inf) + ) + (i32.const 0) + (f64.eq + (get_local $3) + (get_local $3) + ) + ) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (select + (f32.ne + (f32.abs + (tee_local $2 + (f32.const 0) + ) + ) + (f32.const inf) + ) + (i32.const 0) + (f32.eq + (get_local $2) + (get_local $2) + ) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (select + (f64.ne + (f64.abs + (tee_local $3 + (f64.const 0) + ) + ) + (f64.const inf) + ) + (i32.const 0) + (f64.eq + (get_local $3) + (get_local $3) + ) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i32.eq + (i32.const -128) + (i32.const -128) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i32.eq + (i32.const 127) + (i32.const 127) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i32.eq + (i32.const -32768) + (i32.const -32768) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i32.eq + (i32.const 32767) + (i32.const 32767) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i32.eq + (i32.const -2147483648) + (i32.const -2147483648) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i32.eq + (i32.const 2147483647) + (i32.const 2147483647) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i64.eq + (i64.const -9223372036854775808) + (i64.const -9223372036854775808) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i64.eq + (i64.const 9223372036854775807) + (i64.const 9223372036854775807) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i32.eq + (i32.const 0) + (i32.const 0) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i32.eq + (i32.const 255) + (i32.const 255) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i32.eq + (i32.const 0) + (i32.const 0) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i32.eq + (i32.const 65535) + (i32.const 65535) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i32.eq + (i32.const 0) + (i32.const 0) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i32.eq + (i32.const -1) + (i32.const -1) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i64.eq + (i64.const 0) + (i64.const 0) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i64.eq + (i64.const -1) + (i64.const -1) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i32.eq + (i32.const 0) + (i32.const 0) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i32.eq + (i32.const 0) + (i32.const 0) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i32.eq + (i32.const 1) + (i32.const 1) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i32.eq + (i32.const 1) + (i32.const 1) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (f32.eq + (f32.const -3402823466385288598117041e14) + (f32.neg + (f32.const 3402823466385288598117041e14) + ) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (f32.eq + (f32.const 3402823466385288598117041e14) + (f32.const 3402823466385288598117041e14) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (f32.eq + (f32.const -16777215) + (f32.neg + (f32.const 16777215) + ) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (f32.eq + (f32.const 16777215) + (f32.const 16777215) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (f32.eq + (f32.const 1.1920928955078125e-07) + (f32.const 1.1920928955078125e-07) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (f64.eq + (f64.const -1797693134862315708145274e284) + (f64.neg + (f64.const 1797693134862315708145274e284) + ) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (f64.eq + (f64.const 1797693134862315708145274e284) + (f64.const 1797693134862315708145274e284) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (f64.eq + (f64.const -9007199254740991) + (f64.neg + (f64.const 9007199254740991) + ) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (f64.eq + (f64.const 9007199254740991) + (f64.const 9007199254740991) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (f64.eq + (f64.const 2.220446049250313e-16) + (f64.const 2.220446049250313e-16) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i32.eq + (call $showcase/ANamespace.aNamespacedFunction + (get_global $showcase/ANamespace.aNamespacedGlobal) + ) + (i32.const 42) + ) + ) + (unreachable) + ) + (set_global $showcase/AnEnum.FOURTYTWO + (get_global $showcase/aMutableGlobal) + ) + (set_global $showcase/AnEnum.FOURTYTHREE + (i32.add + (get_global $showcase/AnEnum.FOURTYTWO) + (i32.const 1) + ) + ) + (if + (i32.eqz + (i32.eq + (i32.const 1) + (i32.const 1) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i32.eq + (i32.const 2) + (i32.const 2) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i32.eq + (i32.const 4) + (i32.const 4) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i32.eq + (i32.const 5) + (i32.const 5) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i32.eq + (get_global $showcase/AnEnum.FOURTYTWO) + (i32.const 42) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i32.eq + (get_global $showcase/AnEnum.FOURTYTHREE) + (i32.const 43) + ) + ) + (unreachable) + ) + (block + (drop + (i32.const 1) + ) + (drop + (i32.const 2) + ) + (drop + (i32.const 3) + ) + ) + (drop + (call $showcase/addGeneric + (i32.const 1) + (i32.const 2) + ) + ) + (drop + (call $showcase/addGeneric + (f32.const 1) + (f32.const 2) + ) + ) + (drop + (i64.clz + (i64.const 32768) + ) + ) + (nop) + (drop + (call $showcase/addGeneric + (f64.const 1) + (f64.const 2) + ) + ) + (i64.store + (i32.const 8) + (i64.const 1229782938247303441) + ) + (i64.store + (i32.add + (i32.const 8) + (i32.const 8) + ) + (i64.const 2459565876494606882) + ) + (i64.store + (i32.add + (i32.const 8) + (i32.const 16) + ) + (i64.const 3689348814741910323) + ) + (i64.store + (i32.add + (i32.const 8) + (i32.const 24) + ) + (i64.const 4919131752989213764) + ) + (set_global $memcpy/dest + (call $memcpy/memcpy + (i32.add + (i32.const 8) + (i32.const 1) + ) + (i32.add + (i32.const 8) + (i32.const 16) + ) + (i32.const 4) + ) + ) + (if + (i32.eqz + (i32.eq + (get_global $memcpy/dest) + (i32.add + (i32.const 8) + (i32.const 1) + ) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i64.eq + (i64.load + (i32.const 8) + ) + (i64.const 1229783084848853777) + ) + ) + (unreachable) + ) + (set_global $memcpy/dest + (call $memcpy/memcpy + (i32.const 8) + (i32.const 8) + (i32.const 32) + ) + ) + (if + (i32.eqz + (i32.eq + (get_global $memcpy/dest) + (i32.const 8) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i64.eq + (i64.load + (i32.const 8) + ) + (i64.const 1229783084848853777) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i64.eq + (i64.load + (i32.add + (i32.const 8) + (i32.const 8) + ) + ) + (i64.const 2459565876494606882) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i64.eq + (i64.load + (i32.add + (i32.const 8) + (i32.const 16) + ) + ) + (i64.const 3689348814741910323) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i64.eq + (i64.load + (i32.add + (i32.const 8) + (i32.const 24) + ) + ) + (i64.const 4919131752989213764) + ) + ) + (unreachable) + ) + (set_global $memcpy/dest + (call $memcpy/memcpy + (i32.add + (i32.const 8) + (i32.const 5) + ) + (i32.add + (i32.const 8) + (i32.const 28) + ) + (i32.const 3) + ) + ) + (if + (i32.eqz + (i64.eq + (i64.load + (i32.const 8) + ) + (i64.const 4919131679688438545) + ) + ) + (unreachable) + ) + (set_global $memcpy/dest + (call $memcpy/memcpy + (i32.add + (i32.const 8) + (i32.const 8) + ) + (i32.add + (i32.const 8) + (i32.const 16) + ) + (i32.const 15) + ) + ) + (if + (i32.eqz + (i64.eq + (i64.load + (i32.const 8) + ) + (i64.const 4919131679688438545) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i64.eq + (i64.load + (i32.add + (i32.const 8) + (i32.const 8) + ) + ) + (i64.const 3689348814741910323) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i64.eq + (i64.load + (i32.add + (i32.const 8) + (i32.const 16) + ) + ) + (i64.const 3694152654344438852) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (i64.eq + (i64.load + (i32.add + (i32.const 8) + (i32.const 24) + ) + ) + (i64.const 4919131752989213764) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (f64.ne + (tee_local $3 + (call $fmod/fmod + (f64.const 1) + (f64.const nan:0x8000000000000) + ) + ) + (get_local $3) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (f64.eq + (call $fmod/fmod + (f64.const 1.5) + (f64.const 1) + ) + (f64.const 0.5) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (f64.lt + (f64.sub + (call $fmod/fmod + (f64.const 9.2) + (f64.const 2) + ) + (f64.const 1.2) + ) + (f64.const 2.220446049250313e-16) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (f64.lt + (f64.sub + (call $fmod/fmod + (f64.const 9.2) + (f64.const 3.7) + ) + (f64.const 1.8) + ) + (f64.const 2.220446049250313e-16) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (f32.ne + (tee_local $2 + (call $fmod/fmodf + (f32.const 1) + (f32.const nan:0x400000) + ) + ) + (get_local $2) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (f32.eq + (call $fmod/fmodf + (f32.const 1.5) + (f32.const 1) + ) + (f32.const 0.5) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (f32.lt + (f32.sub + (call $fmod/fmodf + (f32.const 9.199999809265137) + (f32.const 2) + ) + (f32.const 1.2000000476837158) + ) + (f32.const 1.1920928955078125e-07) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (f32.lt + (f32.sub + (call $fmod/fmodf + (f32.const 9.199999809265137) + (f32.const 3.700000047683716) + ) + (f32.const 1.7999999523162842) + ) + (f32.const 1.1920928955078125e-07) + ) + ) + (unreachable) + ) + (i32.store + (get_global $showcase/aClassInstance) + (i32.const 42) + ) + (f32.store offset=4 + (get_global $showcase/aClassInstance) + (f32.const 9e3) + ) + (if + (i32.eqz + (i32.eq + (i32.load + (i32.const 8) + ) + (i32.const 42) + ) + ) + (unreachable) + ) + (if + (i32.eqz + (f32.eq + (f32.load + (i32.const 12) + ) + (f32.const 9e3) + ) + ) + (unreachable) + ) + (call $showcase/ADerivedClass#set:aWildAccessorAppears + (get_global $showcase/aClassInstance) + (f32.const 123) + ) + (if + (i32.eqz + (f32.eq + (call $showcase/ADerivedClass#get:aWildAccessorAppears + (get_global $showcase/aClassInstance) + ) + (f32.const 123) + ) + ) + (unreachable) + ) + (set_global $showcase/AClass.aStaticField + (get_global $showcase/aClassInstance) + ) + (if + (i32.eqz + (i32.eq + (get_global $showcase/AClass.aStaticField) + (get_global $showcase/aClassInstance) + ) + ) + (unreachable) + ) + ) +) +(; +[program.elements] + GLOBAL: NaN + GLOBAL: Infinity + FUNCTION_PROTOTYPE: isNaN + FUNCTION_PROTOTYPE: isFinite + FUNCTION_PROTOTYPE: clz + FUNCTION_PROTOTYPE: ctz + FUNCTION_PROTOTYPE: popcnt + FUNCTION_PROTOTYPE: rotl + FUNCTION_PROTOTYPE: rotr + FUNCTION_PROTOTYPE: abs + FUNCTION_PROTOTYPE: max + FUNCTION_PROTOTYPE: min + FUNCTION_PROTOTYPE: ceil + FUNCTION_PROTOTYPE: floor + FUNCTION_PROTOTYPE: copysign + FUNCTION_PROTOTYPE: nearest + FUNCTION_PROTOTYPE: reinterpret + FUNCTION_PROTOTYPE: sqrt + FUNCTION_PROTOTYPE: trunc + FUNCTION_PROTOTYPE: load + FUNCTION_PROTOTYPE: store + FUNCTION_PROTOTYPE: sizeof + FUNCTION_PROTOTYPE: select + FUNCTION_PROTOTYPE: unreachable + FUNCTION_PROTOTYPE: current_memory + FUNCTION_PROTOTYPE: grow_memory + FUNCTION_PROTOTYPE: parseInt + FUNCTION_PROTOTYPE: parseFloat + FUNCTION_PROTOTYPE: changetype + FUNCTION_PROTOTYPE: assert + FUNCTION_PROTOTYPE: i8 + FUNCTION_PROTOTYPE: i16 + FUNCTION_PROTOTYPE: i32 + FUNCTION_PROTOTYPE: i64 + FUNCTION_PROTOTYPE: u8 + FUNCTION_PROTOTYPE: u16 + FUNCTION_PROTOTYPE: u32 + FUNCTION_PROTOTYPE: u64 + FUNCTION_PROTOTYPE: bool + FUNCTION_PROTOTYPE: f32 + FUNCTION_PROTOTYPE: f64 + FUNCTION_PROTOTYPE: isize + FUNCTION_PROTOTYPE: usize + GLOBAL: HEAP_BASE + GLOBAL: showcase/aConstantGlobal + GLOBAL: showcase/anExportedConstantGlobal + GLOBAL: showcase/aMutableGlobal + GLOBAL: showcase/anInferredI32 + GLOBAL: showcase/anInferredI64 + GLOBAL: showcase/anInferredF64 + GLOBAL: showcase/anInferredF32 + NAMESPACE: showcase/ANamespace + GLOBAL: showcase/ANamespace.aNamespacedGlobal + FUNCTION_PROTOTYPE: showcase/ANamespace.aNamespacedFunction + ENUM: showcase/AnEnum + FUNCTION_PROTOTYPE: showcase/addGeneric + FUNCTION_PROTOTYPE: showcase/anUnusedFunction + FUNCTION_PROTOTYPE: showcase/anExportedFunction + CLASS_PROTOTYPE: showcase/AClass + GLOBAL: showcase/AClass.aStaticField + CLASS_PROTOTYPE: showcase/ADerivedClass + PROPERTY: showcase/ADerivedClass#aWildAccessorAppears + GLOBAL: showcase/aClassInstance + GLOBAL: unary/i + GLOBAL: unary/I + GLOBAL: unary/f + GLOBAL: unary/F + GLOBAL: binary/b + GLOBAL: binary/i + GLOBAL: binary/I + GLOBAL: binary/f + GLOBAL: binary/F + GLOBAL: logical/i + GLOBAL: logical/I + GLOBAL: logical/f + GLOBAL: logical/F + GLOBAL: builtins/b + GLOBAL: builtins/i + GLOBAL: builtins/I + GLOBAL: builtins/f + GLOBAL: builtins/F + GLOBAL: builtins/s + FUNCTION_PROTOTYPE: builtins/test + FUNCTION_PROTOTYPE: memcpy/memcpy + GLOBAL: memcpy/base + GLOBAL: memcpy/dest + FUNCTION_PROTOTYPE: fmod/fmod + FUNCTION_PROTOTYPE: fmod/fmodf +[program.exports] + GLOBAL: showcase/anExportedConstantGlobal + GLOBAL: showcase/aConstantGlobal + GLOBAL: showcase/anAliasedConstantGlobal + ENUM: showcase/AnEnum + FUNCTION_PROTOTYPE: showcase/anExportedFunction + FUNCTION_PROTOTYPE: builtins/test + FUNCTION_PROTOTYPE: memcpy/memcpy + FUNCTION_PROTOTYPE: fmod/fmod + FUNCTION_PROTOTYPE: fmod/fmodf +;) diff --git a/tests/parser/import.ts b/tests/parser/import.ts index 3b3248d0..6c57f460 100644 --- a/tests/parser/import.ts +++ b/tests/parser/import.ts @@ -5,3 +5,5 @@ import { A, B, C } from "./other"; import { A as B, C, D as E, F } from "./other"; import * as A from "./other"; + +import "./other"; diff --git a/tests/parser/import.ts.fixture.ts b/tests/parser/import.ts.fixture.ts index fd389fb9..493896ea 100644 --- a/tests/parser/import.ts.fixture.ts +++ b/tests/parser/import.ts.fixture.ts @@ -13,3 +13,4 @@ D as E, F } from "./other"; import * as A from "./other"; +import "./other";