From d5a7e6c004ce17b0a54279820b2c678d7f42ed75 Mon Sep 17 00:00:00 2001 From: KKiiim Date: Mon, 30 Nov 2026 14:44:40 +0800 Subject: [PATCH] fix --- src/compiler.ts | 466 +- tests/compiler/assignment-chain.debug.wat | 20 +- tests/compiler/assignment-chain.release.wat | 8 +- tests/compiler/bindings/esm.debug.wat | 20 +- tests/compiler/bindings/esm.release.wat | 12 +- .../bindings/noExportRuntime.debug.wat | 20 +- .../bindings/noExportRuntime.release.wat | 8 +- tests/compiler/bindings/raw.debug.wat | 20 +- tests/compiler/bindings/raw.release.wat | 12 +- tests/compiler/call-inferred.debug.wat | 20 +- tests/compiler/call-inferred.release.wat | 8 +- tests/compiler/call-rest.debug.wat | 20 +- tests/compiler/call-rest.release.wat | 12 +- tests/compiler/call-super.debug.wat | 20 +- tests/compiler/call-super.release.wat | 8 +- tests/compiler/class-implements.debug.wat | 20 +- tests/compiler/class-implements.release.wat | 22 +- .../compiler/class-overloading-cast.debug.wat | 20 +- .../class-overloading-cast.release.wat | 18 +- tests/compiler/class-overloading.debug.wat | 20 +- tests/compiler/class-overloading.release.wat | 116 +- tests/compiler/class-override.debug.wat | 20 +- tests/compiler/class-override.release.wat | 14 +- tests/compiler/class.debug.wat | 20 +- tests/compiler/class.release.wat | 8 +- .../compound-assignment-side-effect.debug.wat | 3738 +++++++++++++++++ ...ompound-assignment-side-effect.release.wat | 2592 ++++++++++++ .../compound-assignment-side-effect.ts | 101 + tests/compiler/constructor.debug.wat | 20 +- tests/compiler/constructor.release.wat | 8 +- tests/compiler/do.debug.wat | 20 +- tests/compiler/do.release.wat | 8 +- tests/compiler/duplicate-fields.debug.wat | 20 +- tests/compiler/duplicate-fields.release.wat | 8 +- tests/compiler/empty-exportruntime.debug.wat | 20 +- .../compiler/empty-exportruntime.release.wat | 4 +- tests/compiler/empty-new.debug.wat | 20 +- tests/compiler/empty-new.release.wat | 8 +- .../compiler/exportstar-rereexport.debug.wat | 20 +- .../exportstar-rereexport.release.wat | 8 +- .../compiler/extends-baseaggregate.debug.wat | 20 +- .../extends-baseaggregate.release.wat | 12 +- tests/compiler/extends-recursive.debug.wat | 20 +- tests/compiler/extends-recursive.release.wat | 8 +- tests/compiler/field-initialization.debug.wat | 20 +- .../compiler/field-initialization.release.wat | 12 +- tests/compiler/field.debug.wat | 20 +- tests/compiler/field.release.wat | 8 +- tests/compiler/for.debug.wat | 20 +- tests/compiler/for.release.wat | 8 +- tests/compiler/function-call.debug.wat | 20 +- tests/compiler/function-call.release.wat | 8 +- tests/compiler/function-expression.debug.wat | 20 +- .../compiler/function-expression.release.wat | 8 +- tests/compiler/getter-call.debug.wat | 20 +- tests/compiler/getter-call.release.wat | 8 +- tests/compiler/heap.debug.wat | 24 +- tests/compiler/heap.release.wat | 6 +- .../incremental-gc/call-indirect.debug.wat | 20 +- .../incremental-gc/call-indirect.release.wat | 8 +- tests/compiler/infer-array.debug.wat | 20 +- tests/compiler/infer-array.release.wat | 12 +- tests/compiler/infer-generic.debug.wat | 20 +- tests/compiler/infer-generic.release.wat | 8 +- tests/compiler/inlining.debug.wat | 20 +- tests/compiler/inlining.release.wat | 8 +- tests/compiler/instanceof.debug.wat | 20 +- tests/compiler/instanceof.release.wat | 48 +- tests/compiler/issues/1095.debug.wat | 20 +- tests/compiler/issues/1095.release.wat | 8 +- tests/compiler/issues/1225.debug.wat | 20 +- tests/compiler/issues/1225.release.wat | 8 +- tests/compiler/issues/1699.debug.wat | 20 +- tests/compiler/issues/1699.release.wat | 12 +- tests/compiler/issues/2166.debug.wat | 20 +- tests/compiler/issues/2166.release.wat | 12 +- tests/compiler/issues/2322/index.debug.wat | 20 +- tests/compiler/issues/2322/index.release.wat | 8 +- tests/compiler/issues/2622.debug.wat | 20 +- tests/compiler/issues/2622.release.wat | 8 +- tests/compiler/issues/2707.debug.wat | 20 +- tests/compiler/issues/2707.release.wat | 8 +- tests/compiler/issues/2873.debug.wat | 20 +- tests/compiler/issues/2873.release.wat | 28 +- tests/compiler/logical.debug.wat | 20 +- tests/compiler/logical.release.wat | 8 +- tests/compiler/managed-cast.debug.wat | 20 +- tests/compiler/managed-cast.release.wat | 8 +- tests/compiler/new.debug.wat | 20 +- tests/compiler/new.release.wat | 8 +- tests/compiler/number.debug.wat | 20 +- tests/compiler/number.release.wat | 16 +- tests/compiler/object-literal.debug.wat | 20 +- tests/compiler/object-literal.release.wat | 18 +- .../operator-overload-non-ambiguity.debug.wat | 20 +- ...perator-overload-non-ambiguity.release.wat | 8 +- .../optional-typeparameters.debug.wat | 20 +- .../optional-typeparameters.release.wat | 8 +- .../postfix-update-side-effect.debug.wat | 2526 +++++++++++ .../postfix-update-side-effect.release.wat | 1767 ++++++++ tests/compiler/postfix-update-side-effect.ts | 18 + tests/compiler/reexport.debug.wat | 20 +- tests/compiler/reexport.release.wat | 8 +- tests/compiler/rereexport.debug.wat | 20 +- tests/compiler/rereexport.release.wat | 8 +- tests/compiler/resolve-access.debug.wat | 20 +- tests/compiler/resolve-access.release.wat | 16 +- tests/compiler/resolve-binary.debug.wat | 20 +- tests/compiler/resolve-binary.release.wat | 16 +- .../compiler/resolve-elementaccess.debug.wat | 20 +- .../resolve-elementaccess.release.wat | 16 +- .../resolve-function-expression.debug.wat | 20 +- .../resolve-function-expression.release.wat | 16 +- tests/compiler/resolve-new.debug.wat | 20 +- tests/compiler/resolve-new.release.wat | 8 +- .../compiler/resolve-propertyaccess.debug.wat | 20 +- .../resolve-propertyaccess.release.wat | 16 +- tests/compiler/resolve-ternary.debug.wat | 20 +- tests/compiler/resolve-ternary.release.wat | 12 +- tests/compiler/resolve-unary.debug.wat | 20 +- tests/compiler/resolve-unary.release.wat | 16 +- tests/compiler/return-unreachable.debug.wat | 20 +- tests/compiler/return-unreachable.release.wat | 8 +- .../compiler/rt/alloc-large-memory.debug.wat | 20 +- tests/compiler/rt/finalize.debug.wat | 20 +- tests/compiler/rt/finalize.release.wat | 8 +- tests/compiler/rt/issue-2719.debug.wat | 20 +- tests/compiler/rt/issue-2719.release.wat | 8 +- .../rt/runtime-incremental-export.debug.wat | 20 +- .../rt/runtime-incremental-export.release.wat | 4 +- .../rt/runtime-minimal-export.debug.wat | 20 +- tests/compiler/simd.debug.wat | 20 +- tests/compiler/simd.release.wat | 8 +- tests/compiler/std/array-literal.debug.wat | 20 +- tests/compiler/std/array-literal.release.wat | 12 +- tests/compiler/std/array.debug.wat | 20 +- tests/compiler/std/array.release.wat | 124 +- tests/compiler/std/arraybuffer.debug.wat | 20 +- tests/compiler/std/arraybuffer.release.wat | 8 +- tests/compiler/std/dataview.debug.wat | 20 +- tests/compiler/std/dataview.release.wat | 8 +- tests/compiler/std/date.debug.wat | 20 +- tests/compiler/std/date.release.wat | 44 +- tests/compiler/std/map.debug.wat | 20 +- tests/compiler/std/map.release.wat | 40 +- tests/compiler/std/new.debug.wat | 20 +- tests/compiler/std/new.release.wat | 8 +- .../std/operator-overloading.debug.wat | 20 +- .../std/operator-overloading.release.wat | 12 +- tests/compiler/std/set.debug.wat | 20 +- tests/compiler/std/set.release.wat | 12 +- tests/compiler/std/static-array.debug.wat | 20 +- tests/compiler/std/static-array.release.wat | 12 +- tests/compiler/std/staticarray.debug.wat | 20 +- tests/compiler/std/staticarray.release.wat | 34 +- .../compiler/std/string-casemapping.debug.wat | 20 +- .../std/string-casemapping.release.wat | 16 +- tests/compiler/std/string-encoding.debug.wat | 20 +- .../compiler/std/string-encoding.release.wat | 16 +- tests/compiler/std/string.debug.wat | 20 +- tests/compiler/std/string.release.wat | 44 +- tests/compiler/std/symbol.debug.wat | 20 +- tests/compiler/std/symbol.release.wat | 16 +- tests/compiler/std/typedarray.debug.wat | 20 +- tests/compiler/std/typedarray.release.wat | 68 +- tests/compiler/std/uri.debug.wat | 20 +- tests/compiler/std/uri.release.wat | 12 +- tests/compiler/super-inline.debug.wat | 20 +- tests/compiler/super-inline.release.wat | 8 +- tests/compiler/switch.debug.wat | 20 +- tests/compiler/switch.release.wat | 16 +- tests/compiler/templateliteral.debug.wat | 20 +- tests/compiler/templateliteral.release.wat | 16 +- tests/compiler/typeof.debug.wat | 20 +- tests/compiler/typeof.release.wat | 12 +- tests/compiler/while.debug.wat | 20 +- tests/compiler/while.release.wat | 8 +- 177 files changed, 12158 insertions(+), 2106 deletions(-) create mode 100644 tests/compiler/compound-assignment-side-effect.debug.wat create mode 100644 tests/compiler/compound-assignment-side-effect.release.wat create mode 100644 tests/compiler/compound-assignment-side-effect.ts create mode 100644 tests/compiler/postfix-update-side-effect.debug.wat create mode 100644 tests/compiler/postfix-update-side-effect.release.wat create mode 100644 tests/compiler/postfix-update-side-effect.ts diff --git a/src/compiler.ts b/src/compiler.ts index f99bd5a049..36c73b694d 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -428,6 +428,45 @@ export const runtimeFunctions = [ "__new", "__pin", "__unpin", "__collect" ]; /** Globals to export if `--exportRuntime` is set. */ export const runtimeGlobals = [ "__rtti_base" ]; +class CompoundAssignmentCacheContext { + constructor( + public target: Element, + public leftExpr: ExpressionRef, + public leftType: Type, + public assignmentAccessContext: AssignmentAccessContext, + public setupPrefixExprs: ExpressionRef[] + ) {} +} + +class AssignmentAccessContext { + constructor( + public thisExpression: Expression | null, + public indexExpression: Expression | null, + public thisExpr: ExpressionRef = 0, + public indexExpr: ExpressionRef = 0 + ) {} + + resolveThisExpr(compiler: Compiler, targetType: Type): ExpressionRef { + if (this.thisExpr) { + compiler.currentType = targetType; + return this.thisExpr; + } + return compiler.compileExpression( + assert(this.thisExpression), + targetType, + Constraints.ConvImplicit | Constraints.IsThis + ); + } + + resolveIndexExpr(compiler: Compiler, targetType: Type): ExpressionRef { + if (this.indexExpr) { + compiler.currentType = targetType; + return this.indexExpr; + } + return compiler.compileExpression(assert(this.indexExpression), targetType, Constraints.ConvImplicit); + } +} + /** Compiler interface. */ export class Compiler extends DiagnosticEmitter { @@ -4089,8 +4128,35 @@ export class Compiler extends DiagnosticEmitter { let expr: ExpressionRef; let compound = false; + let compoundAssignmentCacheContext: CompoundAssignmentCacheContext | null = null; let operator = expression.operator; + let leftContextualType = contextualType; + switch (operator) { + case Token.LessThan_LessThan_Equals: + case Token.GreaterThan_GreaterThan_Equals: + case Token.GreaterThan_GreaterThan_GreaterThan_Equals: + case Token.Ampersand_Equals: + case Token.Bar_Equals: + case Token.Caret_Equals: + leftContextualType = contextualType.intType; + // falls through + case Token.Plus_Equals: + case Token.Minus_Equals: + case Token.Asterisk_Equals: + case Token.Asterisk_Asterisk_Equals: + case Token.Slash_Equals: + case Token.Percent_Equals: + compound = true; + break; + } + if (compound) { + let cacheTarget = this.getCompoundAssignmentSideEffectCacheTarget(left); + if (cacheTarget && this.needsCompoundAssignmentSideEffectCache(cacheTarget)) { + compoundAssignmentCacheContext = this.prepareCompoundAssignmentCache(left, leftContextualType); + if (!compoundAssignmentCacheContext) return module.unreachable(); + } + } switch (operator) { case Token.LessThan: case Token.GreaterThan: @@ -4107,9 +4173,11 @@ export class Compiler extends DiagnosticEmitter { case Token.Equals: { return this.compileAssignment(left, right, contextualType); } - case Token.Plus_Equals: compound = true; + case Token.Plus_Equals: case Token.Plus: { - leftExpr = this.compileExpression(left, contextualType); + leftExpr = compoundAssignmentCacheContext + ? compoundAssignmentCacheContext.leftExpr + : this.compileExpression(left, contextualType); leftType = this.currentType; // check operator overload @@ -4151,9 +4219,11 @@ export class Compiler extends DiagnosticEmitter { expr = this.makeAdd(leftExpr, rightExpr, commonType); break; } - case Token.Minus_Equals: compound = true; + case Token.Minus_Equals: case Token.Minus: { - leftExpr = this.compileExpression(left, contextualType); + leftExpr = compoundAssignmentCacheContext + ? compoundAssignmentCacheContext.leftExpr + : this.compileExpression(left, contextualType); leftType = this.currentType; // check operator overload @@ -4196,9 +4266,11 @@ export class Compiler extends DiagnosticEmitter { expr = this.makeSub(leftExpr, rightExpr, commonType); break; } - case Token.Asterisk_Equals: compound = true; + case Token.Asterisk_Equals: case Token.Asterisk: { - leftExpr = this.compileExpression(left, contextualType); + leftExpr = compoundAssignmentCacheContext + ? compoundAssignmentCacheContext.leftExpr + : this.compileExpression(left, contextualType); leftType = this.currentType; // check operator overload @@ -4241,9 +4313,11 @@ export class Compiler extends DiagnosticEmitter { expr = this.makeMul(leftExpr, rightExpr, commonType); break; } - case Token.Asterisk_Asterisk_Equals: compound = true; + case Token.Asterisk_Asterisk_Equals: case Token.Asterisk_Asterisk: { - leftExpr = this.compileExpression(left, contextualType); + leftExpr = compoundAssignmentCacheContext + ? compoundAssignmentCacheContext.leftExpr + : this.compileExpression(left, contextualType); leftType = this.currentType; // check operator overload @@ -4286,9 +4360,11 @@ export class Compiler extends DiagnosticEmitter { expr = this.makePow(leftExpr, rightExpr, commonType, expression); break; } - case Token.Slash_Equals: compound = true; + case Token.Slash_Equals: case Token.Slash: { - leftExpr = this.compileExpression(left, contextualType); + leftExpr = compoundAssignmentCacheContext + ? compoundAssignmentCacheContext.leftExpr + : this.compileExpression(left, contextualType); leftType = this.currentType; // check operator overload @@ -4331,9 +4407,11 @@ export class Compiler extends DiagnosticEmitter { expr = this.makeDiv(leftExpr, rightExpr, commonType); break; } - case Token.Percent_Equals: compound = true; + case Token.Percent_Equals: case Token.Percent: { - leftExpr = this.compileExpression(left, contextualType); + leftExpr = compoundAssignmentCacheContext + ? compoundAssignmentCacheContext.leftExpr + : this.compileExpression(left, contextualType); leftType = this.currentType; // check operator overload @@ -4376,9 +4454,11 @@ export class Compiler extends DiagnosticEmitter { expr = this.makeRem(leftExpr, rightExpr, commonType, expression); break; } - case Token.LessThan_LessThan_Equals: compound = true; + case Token.LessThan_LessThan_Equals: case Token.LessThan_LessThan: { - leftExpr = this.compileExpression(left, contextualType.intType); + leftExpr = compoundAssignmentCacheContext + ? compoundAssignmentCacheContext.leftExpr + : this.compileExpression(left, contextualType.intType); leftType = this.currentType; // check operator overload @@ -4403,9 +4483,11 @@ export class Compiler extends DiagnosticEmitter { expr = this.makeShl(leftExpr, rightExpr, rightType); break; } - case Token.GreaterThan_GreaterThan_Equals: compound = true; + case Token.GreaterThan_GreaterThan_Equals: case Token.GreaterThan_GreaterThan: { - leftExpr = this.compileExpression(left, contextualType.intType); + leftExpr = compoundAssignmentCacheContext + ? compoundAssignmentCacheContext.leftExpr + : this.compileExpression(left, contextualType.intType); leftType = this.currentType; // check operator overload @@ -4431,9 +4513,11 @@ export class Compiler extends DiagnosticEmitter { expr = this.makeShr(leftExpr, rightExpr, rightType); break; } - case Token.GreaterThan_GreaterThan_GreaterThan_Equals: compound = true; + case Token.GreaterThan_GreaterThan_GreaterThan_Equals: case Token.GreaterThan_GreaterThan_GreaterThan: { - leftExpr = this.compileExpression(left, contextualType.intType); + leftExpr = compoundAssignmentCacheContext + ? compoundAssignmentCacheContext.leftExpr + : this.compileExpression(left, contextualType.intType); leftType = this.currentType; // check operator overload @@ -4458,9 +4542,11 @@ export class Compiler extends DiagnosticEmitter { expr = this.makeShru(leftExpr, rightExpr, rightType); break; } - case Token.Ampersand_Equals: compound = true; + case Token.Ampersand_Equals: case Token.Ampersand: { - leftExpr = this.compileExpression(left, contextualType.intType); + leftExpr = compoundAssignmentCacheContext + ? compoundAssignmentCacheContext.leftExpr + : this.compileExpression(left, contextualType.intType); leftType = this.currentType; // check operator overload @@ -4503,9 +4589,11 @@ export class Compiler extends DiagnosticEmitter { expr = this.makeAnd(leftExpr, rightExpr, commonType); break; } - case Token.Bar_Equals: compound = true; + case Token.Bar_Equals: case Token.Bar: { - leftExpr = this.compileExpression(left, contextualType.intType); + leftExpr = compoundAssignmentCacheContext + ? compoundAssignmentCacheContext.leftExpr + : this.compileExpression(left, contextualType.intType); leftType = this.currentType; // check operator overload @@ -4548,9 +4636,11 @@ export class Compiler extends DiagnosticEmitter { expr = this.makeOr(leftExpr, rightExpr, commonType); break; } - case Token.Caret_Equals: compound = true; + case Token.Caret_Equals: case Token.Caret: { - leftExpr = this.compileExpression(left, contextualType.intType); + leftExpr = compoundAssignmentCacheContext + ? compoundAssignmentCacheContext.leftExpr + : this.compileExpression(left, contextualType.intType); leftType = this.currentType; // check operator overload @@ -4798,8 +4888,13 @@ export class Compiler extends DiagnosticEmitter { } if (!compound) return expr; let resolver = this.resolver; - let target = resolver.lookupExpression(left, this.currentFlow); + let target = compoundAssignmentCacheContext + ? compoundAssignmentCacheContext.target + : resolver.lookupExpression(left, this.currentFlow); if (!target) return module.unreachable(); + let assignmentAccessContext = compoundAssignmentCacheContext + ? compoundAssignmentCacheContext.assignmentAccessContext + : new AssignmentAccessContext(resolver.currentThisExpression, resolver.currentElementExpression); let targetType = resolver.getTypeOfElement(target); if (!targetType) targetType = Type.void; if (!this.currentType.isStrictlyAssignableTo(targetType)) { @@ -4809,15 +4904,252 @@ export class Compiler extends DiagnosticEmitter { ); return module.unreachable(); } - return this.makeAssignment( + let assignmentExpr = this.makeAssignment( target, expr, this.currentType, right, - resolver.currentThisExpression, - resolver.currentElementExpression, + assignmentAccessContext, contextualType != Type.void ); + return compoundAssignmentCacheContext + ? this.prependSetupPrefixExpressions(compoundAssignmentCacheContext.setupPrefixExprs, assignmentExpr) + : assignmentExpr; + } + + private prepareCompoundAssignmentCache( + expression: Expression, + contextualType: Type + ): CompoundAssignmentCacheContext | null { + let module = this.module; + let flow = this.currentFlow; + let resolver = this.resolver; + let cacheTarget = assert(this.getCompoundAssignmentSideEffectCacheTarget(expression)); + let setupPrefixExprs = new Array(); + let assertions = new Array(); + while (expression != cacheTarget) { + switch (expression.kind) { + case NodeKind.Parenthesized: + expression = (expression).expression; + break; + case NodeKind.Assertion: + assertions.push(expression); + expression = (expression).expression; + break; + case NodeKind.Comma: { + let expressions = (expression).expressions; + let last = expressions.length - 1; + for (let i = 0; i < last; ++i) { + setupPrefixExprs.push(this.compileExpression( + expressions[i], Type.void, Constraints.ConvImplicit | Constraints.WillDrop + )); + } + expression = expressions[last]; + break; + } + default: assert(false); + } + } + this.maybeCompileEnclosingSource(cacheTarget); + let target = resolver.lookupExpression(cacheTarget, flow, contextualType); + if (!target) return null; + let thisExpression = resolver.currentThisExpression; + let indexExpression = resolver.currentElementExpression; + let getterInstance: Function; + switch (target.kind) { + case ElementKind.PropertyPrototype: { + let propertyInstance = resolver.resolveProperty(target); + if (!propertyInstance) return null; + target = propertyInstance; + // falls through + } + case ElementKind.Property: { + let getter = (target).getterInstance; + if (!getter) return null; + getterInstance = getter; + break; + } + case ElementKind.IndexSignature: { + let classInstance = (target).parent; + let getter = classInstance.lookupOverload( + OperatorKind.IndexedGet, + flow.is(FlowFlags.UncheckedContext) + ); + if (!getter) { + this.error( + DiagnosticCode.Index_signature_is_missing_in_type_0, + cacheTarget.range, classInstance.internalName + ); + return null; + } + getterInstance = getter; + break; + } + default: { + this.error( + DiagnosticCode.The_target_of_an_assignment_must_be_a_variable_or_a_property_access, + cacheTarget.range + ); + return null; + } + } + + let thisArg: ExpressionRef = 0; + let assignmentThisExpr: ExpressionRef = 0; + let indexArg: ExpressionRef = 0; + let assignmentIndexExpr: ExpressionRef = 0; + if (getterInstance.is(CommonFlags.Instance)) { + let thisType = assert(getterInstance.signature.thisType); + let receiverExpr = this.compileExpression( + assert(thisExpression), + thisType, + Constraints.ConvImplicit | Constraints.IsThis + ); + let receiverTemp = flow.getTempLocal(thisType); + flow.setLocalFlag(receiverTemp.index, LocalFlags.Initialized); + setupPrefixExprs.push(module.local_set(receiverTemp.index, receiverExpr, thisType.isManaged)); + thisArg = module.local_get(receiverTemp.index, thisType.toRef()); + assignmentThisExpr = module.local_get(receiverTemp.index, thisType.toRef()); + } + if (target.kind == ElementKind.IndexSignature) { + let indexType = getterInstance.signature.parameterTypes[0]; + let indexExpr = this.compileExpression(assert(indexExpression), indexType, Constraints.ConvImplicit); + let indexTemp = flow.getTempLocal(indexType); + flow.setLocalFlag(indexTemp.index, LocalFlags.Initialized); + setupPrefixExprs.push(module.local_set(indexTemp.index, indexExpr, indexType.isManaged)); + indexArg = module.local_get(indexTemp.index, indexType.toRef()); + assignmentIndexExpr = module.local_get(indexTemp.index, indexType.toRef()); + } + + let leftExpr = target.kind == ElementKind.IndexSignature + ? this.makeCallDirect(getterInstance, [ thisArg, indexArg ], cacheTarget) + : this.compileCallDirect(getterInstance, [], cacheTarget, thisArg); + for (let i = assertions.length - 1; i >= 0; --i) { + let assertion = assertions[i]; + leftExpr = this.compileAssertionExpression( + Node.createAssertionExpression( + AssertionKind.NonNull, + Node.createCompiledExpression(leftExpr, this.currentType, assertion.expression.range), + null, + assertion.range + ), + contextualType, + Constraints.None + ); + } + let leftType = this.currentType; + let assignmentAccessContext = new AssignmentAccessContext( + thisExpression, + indexExpression, + assignmentThisExpr, + assignmentIndexExpr + ); + return new CompoundAssignmentCacheContext( + target, leftExpr, leftType, assignmentAccessContext, setupPrefixExprs + ); + } + + private prependSetupPrefixExpressions( + setupPrefixExprs: ExpressionRef[], + expr: ExpressionRef + ): ExpressionRef { + setupPrefixExprs.push(expr); + return this.module.block(null, setupPrefixExprs, this.currentType.toRef()); + } + + private needsCompoundAssignmentSideEffectCache(target: Expression): bool { + if (target.kind == NodeKind.PropertyAccess) { + return this.expressionHasSideEffects((target).expression); + } + let access = target; + return this.expressionHasSideEffects(access.expression) + || this.expressionHasSideEffects(access.elementExpression); + } + + private getCompoundAssignmentSideEffectCacheTarget(target: Expression): Expression | null { + while (target.kind == NodeKind.Parenthesized) { + target = (target).expression; + } + switch (target.kind) { + case NodeKind.PropertyAccess: + case NodeKind.ElementAccess: + return target; + case NodeKind.Assertion: { + let assertion = target; + return assertion.assertionKind == AssertionKind.NonNull + ? this.getCompoundAssignmentSideEffectCacheTarget(assertion.expression) + : null; + } + case NodeKind.Comma: { + let expressions = (target).expressions; + return this.getCompoundAssignmentSideEffectCacheTarget(expressions[expressions.length - 1]); + } + default: + return null; + } + } + + /** Detects effects that must not be duplicated when loading and storing an assignment target. */ + private expressionHasSideEffects(expression: Expression): bool { + switch (expression.kind) { + case NodeKind.Call: + case NodeKind.New: + case NodeKind.UnaryPostfix: + return true; + case NodeKind.UnaryPrefix: { + let unary = expression; + return unary.operator == Token.Plus_Plus + || unary.operator == Token.Minus_Minus + || this.expressionHasSideEffects(unary.operand); + } + case NodeKind.Parenthesized: + return this.expressionHasSideEffects((expression).expression); + case NodeKind.Assertion: + return this.expressionHasSideEffects((expression).expression); + case NodeKind.PropertyAccess: + return this.expressionHasSideEffects((expression).expression); + case NodeKind.ElementAccess: { + let access = expression; + return this.expressionHasSideEffects(access.expression) + || this.expressionHasSideEffects(access.elementExpression); + } + case NodeKind.Comma: { + let expressions = (expression).expressions; + for (let i = 0, k = expressions.length; i < k; ++i) { + if (this.expressionHasSideEffects(unchecked(expressions[i]))) return true; + } + return false; + } + case NodeKind.Ternary: { + let ternary = expression; + return this.expressionHasSideEffects(ternary.condition) + || this.expressionHasSideEffects(ternary.ifThen) + || this.expressionHasSideEffects(ternary.ifElse); + } + case NodeKind.Binary: { + let binary = expression; + switch (binary.operator) { + case Token.Equals: + case Token.Plus_Equals: + case Token.Minus_Equals: + case Token.Asterisk_Equals: + case Token.Asterisk_Asterisk_Equals: + case Token.Slash_Equals: + case Token.Percent_Equals: + case Token.LessThan_LessThan_Equals: + case Token.GreaterThan_GreaterThan_Equals: + case Token.GreaterThan_GreaterThan_GreaterThan_Equals: + case Token.Ampersand_Equals: + case Token.Bar_Equals: + case Token.Caret_Equals: + return true; + default: + return this.expressionHasSideEffects(binary.left) || this.expressionHasSideEffects(binary.right); + } + } + default: + return false; + } } makeLt(leftExpr: ExpressionRef, rightExpr: ExpressionRef, type: Type): ExpressionRef { @@ -5812,8 +6144,7 @@ export class Compiler extends DiagnosticEmitter { this.convertExpression(valueExpr, valueType, targetType, false, valueExpression), targetType, valueExpression, - thisExpression, - elementExpression, + new AssignmentAccessContext(thisExpression, elementExpression), contextualType != Type.void ); } @@ -5828,10 +6159,8 @@ export class Compiler extends DiagnosticEmitter { valueType: Type, /** Expression reference. Has already been compiled to `valueExpr`. */ valueExpression: Expression, - /** `this` expression reference if a field or property set. */ - thisExpression: Expression | null, - /** Index expression reference if an indexed set. */ - indexExpression: Expression | null, + /** Receiver and index expressions, optionally cached for a read-modify-write operation. */ + accessContext: AssignmentAccessContext, /** Whether to tee the value. */ tee: bool ): ExpressionRef { @@ -5889,7 +6218,7 @@ export class Compiler extends DiagnosticEmitter { } } // Mark initialized fields in constructors - thisExpression = assert(thisExpression); + let thisExpression = assert(accessContext.thisExpression); if (isConstructor && thisExpression.kind == NodeKind.This) { flow.setThisFieldFlag(propertyInstance, FieldFlags.Initialized); } @@ -5906,11 +6235,7 @@ export class Compiler extends DiagnosticEmitter { assert(setterInstance.signature.returnType == Type.void); if (propertyInstance.is(CommonFlags.Instance)) { let thisType = assert(setterInstance.signature.thisType); - let thisExpr = this.compileExpression( - assert(thisExpression), - thisType, - Constraints.ConvImplicit | Constraints.IsThis - ); + let thisExpr = accessContext.resolveThisExpr(this, thisType); if (!tee) return this.makeCallDirect(setterInstance, [ thisExpr, valueExpr ], valueExpression); let tempLocal = flow.getTempLocal(valueType); let valueTypeRef = valueType.toRef(); @@ -5963,11 +6288,7 @@ export class Compiler extends DiagnosticEmitter { } assert(setterInstance.signature.parameterTypes.length == 2); let thisType = classInstance.type; - let thisExpr = this.compileExpression( - assert(thisExpression), - thisType, - Constraints.ConvImplicit | Constraints.IsThis - ); + let thisExpr = accessContext.resolveThisExpr(this, thisType); let setterIndexType = setterInstance.signature.parameterTypes[0]; let getterIndexType = getterInstance.signature.parameterTypes[0]; if (!setterIndexType.equals(getterIndexType)) { @@ -5980,7 +6301,7 @@ export class Compiler extends DiagnosticEmitter { this.currentType = tee ? getterInstance.signature.returnType : Type.void; return module.unreachable(); } - let elementExpr = this.compileExpression(assert(indexExpression), setterIndexType, Constraints.ConvImplicit); + let elementExpr = accessContext.resolveIndexExpr(this, setterIndexType); let elementType = this.currentType; if (tee) { let tempTarget = flow.getTempLocal(thisType); @@ -9321,13 +9642,22 @@ export class Compiler extends DiagnosticEmitter { ): ExpressionRef { let module = this.module; let flow = this.currentFlow; + let compoundAssignmentCacheContext: CompoundAssignmentCacheContext | null = null; + let cacheTarget = this.getCompoundAssignmentSideEffectCacheTarget(expression.operand); // make a getter for the expression (also obtains the type) - const getValueOriginal = this.compileExpression( // reports - expression.operand, - contextualType.exceptVoid, - Constraints.None - ); + let getValueOriginal: ExpressionRef; + if (cacheTarget && this.needsCompoundAssignmentSideEffectCache(cacheTarget)) { + compoundAssignmentCacheContext = this.prepareCompoundAssignmentCache(expression.operand, contextualType.exceptVoid); + if (!compoundAssignmentCacheContext) return module.unreachable(); + getValueOriginal = compoundAssignmentCacheContext.leftExpr; + } else { + getValueOriginal = this.compileExpression( // reports + expression.operand, + contextualType.exceptVoid, + Constraints.None + ); + } let getValue: ExpressionRef; // if the value isn't dropped, a temp. local is required to remember the original value, @@ -9360,7 +9690,9 @@ export class Compiler extends DiagnosticEmitter { } expr = this.compileUnaryOverload(overload, expression.operand, getValue, expression); if (isInstance) break; - return expr; // here + return compoundAssignmentCacheContext + ? this.prependSetupPrefixExpressions(compoundAssignmentCacheContext.setupPrefixExprs, expr) + : expr; } } if (!this.currentType.isValue) { @@ -9443,7 +9775,9 @@ export class Compiler extends DiagnosticEmitter { } expr = this.compileUnaryOverload(overload, expression.operand, getValue, expression); if (isInstance) break; - return expr; // here + return compoundAssignmentCacheContext + ? this.prependSetupPrefixExpressions(compoundAssignmentCacheContext.setupPrefixExprs, expr) + : expr; } } if (!this.currentType.isValue) { @@ -9520,22 +9854,29 @@ export class Compiler extends DiagnosticEmitter { } let resolver = this.resolver; - let target = resolver.lookupExpression(expression.operand, flow); // reports + let target = compoundAssignmentCacheContext + ? compoundAssignmentCacheContext.target + : resolver.lookupExpression(expression.operand, flow); // reports if (!target) { return module.unreachable(); } + let assignmentAccessContext = compoundAssignmentCacheContext + ? compoundAssignmentCacheContext.assignmentAccessContext + : new AssignmentAccessContext(resolver.currentThisExpression, resolver.currentElementExpression); // simplify if dropped anyway if (!tempLocal) { - return this.makeAssignment( + let setValue = this.makeAssignment( target, expr, this.currentType, expression.operand, - resolver.currentThisExpression, - resolver.currentElementExpression, + assignmentAccessContext, false ); + return compoundAssignmentCacheContext + ? this.prependSetupPrefixExpressions(compoundAssignmentCacheContext.setupPrefixExprs, setValue) + : setValue; } // otherwise use the temp. local for the intermediate value (always possibly overflows) @@ -9544,18 +9885,20 @@ export class Compiler extends DiagnosticEmitter { expr, // includes a tee of getValue to tempLocal this.currentType, expression.operand, - resolver.currentThisExpression, - resolver.currentElementExpression, + assignmentAccessContext, false ); this.currentType = tempLocal.type; let typeRef = tempLocal.type.toRef(); - return module.block(null, [ + let result = module.block(null, [ setValue, module.local_get(tempLocal.index, typeRef) ], typeRef); // result of 'x++' / 'x--' might overflow + return compoundAssignmentCacheContext + ? this.prependSetupPrefixExpressions(compoundAssignmentCacheContext.setupPrefixExprs, result) + : result; } private compileUnaryPrefixExpression( @@ -9908,8 +10251,7 @@ export class Compiler extends DiagnosticEmitter { expr, this.currentType, expression.operand, - resolver.currentThisExpression, - resolver.currentElementExpression, + new AssignmentAccessContext(resolver.currentThisExpression, resolver.currentElementExpression), contextualType != Type.void ); } diff --git a/tests/compiler/assignment-chain.debug.wat b/tests/compiler/assignment-chain.debug.wat index 340796c987..a41a7b47c6 100644 --- a/tests/compiler/assignment-chain.debug.wat +++ b/tests/compiler/assignment-chain.debug.wat @@ -2009,7 +2009,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2075,21 +2075,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2105,6 +2090,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/assignment-chain.release.wat b/tests/compiler/assignment-chain.release.wat index fb11835ac0..96a0f93478 100644 --- a/tests/compiler/assignment-chain.release.wat +++ b/tests/compiler/assignment-chain.release.wat @@ -77,7 +77,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$129 + block $__inlined_func$~lib/rt/itcms/Object#unlink$128 local.get $1 i32.load offset=4 i32.const -4 @@ -101,7 +101,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$129 + br $__inlined_func$~lib/rt/itcms/Object#unlink$128 end local.get $1 i32.load offset=8 @@ -604,7 +604,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -621,7 +621,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 diff --git a/tests/compiler/bindings/esm.debug.wat b/tests/compiler/bindings/esm.debug.wat index a6850592f3..ddbf297ecb 100644 --- a/tests/compiler/bindings/esm.debug.wat +++ b/tests/compiler/bindings/esm.debug.wat @@ -2135,7 +2135,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2201,21 +2201,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2231,6 +2216,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/bindings/esm.release.wat b/tests/compiler/bindings/esm.release.wat index 4fa9022ad2..f77976c790 100644 --- a/tests/compiler/bindings/esm.release.wat +++ b/tests/compiler/bindings/esm.release.wat @@ -165,7 +165,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$70 + block $__inlined_func$~lib/rt/itcms/interrupt$69 i32.const 2048 local.set $2 loop $do-loop|0 @@ -182,7 +182,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$70 + br $__inlined_func$~lib/rt/itcms/interrupt$69 end local.get $2 i32.const 0 @@ -2163,7 +2163,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store - block $__inlined_func$~lib/rt/itcms/__renew$269 + block $__inlined_func$~lib/rt/itcms/__renew$268 i32.const 1073741820 local.get $2 i32.const 1 @@ -2206,7 +2206,7 @@ i32.store offset=16 local.get $2 local.set $1 - br $__inlined_func$~lib/rt/itcms/__renew$269 + br $__inlined_func$~lib/rt/itcms/__renew$268 end local.get $3 local.get $4 @@ -2563,7 +2563,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store - block $__inlined_func$~lib/string/String#concat$284 + block $__inlined_func$~lib/string/String#concat$283 local.get $1 i32.const 20 i32.sub @@ -2582,7 +2582,7 @@ global.set $~lib/memory/__stack_pointer i32.const 1760 local.set $2 - br $__inlined_func$~lib/string/String#concat$284 + br $__inlined_func$~lib/string/String#concat$283 end global.get $~lib/memory/__stack_pointer local.get $2 diff --git a/tests/compiler/bindings/noExportRuntime.debug.wat b/tests/compiler/bindings/noExportRuntime.debug.wat index ba2e2f6010..2e8a1f442b 100644 --- a/tests/compiler/bindings/noExportRuntime.debug.wat +++ b/tests/compiler/bindings/noExportRuntime.debug.wat @@ -2030,7 +2030,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2096,21 +2096,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2126,6 +2111,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/bindings/noExportRuntime.release.wat b/tests/compiler/bindings/noExportRuntime.release.wat index 8db482731d..a883af1898 100644 --- a/tests/compiler/bindings/noExportRuntime.release.wat +++ b/tests/compiler/bindings/noExportRuntime.release.wat @@ -113,7 +113,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -130,7 +130,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 @@ -821,7 +821,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$132 + block $__inlined_func$~lib/rt/itcms/Object#unlink$131 local.get $0 i32.load offset=4 i32.const -4 @@ -845,7 +845,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$132 + br $__inlined_func$~lib/rt/itcms/Object#unlink$131 end local.get $0 i32.load offset=8 diff --git a/tests/compiler/bindings/raw.debug.wat b/tests/compiler/bindings/raw.debug.wat index c54a11e383..4659f98f75 100644 --- a/tests/compiler/bindings/raw.debug.wat +++ b/tests/compiler/bindings/raw.debug.wat @@ -2138,7 +2138,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2204,21 +2204,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2234,6 +2219,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/bindings/raw.release.wat b/tests/compiler/bindings/raw.release.wat index 6d66004d1a..4202bccd05 100644 --- a/tests/compiler/bindings/raw.release.wat +++ b/tests/compiler/bindings/raw.release.wat @@ -165,7 +165,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$71 + block $__inlined_func$~lib/rt/itcms/interrupt$70 i32.const 2048 local.set $2 loop $do-loop|0 @@ -182,7 +182,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$71 + br $__inlined_func$~lib/rt/itcms/interrupt$70 end local.get $2 i32.const 0 @@ -2163,7 +2163,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store - block $__inlined_func$~lib/rt/itcms/__renew$270 + block $__inlined_func$~lib/rt/itcms/__renew$269 i32.const 1073741820 local.get $2 i32.const 1 @@ -2206,7 +2206,7 @@ i32.store offset=16 local.get $2 local.set $1 - br $__inlined_func$~lib/rt/itcms/__renew$270 + br $__inlined_func$~lib/rt/itcms/__renew$269 end local.get $3 local.get $4 @@ -2563,7 +2563,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store - block $__inlined_func$~lib/string/String#concat$285 + block $__inlined_func$~lib/string/String#concat$284 local.get $1 i32.const 20 i32.sub @@ -2582,7 +2582,7 @@ global.set $~lib/memory/__stack_pointer i32.const 1760 local.set $2 - br $__inlined_func$~lib/string/String#concat$285 + br $__inlined_func$~lib/string/String#concat$284 end global.get $~lib/memory/__stack_pointer local.get $2 diff --git a/tests/compiler/call-inferred.debug.wat b/tests/compiler/call-inferred.debug.wat index 1d07f41be0..94c236c669 100644 --- a/tests/compiler/call-inferred.debug.wat +++ b/tests/compiler/call-inferred.debug.wat @@ -2035,7 +2035,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2101,21 +2101,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2131,6 +2116,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/call-inferred.release.wat b/tests/compiler/call-inferred.release.wat index 07fa104b08..9b07eaa917 100644 --- a/tests/compiler/call-inferred.release.wat +++ b/tests/compiler/call-inferred.release.wat @@ -73,7 +73,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$125 + block $__inlined_func$~lib/rt/itcms/Object#unlink$124 local.get $1 i32.load offset=4 i32.const -4 @@ -97,7 +97,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$125 + br $__inlined_func$~lib/rt/itcms/Object#unlink$124 end local.get $1 i32.load offset=8 @@ -208,7 +208,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$70 + block $__inlined_func$~lib/rt/itcms/interrupt$69 i32.const 2048 local.set $2 loop $do-loop|0 @@ -225,7 +225,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$70 + br $__inlined_func$~lib/rt/itcms/interrupt$69 end local.get $2 i32.const 0 diff --git a/tests/compiler/call-rest.debug.wat b/tests/compiler/call-rest.debug.wat index 4bedb4c4ec..51ac398f2e 100644 --- a/tests/compiler/call-rest.debug.wat +++ b/tests/compiler/call-rest.debug.wat @@ -2032,7 +2032,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2098,21 +2098,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2128,6 +2113,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/call-rest.release.wat b/tests/compiler/call-rest.release.wat index 418eed48ad..4edcb421af 100644 --- a/tests/compiler/call-rest.release.wat +++ b/tests/compiler/call-rest.release.wat @@ -185,7 +185,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -202,7 +202,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 @@ -1071,7 +1071,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$160 + block $__inlined_func$~lib/rt/itcms/Object#unlink$159 local.get $0 i32.load offset=4 i32.const -4 @@ -1095,7 +1095,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$160 + br $__inlined_func$~lib/rt/itcms/Object#unlink$159 end local.get $0 i32.load offset=8 @@ -2046,7 +2046,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store - block $__inlined_func$~lib/rt/itcms/__renew$154 + block $__inlined_func$~lib/rt/itcms/__renew$153 i32.const 1073741820 local.get $2 i32.const 1 @@ -2089,7 +2089,7 @@ i32.store offset=16 local.get $2 local.set $1 - br $__inlined_func$~lib/rt/itcms/__renew$154 + br $__inlined_func$~lib/rt/itcms/__renew$153 end local.get $3 local.get $4 diff --git a/tests/compiler/call-super.debug.wat b/tests/compiler/call-super.debug.wat index 9e413d5a8e..e4eac68dd0 100644 --- a/tests/compiler/call-super.debug.wat +++ b/tests/compiler/call-super.debug.wat @@ -2005,7 +2005,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2071,21 +2071,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2101,6 +2086,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/call-super.release.wat b/tests/compiler/call-super.release.wat index 003836b8dc..0889ebbf21 100644 --- a/tests/compiler/call-super.release.wat +++ b/tests/compiler/call-super.release.wat @@ -56,7 +56,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -73,7 +73,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 @@ -387,7 +387,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$158 + block $__inlined_func$~lib/rt/itcms/Object#unlink$157 local.get $1 i32.load offset=4 i32.const -4 @@ -411,7 +411,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$158 + br $__inlined_func$~lib/rt/itcms/Object#unlink$157 end local.get $1 i32.load offset=8 diff --git a/tests/compiler/class-implements.debug.wat b/tests/compiler/class-implements.debug.wat index a7eac9aaaf..dfba2022fd 100644 --- a/tests/compiler/class-implements.debug.wat +++ b/tests/compiler/class-implements.debug.wat @@ -2008,7 +2008,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2074,21 +2074,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2104,6 +2089,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/class-implements.release.wat b/tests/compiler/class-implements.release.wat index 54da044a10..15561a1529 100644 --- a/tests/compiler/class-implements.release.wat +++ b/tests/compiler/class-implements.release.wat @@ -63,7 +63,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -80,7 +80,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 @@ -435,7 +435,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$174 + block $__inlined_func$~lib/rt/itcms/Object#unlink$173 local.get $1 i32.load offset=4 i32.const -4 @@ -459,7 +459,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$174 + br $__inlined_func$~lib/rt/itcms/Object#unlink$173 end local.get $1 i32.load offset=8 @@ -2345,7 +2345,7 @@ global.get $class-implements/h local.tee $0 i32.store - block $__inlined_func$class-implements/I#foo@override$167 (result i32) + block $__inlined_func$class-implements/I#foo@override$166 (result i32) block $case3 block $case2 block $case1 @@ -2362,13 +2362,13 @@ unreachable end i32.const 4 - br $__inlined_func$class-implements/I#foo@override$167 + br $__inlined_func$class-implements/I#foo@override$166 end i32.const 1 - br $__inlined_func$class-implements/I#foo@override$167 + br $__inlined_func$class-implements/I#foo@override$166 end i32.const 2 - br $__inlined_func$class-implements/I#foo@override$167 + br $__inlined_func$class-implements/I#foo@override$166 end i32.const 3 end @@ -2414,7 +2414,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store - block $__inlined_func$class-implements/J#foo@override$169 (result i32) + block $__inlined_func$class-implements/J#foo@override$168 (result i32) block $case315 block $case216 block $case117 @@ -2433,10 +2433,10 @@ unreachable end i32.const 4 - br $__inlined_func$class-implements/J#foo@override$169 + br $__inlined_func$class-implements/J#foo@override$168 end i32.const 3 - br $__inlined_func$class-implements/J#foo@override$169 + br $__inlined_func$class-implements/J#foo@override$168 end i32.const 1 end diff --git a/tests/compiler/class-overloading-cast.debug.wat b/tests/compiler/class-overloading-cast.debug.wat index c108e6d09e..2e8d7a9d28 100644 --- a/tests/compiler/class-overloading-cast.debug.wat +++ b/tests/compiler/class-overloading-cast.debug.wat @@ -2014,7 +2014,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2080,21 +2080,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2110,6 +2095,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/class-overloading-cast.release.wat b/tests/compiler/class-overloading-cast.release.wat index a06c23f70d..efa9eb58dc 100644 --- a/tests/compiler/class-overloading-cast.release.wat +++ b/tests/compiler/class-overloading-cast.release.wat @@ -57,7 +57,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $1 loop $do-loop|0 @@ -74,7 +74,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $1 i32.const 0 @@ -316,7 +316,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$141 + block $__inlined_func$~lib/rt/itcms/Object#unlink$140 local.get $1 i32.load offset=4 i32.const -4 @@ -340,7 +340,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$141 + br $__inlined_func$~lib/rt/itcms/Object#unlink$140 end local.get $1 i32.load offset=8 @@ -543,7 +543,7 @@ end end end - block $__inlined_func$~lib/util/string/compareImpl$87 + block $__inlined_func$~lib/util/string/compareImpl$86 loop $while-continue|1 local.get $0 local.tee $3 @@ -563,7 +563,7 @@ local.get $4 local.get $5 i32.ne - br_if $__inlined_func$~lib/util/string/compareImpl$87 + br_if $__inlined_func$~lib/util/string/compareImpl$86 local.get $2 i32.const 2 i32.add @@ -1877,7 +1877,7 @@ local.tee $0 i32.store offset=4 global.get $~lib/memory/__stack_pointer - block $__inlined_func$class-overloading-cast/A#foo@override$136 (result i32) + block $__inlined_func$class-overloading-cast/A#foo@override$135 (result i32) block $default block $case1 local.get $0 @@ -1895,10 +1895,10 @@ br $default end i32.const 1488 - br $__inlined_func$class-overloading-cast/A#foo@override$136 + br $__inlined_func$class-overloading-cast/A#foo@override$135 end i32.const 1488 - br $__inlined_func$class-overloading-cast/A#foo@override$136 + br $__inlined_func$class-overloading-cast/A#foo@override$135 end i32.const 1456 end diff --git a/tests/compiler/class-overloading.debug.wat b/tests/compiler/class-overloading.debug.wat index 7cdea8bbb4..188c68ab4f 100644 --- a/tests/compiler/class-overloading.debug.wat +++ b/tests/compiler/class-overloading.debug.wat @@ -2018,7 +2018,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2084,21 +2084,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2114,6 +2099,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/class-overloading.release.wat b/tests/compiler/class-overloading.release.wat index 5552f940ac..6a402846b3 100644 --- a/tests/compiler/class-overloading.release.wat +++ b/tests/compiler/class-overloading.release.wat @@ -171,7 +171,7 @@ end end end - block $__inlined_func$~lib/util/string/compareImpl$95 + block $__inlined_func$~lib/util/string/compareImpl$94 loop $while-continue|1 local.get $0 local.tee $3 @@ -191,7 +191,7 @@ local.get $4 local.get $5 i32.ne - br_if $__inlined_func$~lib/util/string/compareImpl$95 + br_if $__inlined_func$~lib/util/string/compareImpl$94 local.get $2 i32.const 2 i32.add @@ -229,7 +229,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $1 loop $do-loop|0 @@ -246,7 +246,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $1 i32.const 0 @@ -488,7 +488,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$171 + block $__inlined_func$~lib/rt/itcms/Object#unlink$170 local.get $1 i32.load offset=4 i32.const -4 @@ -512,7 +512,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$171 + br $__inlined_func$~lib/rt/itcms/Object#unlink$170 end local.get $1 i32.load offset=8 @@ -2007,7 +2007,7 @@ global.get $class-overloading/a local.tee $0 i32.store - block $__inlined_func$class-overloading/A#b@override$153 + block $__inlined_func$class-overloading/A#b@override$152 block $default block $case2 block $case1 @@ -2022,15 +2022,15 @@ end i32.const 1520 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#b@override$153 + br $__inlined_func$class-overloading/A#b@override$152 end i32.const 1616 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#b@override$153 + br $__inlined_func$class-overloading/A#b@override$152 end i32.const 1648 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#b@override$153 + br $__inlined_func$class-overloading/A#b@override$152 end i32.const 1488 global.set $class-overloading/which @@ -2057,7 +2057,7 @@ global.get $class-overloading/a local.tee $0 i32.store - block $__inlined_func$class-overloading/A#get:c@override$154 + block $__inlined_func$class-overloading/A#get:c@override$153 block $default4 block $case25 block $case16 @@ -2072,15 +2072,15 @@ end i32.const 1520 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#get:c@override$154 + br $__inlined_func$class-overloading/A#get:c@override$153 end i32.const 1616 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#get:c@override$154 + br $__inlined_func$class-overloading/A#get:c@override$153 end i32.const 1648 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#get:c@override$154 + br $__inlined_func$class-overloading/A#get:c@override$153 end i32.const 1488 global.set $class-overloading/which @@ -2107,7 +2107,7 @@ global.get $class-overloading/a local.tee $0 i32.store - block $__inlined_func$class-overloading/A#b@override$155 + block $__inlined_func$class-overloading/A#b@override$154 block $default8 block $case29 block $case110 @@ -2122,15 +2122,15 @@ end i32.const 1520 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#b@override$155 + br $__inlined_func$class-overloading/A#b@override$154 end i32.const 1616 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#b@override$155 + br $__inlined_func$class-overloading/A#b@override$154 end i32.const 1648 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#b@override$155 + br $__inlined_func$class-overloading/A#b@override$154 end i32.const 1488 global.set $class-overloading/which @@ -2302,7 +2302,7 @@ global.get $class-overloading/a local.tee $0 i32.store - block $__inlined_func$class-overloading/A#b@override$157 + block $__inlined_func$class-overloading/A#b@override$156 block $default16 block $case217 block $case118 @@ -2317,15 +2317,15 @@ end i32.const 1520 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#b@override$157 + br $__inlined_func$class-overloading/A#b@override$156 end i32.const 1616 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#b@override$157 + br $__inlined_func$class-overloading/A#b@override$156 end i32.const 1648 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#b@override$157 + br $__inlined_func$class-overloading/A#b@override$156 end i32.const 1488 global.set $class-overloading/which @@ -2352,7 +2352,7 @@ global.get $class-overloading/a local.tee $0 i32.store - block $__inlined_func$class-overloading/A#get:c@override$158 + block $__inlined_func$class-overloading/A#get:c@override$157 block $default24 block $case225 block $case126 @@ -2367,15 +2367,15 @@ end i32.const 1520 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#get:c@override$158 + br $__inlined_func$class-overloading/A#get:c@override$157 end i32.const 1616 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#get:c@override$158 + br $__inlined_func$class-overloading/A#get:c@override$157 end i32.const 1648 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#get:c@override$158 + br $__inlined_func$class-overloading/A#get:c@override$157 end i32.const 1488 global.set $class-overloading/which @@ -2400,7 +2400,7 @@ global.get $class-overloading/a local.tee $0 i32.store - block $__inlined_func$class-overloading/A#b@override$159 + block $__inlined_func$class-overloading/A#b@override$158 block $default32 block $case233 block $case134 @@ -2415,15 +2415,15 @@ end i32.const 1520 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#b@override$159 + br $__inlined_func$class-overloading/A#b@override$158 end i32.const 1616 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#b@override$159 + br $__inlined_func$class-overloading/A#b@override$158 end i32.const 1648 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#b@override$159 + br $__inlined_func$class-overloading/A#b@override$158 end i32.const 1488 global.set $class-overloading/which @@ -2477,7 +2477,7 @@ global.get $class-overloading/a local.tee $0 i32.store - block $__inlined_func$class-overloading/A#b@override$160 + block $__inlined_func$class-overloading/A#b@override$159 block $default40 block $case241 block $case142 @@ -2492,15 +2492,15 @@ end i32.const 1520 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#b@override$160 + br $__inlined_func$class-overloading/A#b@override$159 end i32.const 1616 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#b@override$160 + br $__inlined_func$class-overloading/A#b@override$159 end i32.const 1648 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#b@override$160 + br $__inlined_func$class-overloading/A#b@override$159 end i32.const 1488 global.set $class-overloading/which @@ -2527,7 +2527,7 @@ global.get $class-overloading/a local.tee $0 i32.store - block $__inlined_func$class-overloading/A#get:c@override$161 + block $__inlined_func$class-overloading/A#get:c@override$160 block $default48 block $case249 block $case150 @@ -2542,15 +2542,15 @@ end i32.const 1520 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#get:c@override$161 + br $__inlined_func$class-overloading/A#get:c@override$160 end i32.const 1616 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#get:c@override$161 + br $__inlined_func$class-overloading/A#get:c@override$160 end i32.const 1648 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#get:c@override$161 + br $__inlined_func$class-overloading/A#get:c@override$160 end i32.const 1488 global.set $class-overloading/which @@ -2575,7 +2575,7 @@ global.get $class-overloading/a local.tee $0 i32.store - block $__inlined_func$class-overloading/A#b@override$162 + block $__inlined_func$class-overloading/A#b@override$161 block $default56 block $case257 block $case158 @@ -2590,15 +2590,15 @@ end i32.const 1520 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#b@override$162 + br $__inlined_func$class-overloading/A#b@override$161 end i32.const 1616 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#b@override$162 + br $__inlined_func$class-overloading/A#b@override$161 end i32.const 1648 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#b@override$162 + br $__inlined_func$class-overloading/A#b@override$161 end i32.const 1488 global.set $class-overloading/which @@ -2679,7 +2679,7 @@ global.get $class-overloading/a local.tee $0 i32.store - block $__inlined_func$class-overloading/A#b@override$164 + block $__inlined_func$class-overloading/A#b@override$163 block $default64 block $case265 block $case166 @@ -2694,15 +2694,15 @@ end i32.const 1520 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#b@override$164 + br $__inlined_func$class-overloading/A#b@override$163 end i32.const 1616 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#b@override$164 + br $__inlined_func$class-overloading/A#b@override$163 end i32.const 1648 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#b@override$164 + br $__inlined_func$class-overloading/A#b@override$163 end i32.const 1488 global.set $class-overloading/which @@ -2729,7 +2729,7 @@ global.get $class-overloading/a local.tee $0 i32.store - block $__inlined_func$class-overloading/A#get:c@override$165 + block $__inlined_func$class-overloading/A#get:c@override$164 block $default72 block $case273 block $case174 @@ -2744,15 +2744,15 @@ end i32.const 1520 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#get:c@override$165 + br $__inlined_func$class-overloading/A#get:c@override$164 end i32.const 1616 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#get:c@override$165 + br $__inlined_func$class-overloading/A#get:c@override$164 end i32.const 1648 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#get:c@override$165 + br $__inlined_func$class-overloading/A#get:c@override$164 end i32.const 1488 global.set $class-overloading/which @@ -2779,7 +2779,7 @@ global.get $class-overloading/a local.tee $0 i32.store - block $__inlined_func$class-overloading/A#b@override$166 + block $__inlined_func$class-overloading/A#b@override$165 block $default80 block $case281 block $case182 @@ -2794,15 +2794,15 @@ end i32.const 1520 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#b@override$166 + br $__inlined_func$class-overloading/A#b@override$165 end i32.const 1616 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#b@override$166 + br $__inlined_func$class-overloading/A#b@override$165 end i32.const 1648 global.set $class-overloading/which - br $__inlined_func$class-overloading/A#b@override$166 + br $__inlined_func$class-overloading/A#b@override$165 end i32.const 1488 global.set $class-overloading/which @@ -2859,7 +2859,7 @@ global.get $class-overloading/ia local.tee $0 i32.store - block $__inlined_func$class-overloading/IA#foo@override$168 + block $__inlined_func$class-overloading/IA#foo@override$167 block $case189 local.get $0 i32.const 8 @@ -2877,7 +2877,7 @@ end i32.const 1680 global.set $class-overloading/which - br $__inlined_func$class-overloading/IA#foo@override$168 + br $__inlined_func$class-overloading/IA#foo@override$167 end i32.const 1712 global.set $class-overloading/which @@ -2934,7 +2934,7 @@ global.get $class-overloading/ic local.tee $0 i32.store - block $__inlined_func$class-overloading/IA#foo@override$170 + block $__inlined_func$class-overloading/IA#foo@override$169 block $case192 local.get $0 i32.const 8 @@ -2952,7 +2952,7 @@ end i32.const 1680 global.set $class-overloading/which - br $__inlined_func$class-overloading/IA#foo@override$170 + br $__inlined_func$class-overloading/IA#foo@override$169 end i32.const 1712 global.set $class-overloading/which diff --git a/tests/compiler/class-override.debug.wat b/tests/compiler/class-override.debug.wat index 7ec0ffa3a3..3d77ec329c 100644 --- a/tests/compiler/class-override.debug.wat +++ b/tests/compiler/class-override.debug.wat @@ -2003,7 +2003,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2069,21 +2069,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2099,6 +2084,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/class-override.release.wat b/tests/compiler/class-override.release.wat index 470d06af94..f0a43e29f5 100644 --- a/tests/compiler/class-override.release.wat +++ b/tests/compiler/class-override.release.wat @@ -75,7 +75,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$120 + block $__inlined_func$~lib/rt/itcms/Object#unlink$119 local.get $1 i32.load offset=4 i32.const -4 @@ -99,7 +99,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$120 + br $__inlined_func$~lib/rt/itcms/Object#unlink$119 end local.get $1 i32.load offset=8 @@ -198,7 +198,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $1 loop $do-loop|0 @@ -215,7 +215,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $1 i32.const 0 @@ -1168,7 +1168,7 @@ global.get $class-override/x local.tee $1 i32.store - block $__inlined_func$class-override/A#f@override$126 + block $__inlined_func$class-override/A#f@override$125 block $default block $case1 block $case0 @@ -1184,7 +1184,7 @@ local.get $0 call $class-override/B#f local.set $0 - br $__inlined_func$class-override/A#f@override$126 + br $__inlined_func$class-override/A#f@override$125 end global.get $~lib/memory/__stack_pointer i32.const 4 @@ -1210,7 +1210,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$class-override/A#f@override$126 + br $__inlined_func$class-override/A#f@override$125 end local.get $0 i32.const 1 diff --git a/tests/compiler/class.debug.wat b/tests/compiler/class.debug.wat index c69e4d351d..81c561cc43 100644 --- a/tests/compiler/class.debug.wat +++ b/tests/compiler/class.debug.wat @@ -2086,7 +2086,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2152,21 +2152,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2182,6 +2167,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/class.release.wat b/tests/compiler/class.release.wat index 7a93b429d2..134d76b022 100644 --- a/tests/compiler/class.release.wat +++ b/tests/compiler/class.release.wat @@ -84,7 +84,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$71 + block $__inlined_func$~lib/rt/itcms/interrupt$70 i32.const 2048 local.set $2 loop $do-loop|0 @@ -101,7 +101,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$71 + br $__inlined_func$~lib/rt/itcms/interrupt$70 end local.get $2 i32.const 0 @@ -792,7 +792,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$139 + block $__inlined_func$~lib/rt/itcms/Object#unlink$138 local.get $0 i32.load offset=4 i32.const -4 @@ -816,7 +816,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$139 + br $__inlined_func$~lib/rt/itcms/Object#unlink$138 end local.get $0 i32.load offset=8 diff --git a/tests/compiler/compound-assignment-side-effect.debug.wat b/tests/compiler/compound-assignment-side-effect.debug.wat new file mode 100644 index 0000000000..52d69d79f6 --- /dev/null +++ b/tests/compiler/compound-assignment-side-effect.debug.wat @@ -0,0 +1,3738 @@ +(module + (type $0 (func (param i32) (result i32))) + (type $1 (func (param i32 i32))) + (type $2 (func (param i32))) + (type $3 (func)) + (type $4 (func (param i32 i32) (result i32))) + (type $5 (func (param i32 i32 i32))) + (type $6 (func (result i32))) + (type $7 (func (param i32 i32 i32 i32))) + (type $8 (func (param i32 i32 i64) (result i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/iter (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/toSpace (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) + (global $~lib/shared/runtime/Runtime.Stub i32 (i32.const 0)) + (global $~lib/shared/runtime/Runtime.Minimal i32 (i32.const 1)) + (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) + (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) + (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $compound-assignment-side-effect/box (mut i32) (i32.const 0)) + (global $compound-assignment-side-effect/boxCalls (mut i32) (i32.const 0)) + (global $compound-assignment-side-effect/arr (mut i32) (i32.const 464)) + (global $compound-assignment-side-effect/idxCalls (mut i32) (i32.const 0)) + (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/native/ASC_RUNTIME i32 (i32.const 2)) + (global $~lib/rt/__rtti_base i32 (i32.const 688)) + (global $~lib/memory/__data_end i32 (i32.const 716)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 33484)) + (global $~lib/memory/__heap_base i32 (i32.const 33484)) + (memory $0 1) + (data $0 (i32.const 12) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00") + (data $1 (i32.const 76) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $2 (i32.const 144) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $3 (i32.const 176) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $4 (i32.const 204) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e\00\00\00\00\00\00\00\00\00") + (data $5 (i32.const 268) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s\00\00\00\00\00\00\00\00\00") + (data $6 (i32.const 320) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $7 (i32.const 348) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $8 (i32.const 412) "\1c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\08\00\00\00\01\00\00\00\02\00\00\00\00\00\00\00") + (data $9 (i32.const 444) ",\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00\10\00\00\00\b0\01\00\00\b0\01\00\00\08\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $10 (i32.const 492) "\\\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00D\00\00\00c\00o\00m\00p\00o\00u\00n\00d\00-\00a\00s\00s\00i\00g\00n\00m\00e\00n\00t\00-\00s\00i\00d\00e\00-\00e\00f\00f\00e\00c\00t\00.\00t\00s\00\00\00\00\00\00\00\00\00") + (data $11 (i32.const 588) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00\00\00") + (data $12 (i32.const 636) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h\00") + (data $13 (i32.const 688) "\06\00\00\00 \00\00\00 \00\00\00 \00\00\00\00\00\00\00 \00\00\00\02\t\00\00") + (table $0 1 1 funcref) + (elem $0 (i32.const 1)) + (export "memory" (memory $0)) + (start $~start) + (func $~lib/rt/itcms/Object#set:nextWithColor (param $this i32) (param $nextWithColor i32) + local.get $this + local.get $nextWithColor + i32.store offset=4 + ) + (func $~lib/rt/itcms/Object#set:prev (param $this i32) (param $prev i32) + local.get $this + local.get $prev + i32.store offset=8 + ) + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space + call $~lib/rt/itcms/Object#set:nextWithColor + local.get $space + local.get $space + call $~lib/rt/itcms/Object#set:prev + local.get $space + return + ) + (func $~lib/rt/itcms/Object#get:nextWithColor (param $this i32) (result i32) + local.get $this + i32.load offset=4 + ) + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this + call $~lib/rt/itcms/Object#get:nextWithColor + i32.const 3 + i32.const -1 + i32.xor + i32.and + return + ) + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this + call $~lib/rt/itcms/Object#get:nextWithColor + i32.const 3 + i32.and + return + ) + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + local.get $cookie + call $~lib/rt/__visit_globals + global.get $~lib/rt/itcms/pinSpace + local.set $pn + local.get $pn + call $~lib/rt/itcms/Object#get:next + local.set $iter + loop $while-continue|0 + local.get $iter + local.get $pn + i32.ne + if + i32.const 1 + drop + local.get $iter + call $~lib/rt/itcms/Object#get:color + i32.const 3 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 96 + i32.const 160 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.get $iter + i32.const 20 + i32.add + local.get $cookie + call $~lib/rt/__visit_members + local.get $iter + call $~lib/rt/itcms/Object#get:next + local.set $iter + br $while-continue|0 + end + end + ) + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this + call $~lib/rt/itcms/Object#get:nextWithColor + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $color + i32.or + call $~lib/rt/itcms/Object#set:nextWithColor + ) + (func $~lib/rt/itcms/Object#get:prev (param $this i32) (result i32) + local.get $this + i32.load offset=8 + ) + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this + call $~lib/rt/itcms/Object#get:nextWithColor + i32.const 3 + i32.and + i32.or + call $~lib/rt/itcms/Object#set:nextWithColor + ) + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this + call $~lib/rt/itcms/Object#get:next + local.set $next + local.get $next + i32.const 0 + i32.eq + if + i32.const 1 + drop + local.get $this + call $~lib/rt/itcms/Object#get:prev + i32.const 0 + i32.eq + if (result i32) + local.get $this + global.get $~lib/memory/__heap_base + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 96 + i32.const 128 + i32.const 18 + call $~lib/builtins/abort + unreachable + end + return + end + local.get $this + call $~lib/rt/itcms/Object#get:prev + local.set $prev + i32.const 1 + drop + local.get $prev + i32.eqz + if + i32.const 0 + i32.const 96 + i32.const 132 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.get $next + local.get $prev + call $~lib/rt/itcms/Object#set:prev + local.get $prev + local.get $next + call $~lib/rt/itcms/Object#set:next + ) + (func $~lib/rt/itcms/Object#get:rtId (param $this i32) (result i32) + local.get $this + i32.load offset=12 + ) + (func $~lib/shared/typeinfo/Typeinfo#get:flags (param $this i32) (result i32) + local.get $this + i32.load + ) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) + global.get $~lib/rt/__rtti_base + local.set $ptr + local.get $id + local.get $ptr + i32.load + i32.gt_u + if + i32.const 224 + i32.const 288 + i32.const 21 + i32.const 28 + call $~lib/builtins/abort + unreachable + end + local.get $ptr + i32.const 4 + i32.add + local.get $id + i32.const 4 + i32.mul + i32.add + call $~lib/shared/typeinfo/Typeinfo#get:flags + return + ) + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this + call $~lib/rt/itcms/Object#get:rtId + local.set $rtId + local.get $rtId + i32.const 2 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $rtId + call $~lib/rt/__typeinfo + i32.const 32 + i32.and + i32.const 0 + i32.ne + end + return + ) + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list + call $~lib/rt/itcms/Object#get:prev + local.set $prev + local.get $this + local.get $list + local.get $withColor + i32.or + call $~lib/rt/itcms/Object#set:nextWithColor + local.get $this + local.get $prev + call $~lib/rt/itcms/Object#set:prev + local.get $prev + local.get $this + call $~lib/rt/itcms/Object#set:next + local.get $list + local.get $this + call $~lib/rt/itcms/Object#set:prev + ) + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $1 i32) + local.get $this + global.get $~lib/rt/itcms/iter + i32.eq + if + local.get $this + call $~lib/rt/itcms/Object#get:prev + local.tee $1 + i32.eqz + if (result i32) + i32.const 0 + i32.const 96 + i32.const 148 + i32.const 30 + call $~lib/builtins/abort + unreachable + else + local.get $1 + end + global.set $~lib/rt/itcms/iter + end + local.get $this + call $~lib/rt/itcms/Object#unlink + local.get $this + global.get $~lib/rt/itcms/toSpace + local.get $this + call $~lib/rt/itcms/Object#get:isPointerfree + if (result i32) + global.get $~lib/rt/itcms/white + i32.eqz + else + i32.const 2 + end + call $~lib/rt/itcms/Object#linkTo + ) + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr + i32.eqz + if + return + end + local.get $ptr + i32.const 20 + i32.sub + local.set $obj + i32.const 0 + drop + local.get $obj + call $~lib/rt/itcms/Object#get:color + global.get $~lib/rt/itcms/white + i32.eq + if + local.get $obj + call $~lib/rt/itcms/Object#makeGray + global.get $~lib/rt/itcms/visitCount + i32.const 1 + i32.add + global.set $~lib/rt/itcms/visitCount + end + ) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + global.get $~lib/memory/__stack_pointer + local.set $ptr + loop $while-continue|0 + local.get $ptr + global.get $~lib/memory/__heap_base + i32.lt_u + if + local.get $ptr + i32.load + local.get $cookie + call $~lib/rt/itcms/__visit + local.get $ptr + i32.const 4 + i32.add + local.set $ptr + br $while-continue|0 + end + end + ) + (func $~lib/rt/common/BLOCK#get:mmInfo (param $this i32) (result i32) + local.get $this + i32.load + ) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) + i32.const 4 + local.get $this + call $~lib/rt/common/BLOCK#get:mmInfo + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + return + ) + (func $~lib/rt/tlsf/Root#set:flMap (param $this i32) (param $flMap i32) + local.get $this + local.get $flMap + i32.store + ) + (func $~lib/rt/common/BLOCK#set:mmInfo (param $this i32) (param $mmInfo i32) + local.get $this + local.get $mmInfo + i32.store + ) + (func $~lib/rt/tlsf/Block#set:prev (param $this i32) (param $prev i32) + local.get $this + local.get $prev + i32.store offset=4 + ) + (func $~lib/rt/tlsf/Block#set:next (param $this i32) (param $next i32) + local.get $this + local.get $next + i32.store offset=8 + ) + (func $~lib/rt/tlsf/Block#get:prev (param $this i32) (result i32) + local.get $this + i32.load offset=4 + ) + (func $~lib/rt/tlsf/Block#get:next (param $this i32) (result i32) + local.get $this + i32.load offset=8 + ) + (func $~lib/rt/tlsf/Root#get:flMap (param $this i32) (result i32) + local.get $this + i32.load + ) + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $6 i32) + (local $7 i32) + (local $boundedSize i32) + (local $prev i32) + (local $next i32) + (local $root|11 i32) + (local $fl|12 i32) + (local $sl|13 i32) + (local $root|14 i32) + (local $fl|15 i32) + (local $sl|16 i32) + (local $head i32) + (local $root|18 i32) + (local $fl|19 i32) + (local $slMap i32) + (local $root|21 i32) + (local $fl|22 i32) + (local $slMap|23 i32) + local.get $block + call $~lib/rt/common/BLOCK#get:mmInfo + local.set $blockInfo + i32.const 1 + drop + local.get $blockInfo + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 268 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $blockInfo + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.set $size + i32.const 1 + drop + local.get $size + i32.const 12 + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 270 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $size + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $fl + local.get $size + i32.const 4 + i32.shr_u + local.set $sl + else + local.get $size + local.tee $6 + i32.const 1073741820 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_u + select + local.set $boundedSize + i32.const 31 + local.get $boundedSize + i32.clz + i32.sub + local.set $fl + local.get $boundedSize + local.get $fl + i32.const 4 + i32.sub + i32.shr_u + i32.const 1 + i32.const 4 + i32.shl + i32.xor + local.set $sl + local.get $fl + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $fl + end + i32.const 1 + drop + local.get $fl + i32.const 23 + i32.lt_u + if (result i32) + local.get $sl + i32.const 16 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 284 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $block + call $~lib/rt/tlsf/Block#get:prev + local.set $prev + local.get $block + call $~lib/rt/tlsf/Block#get:next + local.set $next + local.get $prev + if + local.get $prev + local.get $next + call $~lib/rt/tlsf/Block#set:next + end + local.get $next + if + local.get $next + local.get $prev + call $~lib/rt/tlsf/Block#set:prev + end + local.get $block + block $~lib/rt/tlsf/GETHEAD|inlined.0 (result i32) + local.get $root + local.set $root|11 + local.get $fl + local.set $fl|12 + local.get $sl + local.set $sl|13 + local.get $root|11 + local.get $fl|12 + i32.const 4 + i32.shl + local.get $sl|13 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + br $~lib/rt/tlsf/GETHEAD|inlined.0 + end + i32.eq + if + local.get $root + local.set $root|14 + local.get $fl + local.set $fl|15 + local.get $sl + local.set $sl|16 + local.get $next + local.set $head + local.get $root|14 + local.get $fl|15 + i32.const 4 + i32.shl + local.get $sl|16 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $head + i32.store offset=96 + local.get $next + i32.eqz + if + block $~lib/rt/tlsf/GETSL|inlined.0 (result i32) + local.get $root + local.set $root|18 + local.get $fl + local.set $fl|19 + local.get $root|18 + local.get $fl|19 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + br $~lib/rt/tlsf/GETSL|inlined.0 + end + local.set $slMap + local.get $root + local.set $root|21 + local.get $fl + local.set $fl|22 + local.get $slMap + i32.const 1 + local.get $sl + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $slMap + local.set $slMap|23 + local.get $root|21 + local.get $fl|22 + i32.const 2 + i32.shl + i32.add + local.get $slMap|23 + i32.store offset=4 + local.get $slMap + i32.eqz + if + local.get $root + local.get $root + call $~lib/rt/tlsf/Root#get:flMap + i32.const 1 + local.get $fl + i32.shl + i32.const -1 + i32.xor + i32.and + call $~lib/rt/tlsf/Root#set:flMap + end + end + end + ) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $block|3 i32) + (local $right i32) + (local $rightInfo i32) + (local $block|6 i32) + (local $block|7 i32) + (local $left i32) + (local $leftInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $13 i32) + (local $14 i32) + (local $boundedSize i32) + (local $root|16 i32) + (local $fl|17 i32) + (local $sl|18 i32) + (local $head i32) + (local $root|20 i32) + (local $fl|21 i32) + (local $sl|22 i32) + (local $head|23 i32) + (local $root|24 i32) + (local $fl|25 i32) + (local $root|26 i32) + (local $fl|27 i32) + (local $slMap i32) + i32.const 1 + drop + local.get $block + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 201 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $block + call $~lib/rt/common/BLOCK#get:mmInfo + local.set $blockInfo + i32.const 1 + drop + local.get $blockInfo + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 203 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + block $~lib/rt/tlsf/GETRIGHT|inlined.0 (result i32) + local.get $block + local.set $block|3 + local.get $block|3 + i32.const 4 + i32.add + local.get $block|3 + call $~lib/rt/common/BLOCK#get:mmInfo + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + br $~lib/rt/tlsf/GETRIGHT|inlined.0 + end + local.set $right + local.get $right + call $~lib/rt/common/BLOCK#get:mmInfo + local.set $rightInfo + local.get $rightInfo + i32.const 1 + i32.and + if + local.get $root + local.get $right + call $~lib/rt/tlsf/removeBlock + local.get $block + local.get $blockInfo + i32.const 4 + i32.add + local.get $rightInfo + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + local.tee $blockInfo + call $~lib/rt/common/BLOCK#set:mmInfo + block $~lib/rt/tlsf/GETRIGHT|inlined.1 (result i32) + local.get $block + local.set $block|6 + local.get $block|6 + i32.const 4 + i32.add + local.get $block|6 + call $~lib/rt/common/BLOCK#get:mmInfo + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + br $~lib/rt/tlsf/GETRIGHT|inlined.1 + end + local.set $right + local.get $right + call $~lib/rt/common/BLOCK#get:mmInfo + local.set $rightInfo + end + local.get $blockInfo + i32.const 2 + i32.and + if + block $~lib/rt/tlsf/GETFREELEFT|inlined.0 (result i32) + local.get $block + local.set $block|7 + local.get $block|7 + i32.const 4 + i32.sub + i32.load + br $~lib/rt/tlsf/GETFREELEFT|inlined.0 + end + local.set $left + local.get $left + call $~lib/rt/common/BLOCK#get:mmInfo + local.set $leftInfo + i32.const 1 + drop + local.get $leftInfo + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 221 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.get $root + local.get $left + call $~lib/rt/tlsf/removeBlock + local.get $left + local.set $block + local.get $block + local.get $leftInfo + i32.const 4 + i32.add + local.get $blockInfo + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + local.tee $blockInfo + call $~lib/rt/common/BLOCK#set:mmInfo + end + local.get $right + local.get $rightInfo + i32.const 2 + i32.or + call $~lib/rt/common/BLOCK#set:mmInfo + local.get $blockInfo + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.set $size + i32.const 1 + drop + local.get $size + i32.const 12 + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 233 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + drop + local.get $block + i32.const 4 + i32.add + local.get $size + i32.add + local.get $right + i32.eq + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 234 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $right + i32.const 4 + i32.sub + local.get $block + i32.store + local.get $size + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $fl + local.get $size + i32.const 4 + i32.shr_u + local.set $sl + else + local.get $size + local.tee $13 + i32.const 1073741820 + local.tee $14 + local.get $13 + local.get $14 + i32.lt_u + select + local.set $boundedSize + i32.const 31 + local.get $boundedSize + i32.clz + i32.sub + local.set $fl + local.get $boundedSize + local.get $fl + i32.const 4 + i32.sub + i32.shr_u + i32.const 1 + i32.const 4 + i32.shl + i32.xor + local.set $sl + local.get $fl + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $fl + end + i32.const 1 + drop + local.get $fl + i32.const 23 + i32.lt_u + if (result i32) + local.get $sl + i32.const 16 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 251 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + block $~lib/rt/tlsf/GETHEAD|inlined.1 (result i32) + local.get $root + local.set $root|16 + local.get $fl + local.set $fl|17 + local.get $sl + local.set $sl|18 + local.get $root|16 + local.get $fl|17 + i32.const 4 + i32.shl + local.get $sl|18 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + br $~lib/rt/tlsf/GETHEAD|inlined.1 + end + local.set $head + local.get $block + i32.const 0 + call $~lib/rt/tlsf/Block#set:prev + local.get $block + local.get $head + call $~lib/rt/tlsf/Block#set:next + local.get $head + if + local.get $head + local.get $block + call $~lib/rt/tlsf/Block#set:prev + end + local.get $root + local.set $root|20 + local.get $fl + local.set $fl|21 + local.get $sl + local.set $sl|22 + local.get $block + local.set $head|23 + local.get $root|20 + local.get $fl|21 + i32.const 4 + i32.shl + local.get $sl|22 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $head|23 + i32.store offset=96 + local.get $root + local.get $root + call $~lib/rt/tlsf/Root#get:flMap + i32.const 1 + local.get $fl + i32.shl + i32.or + call $~lib/rt/tlsf/Root#set:flMap + local.get $root + local.set $root|26 + local.get $fl + local.set $fl|27 + block $~lib/rt/tlsf/GETSL|inlined.1 (result i32) + local.get $root + local.set $root|24 + local.get $fl + local.set $fl|25 + local.get $root|24 + local.get $fl|25 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + br $~lib/rt/tlsf/GETSL|inlined.1 + end + i32.const 1 + local.get $sl + i32.shl + i32.or + local.set $slMap + local.get $root|26 + local.get $fl|27 + i32.const 2 + i32.shl + i32.add + local.get $slMap + i32.store offset=4 + ) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $endU64 i64) (result i32) + (local $end i32) + (local $root|4 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $root|10 i32) + (local $tail|11 i32) + local.get $endU64 + i32.wrap_i64 + local.set $end + i32.const 1 + drop + local.get $start + i64.extend_i32_u + local.get $endU64 + i64.le_u + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 382 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $start + i32.const 4 + i32.add + i32.const 15 + i32.add + i32.const 15 + i32.const -1 + i32.xor + i32.and + i32.const 4 + i32.sub + local.set $start + local.get $end + i32.const 15 + i32.const -1 + i32.xor + i32.and + local.set $end + block $~lib/rt/tlsf/GETTAIL|inlined.0 (result i32) + local.get $root + local.set $root|4 + local.get $root|4 + i32.load offset=1568 + br $~lib/rt/tlsf/GETTAIL|inlined.0 + end + local.set $tail + i32.const 0 + local.set $tailInfo + local.get $tail + if + i32.const 1 + drop + local.get $start + local.get $tail + i32.const 4 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 389 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.get $start + i32.const 16 + i32.sub + local.get $tail + i32.eq + if + local.get $start + i32.const 16 + i32.sub + local.set $start + local.get $tail + call $~lib/rt/common/BLOCK#get:mmInfo + local.set $tailInfo + else + end + else + i32.const 1 + drop + local.get $start + local.get $root + i32.const 1572 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 402 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + end + local.get $end + local.get $start + i32.sub + local.set $size + local.get $size + i32.const 4 + i32.const 12 + i32.add + i32.const 4 + i32.add + i32.lt_u + if + i32.const 0 + return + end + local.get $size + i32.const 2 + i32.const 4 + i32.mul + i32.sub + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize + i32.const 1 + i32.or + local.get $tailInfo + i32.const 2 + i32.and + i32.or + call $~lib/rt/common/BLOCK#set:mmInfo + local.get $left + i32.const 0 + call $~lib/rt/tlsf/Block#set:prev + local.get $left + i32.const 0 + call $~lib/rt/tlsf/Block#set:next + local.get $start + i32.const 4 + i32.add + local.get $leftSize + i32.add + local.set $tail + local.get $tail + i32.const 0 + i32.const 2 + i32.or + call $~lib/rt/common/BLOCK#set:mmInfo + local.get $root + local.set $root|10 + local.get $tail + local.set $tail|11 + local.get $root|10 + local.get $tail|11 + i32.store offset=1568 + local.get $root + local.get $left + call $~lib/rt/tlsf/insertBlock + i32.const 1 + return + ) + (func $~lib/rt/tlsf/initialize + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $root|4 i32) + (local $tail i32) + (local $fl i32) + (local $root|7 i32) + (local $fl|8 i32) + (local $slMap i32) + (local $sl i32) + (local $root|11 i32) + (local $fl|12 i32) + (local $sl|13 i32) + (local $head i32) + (local $memStart i32) + i32.const 0 + drop + global.get $~lib/memory/__heap_base + i32.const 15 + i32.add + i32.const 15 + i32.const -1 + i32.xor + i32.and + local.set $rootOffset + memory.size + local.set $pagesBefore + local.get $rootOffset + i32.const 1572 + i32.add + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore + i32.gt_s + if (result i32) + local.get $pagesNeeded + local.get $pagesBefore + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + local.get $rootOffset + local.set $root + local.get $root + i32.const 0 + call $~lib/rt/tlsf/Root#set:flMap + local.get $root + local.set $root|4 + i32.const 0 + local.set $tail + local.get $root|4 + local.get $tail + i32.store offset=1568 + i32.const 0 + local.set $fl + loop $for-loop|0 + local.get $fl + i32.const 23 + i32.lt_u + if + local.get $root + local.set $root|7 + local.get $fl + local.set $fl|8 + i32.const 0 + local.set $slMap + local.get $root|7 + local.get $fl|8 + i32.const 2 + i32.shl + i32.add + local.get $slMap + i32.store offset=4 + i32.const 0 + local.set $sl + loop $for-loop|1 + local.get $sl + i32.const 16 + i32.lt_u + if + local.get $root + local.set $root|11 + local.get $fl + local.set $fl|12 + local.get $sl + local.set $sl|13 + i32.const 0 + local.set $head + local.get $root|11 + local.get $fl|12 + i32.const 4 + i32.shl + local.get $sl|13 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $head + i32.store offset=96 + local.get $sl + i32.const 1 + i32.add + local.set $sl + br $for-loop|1 + end + end + local.get $fl + i32.const 1 + i32.add + local.set $fl + br $for-loop|0 + end + end + local.get $rootOffset + i32.const 1572 + i32.add + local.set $memStart + i32.const 0 + drop + local.get $root + local.get $memStart + memory.size + i64.extend_i32_s + i64.const 16 + i64.shl + call $~lib/rt/tlsf/addMemory + drop + local.get $root + global.set $~lib/rt/tlsf/ROOT + ) + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr + i32.const 4 + i32.sub + local.set $block + local.get $ptr + i32.const 0 + i32.ne + if (result i32) + local.get $ptr + i32.const 15 + i32.and + i32.eqz + else + i32.const 0 + end + if (result i32) + local.get $block + call $~lib/rt/common/BLOCK#get:mmInfo + i32.const 1 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 562 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $block + return + ) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) + i32.const 0 + drop + local.get $block + local.get $block + call $~lib/rt/common/BLOCK#get:mmInfo + i32.const 1 + i32.or + call $~lib/rt/common/BLOCK#set:mmInfo + local.get $root + local.get $block + call $~lib/rt/tlsf/insertBlock + ) + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr + global.get $~lib/memory/__heap_base + i32.lt_u + if + return + end + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + local.get $ptr + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock + ) + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj + global.get $~lib/memory/__heap_base + i32.lt_u + if + local.get $obj + i32.const 0 + call $~lib/rt/itcms/Object#set:nextWithColor + local.get $obj + i32.const 0 + call $~lib/rt/itcms/Object#set:prev + else + global.get $~lib/rt/itcms/total + local.get $obj + call $~lib/rt/itcms/Object#get:size + i32.sub + global.set $~lib/rt/itcms/total + i32.const 0 + drop + local.get $obj + i32.const 4 + i32.add + call $~lib/rt/tlsf/__free + end + ) + (func $~lib/rt/itcms/step (result i32) + (local $obj i32) + (local $1 i32) + (local $black i32) + (local $from i32) + block $break|0 + block $case2|0 + block $case1|0 + block $case0|0 + global.get $~lib/rt/itcms/state + local.set $1 + local.get $1 + i32.const 0 + i32.eq + br_if $case0|0 + local.get $1 + i32.const 1 + i32.eq + br_if $case1|0 + local.get $1 + i32.const 2 + i32.eq + br_if $case2|0 + br $break|0 + end + i32.const 1 + global.set $~lib/rt/itcms/state + i32.const 0 + global.set $~lib/rt/itcms/visitCount + i32.const 0 + call $~lib/rt/itcms/visitRoots + global.get $~lib/rt/itcms/toSpace + global.set $~lib/rt/itcms/iter + global.get $~lib/rt/itcms/visitCount + i32.const 1 + i32.mul + return + end + global.get $~lib/rt/itcms/white + i32.eqz + local.set $black + global.get $~lib/rt/itcms/iter + call $~lib/rt/itcms/Object#get:next + local.set $obj + loop $while-continue|1 + local.get $obj + global.get $~lib/rt/itcms/toSpace + i32.ne + if + local.get $obj + global.set $~lib/rt/itcms/iter + local.get $obj + call $~lib/rt/itcms/Object#get:color + local.get $black + i32.ne + if + local.get $obj + local.get $black + call $~lib/rt/itcms/Object#set:color + i32.const 0 + global.set $~lib/rt/itcms/visitCount + local.get $obj + i32.const 20 + i32.add + i32.const 0 + call $~lib/rt/__visit_members + global.get $~lib/rt/itcms/visitCount + i32.const 1 + i32.mul + return + end + local.get $obj + call $~lib/rt/itcms/Object#get:next + local.set $obj + br $while-continue|1 + end + end + i32.const 0 + global.set $~lib/rt/itcms/visitCount + i32.const 0 + call $~lib/rt/itcms/visitRoots + global.get $~lib/rt/itcms/iter + call $~lib/rt/itcms/Object#get:next + local.set $obj + local.get $obj + global.get $~lib/rt/itcms/toSpace + i32.eq + if + i32.const 0 + call $~lib/rt/itcms/visitStack + global.get $~lib/rt/itcms/iter + call $~lib/rt/itcms/Object#get:next + local.set $obj + loop $while-continue|2 + local.get $obj + global.get $~lib/rt/itcms/toSpace + i32.ne + if + local.get $obj + call $~lib/rt/itcms/Object#get:color + local.get $black + i32.ne + if + local.get $obj + local.get $black + call $~lib/rt/itcms/Object#set:color + local.get $obj + i32.const 20 + i32.add + i32.const 0 + call $~lib/rt/__visit_members + end + local.get $obj + call $~lib/rt/itcms/Object#get:next + local.set $obj + br $while-continue|2 + end + end + global.get $~lib/rt/itcms/fromSpace + local.set $from + global.get $~lib/rt/itcms/toSpace + global.set $~lib/rt/itcms/fromSpace + local.get $from + global.set $~lib/rt/itcms/toSpace + local.get $black + global.set $~lib/rt/itcms/white + local.get $from + call $~lib/rt/itcms/Object#get:next + global.set $~lib/rt/itcms/iter + i32.const 2 + global.set $~lib/rt/itcms/state + end + global.get $~lib/rt/itcms/visitCount + i32.const 1 + i32.mul + return + end + global.get $~lib/rt/itcms/iter + local.set $obj + local.get $obj + global.get $~lib/rt/itcms/toSpace + i32.ne + if + local.get $obj + call $~lib/rt/itcms/Object#get:next + global.set $~lib/rt/itcms/iter + i32.const 1 + drop + local.get $obj + call $~lib/rt/itcms/Object#get:color + global.get $~lib/rt/itcms/white + i32.eqz + i32.eq + i32.eqz + if + i32.const 0 + i32.const 96 + i32.const 229 + i32.const 20 + call $~lib/builtins/abort + unreachable + end + local.get $obj + call $~lib/rt/itcms/free + i32.const 10 + return + end + global.get $~lib/rt/itcms/toSpace + global.get $~lib/rt/itcms/toSpace + call $~lib/rt/itcms/Object#set:nextWithColor + global.get $~lib/rt/itcms/toSpace + global.get $~lib/rt/itcms/toSpace + call $~lib/rt/itcms/Object#set:prev + i32.const 0 + global.set $~lib/rt/itcms/state + br $break|0 + end + i32.const 0 + return + ) + (func $~lib/rt/itcms/interrupt + (local $budget i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1024 + i32.const 200 + i32.mul + i32.const 100 + i32.div_u + local.set $budget + loop $do-loop|0 + local.get $budget + call $~lib/rt/itcms/step + i32.sub + local.set $budget + global.get $~lib/rt/itcms/state + i32.const 0 + i32.eq + if + i32.const 0 + drop + i32.const 200 + i32.const 100 + i32.rem_u + i32.const 0 + i32.eq + drop + global.get $~lib/rt/itcms/total + i32.const 200 + i32.const 100 + i32.div_u + i32.mul + i32.const 1024 + i32.add + global.set $~lib/rt/itcms/threshold + i32.const 0 + drop + return + end + local.get $budget + i32.const 0 + i32.gt_s + br_if $do-loop|0 + end + i32.const 0 + drop + global.get $~lib/rt/itcms/total + i32.const 1024 + global.get $~lib/rt/itcms/total + global.get $~lib/rt/itcms/threshold + i32.sub + i32.const 1024 + i32.lt_u + i32.mul + i32.add + global.set $~lib/rt/itcms/threshold + i32.const 0 + drop + ) + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size + i32.const 12 + i32.le_u + if (result i32) + i32.const 12 + else + local.get $size + i32.const 4 + i32.add + i32.const 15 + i32.add + i32.const 15 + i32.const -1 + i32.xor + i32.and + i32.const 4 + i32.sub + end + return + ) + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size + i32.const 1073741820 + i32.gt_u + if + i32.const 32 + i32.const 368 + i32.const 461 + i32.const 29 + call $~lib/builtins/abort + unreachable + end + local.get $size + call $~lib/rt/tlsf/computeSize + return + ) + (func $~lib/rt/tlsf/roundSize (param $size i32) (result i32) + local.get $size + i32.const 536870910 + i32.lt_u + if (result i32) + local.get $size + i32.const 1 + i32.const 27 + local.get $size + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + else + local.get $size + end + return + ) + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $requestSize i32) + (local $root|5 i32) + (local $fl|6 i32) + (local $slMap i32) + (local $head i32) + (local $flMap i32) + (local $root|10 i32) + (local $fl|11 i32) + (local $root|12 i32) + (local $fl|13 i32) + (local $sl|14 i32) + (local $root|15 i32) + (local $fl|16 i32) + (local $sl|17 i32) + local.get $size + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $fl + local.get $size + i32.const 4 + i32.shr_u + local.set $sl + else + local.get $size + call $~lib/rt/tlsf/roundSize + local.set $requestSize + i32.const 4 + i32.const 8 + i32.mul + i32.const 1 + i32.sub + local.get $requestSize + i32.clz + i32.sub + local.set $fl + local.get $requestSize + local.get $fl + i32.const 4 + i32.sub + i32.shr_u + i32.const 1 + i32.const 4 + i32.shl + i32.xor + local.set $sl + local.get $fl + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $fl + end + i32.const 1 + drop + local.get $fl + i32.const 23 + i32.lt_u + if (result i32) + local.get $sl + i32.const 16 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 334 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + block $~lib/rt/tlsf/GETSL|inlined.2 (result i32) + local.get $root + local.set $root|5 + local.get $fl + local.set $fl|6 + local.get $root|5 + local.get $fl|6 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + br $~lib/rt/tlsf/GETSL|inlined.2 + end + i32.const 0 + i32.const -1 + i32.xor + local.get $sl + i32.shl + i32.and + local.set $slMap + i32.const 0 + local.set $head + local.get $slMap + i32.eqz + if + local.get $root + call $~lib/rt/tlsf/Root#get:flMap + i32.const 0 + i32.const -1 + i32.xor + local.get $fl + i32.const 1 + i32.add + i32.shl + i32.and + local.set $flMap + local.get $flMap + i32.eqz + if + i32.const 0 + local.set $head + else + local.get $flMap + i32.ctz + local.set $fl + block $~lib/rt/tlsf/GETSL|inlined.3 (result i32) + local.get $root + local.set $root|10 + local.get $fl + local.set $fl|11 + local.get $root|10 + local.get $fl|11 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + br $~lib/rt/tlsf/GETSL|inlined.3 + end + local.set $slMap + i32.const 1 + drop + local.get $slMap + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 347 + i32.const 18 + call $~lib/builtins/abort + unreachable + end + block $~lib/rt/tlsf/GETHEAD|inlined.2 (result i32) + local.get $root + local.set $root|12 + local.get $fl + local.set $fl|13 + local.get $slMap + i32.ctz + local.set $sl|14 + local.get $root|12 + local.get $fl|13 + i32.const 4 + i32.shl + local.get $sl|14 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + br $~lib/rt/tlsf/GETHEAD|inlined.2 + end + local.set $head + end + else + block $~lib/rt/tlsf/GETHEAD|inlined.3 (result i32) + local.get $root + local.set $root|15 + local.get $fl + local.set $fl|16 + local.get $slMap + i32.ctz + local.set $sl|17 + local.get $root|15 + local.get $fl|16 + i32.const 4 + i32.shl + local.get $sl|17 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + br $~lib/rt/tlsf/GETHEAD|inlined.3 + end + local.set $head + end + local.get $head + return + ) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $root|3 i32) + (local $pagesNeeded i32) + (local $5 i32) + (local $6 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) + i32.const 0 + drop + local.get $size + i32.const 256 + i32.ge_u + if + local.get $size + call $~lib/rt/tlsf/roundSize + local.set $size + end + memory.size + local.set $pagesBefore + local.get $size + i32.const 4 + local.get $pagesBefore + i32.const 16 + i32.shl + i32.const 4 + i32.sub + block $~lib/rt/tlsf/GETTAIL|inlined.1 (result i32) + local.get $root + local.set $root|3 + local.get $root|3 + i32.load offset=1568 + br $~lib/rt/tlsf/GETTAIL|inlined.1 + end + i32.ne + i32.shl + i32.add + local.set $size + local.get $size + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $pagesNeeded + local.get $pagesBefore + local.tee $5 + local.get $pagesNeeded + local.tee $6 + local.get $5 + local.get $6 + i32.gt_s + select + local.set $pagesWanted + local.get $pagesWanted + memory.grow + i32.const 0 + i32.lt_s + if + local.get $pagesNeeded + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + memory.size + local.set $pagesAfter + local.get $root + local.get $pagesBefore + i32.const 16 + i32.shl + local.get $pagesAfter + i64.extend_i32_s + i64.const 16 + i64.shl + call $~lib/rt/tlsf/addMemory + drop + ) + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $spare i32) + (local $block|6 i32) + (local $7 i32) + local.get $block + call $~lib/rt/common/BLOCK#get:mmInfo + local.set $blockInfo + i32.const 1 + drop + local.get $size + i32.const 4 + i32.add + i32.const 15 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 361 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $blockInfo + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $size + i32.sub + local.set $remaining + local.get $remaining + i32.const 4 + i32.const 12 + i32.add + i32.ge_u + if + local.get $block + local.get $size + local.get $blockInfo + i32.const 2 + i32.and + i32.or + call $~lib/rt/common/BLOCK#set:mmInfo + local.get $block + i32.const 4 + i32.add + local.get $size + i32.add + local.set $spare + local.get $spare + local.get $remaining + i32.const 4 + i32.sub + i32.const 1 + i32.or + call $~lib/rt/common/BLOCK#set:mmInfo + local.get $root + local.get $spare + call $~lib/rt/tlsf/insertBlock + else + local.get $block + local.get $blockInfo + i32.const 1 + i32.const -1 + i32.xor + i32.and + call $~lib/rt/common/BLOCK#set:mmInfo + block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) + local.get $block + local.set $block|6 + local.get $block|6 + i32.const 4 + i32.add + local.get $block|6 + call $~lib/rt/common/BLOCK#get:mmInfo + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + br $~lib/rt/tlsf/GETRIGHT|inlined.2 + end + local.set $7 + local.get $7 + local.get $7 + call $~lib/rt/common/BLOCK#get:mmInfo + i32.const 2 + i32.const -1 + i32.xor + i32.and + call $~lib/rt/common/BLOCK#set:mmInfo + end + ) + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size + call $~lib/rt/tlsf/prepareSize + local.set $payloadSize + local.get $root + local.get $payloadSize + call $~lib/rt/tlsf/searchBlock + local.set $block + local.get $block + i32.eqz + if + local.get $root + local.get $payloadSize + call $~lib/rt/tlsf/growMemory + local.get $root + local.get $payloadSize + call $~lib/rt/tlsf/searchBlock + local.set $block + i32.const 1 + drop + local.get $block + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 499 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + end + i32.const 1 + drop + local.get $block + call $~lib/rt/common/BLOCK#get:mmInfo + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $payloadSize + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 501 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $root + local.get $block + call $~lib/rt/tlsf/removeBlock + local.get $root + local.get $block + local.get $payloadSize + call $~lib/rt/tlsf/prepareBlock + i32.const 0 + drop + local.get $block + return + ) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + local.get $size + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + return + ) + (func $~lib/rt/itcms/Object#set:rtId (param $this i32) (param $rtId i32) + local.get $this + local.get $rtId + i32.store offset=12 + ) + (func $~lib/rt/itcms/Object#set:rtSize (param $this i32) (param $rtSize i32) + local.get $this + local.get $rtSize + i32.store offset=16 + ) + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size + i32.const 1073741804 + i32.ge_u + if + i32.const 32 + i32.const 96 + i32.const 261 + i32.const 31 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/itcms/total + global.get $~lib/rt/itcms/threshold + i32.ge_u + if + call $~lib/rt/itcms/interrupt + end + i32.const 16 + local.get $size + i32.add + call $~lib/rt/tlsf/__alloc + i32.const 4 + i32.sub + local.set $obj + local.get $obj + local.get $id + call $~lib/rt/itcms/Object#set:rtId + local.get $obj + local.get $size + call $~lib/rt/itcms/Object#set:rtSize + local.get $obj + global.get $~lib/rt/itcms/fromSpace + global.get $~lib/rt/itcms/white + call $~lib/rt/itcms/Object#linkTo + global.get $~lib/rt/itcms/total + local.get $obj + call $~lib/rt/itcms/Object#get:size + i32.add + global.set $~lib/rt/itcms/total + local.get $obj + i32.const 20 + i32.add + local.set $ptr + local.get $ptr + i32.const 0 + local.get $size + memory.fill + local.get $ptr + return + ) + (func $compound-assignment-side-effect/Box#set:value (param $this i32) (param $value i32) + local.get $this + local.get $value + i32.store + ) + (func $compound-assignment-side-effect/getBox (result i32) + global.get $compound-assignment-side-effect/boxCalls + i32.const 1 + i32.add + global.set $compound-assignment-side-effect/boxCalls + global.get $compound-assignment-side-effect/box + return + ) + (func $compound-assignment-side-effect/Box#get:value (param $this i32) (result i32) + local.get $this + i32.load + ) + (func $compound-assignment-side-effect/assertOneBoxCall + global.get $compound-assignment-side-effect/boxCalls + i32.const 1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 19 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/math/ipow32 (param $x i32) (param $e i32) (result i32) + (local $out i32) + (local $log i32) + (local $4 i32) + i32.const 1 + local.set $out + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $x + i32.const 2 + i32.eq + if + i32.const 1 + local.get $e + i32.shl + i32.const 0 + local.get $e + i32.const 32 + i32.lt_u + select + return + end + local.get $e + i32.const 0 + i32.le_s + if + local.get $x + i32.const -1 + i32.eq + if + i32.const -1 + i32.const 1 + local.get $e + i32.const 1 + i32.and + select + return + end + local.get $e + i32.const 0 + i32.eq + local.get $x + i32.const 1 + i32.eq + i32.or + return + else + local.get $e + i32.const 1 + i32.eq + if + local.get $x + return + else + local.get $e + i32.const 2 + i32.eq + if + local.get $x + local.get $x + i32.mul + return + else + local.get $e + i32.const 32 + i32.lt_s + if + i32.const 32 + local.get $e + i32.clz + i32.sub + local.set $log + block $break|0 + block $case4|0 + block $case3|0 + block $case2|0 + block $case1|0 + block $case0|0 + local.get $log + local.set $4 + local.get $4 + i32.const 5 + i32.eq + br_if $case0|0 + local.get $4 + i32.const 4 + i32.eq + br_if $case1|0 + local.get $4 + i32.const 3 + i32.eq + br_if $case2|0 + local.get $4 + i32.const 2 + i32.eq + br_if $case3|0 + local.get $4 + i32.const 1 + i32.eq + br_if $case4|0 + br $break|0 + end + local.get $e + i32.const 1 + i32.and + if + local.get $out + local.get $x + i32.mul + local.set $out + end + local.get $e + i32.const 1 + i32.shr_u + local.set $e + local.get $x + local.get $x + i32.mul + local.set $x + end + local.get $e + i32.const 1 + i32.and + if + local.get $out + local.get $x + i32.mul + local.set $out + end + local.get $e + i32.const 1 + i32.shr_u + local.set $e + local.get $x + local.get $x + i32.mul + local.set $x + end + local.get $e + i32.const 1 + i32.and + if + local.get $out + local.get $x + i32.mul + local.set $out + end + local.get $e + i32.const 1 + i32.shr_u + local.set $e + local.get $x + local.get $x + i32.mul + local.set $x + end + local.get $e + i32.const 1 + i32.and + if + local.get $out + local.get $x + i32.mul + local.set $out + end + local.get $e + i32.const 1 + i32.shr_u + local.set $e + local.get $x + local.get $x + i32.mul + local.set $x + end + local.get $e + i32.const 1 + i32.and + if + local.get $out + local.get $x + i32.mul + local.set $out + end + end + local.get $out + return + end + end + end + end + loop $while-continue|1 + local.get $e + if + local.get $e + i32.const 1 + i32.and + if + local.get $out + local.get $x + i32.mul + local.set $out + end + local.get $e + i32.const 1 + i32.shr_u + local.set $e + local.get $x + local.get $x + i32.mul + local.set $x + br $while-continue|1 + end + end + local.get $out + return + ) + (func $~lib/array/Array#get:length_ (param $this i32) (result i32) + local.get $this + i32.load offset=12 + ) + (func $~lib/arraybuffer/ArrayBufferView#get:byteLength (param $this i32) (result i32) + local.get $this + i32.load offset=8 + ) + (func $~lib/arraybuffer/ArrayBufferView#get:buffer (param $this i32) (result i32) + local.get $this + i32.load + ) + (func $~lib/rt/itcms/Object#get:rtSize (param $this i32) (result i32) + local.get $this + i32.load offset=16 + ) + (func $~lib/rt/itcms/__renew (param $oldPtr i32) (param $size i32) (result i32) + (local $oldObj i32) + (local $newPtr i32) + (local $4 i32) + (local $5 i32) + local.get $oldPtr + i32.const 20 + i32.sub + local.set $oldObj + local.get $size + local.get $oldObj + call $~lib/rt/common/BLOCK#get:mmInfo + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.sub + i32.le_u + if + local.get $oldObj + local.get $size + call $~lib/rt/itcms/Object#set:rtSize + local.get $oldPtr + return + end + local.get $size + local.get $oldObj + call $~lib/rt/itcms/Object#get:rtId + call $~lib/rt/itcms/__new + local.set $newPtr + local.get $newPtr + local.get $oldPtr + local.get $size + local.tee $4 + local.get $oldObj + call $~lib/rt/itcms/Object#get:rtSize + local.tee $5 + local.get $4 + local.get $5 + i32.lt_u + select + memory.copy + local.get $newPtr + return + ) + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $parent i32) + (local $parentColor i32) + local.get $childPtr + i32.eqz + if + return + end + i32.const 1 + drop + local.get $parentPtr + i32.eqz + if + i32.const 0 + i32.const 96 + i32.const 295 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $childPtr + i32.const 20 + i32.sub + local.set $child + local.get $child + call $~lib/rt/itcms/Object#get:color + global.get $~lib/rt/itcms/white + i32.eq + if + local.get $parentPtr + i32.const 20 + i32.sub + local.set $parent + local.get $parent + call $~lib/rt/itcms/Object#get:color + local.set $parentColor + local.get $parentColor + global.get $~lib/rt/itcms/white + i32.eqz + i32.eq + if + local.get $expectMultiple + if + local.get $parent + call $~lib/rt/itcms/Object#makeGray + else + local.get $child + call $~lib/rt/itcms/Object#makeGray + end + else + local.get $parentColor + i32.const 3 + i32.eq + if (result i32) + global.get $~lib/rt/itcms/state + i32.const 1 + i32.eq + else + i32.const 0 + end + if + local.get $child + call $~lib/rt/itcms/Object#makeGray + end + end + end + ) + (func $~lib/array/Array#set:length_ (param $this i32) (param $length_ i32) + local.get $this + local.get $length_ + i32.store offset=12 + ) + (func $~lib/array/Array#get:dataStart (param $this i32) (result i32) + local.get $this + i32.load offset=4 + ) + (func $compound-assignment-side-effect/getIndex (result i32) + global.get $compound-assignment-side-effect/idxCalls + i32.const 1 + i32.add + global.set $compound-assignment-side-effect/idxCalls + i32.const 0 + return + ) + (func $start:compound-assignment-side-effect + (local $0 i32) + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold + i32.const 144 + call $~lib/rt/itcms/initLazy + global.set $~lib/rt/itcms/pinSpace + i32.const 176 + call $~lib/rt/itcms/initLazy + global.set $~lib/rt/itcms/toSpace + i32.const 320 + call $~lib/rt/itcms/initLazy + global.set $~lib/rt/itcms/fromSpace + i32.const 0 + call $compound-assignment-side-effect/Box#constructor + global.set $compound-assignment-side-effect/box + call $compound-assignment-side-effect/testPropertyCompoundAssignments + call $compound-assignment-side-effect/testElementCompoundAssignments + ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $compound-assignment-side-effect/box + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $compound-assignment-side-effect/arr + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + i32.const 224 + local.get $0 + call $~lib/rt/itcms/__visit + i32.const 656 + local.get $0 + call $~lib/rt/itcms/__visit + i32.const 32 + local.get $0 + call $~lib/rt/itcms/__visit + ) + (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $1 + call $~lib/object/Object~visit + local.get $0 + i32.load + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/object/Object~visit (param $0 i32) (param $1 i32) + ) + (func $~lib/array/Array#get:buffer (param $this i32) (result i32) + local.get $this + i32.load + ) + (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/object/Object~visit + local.get $0 + local.get $1 + call $~lib/array/Array#__visit + ) + (func $~lib/rt/__visit_members (param $0 i32) (param $1 i32) + block $invalid + block $~lib/array/Array + block $compound-assignment-side-effect/Box + block $~lib/arraybuffer/ArrayBufferView + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + block $~lib/object/Object + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/object/Object $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $compound-assignment-side-effect/Box $~lib/array/Array $invalid + end + return + end + return + end + return + end + local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView~visit + return + end + return + end + local.get $0 + local.get $1 + call $~lib/array/Array~visit + return + end + unreachable + ) + (func $~start + call $start:compound-assignment-side-effect + ) + (func $~stack_check + global.get $~lib/memory/__stack_pointer + global.get $~lib/memory/__data_end + i32.lt_s + if + i32.const 33504 + i32.const 33552 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + ) + (func $compound-assignment-side-effect/Box#constructor (param $this i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $this + i32.eqz + if + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.const 4 + call $~lib/rt/itcms/__new + local.tee $this + i32.store + end + global.get $~lib/memory/__stack_pointer + local.get $this + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $1 + call $~lib/object/Object#constructor + local.tee $this + i32.store + local.get $this + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $1 + i32.const 0 + call $compound-assignment-side-effect/Box#set:value + local.get $this + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $compound-assignment-side-effect/resetBox (param $value i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $compound-assignment-side-effect/box + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store + local.get $1 + local.get $value + call $compound-assignment-side-effect/Box#set:value + i32.const 0 + global.set $compound-assignment-side-effect/boxCalls + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $compound-assignment-side-effect/testPropertyCompoundAssignments + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + global.get $~lib/memory/__stack_pointer + i32.const 56 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 56 + memory.fill + i32.const 8 + call $compound-assignment-side-effect/resetBox + global.get $~lib/memory/__stack_pointer + call $compound-assignment-side-effect/getBox + local.tee $0 + i32.store + local.get $0 + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + local.get $0 + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=8 + local.get $12 + call $compound-assignment-side-effect/Box#get:value + i32.const 2 + i32.add + call $compound-assignment-side-effect/Box#set:value + global.get $compound-assignment-side-effect/box + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + call $compound-assignment-side-effect/Box#get:value + i32.const 10 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 25 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + call $compound-assignment-side-effect/assertOneBoxCall + i32.const 8 + call $compound-assignment-side-effect/resetBox + global.get $~lib/memory/__stack_pointer + call $compound-assignment-side-effect/getBox + local.tee $1 + i32.store offset=12 + local.get $1 + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + local.get $1 + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=8 + local.get $12 + call $compound-assignment-side-effect/Box#get:value + i32.const 3 + i32.sub + call $compound-assignment-side-effect/Box#set:value + global.get $compound-assignment-side-effect/box + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + call $compound-assignment-side-effect/Box#get:value + i32.const 5 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 30 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + call $compound-assignment-side-effect/assertOneBoxCall + i32.const 8 + call $compound-assignment-side-effect/resetBox + global.get $~lib/memory/__stack_pointer + call $compound-assignment-side-effect/getBox + local.tee $2 + i32.store offset=16 + local.get $2 + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + local.get $2 + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=8 + local.get $12 + call $compound-assignment-side-effect/Box#get:value + i32.const 3 + i32.mul + call $compound-assignment-side-effect/Box#set:value + global.get $compound-assignment-side-effect/box + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + call $compound-assignment-side-effect/Box#get:value + i32.const 24 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 35 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + call $compound-assignment-side-effect/assertOneBoxCall + i32.const 8 + call $compound-assignment-side-effect/resetBox + global.get $~lib/memory/__stack_pointer + call $compound-assignment-side-effect/getBox + local.tee $3 + i32.store offset=20 + local.get $3 + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + local.get $3 + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=8 + local.get $12 + call $compound-assignment-side-effect/Box#get:value + i32.const 2 + i32.div_s + call $compound-assignment-side-effect/Box#set:value + global.get $compound-assignment-side-effect/box + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + call $compound-assignment-side-effect/Box#get:value + i32.const 4 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 40 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + call $compound-assignment-side-effect/assertOneBoxCall + i32.const 8 + call $compound-assignment-side-effect/resetBox + global.get $~lib/memory/__stack_pointer + call $compound-assignment-side-effect/getBox + local.tee $4 + i32.store offset=24 + local.get $4 + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + local.get $4 + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=8 + local.get $12 + call $compound-assignment-side-effect/Box#get:value + i32.const 3 + i32.rem_s + call $compound-assignment-side-effect/Box#set:value + global.get $compound-assignment-side-effect/box + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + call $compound-assignment-side-effect/Box#get:value + i32.const 2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 45 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + call $compound-assignment-side-effect/assertOneBoxCall + i32.const 8 + call $compound-assignment-side-effect/resetBox + global.get $~lib/memory/__stack_pointer + call $compound-assignment-side-effect/getBox + local.tee $5 + i32.store offset=28 + local.get $5 + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + local.get $5 + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=8 + local.get $12 + call $compound-assignment-side-effect/Box#get:value + i32.const 1 + i32.shl + call $compound-assignment-side-effect/Box#set:value + global.get $compound-assignment-side-effect/box + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + call $compound-assignment-side-effect/Box#get:value + i32.const 16 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 50 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + call $compound-assignment-side-effect/assertOneBoxCall + i32.const 8 + call $compound-assignment-side-effect/resetBox + global.get $~lib/memory/__stack_pointer + call $compound-assignment-side-effect/getBox + local.tee $6 + i32.store offset=32 + local.get $6 + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + local.get $6 + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=8 + local.get $12 + call $compound-assignment-side-effect/Box#get:value + i32.const 1 + i32.shr_s + call $compound-assignment-side-effect/Box#set:value + global.get $compound-assignment-side-effect/box + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + call $compound-assignment-side-effect/Box#get:value + i32.const 4 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 55 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + call $compound-assignment-side-effect/assertOneBoxCall + i32.const -8 + call $compound-assignment-side-effect/resetBox + global.get $~lib/memory/__stack_pointer + call $compound-assignment-side-effect/getBox + local.tee $7 + i32.store offset=36 + local.get $7 + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + local.get $7 + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=8 + local.get $12 + call $compound-assignment-side-effect/Box#get:value + i32.const 1 + i32.shr_u + call $compound-assignment-side-effect/Box#set:value + global.get $compound-assignment-side-effect/box + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + call $compound-assignment-side-effect/Box#get:value + i32.const 2147483644 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 60 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + call $compound-assignment-side-effect/assertOneBoxCall + i32.const 10 + call $compound-assignment-side-effect/resetBox + global.get $~lib/memory/__stack_pointer + call $compound-assignment-side-effect/getBox + local.tee $8 + i32.store offset=40 + local.get $8 + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + local.get $8 + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=8 + local.get $12 + call $compound-assignment-side-effect/Box#get:value + i32.const 3 + i32.and + call $compound-assignment-side-effect/Box#set:value + global.get $compound-assignment-side-effect/box + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + call $compound-assignment-side-effect/Box#get:value + i32.const 2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 65 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + call $compound-assignment-side-effect/assertOneBoxCall + i32.const 8 + call $compound-assignment-side-effect/resetBox + global.get $~lib/memory/__stack_pointer + call $compound-assignment-side-effect/getBox + local.tee $9 + i32.store offset=44 + local.get $9 + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + local.get $9 + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=8 + local.get $12 + call $compound-assignment-side-effect/Box#get:value + i32.const 3 + i32.or + call $compound-assignment-side-effect/Box#set:value + global.get $compound-assignment-side-effect/box + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + call $compound-assignment-side-effect/Box#get:value + i32.const 11 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 70 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + call $compound-assignment-side-effect/assertOneBoxCall + i32.const 8 + call $compound-assignment-side-effect/resetBox + global.get $~lib/memory/__stack_pointer + call $compound-assignment-side-effect/getBox + local.tee $10 + i32.store offset=48 + local.get $10 + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + local.get $10 + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=8 + local.get $12 + call $compound-assignment-side-effect/Box#get:value + i32.const 3 + i32.xor + call $compound-assignment-side-effect/Box#set:value + global.get $compound-assignment-side-effect/box + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + call $compound-assignment-side-effect/Box#get:value + i32.const 11 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 75 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + call $compound-assignment-side-effect/assertOneBoxCall + i32.const 3 + call $compound-assignment-side-effect/resetBox + global.get $~lib/memory/__stack_pointer + call $compound-assignment-side-effect/getBox + local.tee $11 + i32.store offset=52 + local.get $11 + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + local.get $11 + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=8 + local.get $12 + call $compound-assignment-side-effect/Box#get:value + i32.const 2 + call $~lib/math/ipow32 + call $compound-assignment-side-effect/Box#set:value + global.get $compound-assignment-side-effect/box + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + call $compound-assignment-side-effect/Box#get:value + i32.const 9 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 80 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + call $compound-assignment-side-effect/assertOneBoxCall + global.get $~lib/memory/__stack_pointer + i32.const 56 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $~lib/array/ensureCapacity (param $array i32) (param $newSize i32) (param $alignLog2 i32) (param $canGrow i32) + (local $oldCapacity i32) + (local $oldData i32) + (local $6 i32) + (local $7 i32) + (local $newCapacity i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $newData i32) + (local $14 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $array + local.set $14 + global.get $~lib/memory/__stack_pointer + local.get $14 + i32.store + local.get $14 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength + local.set $oldCapacity + local.get $newSize + local.get $oldCapacity + local.get $alignLog2 + i32.shr_u + i32.gt_u + if + local.get $newSize + i32.const 1073741820 + local.get $alignLog2 + i32.shr_u + i32.gt_u + if + i32.const 656 + i32.const 608 + i32.const 19 + i32.const 48 + call $~lib/builtins/abort + unreachable + end + local.get $array + local.set $14 + global.get $~lib/memory/__stack_pointer + local.get $14 + i32.store + local.get $14 + call $~lib/arraybuffer/ArrayBufferView#get:buffer + local.set $oldData + local.get $newSize + local.tee $6 + i32.const 8 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_u + select + local.get $alignLog2 + i32.shl + local.set $newCapacity + local.get $canGrow + if + local.get $oldCapacity + i32.const 1 + i32.shl + local.tee $9 + i32.const 1073741820 + local.tee $10 + local.get $9 + local.get $10 + i32.lt_u + select + local.tee $11 + local.get $newCapacity + local.tee $12 + local.get $11 + local.get $12 + i32.gt_u + select + local.set $newCapacity + end + local.get $oldData + local.get $newCapacity + call $~lib/rt/itcms/__renew + local.set $newData + i32.const 2 + global.get $~lib/shared/runtime/Runtime.Incremental + i32.ne + drop + local.get $newData + local.get $oldData + i32.ne + if + local.get $array + local.get $newData + i32.store + local.get $array + local.get $newData + i32.store offset=4 + local.get $array + local.get $newData + i32.const 0 + call $~lib/rt/itcms/__link + end + local.get $array + local.get $newCapacity + i32.store offset=8 + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $~lib/array/Array#__set (param $this i32) (param $index i32) (param $value i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $index + local.get $this + local.set $3 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store + local.get $3 + call $~lib/array/Array#get:length_ + i32.ge_u + if + local.get $index + i32.const 0 + i32.lt_s + if + i32.const 224 + i32.const 608 + i32.const 130 + i32.const 22 + call $~lib/builtins/abort + unreachable + end + local.get $this + local.get $index + i32.const 1 + i32.add + i32.const 2 + i32.const 1 + call $~lib/array/ensureCapacity + local.get $this + local.set $3 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store + local.get $3 + local.get $index + i32.const 1 + i32.add + call $~lib/array/Array#set:length_ + end + local.get $this + local.set $3 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store + local.get $3 + call $~lib/array/Array#get:dataStart + local.get $index + i32.const 2 + i32.shl + i32.add + local.get $value + i32.store + i32.const 0 + drop + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + (local $3 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $index + local.get $this + local.set $3 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store + local.get $3 + call $~lib/array/Array#get:length_ + i32.ge_u + if + i32.const 224 + i32.const 608 + i32.const 114 + i32.const 42 + call $~lib/builtins/abort + unreachable + end + local.get $this + local.set $3 + global.get $~lib/memory/__stack_pointer + local.get $3 + i32.store + local.get $3 + call $~lib/array/Array#get:dataStart + local.get $index + i32.const 2 + i32.shl + i32.add + i32.load + local.set $value + i32.const 0 + drop + local.get $value + local.set $3 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $3 + return + ) + (func $compound-assignment-side-effect/testElementCompoundAssignments + (local $0 i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store offset=8 + i32.const 0 + global.set $compound-assignment-side-effect/idxCalls + global.get $compound-assignment-side-effect/arr + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store + local.get $2 + i32.const 0 + i32.const 1 + call $~lib/array/Array#__set + global.get $~lib/memory/__stack_pointer + global.get $compound-assignment-side-effect/arr + local.tee $0 + i32.store offset=4 + call $compound-assignment-side-effect/getIndex + local.set $1 + local.get $0 + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store + local.get $2 + local.get $1 + local.get $0 + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store offset=8 + local.get $2 + local.get $1 + call $~lib/array/Array#__get + i32.const 2 + i32.or + call $~lib/array/Array#__set + global.get $compound-assignment-side-effect/arr + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store + local.get $2 + i32.const 0 + call $~lib/array/Array#__get + i32.const 3 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 96 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $compound-assignment-side-effect/idxCalls + i32.const 1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 97 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) + (local $2 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + i32.const 0 + drop + local.get $this + local.set $2 + global.get $~lib/memory/__stack_pointer + local.get $2 + i32.store + local.get $2 + call $~lib/array/Array#get:buffer + local.get $cookie + call $~lib/rt/itcms/__visit + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $~lib/object/Object#constructor (param $this i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $this + i32.eqz + if + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 0 + call $~lib/rt/itcms/__new + local.tee $this + i32.store + end + local.get $this + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) +) diff --git a/tests/compiler/compound-assignment-side-effect.release.wat b/tests/compiler/compound-assignment-side-effect.release.wat new file mode 100644 index 0000000000..c7dafd80ba --- /dev/null +++ b/tests/compiler/compound-assignment-side-effect.release.wat @@ -0,0 +1,2592 @@ +(module + (type $0 (func (param i32))) + (type $1 (func)) + (type $2 (func (param i32 i32))) + (type $3 (func (param i32 i32) (result i32))) + (type $4 (func (result i32))) + (type $5 (func (param i32 i32 i32 i32))) + (type $6 (func (param i32 i32 i64))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/iter (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/toSpace (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) + (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) + (global $compound-assignment-side-effect/box (mut i32) (i32.const 0)) + (global $compound-assignment-side-effect/boxCalls (mut i32) (i32.const 0)) + (global $compound-assignment-side-effect/idxCalls (mut i32) (i32.const 0)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 34508)) + (memory $0 1) + (data $0 (i32.const 1036) "<") + (data $0.1 (i32.const 1048) "\02\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") + (data $1 (i32.const 1100) "<") + (data $1.1 (i32.const 1112) "\02\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") + (data $4 (i32.const 1228) "<") + (data $4.1 (i32.const 1240) "\02\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") + (data $5 (i32.const 1292) ",") + (data $5.1 (i32.const 1304) "\02\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") + (data $7 (i32.const 1372) "<") + (data $7.1 (i32.const 1384) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") + (data $8 (i32.const 1436) "\1c") + (data $8.1 (i32.const 1448) "\01\00\00\00\08\00\00\00\01\00\00\00\02") + (data $9 (i32.const 1468) ",") + (data $9.1 (i32.const 1480) "\05\00\00\00\10\00\00\00\b0\05\00\00\b0\05\00\00\08\00\00\00\02") + (data $10 (i32.const 1516) "\\") + (data $10.1 (i32.const 1528) "\02\00\00\00D\00\00\00c\00o\00m\00p\00o\00u\00n\00d\00-\00a\00s\00s\00i\00g\00n\00m\00e\00n\00t\00-\00s\00i\00d\00e\00-\00e\00f\00f\00e\00c\00t\00.\00t\00s") + (data $11 (i32.const 1612) ",") + (data $11.1 (i32.const 1624) "\02\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data $12 (i32.const 1660) ",") + (data $12.1 (i32.const 1672) "\02\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") + (data $13 (i32.const 1712) "\06\00\00\00 \00\00\00 \00\00\00 \00\00\00\00\00\00\00 \00\00\00\02\t") + (export "memory" (memory $0)) + (start $~start) + (func $compound-assignment-side-effect/resetBox (param $0 i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1740 + i32.lt_s + if + i32.const 34528 + i32.const 34576 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + global.get $compound-assignment-side-effect/box + local.tee $1 + i32.store + local.get $1 + local.get $0 + i32.store + i32.const 0 + global.set $compound-assignment-side-effect/boxCalls + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $~lib/rt/itcms/__visit (param $0 i32) + local.get $0 + i32.eqz + if + return + end + global.get $~lib/rt/itcms/white + local.get $0 + i32.const 20 + i32.sub + local.tee $0 + i32.load offset=4 + i32.const 3 + i32.and + i32.eq + if + local.get $0 + call $~lib/rt/itcms/Object#makeGray + global.get $~lib/rt/itcms/visitCount + i32.const 1 + i32.add + global.set $~lib/rt/itcms/visitCount + end + ) + (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.tee $3 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 1392 + i32.const 268 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const -4 + i32.and + local.tee $3 + i32.const 12 + i32.lt_u + if + i32.const 0 + i32.const 1392 + i32.const 270 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 256 + i32.lt_u + if (result i32) + local.get $3 + i32.const 4 + i32.shr_u + else + i32.const 31 + i32.const 1073741820 + local.get $3 + local.get $3 + i32.const 1073741820 + i32.ge_u + select + local.tee $3 + i32.clz + i32.sub + local.tee $4 + i32.const 7 + i32.sub + local.set $2 + local.get $3 + local.get $4 + i32.const 4 + i32.sub + i32.shr_u + i32.const 16 + i32.xor + end + local.tee $3 + i32.const 16 + i32.lt_u + local.get $2 + i32.const 23 + i32.lt_u + i32.and + i32.eqz + if + i32.const 0 + i32.const 1392 + i32.const 284 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=8 + local.set $5 + local.get $1 + i32.load offset=4 + local.tee $4 + if + local.get $4 + local.get $5 + i32.store offset=8 + end + local.get $5 + if + local.get $5 + local.get $4 + i32.store offset=4 + end + local.get $1 + local.get $0 + local.get $2 + i32.const 4 + i32.shl + local.get $3 + i32.add + i32.const 2 + i32.shl + i32.add + local.tee $1 + i32.load offset=96 + i32.eq + if + local.get $1 + local.get $5 + i32.store offset=96 + local.get $5 + i32.eqz + if + local.get $0 + local.get $2 + i32.const 2 + i32.shl + i32.add + local.tee $1 + i32.load offset=4 + i32.const -2 + local.get $3 + i32.rotl + i32.and + local.set $3 + local.get $1 + local.get $3 + i32.store offset=4 + local.get $3 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const -2 + local.get $2 + i32.rotl + i32.and + i32.store + end + end + end + ) + (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 1392 + i32.const 201 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load + local.tee $3 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 1392 + i32.const 203 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 4 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $4 + i32.load + local.tee $2 + i32.const 1 + i32.and + if + local.get $0 + local.get $4 + call $~lib/rt/tlsf/removeBlock + local.get $1 + local.get $3 + i32.const 4 + i32.add + local.get $2 + i32.const -4 + i32.and + i32.add + local.tee $3 + i32.store + local.get $1 + i32.const 4 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $4 + i32.load + local.set $2 + end + local.get $3 + i32.const 2 + i32.and + if + local.get $1 + i32.const 4 + i32.sub + i32.load + local.tee $1 + i32.load + local.tee $6 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 1392 + i32.const 221 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/rt/tlsf/removeBlock + local.get $1 + local.get $6 + i32.const 4 + i32.add + local.get $3 + i32.const -4 + i32.and + i32.add + local.tee $3 + i32.store + end + local.get $4 + local.get $2 + i32.const 2 + i32.or + i32.store + local.get $3 + i32.const -4 + i32.and + local.tee $2 + i32.const 12 + i32.lt_u + if + i32.const 0 + i32.const 1392 + i32.const 233 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $1 + i32.const 4 + i32.add + local.get $2 + i32.add + i32.ne + if + i32.const 0 + i32.const 1392 + i32.const 234 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $4 + i32.const 4 + i32.sub + local.get $1 + i32.store + local.get $2 + i32.const 256 + i32.lt_u + if (result i32) + local.get $2 + i32.const 4 + i32.shr_u + else + i32.const 31 + i32.const 1073741820 + local.get $2 + local.get $2 + i32.const 1073741820 + i32.ge_u + select + local.tee $2 + i32.clz + i32.sub + local.tee $3 + i32.const 7 + i32.sub + local.set $5 + local.get $2 + local.get $3 + i32.const 4 + i32.sub + i32.shr_u + i32.const 16 + i32.xor + end + local.tee $2 + i32.const 16 + i32.lt_u + local.get $5 + i32.const 23 + i32.lt_u + i32.and + i32.eqz + if + i32.const 0 + i32.const 1392 + i32.const 251 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $5 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + local.set $3 + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + local.get $3 + i32.store offset=8 + local.get $3 + if + local.get $3 + local.get $1 + i32.store offset=4 + end + local.get $0 + local.get $5 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $1 + i32.store offset=96 + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $5 + i32.shl + i32.or + i32.store + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + local.tee $0 + local.get $0 + i32.load offset=4 + i32.const 1 + local.get $2 + i32.shl + i32.or + i32.store offset=4 + ) + (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.const 1073741804 + i32.ge_u + if + i32.const 1056 + i32.const 1120 + i32.const 261 + i32.const 31 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/itcms/total + global.get $~lib/rt/itcms/threshold + i32.ge_u + if + block $__inlined_func$~lib/rt/itcms/interrupt$68 + i32.const 2048 + local.set $2 + loop $do-loop|0 + local.get $2 + call $~lib/rt/itcms/step + i32.sub + local.set $2 + global.get $~lib/rt/itcms/state + i32.eqz + if + global.get $~lib/rt/itcms/total + i32.const 1 + i32.shl + i32.const 1024 + i32.add + global.set $~lib/rt/itcms/threshold + br $__inlined_func$~lib/rt/itcms/interrupt$68 + end + local.get $2 + i32.const 0 + i32.gt_s + br_if $do-loop|0 + end + global.get $~lib/rt/itcms/total + global.get $~lib/rt/itcms/total + global.get $~lib/rt/itcms/threshold + i32.sub + i32.const 1024 + i32.lt_u + i32.const 10 + i32.shl + i32.add + global.set $~lib/rt/itcms/threshold + end + end + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + local.set $4 + local.get $0 + i32.const 16 + i32.add + local.tee $2 + i32.const 1073741820 + i32.gt_u + if + i32.const 1056 + i32.const 1392 + i32.const 461 + i32.const 29 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $2 + i32.const 12 + i32.le_u + if (result i32) + i32.const 12 + else + local.get $2 + i32.const 19 + i32.add + i32.const -16 + i32.and + i32.const 4 + i32.sub + end + local.tee $5 + call $~lib/rt/tlsf/searchBlock + local.tee $2 + i32.eqz + if + local.get $5 + i32.const 256 + i32.ge_u + if (result i32) + local.get $5 + i32.const 536870910 + i32.lt_u + if (result i32) + local.get $5 + i32.const 1 + i32.const 27 + local.get $5 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + else + local.get $5 + end + else + local.get $5 + end + i32.const 4 + local.get $4 + i32.load offset=1568 + memory.size + local.tee $2 + i32.const 16 + i32.shl + i32.const 4 + i32.sub + i32.ne + i32.shl + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.set $3 + local.get $2 + local.get $3 + local.get $2 + local.get $3 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $3 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $4 + local.get $2 + i32.const 16 + i32.shl + memory.size + i64.extend_i32_s + i64.const 16 + i64.shl + call $~lib/rt/tlsf/addMemory + local.get $4 + local.get $5 + call $~lib/rt/tlsf/searchBlock + local.tee $2 + i32.eqz + if + i32.const 0 + i32.const 1392 + i32.const 499 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + end + local.get $5 + local.get $2 + i32.load + i32.const -4 + i32.and + i32.gt_u + if + i32.const 0 + i32.const 1392 + i32.const 501 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $2 + call $~lib/rt/tlsf/removeBlock + local.get $2 + i32.load + local.set $6 + local.get $5 + i32.const 4 + i32.add + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1392 + i32.const 361 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const -4 + i32.and + local.get $5 + i32.sub + local.tee $3 + i32.const 16 + i32.ge_u + if + local.get $2 + local.get $5 + local.get $6 + i32.const 2 + i32.and + i32.or + i32.store + local.get $2 + i32.const 4 + i32.add + local.get $5 + i32.add + local.tee $5 + local.get $3 + i32.const 4 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $4 + local.get $5 + call $~lib/rt/tlsf/insertBlock + else + local.get $2 + local.get $6 + i32.const -2 + i32.and + i32.store + local.get $2 + i32.const 4 + i32.add + local.get $2 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $3 + local.get $3 + i32.load + i32.const -3 + i32.and + i32.store + end + local.get $2 + local.get $1 + i32.store offset=12 + local.get $2 + local.get $0 + i32.store offset=16 + global.get $~lib/rt/itcms/fromSpace + local.tee $1 + i32.load offset=8 + local.set $3 + local.get $2 + local.get $1 + global.get $~lib/rt/itcms/white + i32.or + i32.store offset=4 + local.get $2 + local.get $3 + i32.store offset=8 + local.get $3 + local.get $2 + local.get $3 + i32.load offset=4 + i32.const 3 + i32.and + i32.or + i32.store offset=4 + local.get $1 + local.get $2 + i32.store offset=8 + global.get $~lib/rt/itcms/total + local.get $2 + i32.load + i32.const -4 + i32.and + i32.const 4 + i32.add + i32.add + global.set $~lib/rt/itcms/total + local.get $2 + i32.const 20 + i32.add + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 + ) + (func $~lib/rt/itcms/Object#makeGray (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/rt/itcms/iter + i32.eq + if + local.get $0 + i32.load offset=8 + local.tee $1 + i32.eqz + if + i32.const 0 + i32.const 1120 + i32.const 148 + i32.const 30 + call $~lib/builtins/abort + unreachable + end + local.get $1 + global.set $~lib/rt/itcms/iter + end + block $__inlined_func$~lib/rt/itcms/Object#unlink$198 + local.get $0 + i32.load offset=4 + i32.const -4 + i32.and + local.tee $1 + i32.eqz + if + local.get $0 + i32.load offset=8 + i32.eqz + local.get $0 + i32.const 34508 + i32.lt_u + i32.and + i32.eqz + if + i32.const 0 + i32.const 1120 + i32.const 128 + i32.const 18 + call $~lib/builtins/abort + unreachable + end + br $__inlined_func$~lib/rt/itcms/Object#unlink$198 + end + local.get $0 + i32.load offset=8 + local.tee $2 + i32.eqz + if + i32.const 0 + i32.const 1120 + i32.const 132 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.store offset=8 + local.get $2 + local.get $1 + local.get $2 + i32.load offset=4 + i32.const 3 + i32.and + i32.or + i32.store offset=4 + end + global.get $~lib/rt/itcms/toSpace + local.set $2 + local.get $0 + i32.load offset=12 + local.tee $1 + i32.const 2 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 1712 + i32.load + i32.gt_u + if + i32.const 1248 + i32.const 1312 + i32.const 21 + i32.const 28 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + i32.shl + i32.const 1716 + i32.add + i32.load + i32.const 32 + i32.and + end + local.set $3 + local.get $2 + i32.load offset=8 + local.set $1 + local.get $0 + global.get $~lib/rt/itcms/white + i32.eqz + i32.const 2 + local.get $3 + select + local.get $2 + i32.or + i32.store offset=4 + local.get $0 + local.get $1 + i32.store offset=8 + local.get $1 + local.get $0 + local.get $1 + i32.load offset=4 + i32.const 3 + i32.and + i32.or + i32.store offset=4 + local.get $2 + local.get $0 + i32.store offset=8 + ) + (func $~lib/rt/__visit_members (param $0 i32) + block $invalid + block $~lib/array/Array + block $compound-assignment-side-effect/Box + block $~lib/arraybuffer/ArrayBufferView + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + block $~lib/object/Object + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/object/Object $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $compound-assignment-side-effect/Box $~lib/array/Array $invalid + end + return + end + return + end + return + end + local.get $0 + i32.load + call $~lib/rt/itcms/__visit + return + end + return + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1740 + i32.lt_s + if + i32.const 34528 + i32.const 34576 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store + local.get $0 + i32.load + call $~lib/rt/itcms/__visit + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + return + end + unreachable + ) + (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $1 + i32.const 256 + i32.lt_u + if + local.get $1 + i32.const 4 + i32.shr_u + local.set $1 + else + local.get $1 + i32.const 536870910 + i32.lt_u + if + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.set $1 + end + local.get $1 + i32.const 31 + local.get $1 + i32.clz + i32.sub + local.tee $2 + i32.const 4 + i32.sub + i32.shr_u + i32.const 16 + i32.xor + local.set $1 + local.get $2 + i32.const 7 + i32.sub + local.set $2 + end + local.get $1 + i32.const 16 + i32.lt_u + local.get $2 + i32.const 23 + i32.lt_u + i32.and + i32.eqz + if + i32.const 0 + i32.const 1392 + i32.const 334 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + i32.const -1 + local.get $1 + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $1 + i32.ctz + local.get $2 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + else + local.get $0 + i32.load + i32.const -1 + local.get $2 + i32.const 1 + i32.add + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $1 + i32.ctz + local.tee $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + local.tee $2 + i32.eqz + if + i32.const 0 + i32.const 1392 + i32.const 347 + i32.const 18 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $2 + i32.ctz + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + else + i32.const 0 + end + end + ) + (func $~lib/rt/tlsf/initialize + (local $0 i32) + (local $1 i32) + memory.size + local.tee $1 + i32.const 0 + i32.le_s + if (result i32) + i32.const 1 + local.get $1 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 34512 + i32.const 0 + i32.store + i32.const 36080 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $0 + i32.const 23 + i32.lt_u + if + local.get $0 + i32.const 2 + i32.shl + i32.const 34512 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 16 + i32.lt_u + if + local.get $0 + i32.const 4 + i32.shl + local.get $1 + i32.add + i32.const 2 + i32.shl + i32.const 34512 + i32.add + i32.const 0 + i32.store offset=96 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + i32.const 34512 + i32.const 36084 + memory.size + i64.extend_i32_s + i64.const 16 + i64.shl + call $~lib/rt/tlsf/addMemory + i32.const 34512 + global.set $~lib/rt/tlsf/ROOT + ) + (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i64) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $2 + local.get $1 + i64.extend_i32_u + i64.lt_u + if + i32.const 0 + i32.const 1392 + i32.const 382 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 19 + i32.add + i32.const -16 + i32.and + i32.const 4 + i32.sub + local.set $1 + local.get $0 + i32.load offset=1568 + local.tee $3 + if + local.get $3 + i32.const 4 + i32.add + local.get $1 + i32.gt_u + if + i32.const 0 + i32.const 1392 + i32.const 389 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.get $3 + local.get $1 + i32.const 16 + i32.sub + local.tee $5 + i32.eq + if + local.get $3 + i32.load + local.set $4 + local.get $5 + local.set $1 + end + else + local.get $0 + i32.const 1572 + i32.add + local.get $1 + i32.gt_u + if + i32.const 0 + i32.const 1392 + i32.const 402 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + end + local.get $2 + i32.wrap_i64 + i32.const -16 + i32.and + local.get $1 + i32.sub + local.tee $3 + i32.const 20 + i32.lt_u + if + return + end + local.get $1 + local.get $4 + i32.const 2 + i32.and + local.get $3 + i32.const 8 + i32.sub + local.tee $3 + i32.const 1 + i32.or + i32.or + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 4 + i32.add + local.get $3 + i32.add + local.tee $3 + i32.const 2 + i32.store + local.get $0 + local.get $3 + i32.store offset=1568 + local.get $0 + local.get $1 + call $~lib/rt/tlsf/insertBlock + ) + (func $~lib/rt/itcms/visitRoots + (local $0 i32) + (local $1 i32) + global.get $compound-assignment-side-effect/box + local.tee $0 + if + local.get $0 + call $~lib/rt/itcms/__visit + end + i32.const 1488 + call $~lib/rt/itcms/__visit + i32.const 1248 + call $~lib/rt/itcms/__visit + i32.const 1680 + call $~lib/rt/itcms/__visit + i32.const 1056 + call $~lib/rt/itcms/__visit + global.get $~lib/rt/itcms/pinSpace + local.tee $1 + i32.load offset=4 + i32.const -4 + i32.and + local.set $0 + loop $while-continue|0 + local.get $0 + local.get $1 + i32.ne + if + local.get $0 + i32.load offset=4 + i32.const 3 + i32.and + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1120 + i32.const 160 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 20 + i32.add + call $~lib/rt/__visit_members + local.get $0 + i32.load offset=4 + i32.const -4 + i32.and + local.set $0 + br $while-continue|0 + end + end + ) + (func $~lib/array/Array#__set (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 1740 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 1488 + i32.store + i32.const 1500 + i32.load + i32.eqz + if + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1740 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 1488 + i32.store + i32.const 1496 + i32.load + local.tee $1 + i32.const 2 + i32.shr_u + i32.eqz + if + global.get $~lib/memory/__stack_pointer + i32.const 1488 + i32.store + block $__inlined_func$~lib/rt/itcms/__renew$195 + i32.const 32 + i32.const 1073741820 + local.get $1 + i32.const 1 + i32.shl + local.tee $1 + local.get $1 + i32.const 1073741820 + i32.ge_u + select + local.tee $1 + local.get $1 + i32.const 32 + i32.le_u + select + local.tee $3 + i32.const 1488 + i32.load + local.tee $2 + i32.const 20 + i32.sub + local.tee $4 + i32.load + i32.const -4 + i32.and + i32.const 16 + i32.sub + i32.le_u + if + local.get $4 + local.get $3 + i32.store offset=16 + local.get $2 + local.set $1 + br $__inlined_func$~lib/rt/itcms/__renew$195 + end + local.get $3 + local.get $4 + i32.load offset=12 + call $~lib/rt/itcms/__new + local.tee $1 + local.get $2 + local.get $3 + local.get $4 + i32.load offset=16 + local.tee $4 + local.get $3 + local.get $4 + i32.lt_u + select + memory.copy + end + local.get $1 + local.get $2 + i32.ne + if + i32.const 1488 + local.get $1 + i32.store + i32.const 1492 + local.get $1 + i32.store + local.get $1 + if + global.get $~lib/rt/itcms/white + local.get $1 + i32.const 20 + i32.sub + local.tee $1 + i32.load offset=4 + i32.const 3 + i32.and + i32.eq + if + i32.const 1472 + i32.load + i32.const 3 + i32.and + local.tee $2 + global.get $~lib/rt/itcms/white + i32.eqz + i32.eq + if + local.get $1 + call $~lib/rt/itcms/Object#makeGray + else + global.get $~lib/rt/itcms/state + i32.const 1 + i32.eq + local.get $2 + i32.const 3 + i32.eq + i32.and + if + local.get $1 + call $~lib/rt/itcms/Object#makeGray + end + end + end + end + end + i32.const 1496 + local.get $3 + i32.store + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1488 + i32.store + i32.const 1500 + i32.const 1 + i32.store + end + global.get $~lib/memory/__stack_pointer + i32.const 1488 + i32.store + i32.const 1492 + i32.load + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + return + end + i32.const 34528 + i32.const 34576 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/array/Array#__get (result i32) + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1740 + i32.lt_s + if + i32.const 34528 + i32.const 34576 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 1488 + i32.store + i32.const 1500 + i32.load + i32.eqz + if + i32.const 1248 + i32.const 1632 + i32.const 114 + i32.const 42 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 1488 + i32.store + i32.const 1492 + i32.load + i32.load + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $~start + (local $0 i32) + (local $1 i32) + block $__inlined_func$start:compound-assignment-side-effect + memory.size + i32.const 16 + i32.shl + i32.const 34508 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold + i32.const 1172 + i32.const 1168 + i32.store + i32.const 1176 + i32.const 1168 + i32.store + i32.const 1168 + global.set $~lib/rt/itcms/pinSpace + i32.const 1204 + i32.const 1200 + i32.store + i32.const 1208 + i32.const 1200 + i32.store + i32.const 1200 + global.set $~lib/rt/itcms/toSpace + i32.const 1348 + i32.const 1344 + i32.store + i32.const 1352 + i32.const 1344 + i32.store + i32.const 1344 + global.set $~lib/rt/itcms/fromSpace + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 1740 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.const 4 + call $~lib/rt/itcms/__new + local.tee $0 + i32.store + global.get $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1740 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + i32.eqz + if + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 0 + call $~lib/rt/itcms/__new + local.tee $0 + i32.store + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + global.set $compound-assignment-side-effect/box + call $compound-assignment-side-effect/testPropertyCompoundAssignments + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1740 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store offset=8 + i32.const 0 + global.set $compound-assignment-side-effect/idxCalls + global.get $~lib/memory/__stack_pointer + i32.const 1488 + i32.store + i32.const 1 + call $~lib/array/Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 1488 + i32.store offset=4 + global.get $compound-assignment-side-effect/idxCalls + i32.const 1 + i32.add + global.set $compound-assignment-side-effect/idxCalls + global.get $~lib/memory/__stack_pointer + i32.const 1488 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 1488 + i32.store offset=8 + call $~lib/array/Array#__get + i32.const 2 + i32.or + call $~lib/array/Array#__set + global.get $~lib/memory/__stack_pointer + i32.const 1488 + i32.store + call $~lib/array/Array#__get + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1536 + i32.const 96 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $compound-assignment-side-effect/idxCalls + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1536 + i32.const 97 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + br $__inlined_func$start:compound-assignment-side-effect + end + i32.const 34528 + i32.const 34576 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/itcms/step (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + block $break|0 + block $case2|0 + block $case1|0 + block $case0|0 + global.get $~lib/rt/itcms/state + br_table $case0|0 $case1|0 $case2|0 $break|0 + end + i32.const 1 + global.set $~lib/rt/itcms/state + i32.const 0 + global.set $~lib/rt/itcms/visitCount + call $~lib/rt/itcms/visitRoots + global.get $~lib/rt/itcms/toSpace + global.set $~lib/rt/itcms/iter + global.get $~lib/rt/itcms/visitCount + return + end + global.get $~lib/rt/itcms/white + i32.eqz + local.set $1 + global.get $~lib/rt/itcms/iter + i32.load offset=4 + i32.const -4 + i32.and + local.set $0 + loop $while-continue|1 + local.get $0 + global.get $~lib/rt/itcms/toSpace + i32.ne + if + local.get $0 + global.set $~lib/rt/itcms/iter + local.get $1 + local.get $0 + i32.load offset=4 + local.tee $2 + i32.const 3 + i32.and + i32.ne + if + local.get $0 + local.get $2 + i32.const -4 + i32.and + local.get $1 + i32.or + i32.store offset=4 + i32.const 0 + global.set $~lib/rt/itcms/visitCount + local.get $0 + i32.const 20 + i32.add + call $~lib/rt/__visit_members + global.get $~lib/rt/itcms/visitCount + return + end + local.get $0 + i32.load offset=4 + i32.const -4 + i32.and + local.set $0 + br $while-continue|1 + end + end + i32.const 0 + global.set $~lib/rt/itcms/visitCount + call $~lib/rt/itcms/visitRoots + global.get $~lib/rt/itcms/toSpace + global.get $~lib/rt/itcms/iter + i32.load offset=4 + i32.const -4 + i32.and + i32.eq + if + global.get $~lib/memory/__stack_pointer + local.set $0 + loop $while-continue|0 + local.get $0 + i32.const 34508 + i32.lt_u + if + local.get $0 + i32.load + call $~lib/rt/itcms/__visit + local.get $0 + i32.const 4 + i32.add + local.set $0 + br $while-continue|0 + end + end + global.get $~lib/rt/itcms/iter + i32.load offset=4 + i32.const -4 + i32.and + local.set $0 + loop $while-continue|2 + local.get $0 + global.get $~lib/rt/itcms/toSpace + i32.ne + if + local.get $1 + local.get $0 + i32.load offset=4 + local.tee $2 + i32.const 3 + i32.and + i32.ne + if + local.get $0 + local.get $2 + i32.const -4 + i32.and + local.get $1 + i32.or + i32.store offset=4 + local.get $0 + i32.const 20 + i32.add + call $~lib/rt/__visit_members + end + local.get $0 + i32.load offset=4 + i32.const -4 + i32.and + local.set $0 + br $while-continue|2 + end + end + global.get $~lib/rt/itcms/fromSpace + local.set $0 + global.get $~lib/rt/itcms/toSpace + global.set $~lib/rt/itcms/fromSpace + local.get $0 + global.set $~lib/rt/itcms/toSpace + local.get $1 + global.set $~lib/rt/itcms/white + local.get $0 + i32.load offset=4 + i32.const -4 + i32.and + global.set $~lib/rt/itcms/iter + i32.const 2 + global.set $~lib/rt/itcms/state + end + global.get $~lib/rt/itcms/visitCount + return + end + global.get $~lib/rt/itcms/iter + local.tee $0 + global.get $~lib/rt/itcms/toSpace + i32.ne + if + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -4 + i32.and + global.set $~lib/rt/itcms/iter + global.get $~lib/rt/itcms/white + i32.eqz + local.get $1 + i32.const 3 + i32.and + i32.ne + if + i32.const 0 + i32.const 1120 + i32.const 229 + i32.const 20 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 34508 + i32.lt_u + if + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + else + global.get $~lib/rt/itcms/total + local.get $0 + i32.load + i32.const -4 + i32.and + i32.const 4 + i32.add + i32.sub + global.set $~lib/rt/itcms/total + local.get $0 + i32.const 4 + i32.add + local.tee $0 + i32.const 34508 + i32.ge_u + if + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + local.get $0 + i32.const 4 + i32.sub + local.set $2 + local.get $0 + i32.const 15 + i32.and + i32.const 1 + local.get $0 + select + if (result i32) + i32.const 1 + else + local.get $2 + i32.load + i32.const 1 + i32.and + end + if + i32.const 0 + i32.const 1392 + i32.const 562 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $2 + i32.load + i32.const 1 + i32.or + i32.store + local.get $2 + call $~lib/rt/tlsf/insertBlock + end + end + i32.const 10 + return + end + global.get $~lib/rt/itcms/toSpace + global.get $~lib/rt/itcms/toSpace + i32.store offset=4 + global.get $~lib/rt/itcms/toSpace + global.get $~lib/rt/itcms/toSpace + i32.store offset=8 + i32.const 0 + global.set $~lib/rt/itcms/state + end + i32.const 0 + ) + (func $compound-assignment-side-effect/testPropertyCompoundAssignments + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 56 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1740 + i32.lt_s + if + i32.const 34528 + i32.const 34576 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 56 + memory.fill + i32.const 8 + call $compound-assignment-side-effect/resetBox + global.get $compound-assignment-side-effect/boxCalls + i32.const 1 + i32.add + global.set $compound-assignment-side-effect/boxCalls + global.get $~lib/memory/__stack_pointer + global.get $compound-assignment-side-effect/box + local.tee $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.load + i32.const 2 + i32.add + i32.store + global.get $~lib/memory/__stack_pointer + global.get $compound-assignment-side-effect/box + local.tee $0 + i32.store offset=4 + local.get $0 + i32.load + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 1536 + i32.const 25 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + block $folding-inner0 + global.get $compound-assignment-side-effect/boxCalls + i32.const 1 + i32.ne + br_if $folding-inner0 + i32.const 8 + call $compound-assignment-side-effect/resetBox + global.get $compound-assignment-side-effect/boxCalls + i32.const 1 + i32.add + global.set $compound-assignment-side-effect/boxCalls + global.get $~lib/memory/__stack_pointer + global.get $compound-assignment-side-effect/box + local.tee $0 + i32.store offset=12 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.load + i32.const 3 + i32.sub + i32.store + global.get $~lib/memory/__stack_pointer + global.get $compound-assignment-side-effect/box + local.tee $0 + i32.store offset=4 + local.get $0 + i32.load + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 1536 + i32.const 30 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $compound-assignment-side-effect/boxCalls + i32.const 1 + i32.ne + br_if $folding-inner0 + i32.const 8 + call $compound-assignment-side-effect/resetBox + global.get $compound-assignment-side-effect/boxCalls + i32.const 1 + i32.add + global.set $compound-assignment-side-effect/boxCalls + global.get $~lib/memory/__stack_pointer + global.get $compound-assignment-side-effect/box + local.tee $0 + i32.store offset=16 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.load + i32.const 3 + i32.mul + i32.store + global.get $~lib/memory/__stack_pointer + global.get $compound-assignment-side-effect/box + local.tee $0 + i32.store offset=4 + local.get $0 + i32.load + i32.const 24 + i32.ne + if + i32.const 0 + i32.const 1536 + i32.const 35 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $compound-assignment-side-effect/boxCalls + i32.const 1 + i32.ne + br_if $folding-inner0 + i32.const 8 + call $compound-assignment-side-effect/resetBox + global.get $compound-assignment-side-effect/boxCalls + i32.const 1 + i32.add + global.set $compound-assignment-side-effect/boxCalls + global.get $~lib/memory/__stack_pointer + global.get $compound-assignment-side-effect/box + local.tee $0 + i32.store offset=20 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.load + i32.const 2 + i32.div_s + i32.store + global.get $~lib/memory/__stack_pointer + global.get $compound-assignment-side-effect/box + local.tee $0 + i32.store offset=4 + local.get $0 + i32.load + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1536 + i32.const 40 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $compound-assignment-side-effect/boxCalls + i32.const 1 + i32.ne + br_if $folding-inner0 + i32.const 8 + call $compound-assignment-side-effect/resetBox + global.get $compound-assignment-side-effect/boxCalls + i32.const 1 + i32.add + global.set $compound-assignment-side-effect/boxCalls + global.get $~lib/memory/__stack_pointer + global.get $compound-assignment-side-effect/box + local.tee $0 + i32.store offset=24 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.load + i32.const 3 + i32.rem_s + i32.store + global.get $~lib/memory/__stack_pointer + global.get $compound-assignment-side-effect/box + local.tee $0 + i32.store offset=4 + local.get $0 + i32.load + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 1536 + i32.const 45 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $compound-assignment-side-effect/boxCalls + i32.const 1 + i32.ne + br_if $folding-inner0 + i32.const 8 + call $compound-assignment-side-effect/resetBox + global.get $compound-assignment-side-effect/boxCalls + i32.const 1 + i32.add + global.set $compound-assignment-side-effect/boxCalls + global.get $~lib/memory/__stack_pointer + global.get $compound-assignment-side-effect/box + local.tee $0 + i32.store offset=28 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.load + i32.const 1 + i32.shl + i32.store + global.get $~lib/memory/__stack_pointer + global.get $compound-assignment-side-effect/box + local.tee $0 + i32.store offset=4 + local.get $0 + i32.load + i32.const 16 + i32.ne + if + i32.const 0 + i32.const 1536 + i32.const 50 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $compound-assignment-side-effect/boxCalls + i32.const 1 + i32.ne + br_if $folding-inner0 + i32.const 8 + call $compound-assignment-side-effect/resetBox + global.get $compound-assignment-side-effect/boxCalls + i32.const 1 + i32.add + global.set $compound-assignment-side-effect/boxCalls + global.get $~lib/memory/__stack_pointer + global.get $compound-assignment-side-effect/box + local.tee $0 + i32.store offset=32 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.load + i32.const 1 + i32.shr_s + i32.store + global.get $~lib/memory/__stack_pointer + global.get $compound-assignment-side-effect/box + local.tee $0 + i32.store offset=4 + local.get $0 + i32.load + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1536 + i32.const 55 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $compound-assignment-side-effect/boxCalls + i32.const 1 + i32.ne + br_if $folding-inner0 + i32.const -8 + call $compound-assignment-side-effect/resetBox + global.get $compound-assignment-side-effect/boxCalls + i32.const 1 + i32.add + global.set $compound-assignment-side-effect/boxCalls + global.get $~lib/memory/__stack_pointer + global.get $compound-assignment-side-effect/box + local.tee $0 + i32.store offset=36 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.load + i32.const 1 + i32.shr_u + i32.store + global.get $~lib/memory/__stack_pointer + global.get $compound-assignment-side-effect/box + local.tee $0 + i32.store offset=4 + local.get $0 + i32.load + i32.const 2147483644 + i32.ne + if + i32.const 0 + i32.const 1536 + i32.const 60 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $compound-assignment-side-effect/boxCalls + i32.const 1 + i32.ne + br_if $folding-inner0 + i32.const 10 + call $compound-assignment-side-effect/resetBox + global.get $compound-assignment-side-effect/boxCalls + i32.const 1 + i32.add + global.set $compound-assignment-side-effect/boxCalls + global.get $~lib/memory/__stack_pointer + global.get $compound-assignment-side-effect/box + local.tee $0 + i32.store offset=40 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.load + i32.const 3 + i32.and + i32.store + global.get $~lib/memory/__stack_pointer + global.get $compound-assignment-side-effect/box + local.tee $0 + i32.store offset=4 + local.get $0 + i32.load + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 1536 + i32.const 65 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $compound-assignment-side-effect/boxCalls + i32.const 1 + i32.ne + br_if $folding-inner0 + i32.const 8 + call $compound-assignment-side-effect/resetBox + global.get $compound-assignment-side-effect/boxCalls + i32.const 1 + i32.add + global.set $compound-assignment-side-effect/boxCalls + global.get $~lib/memory/__stack_pointer + global.get $compound-assignment-side-effect/box + local.tee $0 + i32.store offset=44 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.load + i32.const 3 + i32.or + i32.store + global.get $~lib/memory/__stack_pointer + global.get $compound-assignment-side-effect/box + local.tee $0 + i32.store offset=4 + local.get $0 + i32.load + i32.const 11 + i32.ne + if + i32.const 0 + i32.const 1536 + i32.const 70 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $compound-assignment-side-effect/boxCalls + i32.const 1 + i32.ne + br_if $folding-inner0 + i32.const 8 + call $compound-assignment-side-effect/resetBox + global.get $compound-assignment-side-effect/boxCalls + i32.const 1 + i32.add + global.set $compound-assignment-side-effect/boxCalls + global.get $~lib/memory/__stack_pointer + global.get $compound-assignment-side-effect/box + local.tee $0 + i32.store offset=48 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.load + i32.const 3 + i32.xor + i32.store + global.get $~lib/memory/__stack_pointer + global.get $compound-assignment-side-effect/box + local.tee $0 + i32.store offset=4 + local.get $0 + i32.load + i32.const 11 + i32.ne + if + i32.const 0 + i32.const 1536 + i32.const 75 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $compound-assignment-side-effect/boxCalls + i32.const 1 + i32.ne + br_if $folding-inner0 + i32.const 3 + call $compound-assignment-side-effect/resetBox + global.get $compound-assignment-side-effect/boxCalls + i32.const 1 + i32.add + global.set $compound-assignment-side-effect/boxCalls + global.get $~lib/memory/__stack_pointer + global.get $compound-assignment-side-effect/box + local.tee $0 + i32.store offset=52 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.load + local.tee $0 + i32.const 2 + i32.eq + if (result i32) + i32.const 4 + else + local.get $0 + local.get $0 + i32.mul + end + i32.store + global.get $~lib/memory/__stack_pointer + global.get $compound-assignment-side-effect/box + local.tee $0 + i32.store offset=4 + local.get $0 + i32.load + i32.const 9 + i32.ne + if + i32.const 0 + i32.const 1536 + i32.const 80 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $compound-assignment-side-effect/boxCalls + i32.const 1 + i32.ne + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 56 + i32.add + global.set $~lib/memory/__stack_pointer + return + end + i32.const 0 + i32.const 1536 + i32.const 19 + i32.const 3 + call $~lib/builtins/abort + unreachable + ) +) diff --git a/tests/compiler/compound-assignment-side-effect.ts b/tests/compiler/compound-assignment-side-effect.ts new file mode 100644 index 0000000000..b943eb7260 --- /dev/null +++ b/tests/compiler/compound-assignment-side-effect.ts @@ -0,0 +1,101 @@ +class Box { + value: i32 = 0; +} + +let box = new Box(); +let boxCalls: i32 = 0; + +function getBox(): Box { + boxCalls++; + return box; +} + +function resetBox(value: i32): void { + box.value = value; + boxCalls = 0; +} + +function assertOneBoxCall(): void { + assert(boxCalls == 1); +} + +function testPropertyCompoundAssignments(): void { + resetBox(8); + getBox().value += 2; + assert(box.value == 10); + assertOneBoxCall(); + + resetBox(8); + getBox().value -= 3; + assert(box.value == 5); + assertOneBoxCall(); + + resetBox(8); + getBox().value *= 3; + assert(box.value == 24); + assertOneBoxCall(); + + resetBox(8); + getBox().value /= 2; + assert(box.value == 4); + assertOneBoxCall(); + + resetBox(8); + getBox().value %= 3; + assert(box.value == 2); + assertOneBoxCall(); + + resetBox(8); + getBox().value <<= 1; + assert(box.value == 16); + assertOneBoxCall(); + + resetBox(8); + getBox().value >>= 1; + assert(box.value == 4); + assertOneBoxCall(); + + resetBox(-8); + getBox().value >>>= 1; + assert(box.value == 2147483644); + assertOneBoxCall(); + + resetBox(10); + getBox().value &= 3; + assert(box.value == 2); + assertOneBoxCall(); + + resetBox(8); + getBox().value |= 3; + assert(box.value == 11); + assertOneBoxCall(); + + resetBox(8); + getBox().value ^= 3; + assert(box.value == 11); + assertOneBoxCall(); + + resetBox(3); + getBox().value **= 2; + assert(box.value == 9); + assertOneBoxCall(); +} + +let arr = [1, 2]; +let idxCalls: i32 = 0; + +function getIndex(): i32 { + idxCalls++; + return 0; +} + +function testElementCompoundAssignments(): void { + idxCalls = 0; + arr[0] = 1; + arr[getIndex()] |= 2; + assert(arr[0] == 3); + assert(idxCalls == 1); +} + +testPropertyCompoundAssignments(); +testElementCompoundAssignments(); diff --git a/tests/compiler/constructor.debug.wat b/tests/compiler/constructor.debug.wat index 9e1fc9db1d..9a2000d722 100644 --- a/tests/compiler/constructor.debug.wat +++ b/tests/compiler/constructor.debug.wat @@ -2014,7 +2014,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2080,21 +2080,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2110,6 +2095,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/constructor.release.wat b/tests/compiler/constructor.release.wat index 0299cca344..ad8fd76392 100644 --- a/tests/compiler/constructor.release.wat +++ b/tests/compiler/constructor.release.wat @@ -82,7 +82,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$153 + block $__inlined_func$~lib/rt/itcms/Object#unlink$152 local.get $1 i32.load offset=4 i32.const -4 @@ -106,7 +106,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$153 + br $__inlined_func$~lib/rt/itcms/Object#unlink$152 end local.get $1 i32.load offset=8 @@ -217,7 +217,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -234,7 +234,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 diff --git a/tests/compiler/do.debug.wat b/tests/compiler/do.debug.wat index cb3313e590..7df84c1078 100644 --- a/tests/compiler/do.debug.wat +++ b/tests/compiler/do.debug.wat @@ -2408,7 +2408,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2474,21 +2474,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2504,6 +2489,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/do.release.wat b/tests/compiler/do.release.wat index 09a5e6e6a9..e017d5889a 100644 --- a/tests/compiler/do.release.wat +++ b/tests/compiler/do.release.wat @@ -332,7 +332,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$125 + block $__inlined_func$~lib/rt/itcms/Object#unlink$124 local.get $1 i32.load offset=4 i32.const -4 @@ -356,7 +356,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$125 + br $__inlined_func$~lib/rt/itcms/Object#unlink$124 end local.get $1 i32.load offset=8 @@ -1235,7 +1235,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $1 loop $do-loop|0 @@ -1252,7 +1252,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $1 i32.const 0 diff --git a/tests/compiler/duplicate-fields.debug.wat b/tests/compiler/duplicate-fields.debug.wat index 752c8deba5..9610d9b8fe 100644 --- a/tests/compiler/duplicate-fields.debug.wat +++ b/tests/compiler/duplicate-fields.debug.wat @@ -2008,7 +2008,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2074,21 +2074,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2104,6 +2089,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/duplicate-fields.release.wat b/tests/compiler/duplicate-fields.release.wat index 93f8386acc..cc9f1b3c69 100644 --- a/tests/compiler/duplicate-fields.release.wat +++ b/tests/compiler/duplicate-fields.release.wat @@ -57,7 +57,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -74,7 +74,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 @@ -844,7 +844,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$139 + block $__inlined_func$~lib/rt/itcms/Object#unlink$138 local.get $0 i32.load offset=4 i32.const -4 @@ -868,7 +868,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$139 + br $__inlined_func$~lib/rt/itcms/Object#unlink$138 end local.get $0 i32.load offset=8 diff --git a/tests/compiler/empty-exportruntime.debug.wat b/tests/compiler/empty-exportruntime.debug.wat index e95efa75fe..696bbfd05a 100644 --- a/tests/compiler/empty-exportruntime.debug.wat +++ b/tests/compiler/empty-exportruntime.debug.wat @@ -2007,7 +2007,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2073,21 +2073,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2103,6 +2088,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/empty-exportruntime.release.wat b/tests/compiler/empty-exportruntime.release.wat index 422cd0bc5a..6315246516 100644 --- a/tests/compiler/empty-exportruntime.release.wat +++ b/tests/compiler/empty-exportruntime.release.wat @@ -1414,7 +1414,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -1431,7 +1431,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 diff --git a/tests/compiler/empty-new.debug.wat b/tests/compiler/empty-new.debug.wat index 424bdfc617..4dc7e0f423 100644 --- a/tests/compiler/empty-new.debug.wat +++ b/tests/compiler/empty-new.debug.wat @@ -2000,7 +2000,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2066,21 +2066,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2096,6 +2081,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/empty-new.release.wat b/tests/compiler/empty-new.release.wat index f4381da8f1..86d71de6c4 100644 --- a/tests/compiler/empty-new.release.wat +++ b/tests/compiler/empty-new.release.wat @@ -69,7 +69,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$107 + block $__inlined_func$~lib/rt/itcms/Object#unlink$106 local.get $1 i32.load offset=4 i32.const -4 @@ -93,7 +93,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$107 + br $__inlined_func$~lib/rt/itcms/Object#unlink$106 end local.get $1 i32.load offset=8 @@ -1200,7 +1200,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $0 loop $do-loop|0 @@ -1217,7 +1217,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $0 i32.const 0 diff --git a/tests/compiler/exportstar-rereexport.debug.wat b/tests/compiler/exportstar-rereexport.debug.wat index 26289418ed..666fd42278 100644 --- a/tests/compiler/exportstar-rereexport.debug.wat +++ b/tests/compiler/exportstar-rereexport.debug.wat @@ -2040,7 +2040,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2106,21 +2106,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2136,6 +2121,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/exportstar-rereexport.release.wat b/tests/compiler/exportstar-rereexport.release.wat index 29956c7614..7e61e3d84b 100644 --- a/tests/compiler/exportstar-rereexport.release.wat +++ b/tests/compiler/exportstar-rereexport.release.wat @@ -85,7 +85,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$120 + block $__inlined_func$~lib/rt/itcms/Object#unlink$119 local.get $1 i32.load offset=4 i32.const -4 @@ -109,7 +109,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$120 + br $__inlined_func$~lib/rt/itcms/Object#unlink$119 end local.get $1 i32.load offset=8 @@ -1405,7 +1405,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $0 loop $do-loop|0 @@ -1422,7 +1422,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $0 i32.const 0 diff --git a/tests/compiler/extends-baseaggregate.debug.wat b/tests/compiler/extends-baseaggregate.debug.wat index 9842604142..171b76058b 100644 --- a/tests/compiler/extends-baseaggregate.debug.wat +++ b/tests/compiler/extends-baseaggregate.debug.wat @@ -2010,7 +2010,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2076,21 +2076,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2106,6 +2091,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/extends-baseaggregate.release.wat b/tests/compiler/extends-baseaggregate.release.wat index 7ece00a053..ddc48a680c 100644 --- a/tests/compiler/extends-baseaggregate.release.wat +++ b/tests/compiler/extends-baseaggregate.release.wat @@ -91,7 +91,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -108,7 +108,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 @@ -858,7 +858,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$142 + block $__inlined_func$~lib/rt/itcms/Object#unlink$141 local.get $0 i32.load offset=4 i32.const -4 @@ -882,7 +882,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$142 + br $__inlined_func$~lib/rt/itcms/Object#unlink$141 end local.get $0 i32.load offset=8 @@ -1674,7 +1674,7 @@ global.get $~lib/memory/__stack_pointer i32.const 1168 i32.store - block $__inlined_func$~lib/rt/itcms/__renew$141 + block $__inlined_func$~lib/rt/itcms/__renew$140 i32.const 1073741820 local.get $0 i32.const 1 @@ -1717,7 +1717,7 @@ i32.store offset=16 local.get $0 local.set $1 - br $__inlined_func$~lib/rt/itcms/__renew$141 + br $__inlined_func$~lib/rt/itcms/__renew$140 end local.get $3 local.get $2 diff --git a/tests/compiler/extends-recursive.debug.wat b/tests/compiler/extends-recursive.debug.wat index a4d78b0d14..569bae4ed7 100644 --- a/tests/compiler/extends-recursive.debug.wat +++ b/tests/compiler/extends-recursive.debug.wat @@ -2000,7 +2000,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2066,21 +2066,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2096,6 +2081,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/extends-recursive.release.wat b/tests/compiler/extends-recursive.release.wat index 4ae0ed92db..5063842527 100644 --- a/tests/compiler/extends-recursive.release.wat +++ b/tests/compiler/extends-recursive.release.wat @@ -70,7 +70,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$116 + block $__inlined_func$~lib/rt/itcms/Object#unlink$115 local.get $0 i32.load offset=4 i32.const -4 @@ -94,7 +94,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$116 + br $__inlined_func$~lib/rt/itcms/Object#unlink$115 end local.get $0 i32.load offset=8 @@ -597,7 +597,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -614,7 +614,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 diff --git a/tests/compiler/field-initialization.debug.wat b/tests/compiler/field-initialization.debug.wat index e5375a2469..afef4b8120 100644 --- a/tests/compiler/field-initialization.debug.wat +++ b/tests/compiler/field-initialization.debug.wat @@ -2011,7 +2011,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2077,21 +2077,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2107,6 +2092,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/field-initialization.release.wat b/tests/compiler/field-initialization.release.wat index 187b718ade..193f8cbde5 100644 --- a/tests/compiler/field-initialization.release.wat +++ b/tests/compiler/field-initialization.release.wat @@ -71,7 +71,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -88,7 +88,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 @@ -563,7 +563,7 @@ end end end - block $__inlined_func$~lib/util/string/compareImpl$118 + block $__inlined_func$~lib/util/string/compareImpl$117 loop $while-continue|1 local.get $0 local.tee $3 @@ -583,7 +583,7 @@ local.get $4 local.get $5 i32.ne - br_if $__inlined_func$~lib/util/string/compareImpl$118 + br_if $__inlined_func$~lib/util/string/compareImpl$117 local.get $2 i32.const 2 i32.add @@ -1144,7 +1144,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$241 + block $__inlined_func$~lib/rt/itcms/Object#unlink$240 local.get $0 i32.load offset=4 i32.const -4 @@ -1168,7 +1168,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$241 + br $__inlined_func$~lib/rt/itcms/Object#unlink$240 end local.get $0 i32.load offset=8 diff --git a/tests/compiler/field.debug.wat b/tests/compiler/field.debug.wat index e2ca4b3acc..0badbbdae6 100644 --- a/tests/compiler/field.debug.wat +++ b/tests/compiler/field.debug.wat @@ -2003,7 +2003,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2069,21 +2069,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2099,6 +2084,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/field.release.wat b/tests/compiler/field.release.wat index da05c7bb6a..27a37f23fc 100644 --- a/tests/compiler/field.release.wat +++ b/tests/compiler/field.release.wat @@ -340,7 +340,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -357,7 +357,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 @@ -1048,7 +1048,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$127 + block $__inlined_func$~lib/rt/itcms/Object#unlink$126 local.get $0 i32.load offset=4 i32.const -4 @@ -1072,7 +1072,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$127 + br $__inlined_func$~lib/rt/itcms/Object#unlink$126 end local.get $0 i32.load offset=8 diff --git a/tests/compiler/for.debug.wat b/tests/compiler/for.debug.wat index fd03f109f2..43ac662b72 100644 --- a/tests/compiler/for.debug.wat +++ b/tests/compiler/for.debug.wat @@ -2389,7 +2389,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2455,21 +2455,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2485,6 +2470,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/for.release.wat b/tests/compiler/for.release.wat index d638bb953f..dabb27d511 100644 --- a/tests/compiler/for.release.wat +++ b/tests/compiler/for.release.wat @@ -396,7 +396,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$128 + block $__inlined_func$~lib/rt/itcms/Object#unlink$127 local.get $1 i32.load offset=4 i32.const -4 @@ -420,7 +420,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$128 + br $__inlined_func$~lib/rt/itcms/Object#unlink$127 end local.get $1 i32.load offset=8 @@ -1235,7 +1235,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $1 loop $do-loop|0 @@ -1252,7 +1252,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $1 i32.const 0 diff --git a/tests/compiler/function-call.debug.wat b/tests/compiler/function-call.debug.wat index d533f74061..2ad583e4ce 100644 --- a/tests/compiler/function-call.debug.wat +++ b/tests/compiler/function-call.debug.wat @@ -2037,7 +2037,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2103,21 +2103,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2133,6 +2118,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/function-call.release.wat b/tests/compiler/function-call.release.wat index ae676fe060..431d8dd103 100644 --- a/tests/compiler/function-call.release.wat +++ b/tests/compiler/function-call.release.wat @@ -94,7 +94,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$115 + block $__inlined_func$~lib/rt/itcms/Object#unlink$114 local.get $1 i32.load offset=4 i32.const -4 @@ -118,7 +118,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$115 + br $__inlined_func$~lib/rt/itcms/Object#unlink$114 end local.get $1 i32.load offset=8 @@ -969,7 +969,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $1 loop $do-loop|0 @@ -986,7 +986,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $1 i32.const 0 diff --git a/tests/compiler/function-expression.debug.wat b/tests/compiler/function-expression.debug.wat index 8758a369fa..e459602747 100644 --- a/tests/compiler/function-expression.debug.wat +++ b/tests/compiler/function-expression.debug.wat @@ -2195,7 +2195,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2261,21 +2261,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2291,6 +2276,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/function-expression.release.wat b/tests/compiler/function-expression.release.wat index 560499a4a1..e72937b768 100644 --- a/tests/compiler/function-expression.release.wat +++ b/tests/compiler/function-expression.release.wat @@ -518,7 +518,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$133 + block $__inlined_func$~lib/rt/itcms/Object#unlink$132 local.get $0 i32.load offset=4 i32.const -4 @@ -542,7 +542,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$133 + br $__inlined_func$~lib/rt/itcms/Object#unlink$132 end local.get $0 i32.load offset=8 @@ -1300,7 +1300,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$71 + block $__inlined_func$~lib/rt/itcms/interrupt$70 i32.const 2048 local.set $0 loop $do-loop|0 @@ -1317,7 +1317,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$71 + br $__inlined_func$~lib/rt/itcms/interrupt$70 end local.get $0 i32.const 0 diff --git a/tests/compiler/getter-call.debug.wat b/tests/compiler/getter-call.debug.wat index 9b5cc21b43..c33e8dd49b 100644 --- a/tests/compiler/getter-call.debug.wat +++ b/tests/compiler/getter-call.debug.wat @@ -2003,7 +2003,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2069,21 +2069,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2099,6 +2084,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/getter-call.release.wat b/tests/compiler/getter-call.release.wat index 9794ae6bb1..3063e69277 100644 --- a/tests/compiler/getter-call.release.wat +++ b/tests/compiler/getter-call.release.wat @@ -75,7 +75,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$115 + block $__inlined_func$~lib/rt/itcms/Object#unlink$114 local.get $1 i32.load offset=4 i32.const -4 @@ -99,7 +99,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$115 + br $__inlined_func$~lib/rt/itcms/Object#unlink$114 end local.get $1 i32.load offset=8 @@ -945,7 +945,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $1 loop $do-loop|0 @@ -962,7 +962,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $1 i32.const 0 diff --git a/tests/compiler/heap.debug.wat b/tests/compiler/heap.debug.wat index 3b82eebc93..8e67e1e44e 100644 --- a/tests/compiler/heap.debug.wat +++ b/tests/compiler/heap.debug.wat @@ -1315,7 +1315,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -1381,21 +1381,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -1411,6 +1396,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 @@ -1617,7 +1605,7 @@ local.get $block return end - block $~lib/rt/tlsf/GETRIGHT|inlined.4 (result i32) + block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) local.get $block local.set $block|6 local.get $block|6 @@ -1630,7 +1618,7 @@ i32.xor i32.and i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.4 + br $~lib/rt/tlsf/GETRIGHT|inlined.3 end local.set $right local.get $right diff --git a/tests/compiler/heap.release.wat b/tests/compiler/heap.release.wat index cf51676de3..4d96ecb77b 100644 --- a/tests/compiler/heap.release.wat +++ b/tests/compiler/heap.release.wat @@ -1050,7 +1050,7 @@ local.get $0 call $~lib/rt/tlsf/checkUsedBlock local.set $0 - block $__inlined_func$~lib/rt/tlsf/reallocateBlock$53 + block $__inlined_func$~lib/rt/tlsf/reallocateBlock$52 i32.const 32 call $~lib/rt/tlsf/prepareSize local.tee $5 @@ -1066,7 +1066,7 @@ local.get $0 local.get $5 call $~lib/rt/tlsf/prepareBlock - br $__inlined_func$~lib/rt/tlsf/reallocateBlock$53 + br $__inlined_func$~lib/rt/tlsf/reallocateBlock$52 end local.get $0 i32.const 4 @@ -1107,7 +1107,7 @@ local.get $0 local.get $5 call $~lib/rt/tlsf/prepareBlock - br $__inlined_func$~lib/rt/tlsf/reallocateBlock$53 + br $__inlined_func$~lib/rt/tlsf/reallocateBlock$52 end end local.get $3 diff --git a/tests/compiler/incremental-gc/call-indirect.debug.wat b/tests/compiler/incremental-gc/call-indirect.debug.wat index f41def2823..eb50e9da40 100644 --- a/tests/compiler/incremental-gc/call-indirect.debug.wat +++ b/tests/compiler/incremental-gc/call-indirect.debug.wat @@ -2049,7 +2049,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2115,21 +2115,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2145,6 +2130,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/incremental-gc/call-indirect.release.wat b/tests/compiler/incremental-gc/call-indirect.release.wat index f43270e2d3..ccb93fa917 100644 --- a/tests/compiler/incremental-gc/call-indirect.release.wat +++ b/tests/compiler/incremental-gc/call-indirect.release.wat @@ -78,7 +78,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$123 + block $__inlined_func$~lib/rt/itcms/Object#unlink$122 local.get $1 i32.load offset=4 i32.const -4 @@ -102,7 +102,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$123 + br $__inlined_func$~lib/rt/itcms/Object#unlink$122 end local.get $1 i32.load offset=8 @@ -865,7 +865,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -882,7 +882,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 diff --git a/tests/compiler/infer-array.debug.wat b/tests/compiler/infer-array.debug.wat index 9a5dcdf64f..31dafa0b18 100644 --- a/tests/compiler/infer-array.debug.wat +++ b/tests/compiler/infer-array.debug.wat @@ -2022,7 +2022,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2088,21 +2088,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2118,6 +2103,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/infer-array.release.wat b/tests/compiler/infer-array.release.wat index a256276d6d..a76c680a3d 100644 --- a/tests/compiler/infer-array.release.wat +++ b/tests/compiler/infer-array.release.wat @@ -235,7 +235,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store - block $__inlined_func$~lib/rt/itcms/__renew$149 + block $__inlined_func$~lib/rt/itcms/__renew$148 i32.const 1073741820 local.get $3 i32.const 1 @@ -278,7 +278,7 @@ i32.store offset=16 local.get $3 local.set $4 - br $__inlined_func$~lib/rt/itcms/__renew$149 + br $__inlined_func$~lib/rt/itcms/__renew$148 end local.get $6 local.get $5 @@ -469,7 +469,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -486,7 +486,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 @@ -1353,7 +1353,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$154 + block $__inlined_func$~lib/rt/itcms/Object#unlink$153 local.get $0 i32.load offset=4 i32.const -4 @@ -1377,7 +1377,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$154 + br $__inlined_func$~lib/rt/itcms/Object#unlink$153 end local.get $0 i32.load offset=8 diff --git a/tests/compiler/infer-generic.debug.wat b/tests/compiler/infer-generic.debug.wat index 387d796ac2..4d7c0b4235 100644 --- a/tests/compiler/infer-generic.debug.wat +++ b/tests/compiler/infer-generic.debug.wat @@ -2049,7 +2049,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2115,21 +2115,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2145,6 +2130,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/infer-generic.release.wat b/tests/compiler/infer-generic.release.wat index a2b525afea..af4e5750f6 100644 --- a/tests/compiler/infer-generic.release.wat +++ b/tests/compiler/infer-generic.release.wat @@ -89,7 +89,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$138 + block $__inlined_func$~lib/rt/itcms/Object#unlink$137 local.get $1 i32.load offset=4 i32.const -4 @@ -113,7 +113,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$138 + br $__inlined_func$~lib/rt/itcms/Object#unlink$137 end local.get $1 i32.load offset=8 @@ -1114,7 +1114,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -1131,7 +1131,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 diff --git a/tests/compiler/inlining.debug.wat b/tests/compiler/inlining.debug.wat index c4f5314669..65f83dfb46 100644 --- a/tests/compiler/inlining.debug.wat +++ b/tests/compiler/inlining.debug.wat @@ -2272,7 +2272,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2338,21 +2338,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2368,6 +2353,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/inlining.release.wat b/tests/compiler/inlining.release.wat index 0da8126d77..ea3c6e4923 100644 --- a/tests/compiler/inlining.release.wat +++ b/tests/compiler/inlining.release.wat @@ -83,7 +83,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$125 + block $__inlined_func$~lib/rt/itcms/Object#unlink$124 local.get $1 i32.load offset=4 i32.const -4 @@ -107,7 +107,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$125 + br $__inlined_func$~lib/rt/itcms/Object#unlink$124 end local.get $1 i32.load offset=8 @@ -1163,7 +1163,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$70 + block $__inlined_func$~lib/rt/itcms/interrupt$69 i32.const 2048 local.set $2 loop $do-loop|0 @@ -1180,7 +1180,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$70 + br $__inlined_func$~lib/rt/itcms/interrupt$69 end local.get $2 i32.const 0 diff --git a/tests/compiler/instanceof.debug.wat b/tests/compiler/instanceof.debug.wat index 6cf9d166a7..eae59343f1 100644 --- a/tests/compiler/instanceof.debug.wat +++ b/tests/compiler/instanceof.debug.wat @@ -2024,7 +2024,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2090,21 +2090,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2120,6 +2105,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/instanceof.release.wat b/tests/compiler/instanceof.release.wat index 3605a2ca97..0713e99e00 100644 --- a/tests/compiler/instanceof.release.wat +++ b/tests/compiler/instanceof.release.wat @@ -73,7 +73,7 @@ i32.store local.get $0 if (result i32) - block $__inlined_func$~instanceof|instanceof/Y$78 (result i32) + block $__inlined_func$~instanceof|instanceof/Y$77 (result i32) block $is_instance local.get $0 i32.const 8 @@ -88,7 +88,7 @@ i32.eq br_if $is_instance i32.const 0 - br $__inlined_func$~instanceof|instanceof/Y$78 + br $__inlined_func$~instanceof|instanceof/Y$77 end i32.const 1 end @@ -147,7 +147,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$241 + block $__inlined_func$~lib/rt/itcms/Object#unlink$240 local.get $1 i32.load offset=4 i32.const -4 @@ -171,7 +171,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$241 + br $__inlined_func$~lib/rt/itcms/Object#unlink$240 end local.get $1 i32.load offset=8 @@ -270,7 +270,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $1 loop $do-loop|0 @@ -287,7 +287,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $1 i32.const 0 @@ -515,7 +515,7 @@ i32.store local.get $0 if (result i32) - block $__inlined_func$~instanceof|instanceof/X$76 (result i32) + block $__inlined_func$~instanceof|instanceof/X$75 (result i32) block $is_instance block $tablify|0 local.get $0 @@ -527,7 +527,7 @@ br_table $is_instance $tablify|0 $tablify|0 $is_instance $tablify|0 $tablify|0 $is_instance $tablify|0 end i32.const 0 - br $__inlined_func$~instanceof|instanceof/X$76 + br $__inlined_func$~instanceof|instanceof/X$75 end i32.const 1 end @@ -619,7 +619,7 @@ i32.store local.get $0 if (result i32) - block $__inlined_func$~instanceof|instanceof/Y$82 (result i32) + block $__inlined_func$~instanceof|instanceof/Y$81 (result i32) block $is_instance local.get $0 i32.const 8 @@ -634,7 +634,7 @@ i32.eq br_if $is_instance i32.const 0 - br $__inlined_func$~instanceof|instanceof/Y$82 + br $__inlined_func$~instanceof|instanceof/Y$81 end i32.const 1 end @@ -2440,7 +2440,7 @@ i32.store offset=12 local.get $0 if (result i32) - block $__inlined_func$~anyinstanceof|instanceof/Child$110 (result i32) + block $__inlined_func$~anyinstanceof|instanceof/Child$109 (result i32) block $is_instance1 local.get $0 i32.const 8 @@ -2455,7 +2455,7 @@ i32.eq br_if $is_instance1 i32.const 0 - br $__inlined_func$~anyinstanceof|instanceof/Child$110 + br $__inlined_func$~anyinstanceof|instanceof/Child$109 end i32.const 1 end @@ -2485,7 +2485,7 @@ i32.store offset=16 local.get $0 if (result i32) - block $__inlined_func$~instanceof|instanceof/Cat$111 (result i32) + block $__inlined_func$~instanceof|instanceof/Cat$110 (result i32) block $is_instance2 local.get $0 i32.const 8 @@ -2500,7 +2500,7 @@ i32.eq br_if $is_instance2 i32.const 0 - br $__inlined_func$~instanceof|instanceof/Cat$111 + br $__inlined_func$~instanceof|instanceof/Cat$110 end i32.const 1 end @@ -2544,7 +2544,7 @@ i32.store offset=24 local.get $0 if (result i32) - block $__inlined_func$~instanceof|instanceof/Cat$113 (result i32) + block $__inlined_func$~instanceof|instanceof/Cat$112 (result i32) block $is_instance4 local.get $0 i32.const 8 @@ -2559,7 +2559,7 @@ i32.eq br_if $is_instance4 i32.const 0 - br $__inlined_func$~instanceof|instanceof/Cat$113 + br $__inlined_func$~instanceof|instanceof/Cat$112 end i32.const 1 end @@ -2604,7 +2604,7 @@ i32.store offset=32 local.get $0 if (result i32) - block $__inlined_func$~instanceof|instanceof/Cat$115 (result i32) + block $__inlined_func$~instanceof|instanceof/Cat$114 (result i32) block $is_instance6 local.get $0 i32.const 8 @@ -2619,7 +2619,7 @@ i32.eq br_if $is_instance6 i32.const 0 - br $__inlined_func$~instanceof|instanceof/Cat$115 + br $__inlined_func$~instanceof|instanceof/Cat$114 end i32.const 1 end @@ -2683,7 +2683,7 @@ i32.store offset=40 local.get $0 if (result i32) - block $__inlined_func$~instanceof|instanceof/Cat$117 (result i32) + block $__inlined_func$~instanceof|instanceof/Cat$116 (result i32) block $is_instance8 local.get $0 i32.const 8 @@ -2698,7 +2698,7 @@ i32.eq br_if $is_instance8 i32.const 0 - br $__inlined_func$~instanceof|instanceof/Cat$117 + br $__inlined_func$~instanceof|instanceof/Cat$116 end i32.const 1 end @@ -2752,7 +2752,7 @@ i32.store offset=48 local.get $0 if (result i32) - block $__inlined_func$~instanceof|instanceof/Cat$119 (result i32) + block $__inlined_func$~instanceof|instanceof/Cat$118 (result i32) block $is_instance10 local.get $0 i32.const 8 @@ -2767,7 +2767,7 @@ i32.eq br_if $is_instance10 i32.const 0 - br $__inlined_func$~instanceof|instanceof/Cat$119 + br $__inlined_func$~instanceof|instanceof/Cat$118 end i32.const 1 end @@ -2822,7 +2822,7 @@ i32.store offset=56 local.get $0 if (result i32) - block $__inlined_func$~instanceof|instanceof/Cat$121 (result i32) + block $__inlined_func$~instanceof|instanceof/Cat$120 (result i32) block $is_instance12 local.get $0 i32.const 8 @@ -2837,7 +2837,7 @@ i32.eq br_if $is_instance12 i32.const 0 - br $__inlined_func$~instanceof|instanceof/Cat$121 + br $__inlined_func$~instanceof|instanceof/Cat$120 end i32.const 1 end diff --git a/tests/compiler/issues/1095.debug.wat b/tests/compiler/issues/1095.debug.wat index 4a22d3612d..4df75af07e 100644 --- a/tests/compiler/issues/1095.debug.wat +++ b/tests/compiler/issues/1095.debug.wat @@ -2003,7 +2003,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2069,21 +2069,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2099,6 +2084,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/issues/1095.release.wat b/tests/compiler/issues/1095.release.wat index 542118d3ea..48fea91ef4 100644 --- a/tests/compiler/issues/1095.release.wat +++ b/tests/compiler/issues/1095.release.wat @@ -477,7 +477,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$117 + block $__inlined_func$~lib/rt/itcms/Object#unlink$116 local.get $0 i32.load offset=4 i32.const -4 @@ -501,7 +501,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$117 + br $__inlined_func$~lib/rt/itcms/Object#unlink$116 end local.get $0 i32.load offset=8 @@ -1005,7 +1005,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -1022,7 +1022,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 diff --git a/tests/compiler/issues/1225.debug.wat b/tests/compiler/issues/1225.debug.wat index 2abb8194d5..090d31e88b 100644 --- a/tests/compiler/issues/1225.debug.wat +++ b/tests/compiler/issues/1225.debug.wat @@ -2018,7 +2018,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2084,21 +2084,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2114,6 +2099,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/issues/1225.release.wat b/tests/compiler/issues/1225.release.wat index 3a9ede7e7b..1a9e74234a 100644 --- a/tests/compiler/issues/1225.release.wat +++ b/tests/compiler/issues/1225.release.wat @@ -75,7 +75,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$119 + block $__inlined_func$~lib/rt/itcms/Object#unlink$118 local.get $1 i32.load offset=4 i32.const -4 @@ -99,7 +99,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$119 + br $__inlined_func$~lib/rt/itcms/Object#unlink$118 end local.get $1 i32.load offset=8 @@ -1399,7 +1399,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $0 loop $do-loop|0 @@ -1416,7 +1416,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $0 i32.const 0 diff --git a/tests/compiler/issues/1699.debug.wat b/tests/compiler/issues/1699.debug.wat index b7c5009d63..95d7fde8b2 100644 --- a/tests/compiler/issues/1699.debug.wat +++ b/tests/compiler/issues/1699.debug.wat @@ -2005,7 +2005,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2071,21 +2071,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2101,6 +2086,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/issues/1699.release.wat b/tests/compiler/issues/1699.release.wat index 5da543848f..ea6b808467 100644 --- a/tests/compiler/issues/1699.release.wat +++ b/tests/compiler/issues/1699.release.wat @@ -86,7 +86,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -103,7 +103,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 @@ -916,7 +916,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$146 + block $__inlined_func$~lib/rt/itcms/Object#unlink$145 local.get $0 i32.load offset=4 i32.const -4 @@ -940,7 +940,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$146 + br $__inlined_func$~lib/rt/itcms/Object#unlink$145 end local.get $0 i32.load offset=8 @@ -1200,7 +1200,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store - block $__inlined_func$~lib/rt/itcms/__renew$145 + block $__inlined_func$~lib/rt/itcms/__renew$144 i32.const 1073741820 local.get $3 i32.const 1 @@ -1243,7 +1243,7 @@ i32.store offset=16 local.get $3 local.set $4 - br $__inlined_func$~lib/rt/itcms/__renew$145 + br $__inlined_func$~lib/rt/itcms/__renew$144 end local.get $6 local.get $5 diff --git a/tests/compiler/issues/2166.debug.wat b/tests/compiler/issues/2166.debug.wat index 0d98c3c656..1f9e10df28 100644 --- a/tests/compiler/issues/2166.debug.wat +++ b/tests/compiler/issues/2166.debug.wat @@ -2007,7 +2007,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2073,21 +2073,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2103,6 +2088,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/issues/2166.release.wat b/tests/compiler/issues/2166.release.wat index fa61a80944..374775fb15 100644 --- a/tests/compiler/issues/2166.release.wat +++ b/tests/compiler/issues/2166.release.wat @@ -156,7 +156,7 @@ end end end - block $__inlined_func$~lib/util/string/compareImpl$79 + block $__inlined_func$~lib/util/string/compareImpl$78 loop $while-continue|1 local.get $0 local.tee $3 @@ -176,7 +176,7 @@ local.get $4 local.get $5 i32.ne - br_if $__inlined_func$~lib/util/string/compareImpl$79 + br_if $__inlined_func$~lib/util/string/compareImpl$78 local.get $2 i32.const 2 i32.add @@ -243,7 +243,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$122 + block $__inlined_func$~lib/rt/itcms/Object#unlink$121 local.get $1 i32.load offset=4 i32.const -4 @@ -267,7 +267,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$122 + br $__inlined_func$~lib/rt/itcms/Object#unlink$121 end local.get $1 i32.load offset=8 @@ -758,7 +758,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $1 loop $do-loop|0 @@ -775,7 +775,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $1 i32.const 0 diff --git a/tests/compiler/issues/2322/index.debug.wat b/tests/compiler/issues/2322/index.debug.wat index 3799f01a97..647a8b2c21 100644 --- a/tests/compiler/issues/2322/index.debug.wat +++ b/tests/compiler/issues/2322/index.debug.wat @@ -2001,7 +2001,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2067,21 +2067,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2097,6 +2082,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/issues/2322/index.release.wat b/tests/compiler/issues/2322/index.release.wat index cf2df6b497..5dbb8e37a4 100644 --- a/tests/compiler/issues/2322/index.release.wat +++ b/tests/compiler/issues/2322/index.release.wat @@ -71,7 +71,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$112 + block $__inlined_func$~lib/rt/itcms/Object#unlink$111 local.get $1 i32.load offset=4 i32.const -4 @@ -95,7 +95,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$112 + br $__inlined_func$~lib/rt/itcms/Object#unlink$111 end local.get $1 i32.load offset=8 @@ -993,7 +993,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -1010,7 +1010,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 diff --git a/tests/compiler/issues/2622.debug.wat b/tests/compiler/issues/2622.debug.wat index 6514ce97bf..2463667b25 100644 --- a/tests/compiler/issues/2622.debug.wat +++ b/tests/compiler/issues/2622.debug.wat @@ -2004,7 +2004,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2070,21 +2070,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2100,6 +2085,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/issues/2622.release.wat b/tests/compiler/issues/2622.release.wat index 2cb8d68623..642342a084 100644 --- a/tests/compiler/issues/2622.release.wat +++ b/tests/compiler/issues/2622.release.wat @@ -74,7 +74,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$111 + block $__inlined_func$~lib/rt/itcms/Object#unlink$110 local.get $1 i32.load offset=4 i32.const -4 @@ -98,7 +98,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$111 + br $__inlined_func$~lib/rt/itcms/Object#unlink$110 end local.get $1 i32.load offset=8 @@ -589,7 +589,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $1 loop $do-loop|0 @@ -606,7 +606,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $1 i32.const 0 diff --git a/tests/compiler/issues/2707.debug.wat b/tests/compiler/issues/2707.debug.wat index 388b0f0f43..0f81bae24a 100644 --- a/tests/compiler/issues/2707.debug.wat +++ b/tests/compiler/issues/2707.debug.wat @@ -2010,7 +2010,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2076,21 +2076,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2106,6 +2091,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/issues/2707.release.wat b/tests/compiler/issues/2707.release.wat index ad235b50e2..3d584b02a1 100644 --- a/tests/compiler/issues/2707.release.wat +++ b/tests/compiler/issues/2707.release.wat @@ -477,7 +477,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$119 + block $__inlined_func$~lib/rt/itcms/Object#unlink$118 local.get $0 i32.load offset=4 i32.const -4 @@ -501,7 +501,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$119 + br $__inlined_func$~lib/rt/itcms/Object#unlink$118 end local.get $0 i32.load offset=8 @@ -972,7 +972,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $1 loop $do-loop|0 @@ -989,7 +989,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $1 i32.const 0 diff --git a/tests/compiler/issues/2873.debug.wat b/tests/compiler/issues/2873.debug.wat index 15c9c5ddef..3b1bb05503 100644 --- a/tests/compiler/issues/2873.debug.wat +++ b/tests/compiler/issues/2873.debug.wat @@ -3602,7 +3602,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -3668,21 +3668,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -3698,6 +3683,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/issues/2873.release.wat b/tests/compiler/issues/2873.release.wat index 82a92f5c23..5831247b4f 100644 --- a/tests/compiler/issues/2873.release.wat +++ b/tests/compiler/issues/2873.release.wat @@ -115,7 +115,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$138 + block $__inlined_func$~lib/rt/itcms/Object#unlink$137 local.get $1 i32.load offset=4 i32.const -4 @@ -139,7 +139,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$138 + br $__inlined_func$~lib/rt/itcms/Object#unlink$137 end local.get $1 i32.load offset=8 @@ -250,7 +250,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$72 + block $__inlined_func$~lib/rt/itcms/interrupt$71 i32.const 2048 local.set $1 loop $do-loop|0 @@ -267,7 +267,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$72 + br $__inlined_func$~lib/rt/itcms/interrupt$71 end local.get $1 i32.const 0 @@ -970,7 +970,7 @@ end end end - block $__inlined_func$~lib/util/string/compareImpl$82 + block $__inlined_func$~lib/util/string/compareImpl$81 loop $while-continue|1 local.get $0 local.tee $3 @@ -990,7 +990,7 @@ local.get $4 local.get $5 i32.ne - br_if $__inlined_func$~lib/util/string/compareImpl$82 + br_if $__inlined_func$~lib/util/string/compareImpl$81 local.get $2 i32.const 2 i32.add @@ -2479,7 +2479,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $__inlined_func$~lib/util/string/joinFloatArray$143 + block $__inlined_func$~lib/util/string/joinFloatArray$142 local.get $1 i32.const 1 i32.sub @@ -2493,7 +2493,7 @@ global.set $~lib/memory/__stack_pointer i32.const 3152 local.set $1 - br $__inlined_func$~lib/util/string/joinFloatArray$143 + br $__inlined_func$~lib/util/string/joinFloatArray$142 end local.get $4 i32.eqz @@ -2506,7 +2506,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinFloatArray$143 + br $__inlined_func$~lib/util/string/joinFloatArray$142 end global.get $~lib/memory/__stack_pointer i32.const 3184 @@ -2602,7 +2602,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinFloatArray$143 + br $__inlined_func$~lib/util/string/joinFloatArray$142 end global.get $~lib/memory/__stack_pointer i32.const 8 @@ -2668,7 +2668,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $__inlined_func$~lib/util/string/joinFloatArray$144 + block $__inlined_func$~lib/util/string/joinFloatArray$143 local.get $0 i32.const 1 i32.sub @@ -2682,7 +2682,7 @@ global.set $~lib/memory/__stack_pointer i32.const 3152 local.set $1 - br $__inlined_func$~lib/util/string/joinFloatArray$144 + br $__inlined_func$~lib/util/string/joinFloatArray$143 end local.get $4 i32.eqz @@ -2695,7 +2695,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinFloatArray$144 + br $__inlined_func$~lib/util/string/joinFloatArray$143 end global.get $~lib/memory/__stack_pointer i32.const 3184 @@ -2795,7 +2795,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinFloatArray$144 + br $__inlined_func$~lib/util/string/joinFloatArray$143 end global.get $~lib/memory/__stack_pointer i32.const 8 diff --git a/tests/compiler/logical.debug.wat b/tests/compiler/logical.debug.wat index bf7e9e66c3..b13edbe37d 100644 --- a/tests/compiler/logical.debug.wat +++ b/tests/compiler/logical.debug.wat @@ -2038,7 +2038,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2104,21 +2104,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2134,6 +2119,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/logical.release.wat b/tests/compiler/logical.release.wat index 7d72c4c009..6bda7b1ad6 100644 --- a/tests/compiler/logical.release.wat +++ b/tests/compiler/logical.release.wat @@ -82,7 +82,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$122 + block $__inlined_func$~lib/rt/itcms/Object#unlink$121 local.get $1 i32.load offset=4 i32.const -4 @@ -106,7 +106,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$122 + br $__inlined_func$~lib/rt/itcms/Object#unlink$121 end local.get $1 i32.load offset=8 @@ -205,7 +205,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $1 loop $do-loop|0 @@ -222,7 +222,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $1 i32.const 0 diff --git a/tests/compiler/managed-cast.debug.wat b/tests/compiler/managed-cast.debug.wat index 1582c65137..9a367ec011 100644 --- a/tests/compiler/managed-cast.debug.wat +++ b/tests/compiler/managed-cast.debug.wat @@ -2003,7 +2003,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2069,21 +2069,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2099,6 +2084,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/managed-cast.release.wat b/tests/compiler/managed-cast.release.wat index 99e4fafa6f..b4cd1adde0 100644 --- a/tests/compiler/managed-cast.release.wat +++ b/tests/compiler/managed-cast.release.wat @@ -431,7 +431,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$137 + block $__inlined_func$~lib/rt/itcms/Object#unlink$136 local.get $1 i32.load offset=4 i32.const -4 @@ -455,7 +455,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$137 + br $__inlined_func$~lib/rt/itcms/Object#unlink$136 end local.get $1 i32.load offset=8 @@ -946,7 +946,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $1 loop $do-loop|0 @@ -963,7 +963,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $1 i32.const 0 diff --git a/tests/compiler/new.debug.wat b/tests/compiler/new.debug.wat index f26b604fbe..f32e22082c 100644 --- a/tests/compiler/new.debug.wat +++ b/tests/compiler/new.debug.wat @@ -2006,7 +2006,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2072,21 +2072,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2102,6 +2087,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/new.release.wat b/tests/compiler/new.release.wat index b952e13bf6..54fca472f0 100644 --- a/tests/compiler/new.release.wat +++ b/tests/compiler/new.release.wat @@ -76,7 +76,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$116 + block $__inlined_func$~lib/rt/itcms/Object#unlink$115 local.get $1 i32.load offset=4 i32.const -4 @@ -100,7 +100,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$116 + br $__inlined_func$~lib/rt/itcms/Object#unlink$115 end local.get $1 i32.load offset=8 @@ -199,7 +199,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $1 loop $do-loop|0 @@ -216,7 +216,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $1 i32.const 0 diff --git a/tests/compiler/number.debug.wat b/tests/compiler/number.debug.wat index a6dc854df5..745a7bd1d9 100644 --- a/tests/compiler/number.debug.wat +++ b/tests/compiler/number.debug.wat @@ -2106,7 +2106,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2172,21 +2172,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2202,6 +2187,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/number.release.wat b/tests/compiler/number.release.wat index 71d88ecec9..bc9a4d54be 100644 --- a/tests/compiler/number.release.wat +++ b/tests/compiler/number.release.wat @@ -192,7 +192,7 @@ end end end - block $__inlined_func$~lib/util/string/compareImpl$81 + block $__inlined_func$~lib/util/string/compareImpl$80 loop $while-continue|1 local.get $0 local.tee $3 @@ -212,7 +212,7 @@ local.get $4 local.get $5 i32.ne - br_if $__inlined_func$~lib/util/string/compareImpl$81 + br_if $__inlined_func$~lib/util/string/compareImpl$80 local.get $2 i32.const 2 i32.add @@ -263,7 +263,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $__inlined_func$~lib/util/number/itoa32$73 + block $__inlined_func$~lib/util/number/itoa32$72 local.get $0 i32.eqz if @@ -273,7 +273,7 @@ global.set $~lib/memory/__stack_pointer i32.const 1248 local.set $0 - br $__inlined_func$~lib/util/number/itoa32$73 + br $__inlined_func$~lib/util/number/itoa32$72 end global.get $~lib/memory/__stack_pointer i32.const 0 @@ -398,7 +398,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$165 + block $__inlined_func$~lib/rt/itcms/Object#unlink$164 local.get $1 i32.load offset=4 i32.const -4 @@ -422,7 +422,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$165 + br $__inlined_func$~lib/rt/itcms/Object#unlink$164 end local.get $1 i32.load offset=8 @@ -1425,7 +1425,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $1 loop $do-loop|0 @@ -1442,7 +1442,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $1 i32.const 0 diff --git a/tests/compiler/object-literal.debug.wat b/tests/compiler/object-literal.debug.wat index 49aa74b6e3..912f71c683 100644 --- a/tests/compiler/object-literal.debug.wat +++ b/tests/compiler/object-literal.debug.wat @@ -2098,7 +2098,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2164,21 +2164,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2194,6 +2179,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/object-literal.release.wat b/tests/compiler/object-literal.release.wat index 872f7b5c5f..f72f88228e 100644 --- a/tests/compiler/object-literal.release.wat +++ b/tests/compiler/object-literal.release.wat @@ -239,7 +239,7 @@ end end end - block $__inlined_func$~lib/util/string/compareImpl$83 + block $__inlined_func$~lib/util/string/compareImpl$82 loop $while-continue|1 local.get $0 local.tee $3 @@ -259,7 +259,7 @@ local.get $4 local.get $5 i32.ne - br_if $__inlined_func$~lib/util/string/compareImpl$83 + br_if $__inlined_func$~lib/util/string/compareImpl$82 local.get $2 i32.const 2 i32.add @@ -306,7 +306,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$68 + block $__inlined_func$~lib/rt/itcms/interrupt$67 i32.const 2048 local.set $2 loop $do-loop|0 @@ -323,7 +323,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$68 + br $__inlined_func$~lib/rt/itcms/interrupt$67 end local.get $2 i32.const 0 @@ -1145,7 +1145,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$205 + block $__inlined_func$~lib/rt/itcms/Object#unlink$204 local.get $0 i32.load offset=4 i32.const -4 @@ -1169,7 +1169,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$205 + br $__inlined_func$~lib/rt/itcms/Object#unlink$204 end local.get $0 i32.load offset=8 @@ -2085,7 +2085,7 @@ i32.const 1 i32.shl local.set $3 - block $__inlined_func$~lib/string/String#substring$210 + block $__inlined_func$~lib/string/String#substring$209 local.get $2 i32.const 0 local.get $2 @@ -2106,7 +2106,7 @@ global.set $~lib/memory/__stack_pointer i32.const 1568 local.set $0 - br $__inlined_func$~lib/string/String#substring$210 + br $__inlined_func$~lib/string/String#substring$209 end local.get $3 i32.eqz @@ -2123,7 +2123,7 @@ global.set $~lib/memory/__stack_pointer i32.const 1056 local.set $0 - br $__inlined_func$~lib/string/String#substring$210 + br $__inlined_func$~lib/string/String#substring$209 end global.get $~lib/memory/__stack_pointer local.get $2 diff --git a/tests/compiler/operator-overload-non-ambiguity.debug.wat b/tests/compiler/operator-overload-non-ambiguity.debug.wat index af1c4b6144..325b2f258d 100644 --- a/tests/compiler/operator-overload-non-ambiguity.debug.wat +++ b/tests/compiler/operator-overload-non-ambiguity.debug.wat @@ -2001,7 +2001,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2067,21 +2067,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2097,6 +2082,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/operator-overload-non-ambiguity.release.wat b/tests/compiler/operator-overload-non-ambiguity.release.wat index 375613c57c..b0bf31bedc 100644 --- a/tests/compiler/operator-overload-non-ambiguity.release.wat +++ b/tests/compiler/operator-overload-non-ambiguity.release.wat @@ -43,7 +43,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $1 loop $do-loop|0 @@ -60,7 +60,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $1 i32.const 0 @@ -302,7 +302,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$116 + block $__inlined_func$~lib/rt/itcms/Object#unlink$115 local.get $1 i32.load offset=4 i32.const -4 @@ -326,7 +326,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$116 + br $__inlined_func$~lib/rt/itcms/Object#unlink$115 end local.get $1 i32.load offset=8 diff --git a/tests/compiler/optional-typeparameters.debug.wat b/tests/compiler/optional-typeparameters.debug.wat index f0ccf39b01..89996fb51d 100644 --- a/tests/compiler/optional-typeparameters.debug.wat +++ b/tests/compiler/optional-typeparameters.debug.wat @@ -2014,7 +2014,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2080,21 +2080,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2110,6 +2095,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/optional-typeparameters.release.wat b/tests/compiler/optional-typeparameters.release.wat index 9dd537f30a..2d30d6b388 100644 --- a/tests/compiler/optional-typeparameters.release.wat +++ b/tests/compiler/optional-typeparameters.release.wat @@ -74,7 +74,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$131 + block $__inlined_func$~lib/rt/itcms/Object#unlink$130 local.get $1 i32.load offset=4 i32.const -4 @@ -98,7 +98,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$131 + br $__inlined_func$~lib/rt/itcms/Object#unlink$130 end local.get $1 i32.load offset=8 @@ -197,7 +197,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $1 loop $do-loop|0 @@ -214,7 +214,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $1 i32.const 0 diff --git a/tests/compiler/postfix-update-side-effect.debug.wat b/tests/compiler/postfix-update-side-effect.debug.wat new file mode 100644 index 0000000000..fff9edbbe7 --- /dev/null +++ b/tests/compiler/postfix-update-side-effect.debug.wat @@ -0,0 +1,2526 @@ +(module + (type $0 (func (param i32) (result i32))) + (type $1 (func (param i32 i32))) + (type $2 (func (param i32))) + (type $3 (func)) + (type $4 (func (param i32 i32) (result i32))) + (type $5 (func (param i32 i32 i32))) + (type $6 (func (result i32))) + (type $7 (func (param i32 i32 i32 i32))) + (type $8 (func (param i32 i32 i64) (result i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/iter (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/toSpace (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) + (global $~lib/shared/runtime/Runtime.Stub i32 (i32.const 0)) + (global $~lib/shared/runtime/Runtime.Minimal i32 (i32.const 1)) + (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2)) + (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) + (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) + (global $postfix-update-side-effect/first (mut i32) (i32.const 0)) + (global $postfix-update-side-effect/second (mut i32) (i32.const 0)) + (global $postfix-update-side-effect/receiverCalls (mut i32) (i32.const 0)) + (global $~lib/rt/__rtti_base i32 (i32.const 496)) + (global $~lib/memory/__data_end i32 (i32.const 520)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 33288)) + (global $~lib/memory/__heap_base i32 (i32.const 33288)) + (memory $0 1) + (data $0 (i32.const 12) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00") + (data $1 (i32.const 76) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $2 (i32.const 144) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $3 (i32.const 176) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $4 (i32.const 204) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e\00\00\00\00\00\00\00\00\00") + (data $5 (i32.const 268) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s\00\00\00\00\00\00\00\00\00") + (data $6 (i32.const 320) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $7 (i32.const 348) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data $8 (i32.const 412) "L\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00:\00\00\00p\00o\00s\00t\00f\00i\00x\00-\00u\00p\00d\00a\00t\00e\00-\00s\00i\00d\00e\00-\00e\00f\00f\00e\00c\00t\00.\00t\00s\00\00\00") + (data $9 (i32.const 496) "\05\00\00\00 \00\00\00 \00\00\00 \00\00\00\00\00\00\00 \00\00\00") + (table $0 1 1 funcref) + (elem $0 (i32.const 1)) + (export "memory" (memory $0)) + (start $~start) + (func $~lib/rt/itcms/Object#set:nextWithColor (param $this i32) (param $nextWithColor i32) + local.get $this + local.get $nextWithColor + i32.store offset=4 + ) + (func $~lib/rt/itcms/Object#set:prev (param $this i32) (param $prev i32) + local.get $this + local.get $prev + i32.store offset=8 + ) + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space + call $~lib/rt/itcms/Object#set:nextWithColor + local.get $space + local.get $space + call $~lib/rt/itcms/Object#set:prev + local.get $space + return + ) + (func $~lib/rt/itcms/Object#get:nextWithColor (param $this i32) (result i32) + local.get $this + i32.load offset=4 + ) + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this + call $~lib/rt/itcms/Object#get:nextWithColor + i32.const 3 + i32.const -1 + i32.xor + i32.and + return + ) + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this + call $~lib/rt/itcms/Object#get:nextWithColor + i32.const 3 + i32.and + return + ) + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + local.get $cookie + call $~lib/rt/__visit_globals + global.get $~lib/rt/itcms/pinSpace + local.set $pn + local.get $pn + call $~lib/rt/itcms/Object#get:next + local.set $iter + loop $while-continue|0 + local.get $iter + local.get $pn + i32.ne + if + i32.const 1 + drop + local.get $iter + call $~lib/rt/itcms/Object#get:color + i32.const 3 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 96 + i32.const 160 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.get $iter + i32.const 20 + i32.add + local.get $cookie + call $~lib/rt/__visit_members + local.get $iter + call $~lib/rt/itcms/Object#get:next + local.set $iter + br $while-continue|0 + end + end + ) + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this + call $~lib/rt/itcms/Object#get:nextWithColor + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $color + i32.or + call $~lib/rt/itcms/Object#set:nextWithColor + ) + (func $~lib/rt/itcms/Object#get:prev (param $this i32) (result i32) + local.get $this + i32.load offset=8 + ) + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this + call $~lib/rt/itcms/Object#get:nextWithColor + i32.const 3 + i32.and + i32.or + call $~lib/rt/itcms/Object#set:nextWithColor + ) + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this + call $~lib/rt/itcms/Object#get:next + local.set $next + local.get $next + i32.const 0 + i32.eq + if + i32.const 1 + drop + local.get $this + call $~lib/rt/itcms/Object#get:prev + i32.const 0 + i32.eq + if (result i32) + local.get $this + global.get $~lib/memory/__heap_base + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 96 + i32.const 128 + i32.const 18 + call $~lib/builtins/abort + unreachable + end + return + end + local.get $this + call $~lib/rt/itcms/Object#get:prev + local.set $prev + i32.const 1 + drop + local.get $prev + i32.eqz + if + i32.const 0 + i32.const 96 + i32.const 132 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.get $next + local.get $prev + call $~lib/rt/itcms/Object#set:prev + local.get $prev + local.get $next + call $~lib/rt/itcms/Object#set:next + ) + (func $~lib/rt/itcms/Object#get:rtId (param $this i32) (result i32) + local.get $this + i32.load offset=12 + ) + (func $~lib/shared/typeinfo/Typeinfo#get:flags (param $this i32) (result i32) + local.get $this + i32.load + ) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) + global.get $~lib/rt/__rtti_base + local.set $ptr + local.get $id + local.get $ptr + i32.load + i32.gt_u + if + i32.const 224 + i32.const 288 + i32.const 21 + i32.const 28 + call $~lib/builtins/abort + unreachable + end + local.get $ptr + i32.const 4 + i32.add + local.get $id + i32.const 4 + i32.mul + i32.add + call $~lib/shared/typeinfo/Typeinfo#get:flags + return + ) + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this + call $~lib/rt/itcms/Object#get:rtId + local.set $rtId + local.get $rtId + i32.const 2 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $rtId + call $~lib/rt/__typeinfo + i32.const 32 + i32.and + i32.const 0 + i32.ne + end + return + ) + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list + call $~lib/rt/itcms/Object#get:prev + local.set $prev + local.get $this + local.get $list + local.get $withColor + i32.or + call $~lib/rt/itcms/Object#set:nextWithColor + local.get $this + local.get $prev + call $~lib/rt/itcms/Object#set:prev + local.get $prev + local.get $this + call $~lib/rt/itcms/Object#set:next + local.get $list + local.get $this + call $~lib/rt/itcms/Object#set:prev + ) + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $1 i32) + local.get $this + global.get $~lib/rt/itcms/iter + i32.eq + if + local.get $this + call $~lib/rt/itcms/Object#get:prev + local.tee $1 + i32.eqz + if (result i32) + i32.const 0 + i32.const 96 + i32.const 148 + i32.const 30 + call $~lib/builtins/abort + unreachable + else + local.get $1 + end + global.set $~lib/rt/itcms/iter + end + local.get $this + call $~lib/rt/itcms/Object#unlink + local.get $this + global.get $~lib/rt/itcms/toSpace + local.get $this + call $~lib/rt/itcms/Object#get:isPointerfree + if (result i32) + global.get $~lib/rt/itcms/white + i32.eqz + else + i32.const 2 + end + call $~lib/rt/itcms/Object#linkTo + ) + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr + i32.eqz + if + return + end + local.get $ptr + i32.const 20 + i32.sub + local.set $obj + i32.const 0 + drop + local.get $obj + call $~lib/rt/itcms/Object#get:color + global.get $~lib/rt/itcms/white + i32.eq + if + local.get $obj + call $~lib/rt/itcms/Object#makeGray + global.get $~lib/rt/itcms/visitCount + i32.const 1 + i32.add + global.set $~lib/rt/itcms/visitCount + end + ) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + global.get $~lib/memory/__stack_pointer + local.set $ptr + loop $while-continue|0 + local.get $ptr + global.get $~lib/memory/__heap_base + i32.lt_u + if + local.get $ptr + i32.load + local.get $cookie + call $~lib/rt/itcms/__visit + local.get $ptr + i32.const 4 + i32.add + local.set $ptr + br $while-continue|0 + end + end + ) + (func $~lib/rt/common/BLOCK#get:mmInfo (param $this i32) (result i32) + local.get $this + i32.load + ) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) + i32.const 4 + local.get $this + call $~lib/rt/common/BLOCK#get:mmInfo + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + return + ) + (func $~lib/rt/tlsf/Root#set:flMap (param $this i32) (param $flMap i32) + local.get $this + local.get $flMap + i32.store + ) + (func $~lib/rt/common/BLOCK#set:mmInfo (param $this i32) (param $mmInfo i32) + local.get $this + local.get $mmInfo + i32.store + ) + (func $~lib/rt/tlsf/Block#set:prev (param $this i32) (param $prev i32) + local.get $this + local.get $prev + i32.store offset=4 + ) + (func $~lib/rt/tlsf/Block#set:next (param $this i32) (param $next i32) + local.get $this + local.get $next + i32.store offset=8 + ) + (func $~lib/rt/tlsf/Block#get:prev (param $this i32) (result i32) + local.get $this + i32.load offset=4 + ) + (func $~lib/rt/tlsf/Block#get:next (param $this i32) (result i32) + local.get $this + i32.load offset=8 + ) + (func $~lib/rt/tlsf/Root#get:flMap (param $this i32) (result i32) + local.get $this + i32.load + ) + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $6 i32) + (local $7 i32) + (local $boundedSize i32) + (local $prev i32) + (local $next i32) + (local $root|11 i32) + (local $fl|12 i32) + (local $sl|13 i32) + (local $root|14 i32) + (local $fl|15 i32) + (local $sl|16 i32) + (local $head i32) + (local $root|18 i32) + (local $fl|19 i32) + (local $slMap i32) + (local $root|21 i32) + (local $fl|22 i32) + (local $slMap|23 i32) + local.get $block + call $~lib/rt/common/BLOCK#get:mmInfo + local.set $blockInfo + i32.const 1 + drop + local.get $blockInfo + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 268 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $blockInfo + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.set $size + i32.const 1 + drop + local.get $size + i32.const 12 + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 270 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $size + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $fl + local.get $size + i32.const 4 + i32.shr_u + local.set $sl + else + local.get $size + local.tee $6 + i32.const 1073741820 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_u + select + local.set $boundedSize + i32.const 31 + local.get $boundedSize + i32.clz + i32.sub + local.set $fl + local.get $boundedSize + local.get $fl + i32.const 4 + i32.sub + i32.shr_u + i32.const 1 + i32.const 4 + i32.shl + i32.xor + local.set $sl + local.get $fl + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $fl + end + i32.const 1 + drop + local.get $fl + i32.const 23 + i32.lt_u + if (result i32) + local.get $sl + i32.const 16 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 284 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $block + call $~lib/rt/tlsf/Block#get:prev + local.set $prev + local.get $block + call $~lib/rt/tlsf/Block#get:next + local.set $next + local.get $prev + if + local.get $prev + local.get $next + call $~lib/rt/tlsf/Block#set:next + end + local.get $next + if + local.get $next + local.get $prev + call $~lib/rt/tlsf/Block#set:prev + end + local.get $block + block $~lib/rt/tlsf/GETHEAD|inlined.0 (result i32) + local.get $root + local.set $root|11 + local.get $fl + local.set $fl|12 + local.get $sl + local.set $sl|13 + local.get $root|11 + local.get $fl|12 + i32.const 4 + i32.shl + local.get $sl|13 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + br $~lib/rt/tlsf/GETHEAD|inlined.0 + end + i32.eq + if + local.get $root + local.set $root|14 + local.get $fl + local.set $fl|15 + local.get $sl + local.set $sl|16 + local.get $next + local.set $head + local.get $root|14 + local.get $fl|15 + i32.const 4 + i32.shl + local.get $sl|16 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $head + i32.store offset=96 + local.get $next + i32.eqz + if + block $~lib/rt/tlsf/GETSL|inlined.0 (result i32) + local.get $root + local.set $root|18 + local.get $fl + local.set $fl|19 + local.get $root|18 + local.get $fl|19 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + br $~lib/rt/tlsf/GETSL|inlined.0 + end + local.set $slMap + local.get $root + local.set $root|21 + local.get $fl + local.set $fl|22 + local.get $slMap + i32.const 1 + local.get $sl + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $slMap + local.set $slMap|23 + local.get $root|21 + local.get $fl|22 + i32.const 2 + i32.shl + i32.add + local.get $slMap|23 + i32.store offset=4 + local.get $slMap + i32.eqz + if + local.get $root + local.get $root + call $~lib/rt/tlsf/Root#get:flMap + i32.const 1 + local.get $fl + i32.shl + i32.const -1 + i32.xor + i32.and + call $~lib/rt/tlsf/Root#set:flMap + end + end + end + ) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $block|3 i32) + (local $right i32) + (local $rightInfo i32) + (local $block|6 i32) + (local $block|7 i32) + (local $left i32) + (local $leftInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $13 i32) + (local $14 i32) + (local $boundedSize i32) + (local $root|16 i32) + (local $fl|17 i32) + (local $sl|18 i32) + (local $head i32) + (local $root|20 i32) + (local $fl|21 i32) + (local $sl|22 i32) + (local $head|23 i32) + (local $root|24 i32) + (local $fl|25 i32) + (local $root|26 i32) + (local $fl|27 i32) + (local $slMap i32) + i32.const 1 + drop + local.get $block + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 201 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $block + call $~lib/rt/common/BLOCK#get:mmInfo + local.set $blockInfo + i32.const 1 + drop + local.get $blockInfo + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 203 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + block $~lib/rt/tlsf/GETRIGHT|inlined.0 (result i32) + local.get $block + local.set $block|3 + local.get $block|3 + i32.const 4 + i32.add + local.get $block|3 + call $~lib/rt/common/BLOCK#get:mmInfo + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + br $~lib/rt/tlsf/GETRIGHT|inlined.0 + end + local.set $right + local.get $right + call $~lib/rt/common/BLOCK#get:mmInfo + local.set $rightInfo + local.get $rightInfo + i32.const 1 + i32.and + if + local.get $root + local.get $right + call $~lib/rt/tlsf/removeBlock + local.get $block + local.get $blockInfo + i32.const 4 + i32.add + local.get $rightInfo + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + local.tee $blockInfo + call $~lib/rt/common/BLOCK#set:mmInfo + block $~lib/rt/tlsf/GETRIGHT|inlined.1 (result i32) + local.get $block + local.set $block|6 + local.get $block|6 + i32.const 4 + i32.add + local.get $block|6 + call $~lib/rt/common/BLOCK#get:mmInfo + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + br $~lib/rt/tlsf/GETRIGHT|inlined.1 + end + local.set $right + local.get $right + call $~lib/rt/common/BLOCK#get:mmInfo + local.set $rightInfo + end + local.get $blockInfo + i32.const 2 + i32.and + if + block $~lib/rt/tlsf/GETFREELEFT|inlined.0 (result i32) + local.get $block + local.set $block|7 + local.get $block|7 + i32.const 4 + i32.sub + i32.load + br $~lib/rt/tlsf/GETFREELEFT|inlined.0 + end + local.set $left + local.get $left + call $~lib/rt/common/BLOCK#get:mmInfo + local.set $leftInfo + i32.const 1 + drop + local.get $leftInfo + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 221 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.get $root + local.get $left + call $~lib/rt/tlsf/removeBlock + local.get $left + local.set $block + local.get $block + local.get $leftInfo + i32.const 4 + i32.add + local.get $blockInfo + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + local.tee $blockInfo + call $~lib/rt/common/BLOCK#set:mmInfo + end + local.get $right + local.get $rightInfo + i32.const 2 + i32.or + call $~lib/rt/common/BLOCK#set:mmInfo + local.get $blockInfo + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.set $size + i32.const 1 + drop + local.get $size + i32.const 12 + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 233 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + drop + local.get $block + i32.const 4 + i32.add + local.get $size + i32.add + local.get $right + i32.eq + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 234 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $right + i32.const 4 + i32.sub + local.get $block + i32.store + local.get $size + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $fl + local.get $size + i32.const 4 + i32.shr_u + local.set $sl + else + local.get $size + local.tee $13 + i32.const 1073741820 + local.tee $14 + local.get $13 + local.get $14 + i32.lt_u + select + local.set $boundedSize + i32.const 31 + local.get $boundedSize + i32.clz + i32.sub + local.set $fl + local.get $boundedSize + local.get $fl + i32.const 4 + i32.sub + i32.shr_u + i32.const 1 + i32.const 4 + i32.shl + i32.xor + local.set $sl + local.get $fl + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $fl + end + i32.const 1 + drop + local.get $fl + i32.const 23 + i32.lt_u + if (result i32) + local.get $sl + i32.const 16 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 251 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + block $~lib/rt/tlsf/GETHEAD|inlined.1 (result i32) + local.get $root + local.set $root|16 + local.get $fl + local.set $fl|17 + local.get $sl + local.set $sl|18 + local.get $root|16 + local.get $fl|17 + i32.const 4 + i32.shl + local.get $sl|18 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + br $~lib/rt/tlsf/GETHEAD|inlined.1 + end + local.set $head + local.get $block + i32.const 0 + call $~lib/rt/tlsf/Block#set:prev + local.get $block + local.get $head + call $~lib/rt/tlsf/Block#set:next + local.get $head + if + local.get $head + local.get $block + call $~lib/rt/tlsf/Block#set:prev + end + local.get $root + local.set $root|20 + local.get $fl + local.set $fl|21 + local.get $sl + local.set $sl|22 + local.get $block + local.set $head|23 + local.get $root|20 + local.get $fl|21 + i32.const 4 + i32.shl + local.get $sl|22 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $head|23 + i32.store offset=96 + local.get $root + local.get $root + call $~lib/rt/tlsf/Root#get:flMap + i32.const 1 + local.get $fl + i32.shl + i32.or + call $~lib/rt/tlsf/Root#set:flMap + local.get $root + local.set $root|26 + local.get $fl + local.set $fl|27 + block $~lib/rt/tlsf/GETSL|inlined.1 (result i32) + local.get $root + local.set $root|24 + local.get $fl + local.set $fl|25 + local.get $root|24 + local.get $fl|25 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + br $~lib/rt/tlsf/GETSL|inlined.1 + end + i32.const 1 + local.get $sl + i32.shl + i32.or + local.set $slMap + local.get $root|26 + local.get $fl|27 + i32.const 2 + i32.shl + i32.add + local.get $slMap + i32.store offset=4 + ) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $endU64 i64) (result i32) + (local $end i32) + (local $root|4 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $root|10 i32) + (local $tail|11 i32) + local.get $endU64 + i32.wrap_i64 + local.set $end + i32.const 1 + drop + local.get $start + i64.extend_i32_u + local.get $endU64 + i64.le_u + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 382 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $start + i32.const 4 + i32.add + i32.const 15 + i32.add + i32.const 15 + i32.const -1 + i32.xor + i32.and + i32.const 4 + i32.sub + local.set $start + local.get $end + i32.const 15 + i32.const -1 + i32.xor + i32.and + local.set $end + block $~lib/rt/tlsf/GETTAIL|inlined.0 (result i32) + local.get $root + local.set $root|4 + local.get $root|4 + i32.load offset=1568 + br $~lib/rt/tlsf/GETTAIL|inlined.0 + end + local.set $tail + i32.const 0 + local.set $tailInfo + local.get $tail + if + i32.const 1 + drop + local.get $start + local.get $tail + i32.const 4 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 389 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.get $start + i32.const 16 + i32.sub + local.get $tail + i32.eq + if + local.get $start + i32.const 16 + i32.sub + local.set $start + local.get $tail + call $~lib/rt/common/BLOCK#get:mmInfo + local.set $tailInfo + else + end + else + i32.const 1 + drop + local.get $start + local.get $root + i32.const 1572 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 402 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + end + local.get $end + local.get $start + i32.sub + local.set $size + local.get $size + i32.const 4 + i32.const 12 + i32.add + i32.const 4 + i32.add + i32.lt_u + if + i32.const 0 + return + end + local.get $size + i32.const 2 + i32.const 4 + i32.mul + i32.sub + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize + i32.const 1 + i32.or + local.get $tailInfo + i32.const 2 + i32.and + i32.or + call $~lib/rt/common/BLOCK#set:mmInfo + local.get $left + i32.const 0 + call $~lib/rt/tlsf/Block#set:prev + local.get $left + i32.const 0 + call $~lib/rt/tlsf/Block#set:next + local.get $start + i32.const 4 + i32.add + local.get $leftSize + i32.add + local.set $tail + local.get $tail + i32.const 0 + i32.const 2 + i32.or + call $~lib/rt/common/BLOCK#set:mmInfo + local.get $root + local.set $root|10 + local.get $tail + local.set $tail|11 + local.get $root|10 + local.get $tail|11 + i32.store offset=1568 + local.get $root + local.get $left + call $~lib/rt/tlsf/insertBlock + i32.const 1 + return + ) + (func $~lib/rt/tlsf/initialize + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $root|4 i32) + (local $tail i32) + (local $fl i32) + (local $root|7 i32) + (local $fl|8 i32) + (local $slMap i32) + (local $sl i32) + (local $root|11 i32) + (local $fl|12 i32) + (local $sl|13 i32) + (local $head i32) + (local $memStart i32) + i32.const 0 + drop + global.get $~lib/memory/__heap_base + i32.const 15 + i32.add + i32.const 15 + i32.const -1 + i32.xor + i32.and + local.set $rootOffset + memory.size + local.set $pagesBefore + local.get $rootOffset + i32.const 1572 + i32.add + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore + i32.gt_s + if (result i32) + local.get $pagesNeeded + local.get $pagesBefore + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + local.get $rootOffset + local.set $root + local.get $root + i32.const 0 + call $~lib/rt/tlsf/Root#set:flMap + local.get $root + local.set $root|4 + i32.const 0 + local.set $tail + local.get $root|4 + local.get $tail + i32.store offset=1568 + i32.const 0 + local.set $fl + loop $for-loop|0 + local.get $fl + i32.const 23 + i32.lt_u + if + local.get $root + local.set $root|7 + local.get $fl + local.set $fl|8 + i32.const 0 + local.set $slMap + local.get $root|7 + local.get $fl|8 + i32.const 2 + i32.shl + i32.add + local.get $slMap + i32.store offset=4 + i32.const 0 + local.set $sl + loop $for-loop|1 + local.get $sl + i32.const 16 + i32.lt_u + if + local.get $root + local.set $root|11 + local.get $fl + local.set $fl|12 + local.get $sl + local.set $sl|13 + i32.const 0 + local.set $head + local.get $root|11 + local.get $fl|12 + i32.const 4 + i32.shl + local.get $sl|13 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $head + i32.store offset=96 + local.get $sl + i32.const 1 + i32.add + local.set $sl + br $for-loop|1 + end + end + local.get $fl + i32.const 1 + i32.add + local.set $fl + br $for-loop|0 + end + end + local.get $rootOffset + i32.const 1572 + i32.add + local.set $memStart + i32.const 0 + drop + local.get $root + local.get $memStart + memory.size + i64.extend_i32_s + i64.const 16 + i64.shl + call $~lib/rt/tlsf/addMemory + drop + local.get $root + global.set $~lib/rt/tlsf/ROOT + ) + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr + i32.const 4 + i32.sub + local.set $block + local.get $ptr + i32.const 0 + i32.ne + if (result i32) + local.get $ptr + i32.const 15 + i32.and + i32.eqz + else + i32.const 0 + end + if (result i32) + local.get $block + call $~lib/rt/common/BLOCK#get:mmInfo + i32.const 1 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 562 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $block + return + ) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) + i32.const 0 + drop + local.get $block + local.get $block + call $~lib/rt/common/BLOCK#get:mmInfo + i32.const 1 + i32.or + call $~lib/rt/common/BLOCK#set:mmInfo + local.get $root + local.get $block + call $~lib/rt/tlsf/insertBlock + ) + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr + global.get $~lib/memory/__heap_base + i32.lt_u + if + return + end + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + local.get $ptr + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock + ) + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj + global.get $~lib/memory/__heap_base + i32.lt_u + if + local.get $obj + i32.const 0 + call $~lib/rt/itcms/Object#set:nextWithColor + local.get $obj + i32.const 0 + call $~lib/rt/itcms/Object#set:prev + else + global.get $~lib/rt/itcms/total + local.get $obj + call $~lib/rt/itcms/Object#get:size + i32.sub + global.set $~lib/rt/itcms/total + i32.const 0 + drop + local.get $obj + i32.const 4 + i32.add + call $~lib/rt/tlsf/__free + end + ) + (func $~lib/rt/itcms/step (result i32) + (local $obj i32) + (local $1 i32) + (local $black i32) + (local $from i32) + block $break|0 + block $case2|0 + block $case1|0 + block $case0|0 + global.get $~lib/rt/itcms/state + local.set $1 + local.get $1 + i32.const 0 + i32.eq + br_if $case0|0 + local.get $1 + i32.const 1 + i32.eq + br_if $case1|0 + local.get $1 + i32.const 2 + i32.eq + br_if $case2|0 + br $break|0 + end + i32.const 1 + global.set $~lib/rt/itcms/state + i32.const 0 + global.set $~lib/rt/itcms/visitCount + i32.const 0 + call $~lib/rt/itcms/visitRoots + global.get $~lib/rt/itcms/toSpace + global.set $~lib/rt/itcms/iter + global.get $~lib/rt/itcms/visitCount + i32.const 1 + i32.mul + return + end + global.get $~lib/rt/itcms/white + i32.eqz + local.set $black + global.get $~lib/rt/itcms/iter + call $~lib/rt/itcms/Object#get:next + local.set $obj + loop $while-continue|1 + local.get $obj + global.get $~lib/rt/itcms/toSpace + i32.ne + if + local.get $obj + global.set $~lib/rt/itcms/iter + local.get $obj + call $~lib/rt/itcms/Object#get:color + local.get $black + i32.ne + if + local.get $obj + local.get $black + call $~lib/rt/itcms/Object#set:color + i32.const 0 + global.set $~lib/rt/itcms/visitCount + local.get $obj + i32.const 20 + i32.add + i32.const 0 + call $~lib/rt/__visit_members + global.get $~lib/rt/itcms/visitCount + i32.const 1 + i32.mul + return + end + local.get $obj + call $~lib/rt/itcms/Object#get:next + local.set $obj + br $while-continue|1 + end + end + i32.const 0 + global.set $~lib/rt/itcms/visitCount + i32.const 0 + call $~lib/rt/itcms/visitRoots + global.get $~lib/rt/itcms/iter + call $~lib/rt/itcms/Object#get:next + local.set $obj + local.get $obj + global.get $~lib/rt/itcms/toSpace + i32.eq + if + i32.const 0 + call $~lib/rt/itcms/visitStack + global.get $~lib/rt/itcms/iter + call $~lib/rt/itcms/Object#get:next + local.set $obj + loop $while-continue|2 + local.get $obj + global.get $~lib/rt/itcms/toSpace + i32.ne + if + local.get $obj + call $~lib/rt/itcms/Object#get:color + local.get $black + i32.ne + if + local.get $obj + local.get $black + call $~lib/rt/itcms/Object#set:color + local.get $obj + i32.const 20 + i32.add + i32.const 0 + call $~lib/rt/__visit_members + end + local.get $obj + call $~lib/rt/itcms/Object#get:next + local.set $obj + br $while-continue|2 + end + end + global.get $~lib/rt/itcms/fromSpace + local.set $from + global.get $~lib/rt/itcms/toSpace + global.set $~lib/rt/itcms/fromSpace + local.get $from + global.set $~lib/rt/itcms/toSpace + local.get $black + global.set $~lib/rt/itcms/white + local.get $from + call $~lib/rt/itcms/Object#get:next + global.set $~lib/rt/itcms/iter + i32.const 2 + global.set $~lib/rt/itcms/state + end + global.get $~lib/rt/itcms/visitCount + i32.const 1 + i32.mul + return + end + global.get $~lib/rt/itcms/iter + local.set $obj + local.get $obj + global.get $~lib/rt/itcms/toSpace + i32.ne + if + local.get $obj + call $~lib/rt/itcms/Object#get:next + global.set $~lib/rt/itcms/iter + i32.const 1 + drop + local.get $obj + call $~lib/rt/itcms/Object#get:color + global.get $~lib/rt/itcms/white + i32.eqz + i32.eq + i32.eqz + if + i32.const 0 + i32.const 96 + i32.const 229 + i32.const 20 + call $~lib/builtins/abort + unreachable + end + local.get $obj + call $~lib/rt/itcms/free + i32.const 10 + return + end + global.get $~lib/rt/itcms/toSpace + global.get $~lib/rt/itcms/toSpace + call $~lib/rt/itcms/Object#set:nextWithColor + global.get $~lib/rt/itcms/toSpace + global.get $~lib/rt/itcms/toSpace + call $~lib/rt/itcms/Object#set:prev + i32.const 0 + global.set $~lib/rt/itcms/state + br $break|0 + end + i32.const 0 + return + ) + (func $~lib/rt/itcms/interrupt + (local $budget i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1024 + i32.const 200 + i32.mul + i32.const 100 + i32.div_u + local.set $budget + loop $do-loop|0 + local.get $budget + call $~lib/rt/itcms/step + i32.sub + local.set $budget + global.get $~lib/rt/itcms/state + i32.const 0 + i32.eq + if + i32.const 0 + drop + i32.const 200 + i32.const 100 + i32.rem_u + i32.const 0 + i32.eq + drop + global.get $~lib/rt/itcms/total + i32.const 200 + i32.const 100 + i32.div_u + i32.mul + i32.const 1024 + i32.add + global.set $~lib/rt/itcms/threshold + i32.const 0 + drop + return + end + local.get $budget + i32.const 0 + i32.gt_s + br_if $do-loop|0 + end + i32.const 0 + drop + global.get $~lib/rt/itcms/total + i32.const 1024 + global.get $~lib/rt/itcms/total + global.get $~lib/rt/itcms/threshold + i32.sub + i32.const 1024 + i32.lt_u + i32.mul + i32.add + global.set $~lib/rt/itcms/threshold + i32.const 0 + drop + ) + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size + i32.const 12 + i32.le_u + if (result i32) + i32.const 12 + else + local.get $size + i32.const 4 + i32.add + i32.const 15 + i32.add + i32.const 15 + i32.const -1 + i32.xor + i32.and + i32.const 4 + i32.sub + end + return + ) + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size + i32.const 1073741820 + i32.gt_u + if + i32.const 32 + i32.const 368 + i32.const 461 + i32.const 29 + call $~lib/builtins/abort + unreachable + end + local.get $size + call $~lib/rt/tlsf/computeSize + return + ) + (func $~lib/rt/tlsf/roundSize (param $size i32) (result i32) + local.get $size + i32.const 536870910 + i32.lt_u + if (result i32) + local.get $size + i32.const 1 + i32.const 27 + local.get $size + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + else + local.get $size + end + return + ) + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $requestSize i32) + (local $root|5 i32) + (local $fl|6 i32) + (local $slMap i32) + (local $head i32) + (local $flMap i32) + (local $root|10 i32) + (local $fl|11 i32) + (local $root|12 i32) + (local $fl|13 i32) + (local $sl|14 i32) + (local $root|15 i32) + (local $fl|16 i32) + (local $sl|17 i32) + local.get $size + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $fl + local.get $size + i32.const 4 + i32.shr_u + local.set $sl + else + local.get $size + call $~lib/rt/tlsf/roundSize + local.set $requestSize + i32.const 4 + i32.const 8 + i32.mul + i32.const 1 + i32.sub + local.get $requestSize + i32.clz + i32.sub + local.set $fl + local.get $requestSize + local.get $fl + i32.const 4 + i32.sub + i32.shr_u + i32.const 1 + i32.const 4 + i32.shl + i32.xor + local.set $sl + local.get $fl + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $fl + end + i32.const 1 + drop + local.get $fl + i32.const 23 + i32.lt_u + if (result i32) + local.get $sl + i32.const 16 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 334 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + block $~lib/rt/tlsf/GETSL|inlined.2 (result i32) + local.get $root + local.set $root|5 + local.get $fl + local.set $fl|6 + local.get $root|5 + local.get $fl|6 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + br $~lib/rt/tlsf/GETSL|inlined.2 + end + i32.const 0 + i32.const -1 + i32.xor + local.get $sl + i32.shl + i32.and + local.set $slMap + i32.const 0 + local.set $head + local.get $slMap + i32.eqz + if + local.get $root + call $~lib/rt/tlsf/Root#get:flMap + i32.const 0 + i32.const -1 + i32.xor + local.get $fl + i32.const 1 + i32.add + i32.shl + i32.and + local.set $flMap + local.get $flMap + i32.eqz + if + i32.const 0 + local.set $head + else + local.get $flMap + i32.ctz + local.set $fl + block $~lib/rt/tlsf/GETSL|inlined.3 (result i32) + local.get $root + local.set $root|10 + local.get $fl + local.set $fl|11 + local.get $root|10 + local.get $fl|11 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + br $~lib/rt/tlsf/GETSL|inlined.3 + end + local.set $slMap + i32.const 1 + drop + local.get $slMap + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 347 + i32.const 18 + call $~lib/builtins/abort + unreachable + end + block $~lib/rt/tlsf/GETHEAD|inlined.2 (result i32) + local.get $root + local.set $root|12 + local.get $fl + local.set $fl|13 + local.get $slMap + i32.ctz + local.set $sl|14 + local.get $root|12 + local.get $fl|13 + i32.const 4 + i32.shl + local.get $sl|14 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + br $~lib/rt/tlsf/GETHEAD|inlined.2 + end + local.set $head + end + else + block $~lib/rt/tlsf/GETHEAD|inlined.3 (result i32) + local.get $root + local.set $root|15 + local.get $fl + local.set $fl|16 + local.get $slMap + i32.ctz + local.set $sl|17 + local.get $root|15 + local.get $fl|16 + i32.const 4 + i32.shl + local.get $sl|17 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + br $~lib/rt/tlsf/GETHEAD|inlined.3 + end + local.set $head + end + local.get $head + return + ) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $root|3 i32) + (local $pagesNeeded i32) + (local $5 i32) + (local $6 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) + i32.const 0 + drop + local.get $size + i32.const 256 + i32.ge_u + if + local.get $size + call $~lib/rt/tlsf/roundSize + local.set $size + end + memory.size + local.set $pagesBefore + local.get $size + i32.const 4 + local.get $pagesBefore + i32.const 16 + i32.shl + i32.const 4 + i32.sub + block $~lib/rt/tlsf/GETTAIL|inlined.1 (result i32) + local.get $root + local.set $root|3 + local.get $root|3 + i32.load offset=1568 + br $~lib/rt/tlsf/GETTAIL|inlined.1 + end + i32.ne + i32.shl + i32.add + local.set $size + local.get $size + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $pagesNeeded + local.get $pagesBefore + local.tee $5 + local.get $pagesNeeded + local.tee $6 + local.get $5 + local.get $6 + i32.gt_s + select + local.set $pagesWanted + local.get $pagesWanted + memory.grow + i32.const 0 + i32.lt_s + if + local.get $pagesNeeded + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + memory.size + local.set $pagesAfter + local.get $root + local.get $pagesBefore + i32.const 16 + i32.shl + local.get $pagesAfter + i64.extend_i32_s + i64.const 16 + i64.shl + call $~lib/rt/tlsf/addMemory + drop + ) + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $spare i32) + (local $block|6 i32) + (local $7 i32) + local.get $block + call $~lib/rt/common/BLOCK#get:mmInfo + local.set $blockInfo + i32.const 1 + drop + local.get $size + i32.const 4 + i32.add + i32.const 15 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 361 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $blockInfo + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $size + i32.sub + local.set $remaining + local.get $remaining + i32.const 4 + i32.const 12 + i32.add + i32.ge_u + if + local.get $block + local.get $size + local.get $blockInfo + i32.const 2 + i32.and + i32.or + call $~lib/rt/common/BLOCK#set:mmInfo + local.get $block + i32.const 4 + i32.add + local.get $size + i32.add + local.set $spare + local.get $spare + local.get $remaining + i32.const 4 + i32.sub + i32.const 1 + i32.or + call $~lib/rt/common/BLOCK#set:mmInfo + local.get $root + local.get $spare + call $~lib/rt/tlsf/insertBlock + else + local.get $block + local.get $blockInfo + i32.const 1 + i32.const -1 + i32.xor + i32.and + call $~lib/rt/common/BLOCK#set:mmInfo + block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) + local.get $block + local.set $block|6 + local.get $block|6 + i32.const 4 + i32.add + local.get $block|6 + call $~lib/rt/common/BLOCK#get:mmInfo + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + br $~lib/rt/tlsf/GETRIGHT|inlined.2 + end + local.set $7 + local.get $7 + local.get $7 + call $~lib/rt/common/BLOCK#get:mmInfo + i32.const 2 + i32.const -1 + i32.xor + i32.and + call $~lib/rt/common/BLOCK#set:mmInfo + end + ) + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size + call $~lib/rt/tlsf/prepareSize + local.set $payloadSize + local.get $root + local.get $payloadSize + call $~lib/rt/tlsf/searchBlock + local.set $block + local.get $block + i32.eqz + if + local.get $root + local.get $payloadSize + call $~lib/rt/tlsf/growMemory + local.get $root + local.get $payloadSize + call $~lib/rt/tlsf/searchBlock + local.set $block + i32.const 1 + drop + local.get $block + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 499 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + end + i32.const 1 + drop + local.get $block + call $~lib/rt/common/BLOCK#get:mmInfo + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $payloadSize + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 501 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $root + local.get $block + call $~lib/rt/tlsf/removeBlock + local.get $root + local.get $block + local.get $payloadSize + call $~lib/rt/tlsf/prepareBlock + i32.const 0 + drop + local.get $block + return + ) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + local.get $size + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + return + ) + (func $~lib/rt/itcms/Object#set:rtId (param $this i32) (param $rtId i32) + local.get $this + local.get $rtId + i32.store offset=12 + ) + (func $~lib/rt/itcms/Object#set:rtSize (param $this i32) (param $rtSize i32) + local.get $this + local.get $rtSize + i32.store offset=16 + ) + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size + i32.const 1073741804 + i32.ge_u + if + i32.const 32 + i32.const 96 + i32.const 261 + i32.const 31 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/itcms/total + global.get $~lib/rt/itcms/threshold + i32.ge_u + if + call $~lib/rt/itcms/interrupt + end + i32.const 16 + local.get $size + i32.add + call $~lib/rt/tlsf/__alloc + i32.const 4 + i32.sub + local.set $obj + local.get $obj + local.get $id + call $~lib/rt/itcms/Object#set:rtId + local.get $obj + local.get $size + call $~lib/rt/itcms/Object#set:rtSize + local.get $obj + global.get $~lib/rt/itcms/fromSpace + global.get $~lib/rt/itcms/white + call $~lib/rt/itcms/Object#linkTo + global.get $~lib/rt/itcms/total + local.get $obj + call $~lib/rt/itcms/Object#get:size + i32.add + global.set $~lib/rt/itcms/total + local.get $obj + i32.const 20 + i32.add + local.set $ptr + local.get $ptr + i32.const 0 + local.get $size + memory.fill + local.get $ptr + return + ) + (func $postfix-update-side-effect/Box#set:value (param $this i32) (param $value i32) + local.get $this + local.get $value + i32.store + ) + (func $postfix-update-side-effect/receiver (result i32) + global.get $postfix-update-side-effect/receiverCalls + i32.const 1 + i32.add + global.set $postfix-update-side-effect/receiverCalls + global.get $postfix-update-side-effect/receiverCalls + i32.const 1 + i32.eq + if (result i32) + global.get $postfix-update-side-effect/first + else + global.get $postfix-update-side-effect/second + end + return + ) + (func $postfix-update-side-effect/Box#get:value (param $this i32) (result i32) + local.get $this + i32.load + ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $postfix-update-side-effect/first + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $postfix-update-side-effect/second + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + i32.const 224 + local.get $0 + call $~lib/rt/itcms/__visit + i32.const 32 + local.get $0 + call $~lib/rt/itcms/__visit + ) + (func $~lib/arraybuffer/ArrayBufferView~visit (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $1 + call $~lib/object/Object~visit + local.get $0 + i32.load + local.get $1 + call $~lib/rt/itcms/__visit + ) + (func $~lib/object/Object~visit (param $0 i32) (param $1 i32) + ) + (func $~lib/rt/__visit_members (param $0 i32) (param $1 i32) + block $invalid + block $postfix-update-side-effect/Box + block $~lib/arraybuffer/ArrayBufferView + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + block $~lib/object/Object + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/object/Object $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $postfix-update-side-effect/Box $invalid + end + return + end + return + end + return + end + local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView~visit + return + end + return + end + unreachable + ) + (func $~start + call $start:postfix-update-side-effect + ) + (func $~stack_check + global.get $~lib/memory/__stack_pointer + global.get $~lib/memory/__data_end + i32.lt_s + if + i32.const 33312 + i32.const 33360 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + ) + (func $postfix-update-side-effect/Box#constructor (param $this i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + local.get $this + i32.eqz + if + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.const 4 + call $~lib/rt/itcms/__new + local.tee $this + i32.store + end + global.get $~lib/memory/__stack_pointer + local.get $this + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $1 + call $~lib/object/Object#constructor + local.tee $this + i32.store + local.get $this + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $1 + i32.const 0 + call $postfix-update-side-effect/Box#set:value + local.get $this + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) + (func $start:postfix-update-side-effect + (local $0 i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store offset=8 + memory.size + i32.const 16 + i32.shl + global.get $~lib/memory/__heap_base + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold + i32.const 144 + call $~lib/rt/itcms/initLazy + global.set $~lib/rt/itcms/pinSpace + i32.const 176 + call $~lib/rt/itcms/initLazy + global.set $~lib/rt/itcms/toSpace + i32.const 320 + call $~lib/rt/itcms/initLazy + global.set $~lib/rt/itcms/fromSpace + i32.const 0 + call $postfix-update-side-effect/Box#constructor + global.set $postfix-update-side-effect/first + i32.const 0 + call $postfix-update-side-effect/Box#constructor + global.set $postfix-update-side-effect/second + global.get $~lib/memory/__stack_pointer + call $postfix-update-side-effect/receiver + local.tee $0 + i32.store + local.get $0 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $1 + local.get $0 + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=8 + local.get $1 + call $postfix-update-side-effect/Box#get:value + i32.const 1 + i32.add + call $postfix-update-side-effect/Box#set:value + global.get $postfix-update-side-effect/receiverCalls + i32.const 1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 432 + i32.const 16 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $postfix-update-side-effect/first + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $1 + call $postfix-update-side-effect/Box#get:value + i32.const 1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 432 + i32.const 17 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $postfix-update-side-effect/second + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $1 + call $postfix-update-side-effect/Box#get:value + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 432 + i32.const 18 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $~lib/object/Object#constructor (param $this i32) (result i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + call $~stack_check + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $this + i32.eqz + if + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 0 + call $~lib/rt/itcms/__new + local.tee $this + i32.store + end + local.get $this + local.set $1 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $1 + ) +) diff --git a/tests/compiler/postfix-update-side-effect.release.wat b/tests/compiler/postfix-update-side-effect.release.wat new file mode 100644 index 0000000000..1d93d55ea6 --- /dev/null +++ b/tests/compiler/postfix-update-side-effect.release.wat @@ -0,0 +1,1767 @@ +(module + (type $0 (func)) + (type $1 (func (param i32))) + (type $2 (func (param i32 i32))) + (type $3 (func (param i32 i32) (result i32))) + (type $4 (func (result i32))) + (type $5 (func (param i32 i32 i32 i32))) + (type $6 (func (param i32 i32 i64))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (global $~lib/rt/itcms/total (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/threshold (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/state (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/visitCount (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/pinSpace (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/iter (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/toSpace (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/white (mut i32) (i32.const 0)) + (global $~lib/rt/itcms/fromSpace (mut i32) (i32.const 0)) + (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) + (global $postfix-update-side-effect/first (mut i32) (i32.const 0)) + (global $postfix-update-side-effect/second (mut i32) (i32.const 0)) + (global $postfix-update-side-effect/receiverCalls (mut i32) (i32.const 0)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 34312)) + (memory $0 1) + (data $0 (i32.const 1036) "<") + (data $0.1 (i32.const 1048) "\02\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") + (data $1 (i32.const 1100) "<") + (data $1.1 (i32.const 1112) "\02\00\00\00 \00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00t\00c\00m\00s\00.\00t\00s") + (data $4 (i32.const 1228) "<") + (data $4.1 (i32.const 1240) "\02\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") + (data $5 (i32.const 1292) ",") + (data $5.1 (i32.const 1304) "\02\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") + (data $7 (i32.const 1372) "<") + (data $7.1 (i32.const 1384) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") + (data $8 (i32.const 1436) "L") + (data $8.1 (i32.const 1448) "\02\00\00\00:\00\00\00p\00o\00s\00t\00f\00i\00x\00-\00u\00p\00d\00a\00t\00e\00-\00s\00i\00d\00e\00-\00e\00f\00f\00e\00c\00t\00.\00t\00s") + (data $9 (i32.const 1520) "\05\00\00\00 \00\00\00 \00\00\00 \00\00\00\00\00\00\00 ") + (export "memory" (memory $0)) + (start $~start) + (func $~lib/rt/itcms/__visit (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.eqz + if + return + end + global.get $~lib/rt/itcms/white + local.get $0 + i32.const 20 + i32.sub + local.tee $1 + i32.load offset=4 + i32.const 3 + i32.and + i32.eq + if + local.get $1 + global.get $~lib/rt/itcms/iter + i32.eq + if + local.get $1 + i32.load offset=8 + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 1120 + i32.const 148 + i32.const 30 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.set $~lib/rt/itcms/iter + end + block $__inlined_func$~lib/rt/itcms/Object#unlink$116 + local.get $1 + i32.load offset=4 + i32.const -4 + i32.and + local.tee $0 + i32.eqz + if + local.get $1 + i32.load offset=8 + i32.eqz + local.get $1 + i32.const 34312 + i32.lt_u + i32.and + i32.eqz + if + i32.const 0 + i32.const 1120 + i32.const 128 + i32.const 18 + call $~lib/builtins/abort + unreachable + end + br $__inlined_func$~lib/rt/itcms/Object#unlink$116 + end + local.get $1 + i32.load offset=8 + local.tee $2 + i32.eqz + if + i32.const 0 + i32.const 1120 + i32.const 132 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $2 + i32.store offset=8 + local.get $2 + local.get $0 + local.get $2 + i32.load offset=4 + i32.const 3 + i32.and + i32.or + i32.store offset=4 + end + global.get $~lib/rt/itcms/toSpace + local.set $2 + local.get $1 + i32.load offset=12 + local.tee $0 + i32.const 2 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $0 + i32.const 1520 + i32.load + i32.gt_u + if + i32.const 1248 + i32.const 1312 + i32.const 21 + i32.const 28 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 2 + i32.shl + i32.const 1524 + i32.add + i32.load + i32.const 32 + i32.and + end + local.set $3 + local.get $2 + i32.load offset=8 + local.set $0 + local.get $1 + global.get $~lib/rt/itcms/white + i32.eqz + i32.const 2 + local.get $3 + select + local.get $2 + i32.or + i32.store offset=4 + local.get $1 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $1 + local.get $0 + i32.load offset=4 + i32.const 3 + i32.and + i32.or + i32.store offset=4 + local.get $2 + local.get $1 + i32.store offset=8 + global.get $~lib/rt/itcms/visitCount + i32.const 1 + i32.add + global.set $~lib/rt/itcms/visitCount + end + ) + (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.tee $3 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 1392 + i32.const 268 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const -4 + i32.and + local.tee $3 + i32.const 12 + i32.lt_u + if + i32.const 0 + i32.const 1392 + i32.const 270 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 256 + i32.lt_u + if (result i32) + local.get $3 + i32.const 4 + i32.shr_u + else + i32.const 31 + i32.const 1073741820 + local.get $3 + local.get $3 + i32.const 1073741820 + i32.ge_u + select + local.tee $3 + i32.clz + i32.sub + local.tee $4 + i32.const 7 + i32.sub + local.set $2 + local.get $3 + local.get $4 + i32.const 4 + i32.sub + i32.shr_u + i32.const 16 + i32.xor + end + local.tee $3 + i32.const 16 + i32.lt_u + local.get $2 + i32.const 23 + i32.lt_u + i32.and + i32.eqz + if + i32.const 0 + i32.const 1392 + i32.const 284 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=8 + local.set $5 + local.get $1 + i32.load offset=4 + local.tee $4 + if + local.get $4 + local.get $5 + i32.store offset=8 + end + local.get $5 + if + local.get $5 + local.get $4 + i32.store offset=4 + end + local.get $1 + local.get $0 + local.get $2 + i32.const 4 + i32.shl + local.get $3 + i32.add + i32.const 2 + i32.shl + i32.add + local.tee $1 + i32.load offset=96 + i32.eq + if + local.get $1 + local.get $5 + i32.store offset=96 + local.get $5 + i32.eqz + if + local.get $0 + local.get $2 + i32.const 2 + i32.shl + i32.add + local.tee $1 + i32.load offset=4 + i32.const -2 + local.get $3 + i32.rotl + i32.and + local.set $3 + local.get $1 + local.get $3 + i32.store offset=4 + local.get $3 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const -2 + local.get $2 + i32.rotl + i32.and + i32.store + end + end + end + ) + (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 1392 + i32.const 201 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load + local.tee $3 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 1392 + i32.const 203 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 4 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $4 + i32.load + local.tee $2 + i32.const 1 + i32.and + if + local.get $0 + local.get $4 + call $~lib/rt/tlsf/removeBlock + local.get $1 + local.get $3 + i32.const 4 + i32.add + local.get $2 + i32.const -4 + i32.and + i32.add + local.tee $3 + i32.store + local.get $1 + i32.const 4 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $4 + i32.load + local.set $2 + end + local.get $3 + i32.const 2 + i32.and + if + local.get $1 + i32.const 4 + i32.sub + i32.load + local.tee $1 + i32.load + local.tee $6 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 1392 + i32.const 221 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/rt/tlsf/removeBlock + local.get $1 + local.get $6 + i32.const 4 + i32.add + local.get $3 + i32.const -4 + i32.and + i32.add + local.tee $3 + i32.store + end + local.get $4 + local.get $2 + i32.const 2 + i32.or + i32.store + local.get $3 + i32.const -4 + i32.and + local.tee $2 + i32.const 12 + i32.lt_u + if + i32.const 0 + i32.const 1392 + i32.const 233 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $1 + i32.const 4 + i32.add + local.get $2 + i32.add + i32.ne + if + i32.const 0 + i32.const 1392 + i32.const 234 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $4 + i32.const 4 + i32.sub + local.get $1 + i32.store + local.get $2 + i32.const 256 + i32.lt_u + if (result i32) + local.get $2 + i32.const 4 + i32.shr_u + else + i32.const 31 + i32.const 1073741820 + local.get $2 + local.get $2 + i32.const 1073741820 + i32.ge_u + select + local.tee $2 + i32.clz + i32.sub + local.tee $3 + i32.const 7 + i32.sub + local.set $5 + local.get $2 + local.get $3 + i32.const 4 + i32.sub + i32.shr_u + i32.const 16 + i32.xor + end + local.tee $2 + i32.const 16 + i32.lt_u + local.get $5 + i32.const 23 + i32.lt_u + i32.and + i32.eqz + if + i32.const 0 + i32.const 1392 + i32.const 251 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $5 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + local.set $3 + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + local.get $3 + i32.store offset=8 + local.get $3 + if + local.get $3 + local.get $1 + i32.store offset=4 + end + local.get $0 + local.get $5 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $1 + i32.store offset=96 + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $5 + i32.shl + i32.or + i32.store + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + local.tee $0 + local.get $0 + i32.load offset=4 + i32.const 1 + local.get $2 + i32.shl + i32.or + i32.store offset=4 + ) + (func $~lib/rt/__visit_members (param $0 i32) + block $invalid + block $postfix-update-side-effect/Box + block $~lib/arraybuffer/ArrayBufferView + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + block $~lib/object/Object + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $~lib/object/Object $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/arraybuffer/ArrayBufferView $postfix-update-side-effect/Box $invalid + end + return + end + return + end + return + end + local.get $0 + i32.load + call $~lib/rt/itcms/__visit + return + end + return + end + unreachable + ) + (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $1 + i32.const 256 + i32.lt_u + if + local.get $1 + i32.const 4 + i32.shr_u + local.set $1 + else + local.get $1 + i32.const 536870910 + i32.lt_u + if + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.set $1 + end + local.get $1 + i32.const 31 + local.get $1 + i32.clz + i32.sub + local.tee $2 + i32.const 4 + i32.sub + i32.shr_u + i32.const 16 + i32.xor + local.set $1 + local.get $2 + i32.const 7 + i32.sub + local.set $2 + end + local.get $1 + i32.const 16 + i32.lt_u + local.get $2 + i32.const 23 + i32.lt_u + i32.and + i32.eqz + if + i32.const 0 + i32.const 1392 + i32.const 334 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + i32.const -1 + local.get $1 + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $1 + i32.ctz + local.get $2 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + else + local.get $0 + i32.load + i32.const -1 + local.get $2 + i32.const 1 + i32.add + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $1 + i32.ctz + local.tee $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + local.tee $2 + i32.eqz + if + i32.const 0 + i32.const 1392 + i32.const 347 + i32.const 18 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $2 + i32.ctz + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + else + i32.const 0 + end + end + ) + (func $~lib/rt/tlsf/initialize + (local $0 i32) + (local $1 i32) + memory.size + local.tee $1 + i32.const 0 + i32.le_s + if (result i32) + i32.const 1 + local.get $1 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 34320 + i32.const 0 + i32.store + i32.const 35888 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $0 + i32.const 23 + i32.lt_u + if + local.get $0 + i32.const 2 + i32.shl + i32.const 34320 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 16 + i32.lt_u + if + local.get $0 + i32.const 4 + i32.shl + local.get $1 + i32.add + i32.const 2 + i32.shl + i32.const 34320 + i32.add + i32.const 0 + i32.store offset=96 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + i32.const 34320 + i32.const 35892 + memory.size + i64.extend_i32_s + i64.const 16 + i64.shl + call $~lib/rt/tlsf/addMemory + i32.const 34320 + global.set $~lib/rt/tlsf/ROOT + ) + (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i64) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $2 + local.get $1 + i64.extend_i32_u + i64.lt_u + if + i32.const 0 + i32.const 1392 + i32.const 382 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 19 + i32.add + i32.const -16 + i32.and + i32.const 4 + i32.sub + local.set $1 + local.get $0 + i32.load offset=1568 + local.tee $3 + if + local.get $3 + i32.const 4 + i32.add + local.get $1 + i32.gt_u + if + i32.const 0 + i32.const 1392 + i32.const 389 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.get $3 + local.get $1 + i32.const 16 + i32.sub + local.tee $5 + i32.eq + if + local.get $3 + i32.load + local.set $4 + local.get $5 + local.set $1 + end + else + local.get $0 + i32.const 1572 + i32.add + local.get $1 + i32.gt_u + if + i32.const 0 + i32.const 1392 + i32.const 402 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + end + local.get $2 + i32.wrap_i64 + i32.const -16 + i32.and + local.get $1 + i32.sub + local.tee $3 + i32.const 20 + i32.lt_u + if + return + end + local.get $1 + local.get $4 + i32.const 2 + i32.and + local.get $3 + i32.const 8 + i32.sub + local.tee $3 + i32.const 1 + i32.or + i32.or + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 4 + i32.add + local.get $3 + i32.add + local.tee $3 + i32.const 2 + i32.store + local.get $0 + local.get $3 + i32.store offset=1568 + local.get $0 + local.get $1 + call $~lib/rt/tlsf/insertBlock + ) + (func $~lib/rt/itcms/visitRoots + (local $0 i32) + (local $1 i32) + global.get $postfix-update-side-effect/first + local.tee $0 + if + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $postfix-update-side-effect/second + local.tee $0 + if + local.get $0 + call $~lib/rt/itcms/__visit + end + i32.const 1248 + call $~lib/rt/itcms/__visit + i32.const 1056 + call $~lib/rt/itcms/__visit + global.get $~lib/rt/itcms/pinSpace + local.tee $1 + i32.load offset=4 + i32.const -4 + i32.and + local.set $0 + loop $while-continue|0 + local.get $0 + local.get $1 + i32.ne + if + local.get $0 + i32.load offset=4 + i32.const 3 + i32.and + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1120 + i32.const 160 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 20 + i32.add + call $~lib/rt/__visit_members + local.get $0 + i32.load offset=4 + i32.const -4 + i32.and + local.set $0 + br $while-continue|0 + end + end + ) + (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.const 1073741804 + i32.ge_u + if + i32.const 1056 + i32.const 1120 + i32.const 261 + i32.const 31 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/itcms/total + global.get $~lib/rt/itcms/threshold + i32.ge_u + if + block $__inlined_func$~lib/rt/itcms/interrupt$68 + i32.const 2048 + local.set $2 + loop $do-loop|0 + local.get $2 + call $~lib/rt/itcms/step + i32.sub + local.set $2 + global.get $~lib/rt/itcms/state + i32.eqz + if + global.get $~lib/rt/itcms/total + i32.const 1 + i32.shl + i32.const 1024 + i32.add + global.set $~lib/rt/itcms/threshold + br $__inlined_func$~lib/rt/itcms/interrupt$68 + end + local.get $2 + i32.const 0 + i32.gt_s + br_if $do-loop|0 + end + global.get $~lib/rt/itcms/total + global.get $~lib/rt/itcms/total + global.get $~lib/rt/itcms/threshold + i32.sub + i32.const 1024 + i32.lt_u + i32.const 10 + i32.shl + i32.add + global.set $~lib/rt/itcms/threshold + end + end + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + local.set $4 + local.get $0 + i32.const 16 + i32.add + local.tee $2 + i32.const 1073741820 + i32.gt_u + if + i32.const 1056 + i32.const 1392 + i32.const 461 + i32.const 29 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $2 + i32.const 12 + i32.le_u + if (result i32) + i32.const 12 + else + local.get $2 + i32.const 19 + i32.add + i32.const -16 + i32.and + i32.const 4 + i32.sub + end + local.tee $5 + call $~lib/rt/tlsf/searchBlock + local.tee $2 + i32.eqz + if + local.get $5 + i32.const 256 + i32.ge_u + if (result i32) + local.get $5 + i32.const 536870910 + i32.lt_u + if (result i32) + local.get $5 + i32.const 1 + i32.const 27 + local.get $5 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + else + local.get $5 + end + else + local.get $5 + end + i32.const 4 + local.get $4 + i32.load offset=1568 + memory.size + local.tee $2 + i32.const 16 + i32.shl + i32.const 4 + i32.sub + i32.ne + i32.shl + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.set $3 + local.get $2 + local.get $3 + local.get $2 + local.get $3 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $3 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $4 + local.get $2 + i32.const 16 + i32.shl + memory.size + i64.extend_i32_s + i64.const 16 + i64.shl + call $~lib/rt/tlsf/addMemory + local.get $4 + local.get $5 + call $~lib/rt/tlsf/searchBlock + local.tee $2 + i32.eqz + if + i32.const 0 + i32.const 1392 + i32.const 499 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + end + local.get $5 + local.get $2 + i32.load + i32.const -4 + i32.and + i32.gt_u + if + i32.const 0 + i32.const 1392 + i32.const 501 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $2 + call $~lib/rt/tlsf/removeBlock + local.get $2 + i32.load + local.set $6 + local.get $5 + i32.const 4 + i32.add + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1392 + i32.const 361 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const -4 + i32.and + local.get $5 + i32.sub + local.tee $3 + i32.const 16 + i32.ge_u + if + local.get $2 + local.get $5 + local.get $6 + i32.const 2 + i32.and + i32.or + i32.store + local.get $2 + i32.const 4 + i32.add + local.get $5 + i32.add + local.tee $5 + local.get $3 + i32.const 4 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $4 + local.get $5 + call $~lib/rt/tlsf/insertBlock + else + local.get $2 + local.get $6 + i32.const -2 + i32.and + i32.store + local.get $2 + i32.const 4 + i32.add + local.get $2 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $3 + local.get $3 + i32.load + i32.const -3 + i32.and + i32.store + end + local.get $2 + local.get $1 + i32.store offset=12 + local.get $2 + local.get $0 + i32.store offset=16 + global.get $~lib/rt/itcms/fromSpace + local.tee $1 + i32.load offset=8 + local.set $3 + local.get $2 + local.get $1 + global.get $~lib/rt/itcms/white + i32.or + i32.store offset=4 + local.get $2 + local.get $3 + i32.store offset=8 + local.get $3 + local.get $2 + local.get $3 + i32.load offset=4 + i32.const 3 + i32.and + i32.or + i32.store offset=4 + local.get $1 + local.get $2 + i32.store offset=8 + global.get $~lib/rt/itcms/total + local.get $2 + i32.load + i32.const -4 + i32.and + i32.const 4 + i32.add + i32.add + global.set $~lib/rt/itcms/total + local.get $2 + i32.const 20 + i32.add + local.tee $1 + i32.const 0 + local.get $0 + memory.fill + local.get $1 + ) + (func $postfix-update-side-effect/Box#constructor (result i32) + (local $0 i32) + (local $1 i32) + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + block $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 1544 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.const 4 + call $~lib/rt/itcms/__new + local.tee $0 + i32.store + global.get $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1544 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store + local.get $0 + i32.eqz + if + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.const 0 + call $~lib/rt/itcms/__new + local.tee $0 + i32.store + end + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.add + global.set $~lib/memory/__stack_pointer + local.get $0 + return + end + i32.const 34336 + i32.const 34384 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + ) + (func $~start + (local $0 i32) + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1544 + i32.lt_s + if + i32.const 34336 + i32.const 34384 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + global.get $~lib/memory/__stack_pointer + i32.const 0 + i32.store offset=8 + memory.size + i32.const 16 + i32.shl + i32.const 34312 + i32.sub + i32.const 1 + i32.shr_u + global.set $~lib/rt/itcms/threshold + i32.const 1172 + i32.const 1168 + i32.store + i32.const 1176 + i32.const 1168 + i32.store + i32.const 1168 + global.set $~lib/rt/itcms/pinSpace + i32.const 1204 + i32.const 1200 + i32.store + i32.const 1208 + i32.const 1200 + i32.store + i32.const 1200 + global.set $~lib/rt/itcms/toSpace + i32.const 1348 + i32.const 1344 + i32.store + i32.const 1352 + i32.const 1344 + i32.store + i32.const 1344 + global.set $~lib/rt/itcms/fromSpace + call $postfix-update-side-effect/Box#constructor + global.set $postfix-update-side-effect/first + call $postfix-update-side-effect/Box#constructor + global.set $postfix-update-side-effect/second + global.get $postfix-update-side-effect/receiverCalls + i32.const 1 + i32.add + global.set $postfix-update-side-effect/receiverCalls + global.get $~lib/memory/__stack_pointer + global.get $postfix-update-side-effect/first + global.get $postfix-update-side-effect/second + global.get $postfix-update-side-effect/receiverCalls + i32.const 1 + i32.eq + select + local.tee $0 + i32.store + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.load + i32.const 1 + i32.add + i32.store + global.get $postfix-update-side-effect/receiverCalls + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1456 + i32.const 16 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + global.get $postfix-update-side-effect/first + local.tee $0 + i32.store offset=4 + local.get $0 + i32.load + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1456 + i32.const 17 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + global.get $postfix-update-side-effect/second + local.tee $0 + i32.store offset=4 + local.get $0 + i32.load + if + i32.const 0 + i32.const 1456 + i32.const 18 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/memory/__stack_pointer + i32.const 12 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $~lib/rt/itcms/step (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + block $break|0 + block $case2|0 + block $case1|0 + block $case0|0 + global.get $~lib/rt/itcms/state + br_table $case0|0 $case1|0 $case2|0 $break|0 + end + i32.const 1 + global.set $~lib/rt/itcms/state + i32.const 0 + global.set $~lib/rt/itcms/visitCount + call $~lib/rt/itcms/visitRoots + global.get $~lib/rt/itcms/toSpace + global.set $~lib/rt/itcms/iter + global.get $~lib/rt/itcms/visitCount + return + end + global.get $~lib/rt/itcms/white + i32.eqz + local.set $1 + global.get $~lib/rt/itcms/iter + i32.load offset=4 + i32.const -4 + i32.and + local.set $0 + loop $while-continue|1 + local.get $0 + global.get $~lib/rt/itcms/toSpace + i32.ne + if + local.get $0 + global.set $~lib/rt/itcms/iter + local.get $1 + local.get $0 + i32.load offset=4 + local.tee $2 + i32.const 3 + i32.and + i32.ne + if + local.get $0 + local.get $2 + i32.const -4 + i32.and + local.get $1 + i32.or + i32.store offset=4 + i32.const 0 + global.set $~lib/rt/itcms/visitCount + local.get $0 + i32.const 20 + i32.add + call $~lib/rt/__visit_members + global.get $~lib/rt/itcms/visitCount + return + end + local.get $0 + i32.load offset=4 + i32.const -4 + i32.and + local.set $0 + br $while-continue|1 + end + end + i32.const 0 + global.set $~lib/rt/itcms/visitCount + call $~lib/rt/itcms/visitRoots + global.get $~lib/rt/itcms/toSpace + global.get $~lib/rt/itcms/iter + i32.load offset=4 + i32.const -4 + i32.and + i32.eq + if + global.get $~lib/memory/__stack_pointer + local.set $0 + loop $while-continue|0 + local.get $0 + i32.const 34312 + i32.lt_u + if + local.get $0 + i32.load + call $~lib/rt/itcms/__visit + local.get $0 + i32.const 4 + i32.add + local.set $0 + br $while-continue|0 + end + end + global.get $~lib/rt/itcms/iter + i32.load offset=4 + i32.const -4 + i32.and + local.set $0 + loop $while-continue|2 + local.get $0 + global.get $~lib/rt/itcms/toSpace + i32.ne + if + local.get $1 + local.get $0 + i32.load offset=4 + local.tee $2 + i32.const 3 + i32.and + i32.ne + if + local.get $0 + local.get $2 + i32.const -4 + i32.and + local.get $1 + i32.or + i32.store offset=4 + local.get $0 + i32.const 20 + i32.add + call $~lib/rt/__visit_members + end + local.get $0 + i32.load offset=4 + i32.const -4 + i32.and + local.set $0 + br $while-continue|2 + end + end + global.get $~lib/rt/itcms/fromSpace + local.set $0 + global.get $~lib/rt/itcms/toSpace + global.set $~lib/rt/itcms/fromSpace + local.get $0 + global.set $~lib/rt/itcms/toSpace + local.get $1 + global.set $~lib/rt/itcms/white + local.get $0 + i32.load offset=4 + i32.const -4 + i32.and + global.set $~lib/rt/itcms/iter + i32.const 2 + global.set $~lib/rt/itcms/state + end + global.get $~lib/rt/itcms/visitCount + return + end + global.get $~lib/rt/itcms/iter + local.tee $0 + global.get $~lib/rt/itcms/toSpace + i32.ne + if + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -4 + i32.and + global.set $~lib/rt/itcms/iter + global.get $~lib/rt/itcms/white + i32.eqz + local.get $1 + i32.const 3 + i32.and + i32.ne + if + i32.const 0 + i32.const 1120 + i32.const 229 + i32.const 20 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 34312 + i32.lt_u + if + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + else + global.get $~lib/rt/itcms/total + local.get $0 + i32.load + i32.const -4 + i32.and + i32.const 4 + i32.add + i32.sub + global.set $~lib/rt/itcms/total + local.get $0 + i32.const 4 + i32.add + local.tee $0 + i32.const 34312 + i32.ge_u + if + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + local.get $0 + i32.const 4 + i32.sub + local.set $2 + local.get $0 + i32.const 15 + i32.and + i32.const 1 + local.get $0 + select + if (result i32) + i32.const 1 + else + local.get $2 + i32.load + i32.const 1 + i32.and + end + if + i32.const 0 + i32.const 1392 + i32.const 562 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $2 + i32.load + i32.const 1 + i32.or + i32.store + local.get $2 + call $~lib/rt/tlsf/insertBlock + end + end + i32.const 10 + return + end + global.get $~lib/rt/itcms/toSpace + global.get $~lib/rt/itcms/toSpace + i32.store offset=4 + global.get $~lib/rt/itcms/toSpace + global.get $~lib/rt/itcms/toSpace + i32.store offset=8 + i32.const 0 + global.set $~lib/rt/itcms/state + end + i32.const 0 + ) +) diff --git a/tests/compiler/postfix-update-side-effect.ts b/tests/compiler/postfix-update-side-effect.ts new file mode 100644 index 0000000000..9cb65ffc3b --- /dev/null +++ b/tests/compiler/postfix-update-side-effect.ts @@ -0,0 +1,18 @@ +class Box { + value: i32 = 0; +} + +let first = new Box(); +let second = new Box(); +let receiverCalls = 0; + +// A second evaluation selects a different receiver. +function receiver(): Box { + receiverCalls++; + return receiverCalls == 1 ? first : second; +} + +receiver().value++; +assert(receiverCalls == 1); +assert(first.value == 1); +assert(second.value == 0); diff --git a/tests/compiler/reexport.debug.wat b/tests/compiler/reexport.debug.wat index 9e784a9395..b3debc2297 100644 --- a/tests/compiler/reexport.debug.wat +++ b/tests/compiler/reexport.debug.wat @@ -2047,7 +2047,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2113,21 +2113,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2143,6 +2128,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/reexport.release.wat b/tests/compiler/reexport.release.wat index b6b81aebab..d15def7ac0 100644 --- a/tests/compiler/reexport.release.wat +++ b/tests/compiler/reexport.release.wat @@ -89,7 +89,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$119 + block $__inlined_func$~lib/rt/itcms/Object#unlink$118 local.get $1 i32.load offset=4 i32.const -4 @@ -113,7 +113,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$119 + br $__inlined_func$~lib/rt/itcms/Object#unlink$118 end local.get $1 i32.load offset=8 @@ -1332,7 +1332,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $0 loop $do-loop|0 @@ -1349,7 +1349,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $0 i32.const 0 diff --git a/tests/compiler/rereexport.debug.wat b/tests/compiler/rereexport.debug.wat index 069f46a726..2674092099 100644 --- a/tests/compiler/rereexport.debug.wat +++ b/tests/compiler/rereexport.debug.wat @@ -2040,7 +2040,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2106,21 +2106,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2136,6 +2121,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/rereexport.release.wat b/tests/compiler/rereexport.release.wat index 30e4698072..d1abd5f851 100644 --- a/tests/compiler/rereexport.release.wat +++ b/tests/compiler/rereexport.release.wat @@ -85,7 +85,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$120 + block $__inlined_func$~lib/rt/itcms/Object#unlink$119 local.get $1 i32.load offset=4 i32.const -4 @@ -109,7 +109,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$120 + br $__inlined_func$~lib/rt/itcms/Object#unlink$119 end local.get $1 i32.load offset=8 @@ -1403,7 +1403,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $0 loop $do-loop|0 @@ -1420,7 +1420,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $0 i32.const 0 diff --git a/tests/compiler/resolve-access.debug.wat b/tests/compiler/resolve-access.debug.wat index a2176400d2..4048b84c8e 100644 --- a/tests/compiler/resolve-access.debug.wat +++ b/tests/compiler/resolve-access.debug.wat @@ -2022,7 +2022,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2088,21 +2088,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2118,6 +2103,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/resolve-access.release.wat b/tests/compiler/resolve-access.release.wat index 427ef20e2d..0234d6b3a4 100644 --- a/tests/compiler/resolve-access.release.wat +++ b/tests/compiler/resolve-access.release.wat @@ -97,7 +97,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -114,7 +114,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 @@ -909,7 +909,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$143 + block $__inlined_func$~lib/rt/itcms/Object#unlink$142 local.get $0 i32.load offset=4 i32.const -4 @@ -933,7 +933,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$143 + br $__inlined_func$~lib/rt/itcms/Object#unlink$142 end local.get $0 i32.load offset=8 @@ -1450,7 +1450,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $__inlined_func$~lib/util/number/utoa64$73 + block $__inlined_func$~lib/util/number/utoa64$72 local.get $0 i64.eqz if @@ -1460,7 +1460,7 @@ global.set $~lib/memory/__stack_pointer i32.const 1728 local.set $2 - br $__inlined_func$~lib/util/number/utoa64$73 + br $__inlined_func$~lib/util/number/utoa64$72 end local.get $0 i64.const 4294967295 @@ -2135,7 +2135,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $__inlined_func$~lib/util/number/utoa32$74 + block $__inlined_func$~lib/util/number/utoa32$73 local.get $2 i32.eqz if @@ -2145,7 +2145,7 @@ global.set $~lib/memory/__stack_pointer i32.const 1728 local.set $0 - br $__inlined_func$~lib/util/number/utoa32$74 + br $__inlined_func$~lib/util/number/utoa32$73 end global.get $~lib/memory/__stack_pointer local.get $2 diff --git a/tests/compiler/resolve-binary.debug.wat b/tests/compiler/resolve-binary.debug.wat index d10576390f..61896b4d45 100644 --- a/tests/compiler/resolve-binary.debug.wat +++ b/tests/compiler/resolve-binary.debug.wat @@ -2242,7 +2242,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2308,21 +2308,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2338,6 +2323,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/resolve-binary.release.wat b/tests/compiler/resolve-binary.release.wat index 73db3a219c..c2e1a67021 100644 --- a/tests/compiler/resolve-binary.release.wat +++ b/tests/compiler/resolve-binary.release.wat @@ -350,7 +350,7 @@ end end end - block $__inlined_func$~lib/util/string/compareImpl$81 + block $__inlined_func$~lib/util/string/compareImpl$80 loop $while-continue|1 local.get $0 local.tee $3 @@ -370,7 +370,7 @@ local.get $4 local.get $5 i32.ne - br_if $__inlined_func$~lib/util/string/compareImpl$81 + br_if $__inlined_func$~lib/util/string/compareImpl$80 local.get $2 i32.const 2 i32.add @@ -421,7 +421,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $__inlined_func$~lib/util/number/itoa32$74 + block $__inlined_func$~lib/util/number/itoa32$73 local.get $0 i32.eqz if @@ -431,7 +431,7 @@ global.set $~lib/memory/__stack_pointer i32.const 1376 local.set $0 - br $__inlined_func$~lib/util/number/itoa32$74 + br $__inlined_func$~lib/util/number/itoa32$73 end global.get $~lib/memory/__stack_pointer i32.const 0 @@ -557,7 +557,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$165 + block $__inlined_func$~lib/rt/itcms/Object#unlink$164 local.get $1 i32.load offset=4 i32.const -4 @@ -581,7 +581,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$165 + br $__inlined_func$~lib/rt/itcms/Object#unlink$164 end local.get $1 i32.load offset=8 @@ -692,7 +692,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$70 + block $__inlined_func$~lib/rt/itcms/interrupt$69 i32.const 2048 local.set $2 loop $do-loop|0 @@ -709,7 +709,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$70 + br $__inlined_func$~lib/rt/itcms/interrupt$69 end local.get $2 i32.const 0 diff --git a/tests/compiler/resolve-elementaccess.debug.wat b/tests/compiler/resolve-elementaccess.debug.wat index a8e9ae57e3..697544797e 100644 --- a/tests/compiler/resolve-elementaccess.debug.wat +++ b/tests/compiler/resolve-elementaccess.debug.wat @@ -2046,7 +2046,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2112,21 +2112,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2142,6 +2127,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/resolve-elementaccess.release.wat b/tests/compiler/resolve-elementaccess.release.wat index 80af465806..767ad3da7b 100644 --- a/tests/compiler/resolve-elementaccess.release.wat +++ b/tests/compiler/resolve-elementaccess.release.wat @@ -183,7 +183,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -200,7 +200,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 @@ -641,7 +641,7 @@ end end end - block $__inlined_func$~lib/util/string/compareImpl$97 + block $__inlined_func$~lib/util/string/compareImpl$96 loop $while-continue|1 local.get $0 local.tee $3 @@ -661,7 +661,7 @@ local.get $4 local.get $5 i32.ne - br_if $__inlined_func$~lib/util/string/compareImpl$97 + br_if $__inlined_func$~lib/util/string/compareImpl$96 local.get $2 i32.const 2 i32.add @@ -1309,7 +1309,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$153 + block $__inlined_func$~lib/rt/itcms/Object#unlink$152 local.get $0 i32.load offset=4 i32.const -4 @@ -1333,7 +1333,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$153 + br $__inlined_func$~lib/rt/itcms/Object#unlink$152 end local.get $0 i32.load offset=8 @@ -1463,7 +1463,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $__inlined_func$~lib/util/number/utoa32$79 + block $__inlined_func$~lib/util/number/utoa32$78 local.get $0 i32.const 255 i32.and @@ -1476,7 +1476,7 @@ global.set $~lib/memory/__stack_pointer i32.const 3536 local.set $0 - br $__inlined_func$~lib/util/number/utoa32$79 + br $__inlined_func$~lib/util/number/utoa32$78 end global.get $~lib/memory/__stack_pointer i32.const 3 diff --git a/tests/compiler/resolve-function-expression.debug.wat b/tests/compiler/resolve-function-expression.debug.wat index c1640f112a..0df25b8ef5 100644 --- a/tests/compiler/resolve-function-expression.debug.wat +++ b/tests/compiler/resolve-function-expression.debug.wat @@ -2088,7 +2088,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2154,21 +2154,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2184,6 +2169,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/resolve-function-expression.release.wat b/tests/compiler/resolve-function-expression.release.wat index 6837fffa79..5765610a19 100644 --- a/tests/compiler/resolve-function-expression.release.wat +++ b/tests/compiler/resolve-function-expression.release.wat @@ -94,7 +94,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$124 + block $__inlined_func$~lib/rt/itcms/Object#unlink$123 local.get $1 i32.load offset=4 i32.const -4 @@ -118,7 +118,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$124 + br $__inlined_func$~lib/rt/itcms/Object#unlink$123 end local.get $1 i32.load offset=8 @@ -1205,7 +1205,7 @@ end end end - block $__inlined_func$~lib/util/string/compareImpl$80 + block $__inlined_func$~lib/util/string/compareImpl$79 loop $while-continue|1 local.get $1 local.tee $0 @@ -1225,7 +1225,7 @@ local.get $0 local.get $2 i32.ne - br_if $__inlined_func$~lib/util/string/compareImpl$80 + br_if $__inlined_func$~lib/util/string/compareImpl$79 local.get $5 i32.const 2 i32.add @@ -1564,7 +1564,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $__inlined_func$~lib/util/number/itoa32$73 + block $__inlined_func$~lib/util/number/itoa32$72 local.get $0 i32.eqz if @@ -1574,7 +1574,7 @@ global.set $~lib/memory/__stack_pointer i32.const 1424 local.set $2 - br $__inlined_func$~lib/util/number/itoa32$73 + br $__inlined_func$~lib/util/number/itoa32$72 end global.get $~lib/memory/__stack_pointer i32.const 0 @@ -1654,7 +1654,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -1671,7 +1671,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 diff --git a/tests/compiler/resolve-new.debug.wat b/tests/compiler/resolve-new.debug.wat index a1724b824f..8bc750bffd 100644 --- a/tests/compiler/resolve-new.debug.wat +++ b/tests/compiler/resolve-new.debug.wat @@ -2001,7 +2001,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2067,21 +2067,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2097,6 +2082,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/resolve-new.release.wat b/tests/compiler/resolve-new.release.wat index ac44b8fd07..73a851ef21 100644 --- a/tests/compiler/resolve-new.release.wat +++ b/tests/compiler/resolve-new.release.wat @@ -71,7 +71,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$112 + block $__inlined_func$~lib/rt/itcms/Object#unlink$111 local.get $1 i32.load offset=4 i32.const -4 @@ -95,7 +95,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$112 + br $__inlined_func$~lib/rt/itcms/Object#unlink$111 end local.get $1 i32.load offset=8 @@ -916,7 +916,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $1 loop $do-loop|0 @@ -933,7 +933,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $1 i32.const 0 diff --git a/tests/compiler/resolve-propertyaccess.debug.wat b/tests/compiler/resolve-propertyaccess.debug.wat index 06b17954f1..013dbac4cb 100644 --- a/tests/compiler/resolve-propertyaccess.debug.wat +++ b/tests/compiler/resolve-propertyaccess.debug.wat @@ -2088,7 +2088,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2154,21 +2154,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2184,6 +2169,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/resolve-propertyaccess.release.wat b/tests/compiler/resolve-propertyaccess.release.wat index fc8a3c80bd..0fc090c8e2 100644 --- a/tests/compiler/resolve-propertyaccess.release.wat +++ b/tests/compiler/resolve-propertyaccess.release.wat @@ -183,7 +183,7 @@ end end end - block $__inlined_func$~lib/util/string/compareImpl$77 + block $__inlined_func$~lib/util/string/compareImpl$76 loop $while-continue|1 local.get $0 local.tee $3 @@ -203,7 +203,7 @@ local.get $4 local.get $5 i32.ne - br_if $__inlined_func$~lib/util/string/compareImpl$77 + br_if $__inlined_func$~lib/util/string/compareImpl$76 local.get $2 i32.const 2 i32.add @@ -256,7 +256,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $__inlined_func$~lib/util/number/itoa32$73 + block $__inlined_func$~lib/util/number/itoa32$72 local.get $0 i32.eqz if @@ -266,7 +266,7 @@ global.set $~lib/memory/__stack_pointer i32.const 1248 local.set $2 - br $__inlined_func$~lib/util/number/itoa32$73 + br $__inlined_func$~lib/util/number/itoa32$72 end global.get $~lib/memory/__stack_pointer i32.const 0 @@ -491,7 +491,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$126 + block $__inlined_func$~lib/rt/itcms/Object#unlink$125 local.get $1 i32.load offset=4 i32.const -4 @@ -515,7 +515,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$126 + br $__inlined_func$~lib/rt/itcms/Object#unlink$125 end local.get $1 i32.load offset=8 @@ -1018,7 +1018,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -1035,7 +1035,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 diff --git a/tests/compiler/resolve-ternary.debug.wat b/tests/compiler/resolve-ternary.debug.wat index ff33c0b57a..b2f8e86e64 100644 --- a/tests/compiler/resolve-ternary.debug.wat +++ b/tests/compiler/resolve-ternary.debug.wat @@ -2096,7 +2096,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2162,21 +2162,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2192,6 +2177,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/resolve-ternary.release.wat b/tests/compiler/resolve-ternary.release.wat index d6ff759cbd..98210ea7e3 100644 --- a/tests/compiler/resolve-ternary.release.wat +++ b/tests/compiler/resolve-ternary.release.wat @@ -114,7 +114,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$128 + block $__inlined_func$~lib/rt/itcms/Object#unlink$127 local.get $1 i32.load offset=4 i32.const -4 @@ -138,7 +138,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$128 + br $__inlined_func$~lib/rt/itcms/Object#unlink$127 end local.get $1 i32.load offset=8 @@ -893,7 +893,7 @@ end end end - block $__inlined_func$~lib/util/string/compareImpl$84 + block $__inlined_func$~lib/util/string/compareImpl$83 loop $while-continue|1 local.get $0 local.tee $3 @@ -913,7 +913,7 @@ local.get $4 local.get $5 i32.ne - br_if $__inlined_func$~lib/util/string/compareImpl$84 + br_if $__inlined_func$~lib/util/string/compareImpl$83 local.get $2 i32.const 2 i32.add @@ -1334,7 +1334,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $1 loop $do-loop|0 @@ -1351,7 +1351,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $1 i32.const 0 diff --git a/tests/compiler/resolve-unary.debug.wat b/tests/compiler/resolve-unary.debug.wat index 46d35d9426..2a9024e16f 100644 --- a/tests/compiler/resolve-unary.debug.wat +++ b/tests/compiler/resolve-unary.debug.wat @@ -2088,7 +2088,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2154,21 +2154,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2184,6 +2169,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/resolve-unary.release.wat b/tests/compiler/resolve-unary.release.wat index a407109355..4e98a07ab8 100644 --- a/tests/compiler/resolve-unary.release.wat +++ b/tests/compiler/resolve-unary.release.wat @@ -197,7 +197,7 @@ end end end - block $__inlined_func$~lib/util/string/compareImpl$79 + block $__inlined_func$~lib/util/string/compareImpl$78 loop $while-continue|1 local.get $0 local.tee $3 @@ -217,7 +217,7 @@ local.get $4 local.get $5 i32.ne - br_if $__inlined_func$~lib/util/string/compareImpl$79 + br_if $__inlined_func$~lib/util/string/compareImpl$78 local.get $2 i32.const 2 i32.add @@ -284,7 +284,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$156 + block $__inlined_func$~lib/rt/itcms/Object#unlink$155 local.get $1 i32.load offset=4 i32.const -4 @@ -308,7 +308,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$156 + br $__inlined_func$~lib/rt/itcms/Object#unlink$155 end local.get $1 i32.load offset=8 @@ -422,7 +422,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $__inlined_func$~lib/util/number/itoa32$73 + block $__inlined_func$~lib/util/number/itoa32$72 local.get $0 i32.eqz if @@ -432,7 +432,7 @@ global.set $~lib/memory/__stack_pointer i32.const 1248 local.set $2 - br $__inlined_func$~lib/util/number/itoa32$73 + br $__inlined_func$~lib/util/number/itoa32$72 end global.get $~lib/memory/__stack_pointer i32.const 0 @@ -640,7 +640,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -657,7 +657,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 diff --git a/tests/compiler/return-unreachable.debug.wat b/tests/compiler/return-unreachable.debug.wat index 0c46f0c920..e2003926b1 100644 --- a/tests/compiler/return-unreachable.debug.wat +++ b/tests/compiler/return-unreachable.debug.wat @@ -2004,7 +2004,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2070,21 +2070,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2100,6 +2085,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/return-unreachable.release.wat b/tests/compiler/return-unreachable.release.wat index 85d8930589..fcb578252f 100644 --- a/tests/compiler/return-unreachable.release.wat +++ b/tests/compiler/return-unreachable.release.wat @@ -477,7 +477,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$121 + block $__inlined_func$~lib/rt/itcms/Object#unlink$120 local.get $0 i32.load offset=4 i32.const -4 @@ -501,7 +501,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$121 + br $__inlined_func$~lib/rt/itcms/Object#unlink$120 end local.get $0 i32.load offset=8 @@ -1032,7 +1032,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -1049,7 +1049,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 diff --git a/tests/compiler/rt/alloc-large-memory.debug.wat b/tests/compiler/rt/alloc-large-memory.debug.wat index 9d12c607e6..58323710b2 100644 --- a/tests/compiler/rt/alloc-large-memory.debug.wat +++ b/tests/compiler/rt/alloc-large-memory.debug.wat @@ -1312,7 +1312,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -1378,21 +1378,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -1408,6 +1393,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/rt/finalize.debug.wat b/tests/compiler/rt/finalize.debug.wat index 9e9ef46519..c16f93fd04 100644 --- a/tests/compiler/rt/finalize.debug.wat +++ b/tests/compiler/rt/finalize.debug.wat @@ -2024,7 +2024,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2090,21 +2090,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2120,6 +2105,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/rt/finalize.release.wat b/tests/compiler/rt/finalize.release.wat index 8dbd26236c..eebf2220a7 100644 --- a/tests/compiler/rt/finalize.release.wat +++ b/tests/compiler/rt/finalize.release.wat @@ -350,7 +350,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$112 + block $__inlined_func$~lib/rt/itcms/Object#unlink$111 local.get $1 i32.load offset=4 i32.const -4 @@ -374,7 +374,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$112 + br $__inlined_func$~lib/rt/itcms/Object#unlink$111 end local.get $1 i32.load offset=8 @@ -1189,7 +1189,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$70 + block $__inlined_func$~lib/rt/itcms/interrupt$69 i32.const 2048 local.set $1 loop $do-loop|0 @@ -1206,7 +1206,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$70 + br $__inlined_func$~lib/rt/itcms/interrupt$69 end local.get $1 i32.const 0 diff --git a/tests/compiler/rt/issue-2719.debug.wat b/tests/compiler/rt/issue-2719.debug.wat index 6aae0a765d..af373de11b 100644 --- a/tests/compiler/rt/issue-2719.debug.wat +++ b/tests/compiler/rt/issue-2719.debug.wat @@ -2001,7 +2001,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2067,21 +2067,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2097,6 +2082,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/rt/issue-2719.release.wat b/tests/compiler/rt/issue-2719.release.wat index 82735386cb..befb38a90b 100644 --- a/tests/compiler/rt/issue-2719.release.wat +++ b/tests/compiler/rt/issue-2719.release.wat @@ -332,7 +332,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$119 + block $__inlined_func$~lib/rt/itcms/Object#unlink$118 local.get $1 i32.load offset=4 i32.const -4 @@ -356,7 +356,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$119 + br $__inlined_func$~lib/rt/itcms/Object#unlink$118 end local.get $1 i32.load offset=8 @@ -1326,7 +1326,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -1343,7 +1343,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 diff --git a/tests/compiler/rt/runtime-incremental-export.debug.wat b/tests/compiler/rt/runtime-incremental-export.debug.wat index e95efa75fe..696bbfd05a 100644 --- a/tests/compiler/rt/runtime-incremental-export.debug.wat +++ b/tests/compiler/rt/runtime-incremental-export.debug.wat @@ -2007,7 +2007,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2073,21 +2073,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2103,6 +2088,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/rt/runtime-incremental-export.release.wat b/tests/compiler/rt/runtime-incremental-export.release.wat index 422cd0bc5a..6315246516 100644 --- a/tests/compiler/rt/runtime-incremental-export.release.wat +++ b/tests/compiler/rt/runtime-incremental-export.release.wat @@ -1414,7 +1414,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -1431,7 +1431,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 diff --git a/tests/compiler/rt/runtime-minimal-export.debug.wat b/tests/compiler/rt/runtime-minimal-export.debug.wat index 95a809eadd..278bc01ee7 100644 --- a/tests/compiler/rt/runtime-minimal-export.debug.wat +++ b/tests/compiler/rt/runtime-minimal-export.debug.wat @@ -1329,7 +1329,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -1395,21 +1395,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -1425,6 +1410,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/simd.debug.wat b/tests/compiler/simd.debug.wat index ded9a32b78..4264afd09c 100644 --- a/tests/compiler/simd.debug.wat +++ b/tests/compiler/simd.debug.wat @@ -2040,7 +2040,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2106,21 +2106,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2136,6 +2121,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/simd.release.wat b/tests/compiler/simd.release.wat index 4194c78220..04f7e8d410 100644 --- a/tests/compiler/simd.release.wat +++ b/tests/compiler/simd.release.wat @@ -840,7 +840,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$132 + block $__inlined_func$~lib/rt/itcms/Object#unlink$131 local.get $0 i32.load offset=4 i32.const -4 @@ -864,7 +864,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$132 + br $__inlined_func$~lib/rt/itcms/Object#unlink$131 end local.get $0 i32.load offset=8 @@ -1278,7 +1278,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$68 + block $__inlined_func$~lib/rt/itcms/interrupt$67 i32.const 2048 local.set $1 loop $do-loop|0 @@ -1295,7 +1295,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$68 + br $__inlined_func$~lib/rt/itcms/interrupt$67 end local.get $1 i32.const 0 diff --git a/tests/compiler/std/array-literal.debug.wat b/tests/compiler/std/array-literal.debug.wat index 641be48a4f..33b8db75ab 100644 --- a/tests/compiler/std/array-literal.debug.wat +++ b/tests/compiler/std/array-literal.debug.wat @@ -2036,7 +2036,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2102,21 +2102,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2132,6 +2117,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/std/array-literal.release.wat b/tests/compiler/std/array-literal.release.wat index 0f52e76640..a6e0f416ff 100644 --- a/tests/compiler/std/array-literal.release.wat +++ b/tests/compiler/std/array-literal.release.wat @@ -206,7 +206,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -223,7 +223,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 @@ -1449,7 +1449,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$154 + block $__inlined_func$~lib/rt/itcms/Object#unlink$153 local.get $0 i32.load offset=4 i32.const -4 @@ -1473,7 +1473,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$154 + br $__inlined_func$~lib/rt/itcms/Object#unlink$153 end local.get $0 i32.load offset=8 @@ -1657,7 +1657,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store - block $__inlined_func$~lib/rt/itcms/__renew$149 + block $__inlined_func$~lib/rt/itcms/__renew$148 i32.const 1073741820 local.get $3 i32.const 1 @@ -1700,7 +1700,7 @@ i32.store offset=16 local.get $1 local.set $2 - br $__inlined_func$~lib/rt/itcms/__renew$149 + br $__inlined_func$~lib/rt/itcms/__renew$148 end local.get $3 local.get $4 diff --git a/tests/compiler/std/array.debug.wat b/tests/compiler/std/array.debug.wat index b54061ee14..54c8ffd683 100644 --- a/tests/compiler/std/array.debug.wat +++ b/tests/compiler/std/array.debug.wat @@ -2345,7 +2345,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2411,21 +2411,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2441,6 +2426,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/std/array.release.wat b/tests/compiler/std/array.release.wat index d3525108c2..849874e8e5 100644 --- a/tests/compiler/std/array.release.wat +++ b/tests/compiler/std/array.release.wat @@ -1041,7 +1041,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$68 + block $__inlined_func$~lib/rt/itcms/interrupt$67 i32.const 2048 local.set $2 loop $do-loop|0 @@ -1058,7 +1058,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$68 + br $__inlined_func$~lib/rt/itcms/interrupt$67 end local.get $2 i32.const 0 @@ -1554,7 +1554,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store - block $__inlined_func$~lib/string/String#concat$740 + block $__inlined_func$~lib/string/String#concat$739 local.get $1 i32.const 20 i32.sub @@ -1573,7 +1573,7 @@ global.set $~lib/memory/__stack_pointer i32.const 11568 local.set $0 - br $__inlined_func$~lib/string/String#concat$740 + br $__inlined_func$~lib/string/String#concat$739 end global.get $~lib/memory/__stack_pointer local.get $0 @@ -3765,7 +3765,7 @@ select local.set $1 end - block $__inlined_func$~lib/rt/itcms/__renew$657 + block $__inlined_func$~lib/rt/itcms/__renew$656 local.get $3 i32.const 20 i32.sub @@ -3783,7 +3783,7 @@ i32.store offset=16 local.get $3 local.set $2 - br $__inlined_func$~lib/rt/itcms/__renew$657 + br $__inlined_func$~lib/rt/itcms/__renew$656 end local.get $1 local.get $4 @@ -4401,7 +4401,7 @@ local.get $2 call $~lib/array/Array#get:length local.set $3 - block $__inlined_func$std/array/isSorted$662 (result i32) + block $__inlined_func$std/array/isSorted$661 (result i32) loop $for-loop|0 local.get $0 local.get $3 @@ -4437,7 +4437,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 0 - br $__inlined_func$std/array/isSorted$662 + br $__inlined_func$std/array/isSorted$661 end local.get $0 i32.const 1 @@ -5034,7 +5034,7 @@ i32.lt_s select local.set $0 - block $__inlined_func$~lib/util/bytes/FILL$139 + block $__inlined_func$~lib/util/bytes/FILL$138 local.get $1 i32.eqz local.get $1 @@ -5059,7 +5059,7 @@ i32.shl memory.fill end - br $__inlined_func$~lib/util/bytes/FILL$139 + br $__inlined_func$~lib/util/bytes/FILL$138 end loop $for-loop|0 local.get $0 @@ -5613,7 +5613,7 @@ i32.lt_s select local.set $0 - block $__inlined_func$~lib/util/bytes/FILL$148 + block $__inlined_func$~lib/util/bytes/FILL$147 local.get $1 i32.reinterpret_f32 i32.eqz @@ -5635,7 +5635,7 @@ i32.shl memory.fill end - br $__inlined_func$~lib/util/bytes/FILL$148 + br $__inlined_func$~lib/util/bytes/FILL$147 end loop $for-loop|0 local.get $0 @@ -7057,7 +7057,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$735 + block $__inlined_func$~lib/rt/itcms/Object#unlink$734 local.get $0 i32.load offset=4 i32.const -4 @@ -7081,7 +7081,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$735 + br $__inlined_func$~lib/rt/itcms/Object#unlink$734 end local.get $0 i32.load offset=8 @@ -7832,7 +7832,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $__inlined_func$~lib/util/string/joinIntegerArray$747 + block $__inlined_func$~lib/util/string/joinIntegerArray$746 local.get $0 i32.const 1 i32.sub @@ -7846,7 +7846,7 @@ global.set $~lib/memory/__stack_pointer i32.const 11568 local.set $0 - br $__inlined_func$~lib/util/string/joinIntegerArray$747 + br $__inlined_func$~lib/util/string/joinIntegerArray$746 end local.get $6 i32.eqz @@ -7859,7 +7859,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$747 + br $__inlined_func$~lib/util/string/joinIntegerArray$746 end global.get $~lib/memory/__stack_pointer i32.const 11856 @@ -7952,7 +7952,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$747 + br $__inlined_func$~lib/util/string/joinIntegerArray$746 end global.get $~lib/memory/__stack_pointer i32.const 8 @@ -8650,7 +8650,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $__inlined_func$~lib/util/string/joinIntegerArray$742 + block $__inlined_func$~lib/util/string/joinIntegerArray$741 local.get $0 i32.const 1 i32.sub @@ -8664,7 +8664,7 @@ global.set $~lib/memory/__stack_pointer i32.const 11568 local.set $0 - br $__inlined_func$~lib/util/string/joinIntegerArray$742 + br $__inlined_func$~lib/util/string/joinIntegerArray$741 end local.get $7 i32.eqz @@ -8677,7 +8677,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$742 + br $__inlined_func$~lib/util/string/joinIntegerArray$741 end global.get $~lib/memory/__stack_pointer local.get $1 @@ -8776,7 +8776,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$742 + br $__inlined_func$~lib/util/string/joinIntegerArray$741 end global.get $~lib/memory/__stack_pointer i32.const 8 @@ -8912,7 +8912,7 @@ local.get $5 call $~lib/array/Array#get:length local.set $4 - block $__inlined_func$std/array/isSorted<~lib/array/Array>$664 (result i32) + block $__inlined_func$std/array/isSorted<~lib/array/Array>$663 (result i32) loop $for-loop|0 local.get $1 local.get $4 @@ -8958,7 +8958,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 0 - br $__inlined_func$std/array/isSorted<~lib/array/Array>$664 + br $__inlined_func$std/array/isSorted<~lib/array/Array>$663 end local.get $1 i32.const 1 @@ -12286,7 +12286,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $__inlined_func$~lib/util/string/joinIntegerArray$743 + block $__inlined_func$~lib/util/string/joinIntegerArray$742 local.get $0 i32.const 1 i32.sub @@ -12300,7 +12300,7 @@ global.set $~lib/memory/__stack_pointer i32.const 11568 local.set $0 - br $__inlined_func$~lib/util/string/joinIntegerArray$743 + br $__inlined_func$~lib/util/string/joinIntegerArray$742 end local.get $7 i32.eqz @@ -12313,7 +12313,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$743 + br $__inlined_func$~lib/util/string/joinIntegerArray$742 end global.get $~lib/memory/__stack_pointer local.get $1 @@ -12412,7 +12412,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$743 + br $__inlined_func$~lib/util/string/joinIntegerArray$742 end global.get $~lib/memory/__stack_pointer i32.const 8 @@ -12864,7 +12864,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $__inlined_func$~lib/util/string/joinIntegerArray$744 + block $__inlined_func$~lib/util/string/joinIntegerArray$743 local.get $0 i32.const 1 i32.sub @@ -12878,7 +12878,7 @@ global.set $~lib/memory/__stack_pointer i32.const 11568 local.set $0 - br $__inlined_func$~lib/util/string/joinIntegerArray$744 + br $__inlined_func$~lib/util/string/joinIntegerArray$743 end local.get $6 i32.eqz @@ -12891,7 +12891,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$744 + br $__inlined_func$~lib/util/string/joinIntegerArray$743 end global.get $~lib/memory/__stack_pointer i32.const 11856 @@ -12984,7 +12984,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$744 + br $__inlined_func$~lib/util/string/joinIntegerArray$743 end global.get $~lib/memory/__stack_pointer i32.const 8 @@ -13690,7 +13690,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $__inlined_func$~lib/util/number/utoa64$485 + block $__inlined_func$~lib/util/number/utoa64$484 local.get $3 i64.eqz if @@ -13700,7 +13700,7 @@ global.set $~lib/memory/__stack_pointer i32.const 7712 local.set $1 - br $__inlined_func$~lib/util/number/utoa64$485 + br $__inlined_func$~lib/util/number/utoa64$484 end local.get $3 i64.const 4294967295 @@ -21592,7 +21592,7 @@ global.get $~lib/memory/__stack_pointer local.get $2 i32.store - block $__inlined_func$~lib/array/Array#indexOf$718 + block $__inlined_func$~lib/array/Array#indexOf$717 local.get $2 i32.load offset=12 local.tee $3 @@ -21608,7 +21608,7 @@ global.set $~lib/memory/__stack_pointer i32.const -1 local.set $0 - br $__inlined_func$~lib/array/Array#indexOf$718 + br $__inlined_func$~lib/array/Array#indexOf$717 end global.get $~lib/memory/__stack_pointer local.get $2 @@ -21634,7 +21634,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/array/Array#indexOf$718 + br $__inlined_func$~lib/array/Array#indexOf$717 end local.get $0 i32.const 1 @@ -21686,7 +21686,7 @@ global.get $~lib/memory/__stack_pointer local.get $2 i32.store - block $__inlined_func$~lib/array/Array#indexOf$719 + block $__inlined_func$~lib/array/Array#indexOf$718 local.get $2 i32.load offset=12 local.tee $3 @@ -21702,7 +21702,7 @@ global.set $~lib/memory/__stack_pointer i32.const -1 local.set $0 - br $__inlined_func$~lib/array/Array#indexOf$719 + br $__inlined_func$~lib/array/Array#indexOf$718 end global.get $~lib/memory/__stack_pointer local.get $2 @@ -21728,7 +21728,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/array/Array#indexOf$719 + br $__inlined_func$~lib/array/Array#indexOf$718 end local.get $0 i32.const 1 @@ -22064,7 +22064,7 @@ global.get $~lib/memory/__stack_pointer local.get $2 i32.store - block $__inlined_func$~lib/array/Array#includes$720 (result i32) + block $__inlined_func$~lib/array/Array#includes$719 (result i32) local.get $2 i32.load offset=12 local.tee $3 @@ -22079,7 +22079,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 0 - br $__inlined_func$~lib/array/Array#includes$720 + br $__inlined_func$~lib/array/Array#includes$719 end global.get $~lib/memory/__stack_pointer local.get $2 @@ -22107,7 +22107,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 1 - br $__inlined_func$~lib/array/Array#includes$720 + br $__inlined_func$~lib/array/Array#includes$719 end local.get $0 i32.const 1 @@ -22156,7 +22156,7 @@ global.get $~lib/memory/__stack_pointer local.get $2 i32.store - block $__inlined_func$~lib/array/Array#includes$721 (result i32) + block $__inlined_func$~lib/array/Array#includes$720 (result i32) local.get $2 i32.load offset=12 local.tee $3 @@ -22171,7 +22171,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 0 - br $__inlined_func$~lib/array/Array#includes$721 + br $__inlined_func$~lib/array/Array#includes$720 end global.get $~lib/memory/__stack_pointer local.get $2 @@ -22199,7 +22199,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 1 - br $__inlined_func$~lib/array/Array#includes$721 + br $__inlined_func$~lib/array/Array#includes$720 end local.get $0 i32.const 1 @@ -27595,7 +27595,7 @@ local.get $3 call $~lib/array/Array#get:length local.set $9 - block $__inlined_func$std/array/isSorted<~lib/string/String|null>$666 (result i32) + block $__inlined_func$std/array/isSorted<~lib/string/String|null>$665 (result i32) loop $for-loop|07 local.get $4 local.get $9 @@ -27641,7 +27641,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 0 - br $__inlined_func$std/array/isSorted<~lib/string/String|null>$666 + br $__inlined_func$std/array/isSorted<~lib/string/String|null>$665 end local.get $4 i32.const 1 @@ -27702,7 +27702,7 @@ global.get $~lib/memory/__stack_pointer local.get $2 i32.store - block $__inlined_func$std/array/isArraysEqual<~lib/string/String|null>$752 (result i32) + block $__inlined_func$std/array/isArraysEqual<~lib/string/String|null>$751 (result i32) local.get $2 call $~lib/array/Array#get:length local.get $3 @@ -27713,7 +27713,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 0 - br $__inlined_func$std/array/isArraysEqual<~lib/string/String|null>$752 + br $__inlined_func$std/array/isArraysEqual<~lib/string/String|null>$751 end local.get $0 local.get $2 @@ -27724,7 +27724,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 1 - br $__inlined_func$std/array/isArraysEqual<~lib/string/String|null>$752 + br $__inlined_func$std/array/isArraysEqual<~lib/string/String|null>$751 end i32.const 0 local.set $4 @@ -27784,7 +27784,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 0 - br $__inlined_func$std/array/isArraysEqual<~lib/string/String|null>$752 + br $__inlined_func$std/array/isArraysEqual<~lib/string/String|null>$751 end local.get $4 i32.const 1 @@ -27984,7 +27984,7 @@ global.get $~lib/memory/__stack_pointer i32.const 10032 i32.store - block $__inlined_func$~lib/string/String#charAt$741 + block $__inlined_func$~lib/string/String#charAt$740 local.get $13 i32.const 10028 i32.load @@ -27998,7 +27998,7 @@ global.set $~lib/memory/__stack_pointer i32.const 11568 local.set $3 - br $__inlined_func$~lib/string/String#charAt$741 + br $__inlined_func$~lib/string/String#charAt$740 end global.get $~lib/memory/__stack_pointer i32.const 2 @@ -28800,7 +28800,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $__inlined_func$~lib/util/string/joinIntegerArray$745 + block $__inlined_func$~lib/util/string/joinIntegerArray$744 local.get $0 i32.const 1 i32.sub @@ -28814,7 +28814,7 @@ global.set $~lib/memory/__stack_pointer i32.const 11568 local.set $0 - br $__inlined_func$~lib/util/string/joinIntegerArray$745 + br $__inlined_func$~lib/util/string/joinIntegerArray$744 end local.get $3 i32.eqz @@ -28827,7 +28827,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$745 + br $__inlined_func$~lib/util/string/joinIntegerArray$744 end global.get $~lib/memory/__stack_pointer i32.const 11856 @@ -28924,7 +28924,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$745 + br $__inlined_func$~lib/util/string/joinIntegerArray$744 end global.get $~lib/memory/__stack_pointer i32.const 8 @@ -29018,7 +29018,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $__inlined_func$~lib/util/string/joinIntegerArray$746 + block $__inlined_func$~lib/util/string/joinIntegerArray$745 local.get $0 i32.const 1 i32.sub @@ -29032,7 +29032,7 @@ global.set $~lib/memory/__stack_pointer i32.const 11568 local.set $0 - br $__inlined_func$~lib/util/string/joinIntegerArray$746 + br $__inlined_func$~lib/util/string/joinIntegerArray$745 end local.get $3 i32.eqz @@ -29045,7 +29045,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$746 + br $__inlined_func$~lib/util/string/joinIntegerArray$745 end global.get $~lib/memory/__stack_pointer i32.const 11856 @@ -29142,7 +29142,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$746 + br $__inlined_func$~lib/util/string/joinIntegerArray$745 end global.get $~lib/memory/__stack_pointer i32.const 8 diff --git a/tests/compiler/std/arraybuffer.debug.wat b/tests/compiler/std/arraybuffer.debug.wat index 62e83133db..ed78139eb8 100644 --- a/tests/compiler/std/arraybuffer.debug.wat +++ b/tests/compiler/std/arraybuffer.debug.wat @@ -2009,7 +2009,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2075,21 +2075,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2105,6 +2090,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/std/arraybuffer.release.wat b/tests/compiler/std/arraybuffer.release.wat index 5e80739f7e..257da31730 100644 --- a/tests/compiler/std/arraybuffer.release.wat +++ b/tests/compiler/std/arraybuffer.release.wat @@ -64,7 +64,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -81,7 +81,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 @@ -1207,7 +1207,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$185 + block $__inlined_func$~lib/rt/itcms/Object#unlink$184 local.get $0 i32.load offset=4 i32.const -4 @@ -1231,7 +1231,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$185 + br $__inlined_func$~lib/rt/itcms/Object#unlink$184 end local.get $0 i32.load offset=8 diff --git a/tests/compiler/std/dataview.debug.wat b/tests/compiler/std/dataview.debug.wat index ad44b4a321..ee6ad47959 100644 --- a/tests/compiler/std/dataview.debug.wat +++ b/tests/compiler/std/dataview.debug.wat @@ -2016,7 +2016,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2082,21 +2082,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2112,6 +2097,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/std/dataview.release.wat b/tests/compiler/std/dataview.release.wat index f02332e163..267695375a 100644 --- a/tests/compiler/std/dataview.release.wat +++ b/tests/compiler/std/dataview.release.wat @@ -850,7 +850,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -867,7 +867,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 @@ -1847,7 +1847,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$221 + block $__inlined_func$~lib/rt/itcms/Object#unlink$220 local.get $0 i32.load offset=4 i32.const -4 @@ -1871,7 +1871,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$221 + br $__inlined_func$~lib/rt/itcms/Object#unlink$220 end local.get $0 i32.load offset=8 diff --git a/tests/compiler/std/date.debug.wat b/tests/compiler/std/date.debug.wat index f0af4387e1..4ff7fcd2f2 100644 --- a/tests/compiler/std/date.debug.wat +++ b/tests/compiler/std/date.debug.wat @@ -2403,7 +2403,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2469,21 +2469,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2499,6 +2484,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/std/date.release.wat b/tests/compiler/std/date.release.wat index ada5d9f64a..e196c389e1 100644 --- a/tests/compiler/std/date.release.wat +++ b/tests/compiler/std/date.release.wat @@ -607,7 +607,7 @@ global.get $~lib/memory/__stack_pointer local.get $2 i32.store - block $__inlined_func$~lib/string/String#charCodeAt$401 + block $__inlined_func$~lib/string/String#charCodeAt$400 local.get $3 local.get $2 i32.const 20 @@ -623,7 +623,7 @@ global.set $~lib/memory/__stack_pointer i32.const -1 local.set $0 - br $__inlined_func$~lib/string/String#charCodeAt$401 + br $__inlined_func$~lib/string/String#charCodeAt$400 end local.get $2 local.get $3 @@ -895,7 +895,7 @@ global.get $~lib/memory/__stack_pointer local.get $2 i32.store - block $__inlined_func$~lib/string/String#substr$402 (result i32) + block $__inlined_func$~lib/string/String#substr$401 (result i32) i32.const 3 local.get $2 i32.const 20 @@ -937,7 +937,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 3456 - br $__inlined_func$~lib/string/String#substr$402 + br $__inlined_func$~lib/string/String#substr$401 end global.get $~lib/memory/__stack_pointer local.get $8 @@ -987,7 +987,7 @@ global.get $~lib/memory/__stack_pointer i32.const 1872 i32.store - block $__inlined_func$~lib/string/String#padEnd$403 + block $__inlined_func$~lib/string/String#padEnd$402 i32.const 1868 i32.load i32.const -2 @@ -1003,7 +1003,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/string/String#padEnd$403 + br $__inlined_func$~lib/string/String#padEnd$402 end global.get $~lib/memory/__stack_pointer i32.const 6 @@ -1220,7 +1220,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -1237,7 +1237,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 @@ -1562,7 +1562,7 @@ global.get $~lib/memory/__stack_pointer i32.const 1872 i32.store - block $__inlined_func$~lib/string/String#padStart$399 + block $__inlined_func$~lib/string/String#padStart$398 i32.const 1868 i32.load i32.const -2 @@ -1581,7 +1581,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/string/String#padStart$399 + br $__inlined_func$~lib/string/String#padStart$398 end global.get $~lib/memory/__stack_pointer local.get $5 @@ -1761,7 +1761,7 @@ global.get $~lib/memory/__stack_pointer local.get $4 i32.store - block $__inlined_func$~lib/string/String#concat$400 + block $__inlined_func$~lib/string/String#concat$399 local.get $4 i32.const 20 i32.sub @@ -1780,7 +1780,7 @@ global.set $~lib/memory/__stack_pointer i32.const 3456 local.set $1 - br $__inlined_func$~lib/string/String#concat$400 + br $__inlined_func$~lib/string/String#concat$399 end global.get $~lib/memory/__stack_pointer local.get $1 @@ -2139,7 +2139,7 @@ i32.load16_u local.set $0 loop $while-continue|0 - block $__inlined_func$~lib/util/string/isSpace$164 (result i32) + block $__inlined_func$~lib/util/string/isSpace$163 (result i32) local.get $0 i32.const 128 i32.or @@ -2154,7 +2154,7 @@ local.get $0 i32.const 5760 i32.lt_u - br_if $__inlined_func$~lib/util/string/isSpace$164 + br_if $__inlined_func$~lib/util/string/isSpace$163 drop i32.const 1 local.get $0 @@ -2162,7 +2162,7 @@ i32.add i32.const 10 i32.le_u - br_if $__inlined_func$~lib/util/string/isSpace$164 + br_if $__inlined_func$~lib/util/string/isSpace$163 drop block $break|0 block $case0|0 @@ -2197,7 +2197,7 @@ br $break|0 end i32.const 1 - br $__inlined_func$~lib/util/string/isSpace$164 + br $__inlined_func$~lib/util/string/isSpace$163 end i32.const 0 end @@ -3975,7 +3975,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$391 + block $__inlined_func$~lib/rt/itcms/Object#unlink$390 local.get $0 i32.load offset=4 i32.const -4 @@ -3999,7 +3999,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$391 + br $__inlined_func$~lib/rt/itcms/Object#unlink$390 end local.get $0 i32.load offset=8 @@ -5630,7 +5630,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store - block $__inlined_func$~lib/rt/itcms/__renew$378 + block $__inlined_func$~lib/rt/itcms/__renew$377 i32.const 1073741820 local.get $2 i32.const 1 @@ -5673,7 +5673,7 @@ i32.store offset=16 local.get $2 local.set $1 - br $__inlined_func$~lib/rt/itcms/__renew$378 + br $__inlined_func$~lib/rt/itcms/__renew$377 end local.get $3 local.get $4 @@ -6598,7 +6598,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $__inlined_func$~lib/util/number/itoa32$73 + block $__inlined_func$~lib/util/number/itoa32$72 local.get $0 i32.eqz if @@ -6608,7 +6608,7 @@ global.set $~lib/memory/__stack_pointer i32.const 1872 local.set $2 - br $__inlined_func$~lib/util/number/itoa32$73 + br $__inlined_func$~lib/util/number/itoa32$72 end global.get $~lib/memory/__stack_pointer i32.const 0 diff --git a/tests/compiler/std/map.debug.wat b/tests/compiler/std/map.debug.wat index 13432055e5..b87f3cee71 100644 --- a/tests/compiler/std/map.debug.wat +++ b/tests/compiler/std/map.debug.wat @@ -2032,7 +2032,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2098,21 +2098,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2128,6 +2113,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/std/map.release.wat b/tests/compiler/std/map.release.wat index 112ed92024..737927731c 100644 --- a/tests/compiler/std/map.release.wat +++ b/tests/compiler/std/map.release.wat @@ -208,7 +208,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -225,7 +225,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 @@ -1557,7 +1557,7 @@ select local.set $1 end - block $__inlined_func$~lib/rt/itcms/__renew$1377 + block $__inlined_func$~lib/rt/itcms/__renew$1376 local.get $4 i32.const 20 i32.sub @@ -1575,7 +1575,7 @@ i32.store offset=16 local.get $4 local.set $2 - br $__inlined_func$~lib/rt/itcms/__renew$1377 + br $__inlined_func$~lib/rt/itcms/__renew$1376 end local.get $1 local.get $3 @@ -3958,7 +3958,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$1422 + block $__inlined_func$~lib/rt/itcms/Object#unlink$1421 local.get $0 i32.load offset=4 i32.const -4 @@ -3982,7 +3982,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$1422 + br $__inlined_func$~lib/rt/itcms/Object#unlink$1421 end local.get $0 i32.load offset=8 @@ -10447,7 +10447,7 @@ i32.add i32.load local.set $3 - block $"__inlined_func$~lib/map/Map#find$1383" + block $"__inlined_func$~lib/map/Map#find$1382" loop $while-continue|0 local.get $3 if @@ -10471,7 +10471,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - br $"__inlined_func$~lib/map/Map#find$1383" + br $"__inlined_func$~lib/map/Map#find$1382" end local.get $4 i32.const -2 @@ -10898,7 +10898,7 @@ i32.add i32.load local.set $3 - block $"__inlined_func$~lib/map/Map#find$1408" + block $"__inlined_func$~lib/map/Map#find$1407" loop $while-continue|0 local.get $3 if @@ -10920,7 +10920,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - br $"__inlined_func$~lib/map/Map#find$1408" + br $"__inlined_func$~lib/map/Map#find$1407" end local.get $4 i32.const -2 @@ -11724,7 +11724,7 @@ i32.add i32.load local.set $3 - block $"__inlined_func$~lib/map/Map#find$1393" + block $"__inlined_func$~lib/map/Map#find$1392" loop $while-continue|0 local.get $3 if @@ -11748,7 +11748,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - br $"__inlined_func$~lib/map/Map#find$1393" + br $"__inlined_func$~lib/map/Map#find$1392" end local.get $4 i32.const -2 @@ -12165,7 +12165,7 @@ i32.add i32.load local.set $3 - block $"__inlined_func$~lib/map/Map#find$1378" + block $"__inlined_func$~lib/map/Map#find$1377" loop $while-continue|0 local.get $3 if @@ -12189,7 +12189,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - br $"__inlined_func$~lib/map/Map#find$1378" + br $"__inlined_func$~lib/map/Map#find$1377" end local.get $4 i32.const -2 @@ -12616,7 +12616,7 @@ i32.add i32.load local.set $3 - block $"__inlined_func$~lib/map/Map#find$1403" + block $"__inlined_func$~lib/map/Map#find$1402" loop $while-continue|0 local.get $3 if @@ -12638,7 +12638,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - br $"__inlined_func$~lib/map/Map#find$1403" + br $"__inlined_func$~lib/map/Map#find$1402" end local.get $4 i32.const -2 @@ -13067,7 +13067,7 @@ i32.add i32.load local.set $3 - block $"__inlined_func$~lib/map/Map#find$1388" + block $"__inlined_func$~lib/map/Map#find$1387" loop $while-continue|0 local.get $3 if @@ -13091,7 +13091,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - br $"__inlined_func$~lib/map/Map#find$1388" + br $"__inlined_func$~lib/map/Map#find$1387" end local.get $4 i32.const -2 @@ -13777,7 +13777,7 @@ i32.add i32.load local.set $3 - block $"__inlined_func$~lib/map/Map#find$1418" + block $"__inlined_func$~lib/map/Map#find$1417" loop $while-continue|0 local.get $3 if @@ -13799,7 +13799,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - br $"__inlined_func$~lib/map/Map#find$1418" + br $"__inlined_func$~lib/map/Map#find$1417" end local.get $4 i32.const -2 diff --git a/tests/compiler/std/new.debug.wat b/tests/compiler/std/new.debug.wat index 5979cb6867..1859c2130a 100644 --- a/tests/compiler/std/new.debug.wat +++ b/tests/compiler/std/new.debug.wat @@ -2018,7 +2018,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2084,21 +2084,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2114,6 +2099,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/std/new.release.wat b/tests/compiler/std/new.release.wat index 98131dbec6..047320bf82 100644 --- a/tests/compiler/std/new.release.wat +++ b/tests/compiler/std/new.release.wat @@ -71,7 +71,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$113 + block $__inlined_func$~lib/rt/itcms/Object#unlink$112 local.get $1 i32.load offset=4 i32.const -4 @@ -95,7 +95,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$113 + br $__inlined_func$~lib/rt/itcms/Object#unlink$112 end local.get $1 i32.load offset=8 @@ -1272,7 +1272,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $0 loop $do-loop|0 @@ -1289,7 +1289,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $0 i32.const 0 diff --git a/tests/compiler/std/operator-overloading.debug.wat b/tests/compiler/std/operator-overloading.debug.wat index 3313be1958..92c0823a8b 100644 --- a/tests/compiler/std/operator-overloading.debug.wat +++ b/tests/compiler/std/operator-overloading.debug.wat @@ -2074,7 +2074,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2140,21 +2140,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2170,6 +2155,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/std/operator-overloading.release.wat b/tests/compiler/std/operator-overloading.release.wat index d352f0f211..af3f94cc66 100644 --- a/tests/compiler/std/operator-overloading.release.wat +++ b/tests/compiler/std/operator-overloading.release.wat @@ -145,7 +145,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$334 + block $__inlined_func$~lib/rt/itcms/Object#unlink$333 local.get $1 i32.load offset=4 i32.const -4 @@ -169,7 +169,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$334 + br $__inlined_func$~lib/rt/itcms/Object#unlink$333 end local.get $1 i32.load offset=8 @@ -353,7 +353,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$68 + block $__inlined_func$~lib/rt/itcms/interrupt$67 i32.const 2048 local.set $1 loop $do-loop|0 @@ -370,7 +370,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$68 + br $__inlined_func$~lib/rt/itcms/interrupt$67 end local.get $1 i32.const 0 @@ -1236,7 +1236,7 @@ end end end - block $__inlined_func$~lib/util/string/compareImpl$199 + block $__inlined_func$~lib/util/string/compareImpl$198 loop $while-continue|1 local.get $0 local.tee $2 @@ -1256,7 +1256,7 @@ local.get $4 local.get $5 i32.ne - br_if $__inlined_func$~lib/util/string/compareImpl$199 + br_if $__inlined_func$~lib/util/string/compareImpl$198 local.get $1 i32.const 2 i32.add diff --git a/tests/compiler/std/set.debug.wat b/tests/compiler/std/set.debug.wat index 3f49782b9d..925d438296 100644 --- a/tests/compiler/std/set.debug.wat +++ b/tests/compiler/std/set.debug.wat @@ -2027,7 +2027,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2093,21 +2093,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2123,6 +2108,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/std/set.release.wat b/tests/compiler/std/set.release.wat index e48a3d3f19..f11891666b 100644 --- a/tests/compiler/std/set.release.wat +++ b/tests/compiler/std/set.release.wat @@ -201,7 +201,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -218,7 +218,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 @@ -1219,7 +1219,7 @@ select local.set $1 end - block $__inlined_func$~lib/rt/itcms/__renew$893 + block $__inlined_func$~lib/rt/itcms/__renew$892 local.get $4 i32.const 20 i32.sub @@ -1237,7 +1237,7 @@ i32.store offset=16 local.get $4 local.set $2 - br $__inlined_func$~lib/rt/itcms/__renew$893 + br $__inlined_func$~lib/rt/itcms/__renew$892 end local.get $1 local.get $3 @@ -4586,7 +4586,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$904 + block $__inlined_func$~lib/rt/itcms/Object#unlink$903 local.get $0 i32.load offset=4 i32.const -4 @@ -4610,7 +4610,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$904 + br $__inlined_func$~lib/rt/itcms/Object#unlink$903 end local.get $0 i32.load offset=8 diff --git a/tests/compiler/std/static-array.debug.wat b/tests/compiler/std/static-array.debug.wat index cfc3928c0c..c67ef1d7c3 100644 --- a/tests/compiler/std/static-array.debug.wat +++ b/tests/compiler/std/static-array.debug.wat @@ -2043,7 +2043,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2109,21 +2109,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2139,6 +2124,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/std/static-array.release.wat b/tests/compiler/std/static-array.release.wat index 14b3ca07e7..ca63da389c 100644 --- a/tests/compiler/std/static-array.release.wat +++ b/tests/compiler/std/static-array.release.wat @@ -135,7 +135,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store - block $__inlined_func$~lib/rt/itcms/__renew$145 + block $__inlined_func$~lib/rt/itcms/__renew$144 i32.const 1073741820 local.get $2 i32.const 1 @@ -173,7 +173,7 @@ i32.store offset=16 local.get $2 local.set $1 - br $__inlined_func$~lib/rt/itcms/__renew$145 + br $__inlined_func$~lib/rt/itcms/__renew$144 end local.get $4 i32.load offset=12 @@ -193,7 +193,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $1 loop $do-loop|0 @@ -210,7 +210,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $1 i32.const 0 @@ -1010,7 +1010,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$155 + block $__inlined_func$~lib/rt/itcms/Object#unlink$154 local.get $0 i32.load offset=4 i32.const -4 @@ -1034,7 +1034,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$155 + br $__inlined_func$~lib/rt/itcms/Object#unlink$154 end local.get $0 i32.load offset=8 diff --git a/tests/compiler/std/staticarray.debug.wat b/tests/compiler/std/staticarray.debug.wat index fe1032fd29..8aea4a2670 100644 --- a/tests/compiler/std/staticarray.debug.wat +++ b/tests/compiler/std/staticarray.debug.wat @@ -2109,7 +2109,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2175,21 +2175,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2205,6 +2190,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/std/staticarray.release.wat b/tests/compiler/std/staticarray.release.wat index e9b6c8eccb..b232df528d 100644 --- a/tests/compiler/std/staticarray.release.wat +++ b/tests/compiler/std/staticarray.release.wat @@ -190,7 +190,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -207,7 +207,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 @@ -469,7 +469,7 @@ end end end - block $__inlined_func$~lib/util/string/compareImpl$106 + block $__inlined_func$~lib/util/string/compareImpl$105 loop $while-continue|1 local.get $0 local.tee $3 @@ -489,7 +489,7 @@ local.get $4 local.get $5 i32.ne - br_if $__inlined_func$~lib/util/string/compareImpl$106 + br_if $__inlined_func$~lib/util/string/compareImpl$105 local.get $2 i32.const 2 i32.add @@ -1218,7 +1218,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store - block $__inlined_func$~lib/staticarray/StaticArray<~lib/string/String>#indexOf$275 + block $__inlined_func$~lib/staticarray/StaticArray<~lib/string/String>#indexOf$274 local.get $0 i32.const 20 i32.sub @@ -1238,7 +1238,7 @@ global.set $~lib/memory/__stack_pointer i32.const -1 local.set $2 - br $__inlined_func$~lib/staticarray/StaticArray<~lib/string/String>#indexOf$275 + br $__inlined_func$~lib/staticarray/StaticArray<~lib/string/String>#indexOf$274 end local.get $2 i32.const 0 @@ -1280,7 +1280,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/staticarray/StaticArray<~lib/string/String>#indexOf$275 + br $__inlined_func$~lib/staticarray/StaticArray<~lib/string/String>#indexOf$274 end local.get $2 i32.const 1 @@ -2482,7 +2482,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$268 + block $__inlined_func$~lib/rt/itcms/Object#unlink$267 local.get $0 i32.load offset=4 i32.const -4 @@ -2506,7 +2506,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$268 + br $__inlined_func$~lib/rt/itcms/Object#unlink$267 end local.get $0 i32.load offset=8 @@ -4893,7 +4893,7 @@ global.get $~lib/memory/__stack_pointer local.get $10 i32.store - block $__inlined_func$~lib/rt/itcms/__renew$225 + block $__inlined_func$~lib/rt/itcms/__renew$224 i32.const 1073741820 local.get $1 i32.const 1 @@ -4936,7 +4936,7 @@ i32.store offset=16 local.get $1 local.set $2 - br $__inlined_func$~lib/rt/itcms/__renew$225 + br $__inlined_func$~lib/rt/itcms/__renew$224 end local.get $4 local.get $3 @@ -6435,7 +6435,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store - block $__inlined_func$~lib/staticarray/StaticArray#includes$277 (result i32) + block $__inlined_func$~lib/staticarray/StaticArray#includes$276 (result i32) local.get $0 i32.const 20 i32.sub @@ -6450,7 +6450,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 0 - br $__inlined_func$~lib/staticarray/StaticArray#includes$277 + br $__inlined_func$~lib/staticarray/StaticArray#includes$276 end loop $while-continue|0 local.get $1 @@ -6472,7 +6472,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 1 - br $__inlined_func$~lib/staticarray/StaticArray#includes$277 + br $__inlined_func$~lib/staticarray/StaticArray#includes$276 end local.get $2 i32.const 1 @@ -6522,7 +6522,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store - block $__inlined_func$~lib/staticarray/StaticArray#includes$278 (result i32) + block $__inlined_func$~lib/staticarray/StaticArray#includes$277 (result i32) local.get $0 i32.const 20 i32.sub @@ -6537,7 +6537,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 0 - br $__inlined_func$~lib/staticarray/StaticArray#includes$278 + br $__inlined_func$~lib/staticarray/StaticArray#includes$277 end loop $while-continue|030 local.get $1 @@ -6559,7 +6559,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 1 - br $__inlined_func$~lib/staticarray/StaticArray#includes$278 + br $__inlined_func$~lib/staticarray/StaticArray#includes$277 end local.get $2 i32.const 1 diff --git a/tests/compiler/std/string-casemapping.debug.wat b/tests/compiler/std/string-casemapping.debug.wat index 5e412bc990..878e018615 100644 --- a/tests/compiler/std/string-casemapping.debug.wat +++ b/tests/compiler/std/string-casemapping.debug.wat @@ -2195,7 +2195,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2261,21 +2261,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2291,6 +2276,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/std/string-casemapping.release.wat b/tests/compiler/std/string-casemapping.release.wat index dc43d6fcf3..d708c1cc9e 100644 --- a/tests/compiler/std/string-casemapping.release.wat +++ b/tests/compiler/std/string-casemapping.release.wat @@ -595,7 +595,7 @@ end end end - block $__inlined_func$~lib/util/string/compareImpl$81 + block $__inlined_func$~lib/util/string/compareImpl$80 loop $while-continue|1 local.get $0 local.tee $3 @@ -615,7 +615,7 @@ local.get $4 local.get $5 i32.ne - br_if $__inlined_func$~lib/util/string/compareImpl$81 + br_if $__inlined_func$~lib/util/string/compareImpl$80 local.get $2 i32.const 2 i32.add @@ -1575,7 +1575,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$143 + block $__inlined_func$~lib/rt/itcms/Object#unlink$142 local.get $1 i32.load offset=4 i32.const -4 @@ -1599,7 +1599,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$143 + br $__inlined_func$~lib/rt/itcms/Object#unlink$142 end local.get $1 i32.load offset=8 @@ -1710,7 +1710,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$70 + block $__inlined_func$~lib/rt/itcms/interrupt$69 i32.const 2048 local.set $2 loop $do-loop|0 @@ -1727,7 +1727,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$70 + br $__inlined_func$~lib/rt/itcms/interrupt$69 end local.get $2 i32.const 0 @@ -2414,7 +2414,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store - block $__inlined_func$~lib/string/String#concat$148 + block $__inlined_func$~lib/string/String#concat$147 local.get $1 i32.const 20 i32.sub @@ -2433,7 +2433,7 @@ global.set $~lib/memory/__stack_pointer i32.const 1056 local.set $0 - br $__inlined_func$~lib/string/String#concat$148 + br $__inlined_func$~lib/string/String#concat$147 end global.get $~lib/memory/__stack_pointer local.get $0 diff --git a/tests/compiler/std/string-encoding.debug.wat b/tests/compiler/std/string-encoding.debug.wat index eb35cd9489..eff810c04a 100644 --- a/tests/compiler/std/string-encoding.debug.wat +++ b/tests/compiler/std/string-encoding.debug.wat @@ -2034,7 +2034,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2100,21 +2100,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2130,6 +2115,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/std/string-encoding.release.wat b/tests/compiler/std/string-encoding.release.wat index fb72c04a38..dd88a6ed93 100644 --- a/tests/compiler/std/string-encoding.release.wat +++ b/tests/compiler/std/string-encoding.release.wat @@ -184,7 +184,7 @@ end end end - block $__inlined_func$~lib/util/string/compareImpl$94 + block $__inlined_func$~lib/util/string/compareImpl$93 loop $while-continue|1 local.get $0 local.tee $3 @@ -204,7 +204,7 @@ local.get $4 local.get $5 i32.ne - br_if $__inlined_func$~lib/util/string/compareImpl$94 + br_if $__inlined_func$~lib/util/string/compareImpl$93 local.get $2 i32.const 2 i32.add @@ -439,7 +439,7 @@ end end end - block $__inlined_func$~lib/rt/itcms/__renew$157 + block $__inlined_func$~lib/rt/itcms/__renew$156 local.get $1 local.get $0 i32.sub @@ -458,7 +458,7 @@ local.get $3 local.get $2 i32.store offset=16 - br $__inlined_func$~lib/rt/itcms/__renew$157 + br $__inlined_func$~lib/rt/itcms/__renew$156 end local.get $2 local.get $3 @@ -729,7 +729,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$158 + block $__inlined_func$~lib/rt/itcms/Object#unlink$157 local.get $1 i32.load offset=4 i32.const -4 @@ -753,7 +753,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$158 + br $__inlined_func$~lib/rt/itcms/Object#unlink$157 end local.get $1 i32.load offset=8 @@ -1109,7 +1109,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$70 + block $__inlined_func$~lib/rt/itcms/interrupt$69 i32.const 2048 local.set $2 loop $do-loop|0 @@ -1126,7 +1126,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$70 + br $__inlined_func$~lib/rt/itcms/interrupt$69 end local.get $2 i32.const 0 diff --git a/tests/compiler/std/string.debug.wat b/tests/compiler/std/string.debug.wat index 738795005a..98af588bf1 100644 --- a/tests/compiler/std/string.debug.wat +++ b/tests/compiler/std/string.debug.wat @@ -2632,7 +2632,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2698,21 +2698,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2728,6 +2713,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/std/string.release.wat b/tests/compiler/std/string.release.wat index ed9cf71122..6dfb367b5f 100644 --- a/tests/compiler/std/string.release.wat +++ b/tests/compiler/std/string.release.wat @@ -1349,7 +1349,7 @@ local.get $0 local.set $2 global.get $~lib/memory/__stack_pointer - block $__inlined_func$~lib/util/number/ulog_base$180 (result i32) + block $__inlined_func$~lib/util/number/ulog_base$179 (result i32) local.get $1 i32.popcnt i32.const 1 @@ -1367,7 +1367,7 @@ i32.div_u i32.const 1 i32.add - br $__inlined_func$~lib/util/number/ulog_base$180 + br $__inlined_func$~lib/util/number/ulog_base$179 end local.get $1 i64.extend_i32_s @@ -1690,7 +1690,7 @@ i64.extend_i32_u local.set $4 global.get $~lib/memory/__stack_pointer - block $__inlined_func$~lib/util/number/ulog_base$175 (result i32) + block $__inlined_func$~lib/util/number/ulog_base$174 (result i32) local.get $1 i32.popcnt i32.const 1 @@ -1708,7 +1708,7 @@ i32.div_u i32.const 1 i32.add - br $__inlined_func$~lib/util/number/ulog_base$175 + br $__inlined_func$~lib/util/number/ulog_base$174 end local.get $1 i64.extend_i32_s @@ -1798,7 +1798,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$70 + block $__inlined_func$~lib/rt/itcms/interrupt$69 i32.const 2048 local.set $2 loop $do-loop|0 @@ -1815,7 +1815,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$70 + br $__inlined_func$~lib/rt/itcms/interrupt$69 end local.get $2 i32.const 0 @@ -2392,7 +2392,7 @@ i64.extend_i32_u local.set $5 global.get $~lib/memory/__stack_pointer - block $__inlined_func$~lib/util/number/ulog_base$171 (result i32) + block $__inlined_func$~lib/util/number/ulog_base$170 (result i32) local.get $1 i32.popcnt i32.const 1 @@ -2410,7 +2410,7 @@ i32.div_u i32.const 1 i32.add - br $__inlined_func$~lib/util/number/ulog_base$171 + br $__inlined_func$~lib/util/number/ulog_base$170 end local.get $1 i64.extend_i32_s @@ -3169,7 +3169,7 @@ local.get $0 local.set $2 global.get $~lib/memory/__stack_pointer - block $__inlined_func$~lib/util/number/ulog_base$185 (result i32) + block $__inlined_func$~lib/util/number/ulog_base$184 (result i32) local.get $1 i32.popcnt i32.const 1 @@ -3187,7 +3187,7 @@ i32.div_u i32.const 1 i32.add - br $__inlined_func$~lib/util/number/ulog_base$185 + br $__inlined_func$~lib/util/number/ulog_base$184 end local.get $1 i64.extend_i32_s @@ -8912,7 +8912,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$287 + block $__inlined_func$~lib/rt/itcms/Object#unlink$286 local.get $0 i32.load offset=4 i32.const -4 @@ -8936,7 +8936,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$287 + br $__inlined_func$~lib/rt/itcms/Object#unlink$286 end local.get $0 i32.load offset=8 @@ -11855,7 +11855,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store - block $__inlined_func$~lib/string/String#charCodeAt$294 + block $__inlined_func$~lib/string/String#charCodeAt$293 local.get $0 i32.const 20 i32.sub @@ -11870,7 +11870,7 @@ global.set $~lib/memory/__stack_pointer i32.const -1 local.set $0 - br $__inlined_func$~lib/string/String#charCodeAt$294 + br $__inlined_func$~lib/string/String#charCodeAt$293 end local.get $0 i32.load16_u @@ -11909,7 +11909,7 @@ global.get $~lib/memory/__stack_pointer local.get $4 i32.store - block $__inlined_func$~lib/string/String#codePointAt$295 + block $__inlined_func$~lib/string/String#codePointAt$294 local.get $4 i32.const 20 i32.sub @@ -11926,7 +11926,7 @@ global.set $~lib/memory/__stack_pointer i32.const -1 local.set $0 - br $__inlined_func$~lib/string/String#codePointAt$295 + br $__inlined_func$~lib/string/String#codePointAt$294 end local.get $0 i32.const 2 @@ -11944,7 +11944,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/string/String#codePointAt$295 + br $__inlined_func$~lib/string/String#codePointAt$294 end local.get $4 i32.load16_u offset=4 @@ -11958,7 +11958,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/string/String#codePointAt$295 + br $__inlined_func$~lib/string/String#codePointAt$294 end global.get $~lib/memory/__stack_pointer i32.const 4 @@ -12419,7 +12419,7 @@ global.get $~lib/memory/__stack_pointer i32.const 2176 i32.store - block $__inlined_func$~lib/string/String#startsWith$296 + block $__inlined_func$~lib/string/String#startsWith$295 local.get $4 i32.const 2172 i32.load @@ -12434,7 +12434,7 @@ global.set $~lib/memory/__stack_pointer i32.const 0 local.set $0 - br $__inlined_func$~lib/string/String#startsWith$296 + br $__inlined_func$~lib/string/String#startsWith$295 end global.get $~lib/memory/__stack_pointer local.get $0 @@ -12511,7 +12511,7 @@ global.get $~lib/memory/__stack_pointer i32.const 2208 i32.store - block $__inlined_func$~lib/string/String#endsWith$297 + block $__inlined_func$~lib/string/String#endsWith$296 i32.const 536870910 local.get $4 local.get $4 @@ -12534,7 +12534,7 @@ global.set $~lib/memory/__stack_pointer i32.const 0 local.set $0 - br $__inlined_func$~lib/string/String#endsWith$297 + br $__inlined_func$~lib/string/String#endsWith$296 end global.get $~lib/memory/__stack_pointer local.get $0 diff --git a/tests/compiler/std/symbol.debug.wat b/tests/compiler/std/symbol.debug.wat index 561a3a4b9a..5b86083af7 100644 --- a/tests/compiler/std/symbol.debug.wat +++ b/tests/compiler/std/symbol.debug.wat @@ -2063,7 +2063,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2129,21 +2129,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2159,6 +2144,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/std/symbol.release.wat b/tests/compiler/std/symbol.release.wat index ea31cd7f43..fa637c7989 100644 --- a/tests/compiler/std/symbol.release.wat +++ b/tests/compiler/std/symbol.release.wat @@ -294,7 +294,7 @@ end end end - block $__inlined_func$~lib/util/string/compareImpl$88 + block $__inlined_func$~lib/util/string/compareImpl$87 loop $while-continue|1 local.get $0 local.tee $3 @@ -314,7 +314,7 @@ local.get $4 local.get $5 i32.ne - br_if $__inlined_func$~lib/util/string/compareImpl$88 + br_if $__inlined_func$~lib/util/string/compareImpl$87 local.get $2 i32.const 2 i32.add @@ -835,7 +835,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $2 loop $do-loop|0 @@ -852,7 +852,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $2 i32.const 0 @@ -1543,7 +1543,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$246 + block $__inlined_func$~lib/rt/itcms/Object#unlink$245 local.get $0 i32.load offset=4 i32.const -4 @@ -1567,7 +1567,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$246 + br $__inlined_func$~lib/rt/itcms/Object#unlink$245 end local.get $0 i32.load offset=8 @@ -2170,7 +2170,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store - block $__inlined_func$~lib/string/String#concat$253 + block $__inlined_func$~lib/string/String#concat$252 local.get $1 i32.const 20 i32.sub @@ -2189,7 +2189,7 @@ global.set $~lib/memory/__stack_pointer i32.const 1888 local.set $0 - br $__inlined_func$~lib/string/String#concat$253 + br $__inlined_func$~lib/string/String#concat$252 end global.get $~lib/memory/__stack_pointer local.get $0 diff --git a/tests/compiler/std/typedarray.debug.wat b/tests/compiler/std/typedarray.debug.wat index c2e2f9861b..0e32692fec 100644 --- a/tests/compiler/std/typedarray.debug.wat +++ b/tests/compiler/std/typedarray.debug.wat @@ -2375,7 +2375,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2441,21 +2441,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2471,6 +2456,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/std/typedarray.release.wat b/tests/compiler/std/typedarray.release.wat index c05cdc426a..63b1289f4c 100644 --- a/tests/compiler/std/typedarray.release.wat +++ b/tests/compiler/std/typedarray.release.wat @@ -694,7 +694,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$68 + block $__inlined_func$~lib/rt/itcms/interrupt$67 i32.const 2048 local.set $2 loop $do-loop|0 @@ -711,7 +711,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$68 + br $__inlined_func$~lib/rt/itcms/interrupt$67 end local.get $2 i32.const 0 @@ -2278,7 +2278,7 @@ end end end - block $__inlined_func$~lib/util/string/compareImpl$714 + block $__inlined_func$~lib/util/string/compareImpl$713 loop $while-continue|1 local.get $0 local.tee $3 @@ -2298,7 +2298,7 @@ local.get $4 local.get $5 i32.ne - br_if $__inlined_func$~lib/util/string/compareImpl$714 + br_if $__inlined_func$~lib/util/string/compareImpl$713 local.get $2 i32.const 2 i32.add @@ -8268,7 +8268,7 @@ i32.lt_s select local.set $0 - block $__inlined_func$~lib/util/bytes/FILL$202 + block $__inlined_func$~lib/util/bytes/FILL$201 local.get $1 i32.eqz local.get $1 @@ -8293,7 +8293,7 @@ i32.shl memory.fill end - br $__inlined_func$~lib/util/bytes/FILL$202 + br $__inlined_func$~lib/util/bytes/FILL$201 end loop $for-loop|0 local.get $0 @@ -10974,7 +10974,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $__inlined_func$~lib/util/string/joinIntegerArray$1419 + block $__inlined_func$~lib/util/string/joinIntegerArray$1418 local.get $0 i32.const 1 i32.sub @@ -10988,7 +10988,7 @@ global.set $~lib/memory/__stack_pointer i32.const 7776 local.set $0 - br $__inlined_func$~lib/util/string/joinIntegerArray$1419 + br $__inlined_func$~lib/util/string/joinIntegerArray$1418 end local.get $6 i32.eqz @@ -11001,7 +11001,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$1419 + br $__inlined_func$~lib/util/string/joinIntegerArray$1418 end global.get $~lib/memory/__stack_pointer i32.const 9584 @@ -11094,7 +11094,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$1419 + br $__inlined_func$~lib/util/string/joinIntegerArray$1418 end global.get $~lib/memory/__stack_pointer i32.const 8 @@ -12620,7 +12620,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$1413 + block $__inlined_func$~lib/rt/itcms/Object#unlink$1412 local.get $0 i32.load offset=4 i32.const -4 @@ -12644,7 +12644,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$1413 + br $__inlined_func$~lib/rt/itcms/Object#unlink$1412 end local.get $0 i32.load offset=8 @@ -18301,7 +18301,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $__inlined_func$~lib/util/string/joinIntegerArray$1423 + block $__inlined_func$~lib/util/string/joinIntegerArray$1422 local.get $0 i32.const 1 i32.sub @@ -18315,7 +18315,7 @@ global.set $~lib/memory/__stack_pointer i32.const 7776 local.set $0 - br $__inlined_func$~lib/util/string/joinIntegerArray$1423 + br $__inlined_func$~lib/util/string/joinIntegerArray$1422 end local.get $6 i32.eqz @@ -18328,7 +18328,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$1423 + br $__inlined_func$~lib/util/string/joinIntegerArray$1422 end global.get $~lib/memory/__stack_pointer i32.const 9584 @@ -18425,7 +18425,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$1423 + br $__inlined_func$~lib/util/string/joinIntegerArray$1422 end global.get $~lib/memory/__stack_pointer i32.const 8 @@ -19024,7 +19024,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $__inlined_func$~lib/util/string/joinIntegerArray$1421 + block $__inlined_func$~lib/util/string/joinIntegerArray$1420 local.get $0 i32.const 1 i32.sub @@ -19038,7 +19038,7 @@ global.set $~lib/memory/__stack_pointer i32.const 7776 local.set $0 - br $__inlined_func$~lib/util/string/joinIntegerArray$1421 + br $__inlined_func$~lib/util/string/joinIntegerArray$1420 end local.get $6 i32.eqz @@ -19051,7 +19051,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$1421 + br $__inlined_func$~lib/util/string/joinIntegerArray$1420 end global.get $~lib/memory/__stack_pointer i32.const 9584 @@ -19148,7 +19148,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$1421 + br $__inlined_func$~lib/util/string/joinIntegerArray$1420 end global.get $~lib/memory/__stack_pointer i32.const 8 @@ -19994,7 +19994,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $__inlined_func$~lib/util/string/joinIntegerArray$1418 + block $__inlined_func$~lib/util/string/joinIntegerArray$1417 local.get $0 i32.const 1 i32.sub @@ -20008,7 +20008,7 @@ global.set $~lib/memory/__stack_pointer i32.const 7776 local.set $0 - br $__inlined_func$~lib/util/string/joinIntegerArray$1418 + br $__inlined_func$~lib/util/string/joinIntegerArray$1417 end local.get $6 i32.eqz @@ -20021,7 +20021,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$1418 + br $__inlined_func$~lib/util/string/joinIntegerArray$1417 end global.get $~lib/memory/__stack_pointer i32.const 9584 @@ -20114,7 +20114,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$1418 + br $__inlined_func$~lib/util/string/joinIntegerArray$1417 end global.get $~lib/memory/__stack_pointer i32.const 8 @@ -22313,7 +22313,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $__inlined_func$~lib/util/string/joinIntegerArray$1422 + block $__inlined_func$~lib/util/string/joinIntegerArray$1421 local.get $0 i32.const 1 i32.sub @@ -22327,7 +22327,7 @@ global.set $~lib/memory/__stack_pointer i32.const 7776 local.set $0 - br $__inlined_func$~lib/util/string/joinIntegerArray$1422 + br $__inlined_func$~lib/util/string/joinIntegerArray$1421 end local.get $6 i32.eqz @@ -22340,7 +22340,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$1422 + br $__inlined_func$~lib/util/string/joinIntegerArray$1421 end global.get $~lib/memory/__stack_pointer i32.const 9584 @@ -22437,7 +22437,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$1422 + br $__inlined_func$~lib/util/string/joinIntegerArray$1421 end global.get $~lib/memory/__stack_pointer i32.const 8 @@ -23491,7 +23491,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $__inlined_func$~lib/util/string/joinIntegerArray$1420 + block $__inlined_func$~lib/util/string/joinIntegerArray$1419 local.get $0 i32.const 1 i32.sub @@ -23505,7 +23505,7 @@ global.set $~lib/memory/__stack_pointer i32.const 7776 local.set $0 - br $__inlined_func$~lib/util/string/joinIntegerArray$1420 + br $__inlined_func$~lib/util/string/joinIntegerArray$1419 end local.get $6 i32.eqz @@ -23518,7 +23518,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$1420 + br $__inlined_func$~lib/util/string/joinIntegerArray$1419 end global.get $~lib/memory/__stack_pointer i32.const 9584 @@ -23615,7 +23615,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$1420 + br $__inlined_func$~lib/util/string/joinIntegerArray$1419 end global.get $~lib/memory/__stack_pointer i32.const 8 @@ -26452,7 +26452,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $__inlined_func$~lib/util/number/utoa64$749 + block $__inlined_func$~lib/util/number/utoa64$748 local.get $3 i64.eqz if @@ -26462,7 +26462,7 @@ global.set $~lib/memory/__stack_pointer i32.const 8000 local.set $1 - br $__inlined_func$~lib/util/number/utoa64$749 + br $__inlined_func$~lib/util/number/utoa64$748 end local.get $3 i64.const 4294967295 diff --git a/tests/compiler/std/uri.debug.wat b/tests/compiler/std/uri.debug.wat index 3351c851af..d1e6051156 100644 --- a/tests/compiler/std/uri.debug.wat +++ b/tests/compiler/std/uri.debug.wat @@ -2077,7 +2077,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2143,21 +2143,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2173,6 +2158,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/std/uri.release.wat b/tests/compiler/std/uri.release.wat index e69563783a..cf0609c988 100644 --- a/tests/compiler/std/uri.release.wat +++ b/tests/compiler/std/uri.release.wat @@ -266,7 +266,7 @@ end end end - block $__inlined_func$~lib/util/string/compareImpl$88 + block $__inlined_func$~lib/util/string/compareImpl$87 loop $while-continue|1 local.get $0 local.tee $3 @@ -286,7 +286,7 @@ local.get $4 local.get $5 i32.ne - br_if $__inlined_func$~lib/util/string/compareImpl$88 + br_if $__inlined_func$~lib/util/string/compareImpl$87 local.get $2 i32.const 2 i32.add @@ -497,7 +497,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$132 + block $__inlined_func$~lib/rt/itcms/Object#unlink$131 local.get $1 i32.load offset=4 i32.const -4 @@ -521,7 +521,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$132 + br $__inlined_func$~lib/rt/itcms/Object#unlink$131 end local.get $1 i32.load offset=8 @@ -1322,7 +1322,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$70 + block $__inlined_func$~lib/rt/itcms/interrupt$69 i32.const 2048 local.set $2 loop $do-loop|0 @@ -1339,7 +1339,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$70 + br $__inlined_func$~lib/rt/itcms/interrupt$69 end local.get $2 i32.const 0 diff --git a/tests/compiler/super-inline.debug.wat b/tests/compiler/super-inline.debug.wat index dc1722f0ec..076d483142 100644 --- a/tests/compiler/super-inline.debug.wat +++ b/tests/compiler/super-inline.debug.wat @@ -2002,7 +2002,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2068,21 +2068,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2098,6 +2083,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/super-inline.release.wat b/tests/compiler/super-inline.release.wat index d1ffdaa805..483b985ed0 100644 --- a/tests/compiler/super-inline.release.wat +++ b/tests/compiler/super-inline.release.wat @@ -72,7 +72,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$116 + block $__inlined_func$~lib/rt/itcms/Object#unlink$115 local.get $1 i32.load offset=4 i32.const -4 @@ -96,7 +96,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$116 + br $__inlined_func$~lib/rt/itcms/Object#unlink$115 end local.get $1 i32.load offset=8 @@ -587,7 +587,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $1 loop $do-loop|0 @@ -604,7 +604,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $1 i32.const 0 diff --git a/tests/compiler/switch.debug.wat b/tests/compiler/switch.debug.wat index dea9957b59..1e96c4cb00 100644 --- a/tests/compiler/switch.debug.wat +++ b/tests/compiler/switch.debug.wat @@ -2328,7 +2328,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2394,21 +2394,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2424,6 +2409,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/switch.release.wat b/tests/compiler/switch.release.wat index 9b967b3838..1da78bdb7a 100644 --- a/tests/compiler/switch.release.wat +++ b/tests/compiler/switch.release.wat @@ -112,7 +112,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store - block $__inlined_func$~lib/string/String#concat$191 + block $__inlined_func$~lib/string/String#concat$190 local.get $1 i32.const 20 i32.sub @@ -131,7 +131,7 @@ global.set $~lib/memory/__stack_pointer i32.const 1296 local.set $0 - br $__inlined_func$~lib/string/String#concat$191 + br $__inlined_func$~lib/string/String#concat$190 end global.get $~lib/memory/__stack_pointer local.get $0 @@ -448,7 +448,7 @@ end end end - block $__inlined_func$~lib/util/string/compareImpl$76 + block $__inlined_func$~lib/util/string/compareImpl$75 loop $while-continue|1 local.get $0 local.tee $3 @@ -468,7 +468,7 @@ local.get $4 local.get $5 i32.ne - br_if $__inlined_func$~lib/util/string/compareImpl$76 + br_if $__inlined_func$~lib/util/string/compareImpl$75 local.get $2 i32.const 2 i32.add @@ -535,7 +535,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$186 + block $__inlined_func$~lib/rt/itcms/Object#unlink$185 local.get $1 i32.load offset=4 i32.const -4 @@ -559,7 +559,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$186 + br $__inlined_func$~lib/rt/itcms/Object#unlink$185 end local.get $1 i32.load offset=8 @@ -1242,7 +1242,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$70 + block $__inlined_func$~lib/rt/itcms/interrupt$69 i32.const 2048 local.set $2 loop $do-loop|0 @@ -1259,7 +1259,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$70 + br $__inlined_func$~lib/rt/itcms/interrupt$69 end local.get $2 i32.const 0 diff --git a/tests/compiler/templateliteral.debug.wat b/tests/compiler/templateliteral.debug.wat index ace4b98b35..ff7a296dd7 100644 --- a/tests/compiler/templateliteral.debug.wat +++ b/tests/compiler/templateliteral.debug.wat @@ -2188,7 +2188,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2254,21 +2254,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2284,6 +2269,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/templateliteral.release.wat b/tests/compiler/templateliteral.release.wat index e99c91217f..d7b50e2199 100644 --- a/tests/compiler/templateliteral.release.wat +++ b/tests/compiler/templateliteral.release.wat @@ -253,7 +253,7 @@ end end end - block $__inlined_func$~lib/util/string/compareImpl$91 + block $__inlined_func$~lib/util/string/compareImpl$90 loop $while-continue|1 local.get $0 local.tee $3 @@ -273,7 +273,7 @@ local.get $4 local.get $5 i32.ne - br_if $__inlined_func$~lib/util/string/compareImpl$91 + br_if $__inlined_func$~lib/util/string/compareImpl$90 local.get $2 i32.const 2 i32.add @@ -459,7 +459,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - block $__inlined_func$~lib/util/number/itoa32$75 + block $__inlined_func$~lib/util/number/itoa32$74 local.get $0 i32.eqz if @@ -469,7 +469,7 @@ global.set $~lib/memory/__stack_pointer i32.const 2032 local.set $0 - br $__inlined_func$~lib/util/number/itoa32$75 + br $__inlined_func$~lib/util/number/itoa32$74 end global.get $~lib/memory/__stack_pointer i32.const 0 @@ -643,7 +643,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$70 + block $__inlined_func$~lib/rt/itcms/interrupt$69 i32.const 2048 local.set $2 loop $do-loop|0 @@ -660,7 +660,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$70 + br $__inlined_func$~lib/rt/itcms/interrupt$69 end local.get $2 i32.const 0 @@ -1585,7 +1585,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$165 + block $__inlined_func$~lib/rt/itcms/Object#unlink$164 local.get $0 i32.load offset=4 i32.const -4 @@ -1609,7 +1609,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$165 + br $__inlined_func$~lib/rt/itcms/Object#unlink$164 end local.get $0 i32.load offset=8 diff --git a/tests/compiler/typeof.debug.wat b/tests/compiler/typeof.debug.wat index 5d02f023cd..c830784b2b 100644 --- a/tests/compiler/typeof.debug.wat +++ b/tests/compiler/typeof.debug.wat @@ -2140,7 +2140,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2206,21 +2206,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2236,6 +2221,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/typeof.release.wat b/tests/compiler/typeof.release.wat index f2e06714bf..0b4d4cbc0e 100644 --- a/tests/compiler/typeof.release.wat +++ b/tests/compiler/typeof.release.wat @@ -167,7 +167,7 @@ end end end - block $__inlined_func$~lib/util/string/compareImpl$78 + block $__inlined_func$~lib/util/string/compareImpl$77 loop $while-continue|1 local.get $0 local.tee $3 @@ -187,7 +187,7 @@ local.get $4 local.get $5 i32.ne - br_if $__inlined_func$~lib/util/string/compareImpl$78 + br_if $__inlined_func$~lib/util/string/compareImpl$77 local.get $2 i32.const 2 i32.add @@ -254,7 +254,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$119 + block $__inlined_func$~lib/rt/itcms/Object#unlink$118 local.get $1 i32.load offset=4 i32.const -4 @@ -278,7 +278,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$119 + br $__inlined_func$~lib/rt/itcms/Object#unlink$118 end local.get $1 i32.load offset=8 @@ -1132,7 +1132,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$70 + block $__inlined_func$~lib/rt/itcms/interrupt$69 i32.const 2048 local.set $1 loop $do-loop|0 @@ -1149,7 +1149,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$70 + br $__inlined_func$~lib/rt/itcms/interrupt$69 end local.get $1 i32.const 0 diff --git a/tests/compiler/while.debug.wat b/tests/compiler/while.debug.wat index 9bb3b1cbbb..66fd61141a 100644 --- a/tests/compiler/while.debug.wat +++ b/tests/compiler/while.debug.wat @@ -2423,7 +2423,7 @@ (local $remaining i32) (local $spare i32) (local $block|6 i32) - (local $block|7 i32) + (local $7 i32) local.get $block call $~lib/rt/common/BLOCK#get:mmInfo local.set $blockInfo @@ -2489,21 +2489,6 @@ i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) - local.get $block - local.set $block|7 - local.get $block|7 - i32.const 4 - i32.add - local.get $block|7 - call $~lib/rt/common/BLOCK#get:mmInfo - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - br $~lib/rt/tlsf/GETRIGHT|inlined.3 - end block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) local.get $block local.set $block|6 @@ -2519,6 +2504,9 @@ i32.add br $~lib/rt/tlsf/GETRIGHT|inlined.2 end + local.set $7 + local.get $7 + local.get $7 call $~lib/rt/common/BLOCK#get:mmInfo i32.const 2 i32.const -1 diff --git a/tests/compiler/while.release.wat b/tests/compiler/while.release.wat index 90a58e5b7a..6000f60da8 100644 --- a/tests/compiler/while.release.wat +++ b/tests/compiler/while.release.wat @@ -332,7 +332,7 @@ local.get $0 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$128 + block $__inlined_func$~lib/rt/itcms/Object#unlink$127 local.get $1 i32.load offset=4 i32.const -4 @@ -356,7 +356,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$128 + br $__inlined_func$~lib/rt/itcms/Object#unlink$127 end local.get $1 i32.load offset=8 @@ -1235,7 +1235,7 @@ global.get $~lib/rt/itcms/threshold i32.ge_u if - block $__inlined_func$~lib/rt/itcms/interrupt$69 + block $__inlined_func$~lib/rt/itcms/interrupt$68 i32.const 2048 local.set $1 loop $do-loop|0 @@ -1252,7 +1252,7 @@ i32.const 1024 i32.add global.set $~lib/rt/itcms/threshold - br $__inlined_func$~lib/rt/itcms/interrupt$69 + br $__inlined_func$~lib/rt/itcms/interrupt$68 end local.get $1 i32.const 0