From d571c423c12cc913537057b0d6ff3afe159cc4e0 Mon Sep 17 00:00:00 2001 From: XMadrid Date: Tue, 10 Mar 2026 17:36:28 +0800 Subject: [PATCH 1/8] Initial fix for |= operator --- src/compiler.ts | 207 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 206 insertions(+), 1 deletion(-) diff --git a/src/compiler.ts b/src/compiler.ts index 36f09ab8aa..2b99e74306 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -476,6 +476,8 @@ export class Compiler extends DiagnosticEmitter { hasCustomFunctionExports: bool = false; /** Whether the module would use the exported runtime to lift/lower. */ desiresExportRuntime: bool = false; + /** Unique suffix for synthesized scoped locals used by compound assignments. */ + private compoundAssignmentTempId: i32 = 0; /** Compiles a {@link Program} to a {@link Module} using the specified options. */ static compile(program: Program): Module { @@ -4473,7 +4475,121 @@ export class Compiler extends DiagnosticEmitter { expr = this.makeAnd(leftExpr, rightExpr, commonType); break; } - case Token.Bar_Equals: compound = true; + case Token.Bar_Equals: { + compound = true; + let assignmentLeft = left; + let setupExprs: ExpressionRef[] | null = null; + if (this.needsCompoundAssignmentSideEffectCache(left)) { + let flow = this.currentFlow; + if (left.kind == NodeKind.PropertyAccess) { + let access = left; + let receiverExpression = access.expression; + if (this.expressionHasSideEffects(receiverExpression)) { + let receiverExpr = this.compileExpression(receiverExpression, Type.auto); + let receiverType = this.currentType; + let receiverTemp = flow.getTempLocal(receiverType); + let receiverName = this.makeCompoundAssignmentTempName(flow); + flow.addScopedAlias(receiverName, receiverType, receiverTemp.index); + flow.setLocalFlag(receiverTemp.index, LocalFlags.Initialized); + setupExprs = [ module.local_set(receiverTemp.index, receiverExpr, receiverType.isManaged) ]; + assignmentLeft = Node.createPropertyAccessExpression( + Node.createIdentifierExpression(receiverName, receiverExpression.range), + access.property, + access.range + ); + } + } else { + let access = left; + let receiverExpression = access.expression; + let elementExpression = access.elementExpression; + let receiverName: string | null = null; + let elementName: string | null = null; + + if (this.expressionHasSideEffects(receiverExpression)) { + let receiverExpr = this.compileExpression(receiverExpression, Type.auto); + let receiverType = this.currentType; + let receiverTemp = flow.getTempLocal(receiverType); + receiverName = this.makeCompoundAssignmentTempName(flow); + flow.addScopedAlias(receiverName, receiverType, receiverTemp.index); + flow.setLocalFlag(receiverTemp.index, LocalFlags.Initialized); + if (!setupExprs) setupExprs = []; + setupExprs.push(module.local_set(receiverTemp.index, receiverExpr, receiverType.isManaged)); + } + + if (this.expressionHasSideEffects(elementExpression)) { + let elementExpr = this.compileExpression(elementExpression, Type.auto); + let elementType = this.currentType; + let elementTemp = flow.getTempLocal(elementType); + elementName = this.makeCompoundAssignmentTempName(flow); + flow.addScopedAlias(elementName, elementType, elementTemp.index); + flow.setLocalFlag(elementTemp.index, LocalFlags.Initialized); + if (!setupExprs) setupExprs = []; + setupExprs.push(module.local_set(elementTemp.index, elementExpr, elementType.isManaged)); + } + + assignmentLeft = Node.createElementAccessExpression( + receiverName + ? Node.createIdentifierExpression(receiverName, receiverExpression.range) + : receiverExpression, + elementName + ? Node.createIdentifierExpression(elementName, elementExpression.range) + : elementExpression, + access.range + ); + } + } + + leftExpr = this.compileExpression(assignmentLeft, contextualType.intType); + leftType = this.currentType; + if (setupExprs) { + let wrappedExprs = setupExprs; + wrappedExprs.push(leftExpr); + leftExpr = module.block(null, wrappedExprs, leftType.toRef()); + } + + // check operator overload + let classReference = leftType.getClassOrWrapper(this.program); + if (classReference) { + let overload = classReference.lookupOverload(OperatorKind.BitwiseOr); + if (overload) { + expr = this.compileBinaryOverload(overload, assignmentLeft, leftExpr, leftType, right, expression); + break; + } + } + + if (!leftType.isIntegerValue) { + this.error( + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, "|", leftType.toString() + ); + return module.unreachable(); + } + rightExpr = this.compileExpression(right, leftType, Constraints.ConvImplicit); + rightType = commonType = this.currentType; + expr = this.makeOr(leftExpr, rightExpr, commonType); + + let resolver = this.resolver; + let target = resolver.lookupExpression(assignmentLeft, this.currentFlow); + if (!target) return module.unreachable(); + let targetType = resolver.getTypeOfElement(target); + if (!targetType) targetType = Type.void; + if (!this.currentType.isStrictlyAssignableTo(targetType)) { + this.error( + DiagnosticCode.Type_0_is_not_assignable_to_type_1, + expression.range, this.currentType.toString(), targetType.toString() + ); + return module.unreachable(); + } + return this.makeAssignment( + target, + expr, + this.currentType, + right, + resolver.currentThisExpression, + resolver.currentElementExpression, + contextualType != Type.void + ); + } case Token.Bar: { leftExpr = this.compileExpression(left, contextualType.intType); leftType = this.currentType; @@ -4790,6 +4906,95 @@ export class Compiler extends DiagnosticEmitter { ); } + private makeCompoundAssignmentTempName(flow: Flow): string { + let name: string; + do { + let id = this.compoundAssignmentTempId++; + name = "__as_or_assign_tmp" + id.toString(); + } while (flow.lookup(name)); + return name; + } + + private needsCompoundAssignmentSideEffectCache(target: Expression): bool { + if (target.kind == NodeKind.PropertyAccess) { + return this.expressionHasSideEffects((target).expression); + } + if (target.kind == NodeKind.ElementAccess) { + let access = target; + return this.expressionHasSideEffects(access.expression) + || this.expressionHasSideEffects(access.elementExpression); + } + return false; + } + + private expressionHasSideEffects(expression: Expression): bool { + while (expression.kind == NodeKind.Parenthesized) { + expression = (expression).expression; + } + switch (expression.kind) { + case NodeKind.Call: + case NodeKind.New: + case NodeKind.UnaryPostfix: + case NodeKind.Class: + case NodeKind.Function: + case NodeKind.Compiled: + return true; + case NodeKind.UnaryPrefix: { + let unary = expression; + if (unary.operator == Token.Plus_Plus || unary.operator == Token.Minus_Minus) { + return true; + } + return this.expressionHasSideEffects(unary.operand); + } + 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); + } + } + case NodeKind.Assertion: + return this.expressionHasSideEffects((expression).expression); + 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.ElementAccess: { + let access = expression; + return this.expressionHasSideEffects(access.expression) + || this.expressionHasSideEffects(access.elementExpression); + } + case NodeKind.PropertyAccess: + return this.expressionHasSideEffects((expression).expression); + case NodeKind.Ternary: { + let ternary = expression; + return this.expressionHasSideEffects(ternary.condition) + || this.expressionHasSideEffects(ternary.ifThen) + || this.expressionHasSideEffects(ternary.ifElse); + } + default: + return false; + } + } + makeLt(leftExpr: ExpressionRef, rightExpr: ExpressionRef, type: Type): ExpressionRef { // Cares about garbage bits and signedness let module = this.module; From 54d209c8c3e35cbd453cdf375e57680e7bf1013e Mon Sep 17 00:00:00 2001 From: XMadrid Date: Tue, 10 Mar 2026 18:04:28 +0800 Subject: [PATCH 2/8] consider more cases about comma --- src/compiler.ts | 109 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 94 insertions(+), 15 deletions(-) diff --git a/src/compiler.ts b/src/compiler.ts index 2b99e74306..a02bb03a76 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -4479,10 +4479,12 @@ export class Compiler extends DiagnosticEmitter { compound = true; let assignmentLeft = left; let setupExprs: ExpressionRef[] | null = null; - if (this.needsCompoundAssignmentSideEffectCache(left)) { + let cacheTarget = this.getCompoundAssignmentSideEffectCacheTarget(left); + if (cacheTarget && this.needsCompoundAssignmentSideEffectCache(left)) { let flow = this.currentFlow; - if (left.kind == NodeKind.PropertyAccess) { - let access = left; + let rewrittenTarget: Expression; + if (cacheTarget.kind == NodeKind.PropertyAccess) { + let access = cacheTarget; let receiverExpression = access.expression; if (this.expressionHasSideEffects(receiverExpression)) { let receiverExpr = this.compileExpression(receiverExpression, Type.auto); @@ -4492,14 +4494,16 @@ export class Compiler extends DiagnosticEmitter { flow.addScopedAlias(receiverName, receiverType, receiverTemp.index); flow.setLocalFlag(receiverTemp.index, LocalFlags.Initialized); setupExprs = [ module.local_set(receiverTemp.index, receiverExpr, receiverType.isManaged) ]; - assignmentLeft = Node.createPropertyAccessExpression( + rewrittenTarget = Node.createPropertyAccessExpression( Node.createIdentifierExpression(receiverName, receiverExpression.range), access.property, access.range ); + } else { + rewrittenTarget = cacheTarget; } } else { - let access = left; + let access = cacheTarget; let receiverExpression = access.expression; let elementExpression = access.elementExpression; let receiverName: string | null = null; @@ -4527,7 +4531,7 @@ export class Compiler extends DiagnosticEmitter { setupExprs.push(module.local_set(elementTemp.index, elementExpr, elementType.isManaged)); } - assignmentLeft = Node.createElementAccessExpression( + rewrittenTarget = Node.createElementAccessExpression( receiverName ? Node.createIdentifierExpression(receiverName, receiverExpression.range) : receiverExpression, @@ -4537,15 +4541,14 @@ export class Compiler extends DiagnosticEmitter { access.range ); } + assignmentLeft = this.replaceCompoundAssignmentSideEffectCacheTarget( + left, + this.wrapCompoundAssignmentCacheSetup(setupExprs, rewrittenTarget) + ); } leftExpr = this.compileExpression(assignmentLeft, contextualType.intType); leftType = this.currentType; - if (setupExprs) { - let wrappedExprs = setupExprs; - wrappedExprs.push(leftExpr); - leftExpr = module.block(null, wrappedExprs, leftType.toRef()); - } // check operator overload let classReference = leftType.getClassOrWrapper(this.program); @@ -4916,17 +4919,93 @@ export class Compiler extends DiagnosticEmitter { } private needsCompoundAssignmentSideEffectCache(target: Expression): bool { - if (target.kind == NodeKind.PropertyAccess) { - return this.expressionHasSideEffects((target).expression); + let cacheTarget = this.getCompoundAssignmentSideEffectCacheTarget(target); + if (!cacheTarget) return false; + if (cacheTarget.kind == NodeKind.PropertyAccess) { + return this.expressionHasSideEffects((cacheTarget).expression); } - if (target.kind == NodeKind.ElementAccess) { - let access = target; + if (cacheTarget.kind == NodeKind.ElementAccess) { + let access = cacheTarget; return this.expressionHasSideEffects(access.expression) || this.expressionHasSideEffects(access.elementExpression); } return false; } + 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; + if (assertion.assertionKind == AssertionKind.NonNull) { + return this.getCompoundAssignmentSideEffectCacheTarget(assertion.expression); + } + return null; + } + case NodeKind.Comma: { + let expressions = (target).expressions; + return this.getCompoundAssignmentSideEffectCacheTarget(expressions[assert(expressions.length) - 1]); + } + default: + return null; + } + } + + private replaceCompoundAssignmentSideEffectCacheTarget(target: Expression, replacement: Expression): Expression { + while (target.kind == NodeKind.Parenthesized) { + target = (target).expression; + replacement = Node.createParenthesizedExpression(replacement, target.range); + } + switch (target.kind) { + case NodeKind.PropertyAccess: + case NodeKind.ElementAccess: + return replacement; + case NodeKind.Assertion: { + let assertion = target; + if (assertion.assertionKind == AssertionKind.NonNull) { + return Node.createAssertionExpression( + AssertionKind.NonNull, + this.replaceCompoundAssignmentSideEffectCacheTarget(assertion.expression, replacement), + null, + assertion.range + ); + } + return target; + } + case NodeKind.Comma: { + let comma = target; + let expressions = comma.expressions; + let cloned = new Array(expressions.length); + for (let i = 0, k = expressions.length - 1; i < k; ++i) { + cloned[i] = unchecked(expressions[i]); + } + cloned[assert(expressions.length) - 1] = this.replaceCompoundAssignmentSideEffectCacheTarget( + expressions[assert(expressions.length) - 1], + replacement + ); + return Node.createCommaExpression(cloned, comma.range); + } + default: + return target; + } + } + + private wrapCompoundAssignmentCacheSetup(setupExprs: ExpressionRef[] | null, target: Expression): Expression { + if (!setupExprs || !setupExprs.length) return target; + let range = target.range; + let expressions = new Array(setupExprs.length + 1); + for (let i = 0, k = setupExprs.length; i < k; ++i) { + expressions[i] = Node.createCompiledExpression(unchecked(setupExprs[i]), Type.void, range); + } + expressions[setupExprs.length] = target; + return Node.createCommaExpression(expressions, range); + } + private expressionHasSideEffects(expression: Expression): bool { while (expression.kind == NodeKind.Parenthesized) { expression = (expression).expression; From 3c8e1df1db036635eaed467a1c17016c1abb2144 Mon Sep 17 00:00:00 2001 From: XMadrid Date: Thu, 12 Mar 2026 17:09:52 +0800 Subject: [PATCH 3/8] wip --- src/compiler.ts | 572 +++++++++++++++++++++++++++--------------------- 1 file changed, 319 insertions(+), 253 deletions(-) diff --git a/src/compiler.ts b/src/compiler.ts index a02bb03a76..7b72663925 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -424,6 +424,37 @@ export const runtimeFunctions = [ "__new", "__pin", "__unpin", "__collect" ]; /** Globals to export if `--exportRuntime` is set. */ export const runtimeGlobals = [ "__rtti_base" ]; +class CompoundAssignmentCacheContext { + target: Element; + leftExpr: ExpressionRef; + leftType: Type; + assignmentThisExpression: Expression | null; + assignmentElementExpression: Expression | null; + assignmentThisExpr: ExpressionRef; + assignmentElementExpr: ExpressionRef; + setupPrefixExprs: ExpressionRef[] | null; + + constructor( + target: Element, + leftExpr: ExpressionRef, + leftType: Type, + assignmentThisExpression: Expression | null, + assignmentElementExpression: Expression | null, + assignmentThisExpr: ExpressionRef, + assignmentElementExpr: ExpressionRef, + setupPrefixExprs: ExpressionRef[] | null + ) { + this.target = target; + this.leftExpr = leftExpr; + this.leftType = leftType; + this.assignmentThisExpression = assignmentThisExpression; + this.assignmentElementExpression = assignmentElementExpression; + this.assignmentThisExpr = assignmentThisExpr; + this.assignmentElementExpr = assignmentElementExpr; + this.setupPrefixExprs = setupPrefixExprs; + } +} + /** Compiler interface. */ export class Compiler extends DiagnosticEmitter { @@ -476,8 +507,6 @@ export class Compiler extends DiagnosticEmitter { hasCustomFunctionExports: bool = false; /** Whether the module would use the exported runtime to lift/lower. */ desiresExportRuntime: bool = false; - /** Unique suffix for synthesized scoped locals used by compound assignments. */ - private compoundAssignmentTempId: i32 = 0; /** Compiles a {@link Program} to a {@link Module} using the specified options. */ static compile(program: Program): Module { @@ -4476,104 +4505,69 @@ export class Compiler extends DiagnosticEmitter { break; } case Token.Bar_Equals: { - compound = true; - let assignmentLeft = left; - let setupExprs: ExpressionRef[] | null = null; + let cacheContext: CompoundAssignmentCacheContext | null = null; let cacheTarget = this.getCompoundAssignmentSideEffectCacheTarget(left); if (cacheTarget && this.needsCompoundAssignmentSideEffectCache(left)) { - let flow = this.currentFlow; - let rewrittenTarget: Expression; - if (cacheTarget.kind == NodeKind.PropertyAccess) { - let access = cacheTarget; - let receiverExpression = access.expression; - if (this.expressionHasSideEffects(receiverExpression)) { - let receiverExpr = this.compileExpression(receiverExpression, Type.auto); - let receiverType = this.currentType; - let receiverTemp = flow.getTempLocal(receiverType); - let receiverName = this.makeCompoundAssignmentTempName(flow); - flow.addScopedAlias(receiverName, receiverType, receiverTemp.index); - flow.setLocalFlag(receiverTemp.index, LocalFlags.Initialized); - setupExprs = [ module.local_set(receiverTemp.index, receiverExpr, receiverType.isManaged) ]; - rewrittenTarget = Node.createPropertyAccessExpression( - Node.createIdentifierExpression(receiverName, receiverExpression.range), - access.property, - access.range - ); - } else { - rewrittenTarget = cacheTarget; - } - } else { - let access = cacheTarget; - let receiverExpression = access.expression; - let elementExpression = access.elementExpression; - let receiverName: string | null = null; - let elementName: string | null = null; - - if (this.expressionHasSideEffects(receiverExpression)) { - let receiverExpr = this.compileExpression(receiverExpression, Type.auto); - let receiverType = this.currentType; - let receiverTemp = flow.getTempLocal(receiverType); - receiverName = this.makeCompoundAssignmentTempName(flow); - flow.addScopedAlias(receiverName, receiverType, receiverTemp.index); - flow.setLocalFlag(receiverTemp.index, LocalFlags.Initialized); - if (!setupExprs) setupExprs = []; - setupExprs.push(module.local_set(receiverTemp.index, receiverExpr, receiverType.isManaged)); - } - - if (this.expressionHasSideEffects(elementExpression)) { - let elementExpr = this.compileExpression(elementExpression, Type.auto); - let elementType = this.currentType; - let elementTemp = flow.getTempLocal(elementType); - elementName = this.makeCompoundAssignmentTempName(flow); - flow.addScopedAlias(elementName, elementType, elementTemp.index); - flow.setLocalFlag(elementTemp.index, LocalFlags.Initialized); - if (!setupExprs) setupExprs = []; - setupExprs.push(module.local_set(elementTemp.index, elementExpr, elementType.isManaged)); - } - - rewrittenTarget = Node.createElementAccessExpression( - receiverName - ? Node.createIdentifierExpression(receiverName, receiverExpression.range) - : receiverExpression, - elementName - ? Node.createIdentifierExpression(elementName, elementExpression.range) - : elementExpression, - access.range - ); - } - assignmentLeft = this.replaceCompoundAssignmentSideEffectCacheTarget( - left, - this.wrapCompoundAssignmentCacheSetup(setupExprs, rewrittenTarget) - ); + cacheContext = this.prepareCompoundAssignmentCache(cacheTarget, contextualType.intType); + if (!cacheContext) return module.unreachable(); + leftExpr = cacheContext.leftExpr; + leftType = cacheContext.leftType; + } else { + leftExpr = this.compileExpression(left, contextualType.intType); + leftType = this.currentType; } - leftExpr = this.compileExpression(assignmentLeft, contextualType.intType); - leftType = this.currentType; - // check operator overload let classReference = leftType.getClassOrWrapper(this.program); if (classReference) { let overload = classReference.lookupOverload(OperatorKind.BitwiseOr); if (overload) { - expr = this.compileBinaryOverload(overload, assignmentLeft, leftExpr, leftType, right, expression); - break; + expr = this.compileBinaryOverload(overload, left, leftExpr, leftType, right, expression); + } else { + if (!leftType.isIntegerValue) { + this.error( + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, "|", leftType.toString() + ); + return module.unreachable(); + } + rightExpr = this.compileExpression(right, leftType, Constraints.ConvImplicit); + rightType = commonType = this.currentType; + expr = this.makeOr(leftExpr, rightExpr, commonType); + } + } else { + if (!leftType.isIntegerValue) { + this.error( + DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, + expression.range, "|", leftType.toString() + ); + return module.unreachable(); } + rightExpr = this.compileExpression(right, leftType, Constraints.ConvImplicit); + rightType = commonType = this.currentType; + expr = this.makeOr(leftExpr, rightExpr, commonType); } - if (!leftType.isIntegerValue) { - this.error( - DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, - expression.range, "|", leftType.toString() - ); - return module.unreachable(); + let resolver = this.resolver; + let target: Element | null; + let thisExpression: Expression | null; + let elementExpression: Expression | null; + let thisExpr: ExpressionRef = 0; + let indexExpr: ExpressionRef = 0; + if (cacheContext) { + target = cacheContext.target; + thisExpression = cacheContext.assignmentThisExpression; + elementExpression = cacheContext.assignmentElementExpression; + thisExpr = cacheContext.assignmentThisExpr; + indexExpr = cacheContext.assignmentElementExpr; + } else { + target = resolver.lookupExpression(left, this.currentFlow); + if (!target) return module.unreachable(); + thisExpression = resolver.currentThisExpression; + elementExpression = resolver.currentElementExpression; } - rightExpr = this.compileExpression(right, leftType, Constraints.ConvImplicit); - rightType = commonType = this.currentType; - expr = this.makeOr(leftExpr, rightExpr, commonType); - let resolver = this.resolver; - let target = resolver.lookupExpression(assignmentLeft, this.currentFlow); - if (!target) return module.unreachable(); + target = assert(target); let targetType = resolver.getTypeOfElement(target); if (!targetType) targetType = Type.void; if (!this.currentType.isStrictlyAssignableTo(targetType)) { @@ -4583,15 +4577,21 @@ export class Compiler extends DiagnosticEmitter { ); return module.unreachable(); } - return this.makeAssignment( + + let assignmentExpr = this.makeAssignment( target, expr, this.currentType, right, - resolver.currentThisExpression, - resolver.currentElementExpression, - contextualType != Type.void + thisExpression, + elementExpression, + contextualType != Type.void, + thisExpr, + indexExpr ); + return cacheContext + ? this.prependSetupPrefixExpressions(cacheContext.setupPrefixExprs, assignmentExpr, contextualType != Type.void) + : assignmentExpr; } case Token.Bar: { leftExpr = this.compileExpression(left, contextualType.intType); @@ -4607,33 +4607,22 @@ export class Compiler extends DiagnosticEmitter { } } - if (compound) { - if (!leftType.isIntegerValue) { - this.error( - DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, - expression.range, "|", leftType.toString() - ); - return module.unreachable(); - } - rightExpr = this.compileExpression(right, leftType, Constraints.ConvImplicit); - rightType = commonType = this.currentType; - } else { - rightExpr = this.compileExpression(right, leftType); - rightType = this.currentType; - commonType = Type.commonType(leftType, rightType, contextualType); - if (!commonType || !commonType.isIntegerValue) { - this.error( - DiagnosticCode.Operator_0_cannot_be_applied_to_types_1_and_2, - expression.range, "|", leftType.toString(), rightType.toString() - ); - this.currentType = contextualType; - return module.unreachable(); - } - leftExpr = this.convertExpression(leftExpr, leftType, commonType, false, left); - leftType = commonType; - rightExpr = this.convertExpression(rightExpr, rightType, commonType, false, right); - rightType = commonType; + rightExpr = this.compileExpression(right, leftType); + rightType = this.currentType; + commonType = Type.commonType(leftType, rightType, contextualType); + if (!commonType || !commonType.isIntegerValue) { + this.error( + DiagnosticCode.Operator_0_cannot_be_applied_to_types_1_and_2, + expression.range, "|", leftType.toString(), rightType.toString() + ); + this.currentType = contextualType; + return module.unreachable(); } + leftExpr = this.convertExpression(leftExpr, leftType, commonType, false, left); + leftType = commonType; + rightExpr = this.convertExpression(rightExpr, rightType, commonType, false, right); + rightType = commonType; + expr = this.makeOr(leftExpr, rightExpr, commonType); break; } @@ -4905,17 +4894,182 @@ export class Compiler extends DiagnosticEmitter { right, resolver.currentThisExpression, resolver.currentElementExpression, - contextualType != Type.void + contextualType != Type.void, + 0, + 0 ); } - private makeCompoundAssignmentTempName(flow: Flow): string { - let name: string; - do { - let id = this.compoundAssignmentTempId++; - name = "__as_or_assign_tmp" + id.toString(); - } while (flow.lookup(name)); - return name; + private prepareCompoundAssignmentCache( + cacheTarget: Expression, + contextualType: Type + ): CompoundAssignmentCacheContext | null { + let module = this.module; + let flow = this.currentFlow; + let resolver = this.resolver; + let target = resolver.lookupExpression(cacheTarget, flow); + if (!target) return null; + + let setupPrefixExprs: ExpressionRef[] | null = null; + let assignmentThisExpression: Expression | null = null; + let assignmentElementExpression: Expression | null = null; + let assignmentThisExpr: ExpressionRef = 0; + let assignmentElementExpr: ExpressionRef = 0; + let readThisExpression: Expression | null = null; + let readElementExpression: Expression | null = null; + + if (cacheTarget.kind == NodeKind.PropertyAccess) { + let access = cacheTarget; + let receiverExpression = access.expression; + let receiverExpr = this.compileExpression(receiverExpression, Type.auto); + let receiverType = this.currentType; + let receiverTemp = flow.getTempLocal(receiverType); + flow.setLocalFlag(receiverTemp.index, LocalFlags.Initialized); + setupPrefixExprs = [ module.local_set(receiverTemp.index, receiverExpr, receiverType.isManaged) ]; + let receiverCachedExpression = Node.createCompiledExpression( + module.local_get(receiverTemp.index, receiverType.toRef()), + receiverType, + receiverExpression.range + ); + readThisExpression = receiverCachedExpression; + assignmentThisExpression = receiverCachedExpression; + } else { + let access = cacheTarget; + let receiverExpression = access.expression; + let elementExpression = access.elementExpression; + let receiverForRead: Expression = receiverExpression; + let elementForRead: Expression = elementExpression; + + assignmentThisExpression = receiverExpression; + assignmentElementExpression = elementExpression; + + if (this.expressionHasSideEffects(receiverExpression)) { + let receiverExpr = this.compileExpression(receiverExpression, Type.auto); + let receiverType = this.currentType; + let receiverTemp = flow.getTempLocal(receiverType); + flow.setLocalFlag(receiverTemp.index, LocalFlags.Initialized); + if (!setupPrefixExprs) setupPrefixExprs = []; + setupPrefixExprs.push(module.local_set(receiverTemp.index, receiverExpr, receiverType.isManaged)); + let receiverCachedExpression = Node.createCompiledExpression( + module.local_get(receiverTemp.index, receiverType.toRef()), + receiverType, + receiverExpression.range + ); + receiverForRead = receiverCachedExpression; + assignmentThisExpression = receiverCachedExpression; + } + + if (this.expressionHasSideEffects(elementExpression)) { + let elementExpr = this.compileExpression(elementExpression, Type.auto); + let elementType = this.currentType; + let elementTemp = flow.getTempLocal(elementType); + flow.setLocalFlag(elementTemp.index, LocalFlags.Initialized); + if (!setupPrefixExprs) setupPrefixExprs = []; + setupPrefixExprs.push(module.local_set(elementTemp.index, elementExpr, elementType.isManaged)); + let elementCachedExpression = Node.createCompiledExpression( + module.local_get(elementTemp.index, elementType.toRef()), + elementType, + elementExpression.range + ); + elementForRead = elementCachedExpression; + assignmentElementExpression = elementCachedExpression; + } + + readThisExpression = receiverForRead; + readElementExpression = elementForRead; + } + + let leftExpr: ExpressionRef; + let leftType: Type; + switch (target.kind) { + case ElementKind.PropertyPrototype: { + let propertyInstance = resolver.resolveProperty(target); + if (!propertyInstance) return null; + target = propertyInstance; + // fall-through + } + case ElementKind.Property: { + let getterInstance = (target).getterInstance; + if (!getterInstance) return null; + if (getterInstance.is(CommonFlags.Instance)) { + let thisArg = this.compileExpression( + assert(readThisExpression), + assert(getterInstance.signature.thisType), + Constraints.ConvImplicit | Constraints.IsThis + ); + assignmentThisExpr = thisArg; + leftExpr = this.compileCallDirect(getterInstance, [], cacheTarget, thisArg); + } else { + leftExpr = this.compileCallDirect(getterInstance, [], cacheTarget); + } + leftType = this.currentType; + break; + } + case ElementKind.IndexSignature: { + let parent = (target).parent; + assert(parent.kind == ElementKind.Class); + let classInstance = parent; + let isUnchecked = flow.is(FlowFlags.UncheckedContext); + let getterInstance = classInstance.lookupOverload(OperatorKind.IndexedGet, isUnchecked); + if (!getterInstance) { + this.error( + DiagnosticCode.Index_signature_is_missing_in_type_0, + cacheTarget.range, + classInstance.internalName + ); + return null; + } + let thisArg = this.compileExpression( + assert(readThisExpression), + classInstance.type, + Constraints.ConvImplicit | Constraints.IsThis + ); + let indexArg = this.compileExpression( + assert(readElementExpression), + getterInstance.signature.parameterTypes[0], + Constraints.ConvImplicit + ); + assignmentThisExpr = thisArg; + assignmentElementExpr = indexArg; + leftExpr = this.makeCallDirect(getterInstance, [ thisArg, indexArg ], cacheTarget); + leftType = this.currentType; + break; + } + default: { + leftExpr = this.compileExpression(cacheTarget, contextualType); + leftType = this.currentType; + break; + } + } + + return new CompoundAssignmentCacheContext( + target, + leftExpr, + leftType, + assignmentThisExpression, + assignmentElementExpression, + assignmentThisExpr, + assignmentElementExpr, + setupPrefixExprs + ); + } + + private prependSetupPrefixExpressions( + setupPrefixExprs: ExpressionRef[] | null, + expr: ExpressionRef, + tee: bool + ): ExpressionRef { + if (!setupPrefixExprs || !setupPrefixExprs.length) return expr; + let setupAndExpr = new Array(setupPrefixExprs.length + 1); + for (let i = 0, k = setupPrefixExprs.length; i < k; ++i) { + setupAndExpr[i] = unchecked(setupPrefixExprs[i]); + } + setupAndExpr[setupPrefixExprs.length] = expr; + return this.module.block( + null, + setupAndExpr, + tee ? this.currentType.toRef() : TypeRef.None + ); } private needsCompoundAssignmentSideEffectCache(target: Expression): bool { @@ -4956,122 +5110,11 @@ export class Compiler extends DiagnosticEmitter { } } - private replaceCompoundAssignmentSideEffectCacheTarget(target: Expression, replacement: Expression): Expression { - while (target.kind == NodeKind.Parenthesized) { - target = (target).expression; - replacement = Node.createParenthesizedExpression(replacement, target.range); - } - switch (target.kind) { - case NodeKind.PropertyAccess: - case NodeKind.ElementAccess: - return replacement; - case NodeKind.Assertion: { - let assertion = target; - if (assertion.assertionKind == AssertionKind.NonNull) { - return Node.createAssertionExpression( - AssertionKind.NonNull, - this.replaceCompoundAssignmentSideEffectCacheTarget(assertion.expression, replacement), - null, - assertion.range - ); - } - return target; - } - case NodeKind.Comma: { - let comma = target; - let expressions = comma.expressions; - let cloned = new Array(expressions.length); - for (let i = 0, k = expressions.length - 1; i < k; ++i) { - cloned[i] = unchecked(expressions[i]); - } - cloned[assert(expressions.length) - 1] = this.replaceCompoundAssignmentSideEffectCacheTarget( - expressions[assert(expressions.length) - 1], - replacement - ); - return Node.createCommaExpression(cloned, comma.range); - } - default: - return target; - } - } - - private wrapCompoundAssignmentCacheSetup(setupExprs: ExpressionRef[] | null, target: Expression): Expression { - if (!setupExprs || !setupExprs.length) return target; - let range = target.range; - let expressions = new Array(setupExprs.length + 1); - for (let i = 0, k = setupExprs.length; i < k; ++i) { - expressions[i] = Node.createCompiledExpression(unchecked(setupExprs[i]), Type.void, range); - } - expressions[setupExprs.length] = target; - return Node.createCommaExpression(expressions, range); - } - private expressionHasSideEffects(expression: Expression): bool { while (expression.kind == NodeKind.Parenthesized) { expression = (expression).expression; } - switch (expression.kind) { - case NodeKind.Call: - case NodeKind.New: - case NodeKind.UnaryPostfix: - case NodeKind.Class: - case NodeKind.Function: - case NodeKind.Compiled: - return true; - case NodeKind.UnaryPrefix: { - let unary = expression; - if (unary.operator == Token.Plus_Plus || unary.operator == Token.Minus_Minus) { - return true; - } - return this.expressionHasSideEffects(unary.operand); - } - 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); - } - } - case NodeKind.Assertion: - return this.expressionHasSideEffects((expression).expression); - 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.ElementAccess: { - let access = expression; - return this.expressionHasSideEffects(access.expression) - || this.expressionHasSideEffects(access.elementExpression); - } - case NodeKind.PropertyAccess: - return this.expressionHasSideEffects((expression).expression); - case NodeKind.Ternary: { - let ternary = expression; - return this.expressionHasSideEffects(ternary.condition) - || this.expressionHasSideEffects(ternary.ifThen) - || this.expressionHasSideEffects(ternary.ifElse); - } - default: - return false; - } + return expression.kind != NodeKind.Identifier; } makeLt(leftExpr: ExpressionRef, rightExpr: ExpressionRef, type: Type): ExpressionRef { @@ -6068,7 +6111,9 @@ export class Compiler extends DiagnosticEmitter { valueExpression, thisExpression, elementExpression, - contextualType != Type.void + contextualType != Type.void, + 0, + 0 ); } @@ -6087,7 +6132,11 @@ export class Compiler extends DiagnosticEmitter { /** Index expression reference if an indexed set. */ indexExpression: Expression | null, /** Whether to tee the value. */ - tee: bool + tee: bool, + /** Precompiled `this` expression reference if available. */ + thisExpr: ExpressionRef, + /** Precompiled index expression reference if available. */ + indexExpr: ExpressionRef, ): ExpressionRef { let module = this.module; let flow = this.currentFlow; @@ -6160,11 +6209,13 @@ 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 - ); + if (!thisExpr) { + thisExpr = this.compileExpression( + assert(thisExpression), + thisType, + Constraints.ConvImplicit | Constraints.IsThis + ); + } if (!tee) return this.makeCallDirect(setterInstance, [ thisExpr, valueExpr ], valueExpression); let tempLocal = flow.getTempLocal(valueType); let valueTypeRef = valueType.toRef(); @@ -6217,11 +6268,13 @@ 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 - ); + if (!thisExpr) { + thisExpr = this.compileExpression( + assert(thisExpression), + thisType, + Constraints.ConvImplicit | Constraints.IsThis + ); + } let setterIndexType = setterInstance.signature.parameterTypes[0]; let getterIndexType = getterInstance.signature.parameterTypes[0]; if (!setterIndexType.equals(getterIndexType)) { @@ -6234,8 +6287,15 @@ 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 elementType = this.currentType; + let elementExpr: ExpressionRef; + let elementType: Type; + if (indexExpr) { + elementExpr = indexExpr; + elementType = getterIndexType; + } else { + elementExpr = this.compileExpression(assert(indexExpression), setterIndexType, Constraints.ConvImplicit); + elementType = this.currentType; + } if (tee) { let tempTarget = flow.getTempLocal(thisType); let tempElement = flow.getTempLocal(elementType); @@ -9778,7 +9838,9 @@ export class Compiler extends DiagnosticEmitter { expression.operand, resolver.currentThisExpression, resolver.currentElementExpression, - false + false, + 0, + 0 ); } @@ -9790,7 +9852,9 @@ export class Compiler extends DiagnosticEmitter { expression.operand, resolver.currentThisExpression, resolver.currentElementExpression, - false + false, + 0, + 0 ); this.currentType = tempLocal.type; @@ -10154,7 +10218,9 @@ export class Compiler extends DiagnosticEmitter { expression.operand, resolver.currentThisExpression, resolver.currentElementExpression, - contextualType != Type.void + contextualType != Type.void, + 0, + 0 ); } From e5a67453ed068b41dac2456af8331d354f3d4f6f Mon Sep 17 00:00:00 2001 From: XMadrid Date: Fri, 13 Mar 2026 10:11:42 +0800 Subject: [PATCH 4/8] works for Bar_Equals --- src/compiler.ts | 151 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 105 insertions(+), 46 deletions(-) diff --git a/src/compiler.ts b/src/compiler.ts index 7b72663925..4d285cf63c 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -4507,7 +4507,7 @@ export class Compiler extends DiagnosticEmitter { case Token.Bar_Equals: { let cacheContext: CompoundAssignmentCacheContext | null = null; let cacheTarget = this.getCompoundAssignmentSideEffectCacheTarget(left); - if (cacheTarget && this.needsCompoundAssignmentSideEffectCache(left)) { + if (cacheTarget && this.needsCompoundAssignmentSideEffectCache(cacheTarget)) { cacheContext = this.prepareCompoundAssignmentCache(cacheTarget, contextualType.intType); if (!cacheContext) return module.unreachable(); leftExpr = cacheContext.leftExpr; @@ -4915,31 +4915,31 @@ export class Compiler extends DiagnosticEmitter { let assignmentElementExpression: Expression | null = null; let assignmentThisExpr: ExpressionRef = 0; let assignmentElementExpr: ExpressionRef = 0; + let cachedThisLocal: Local | null = null; + let cachedThisType: Type = Type.void; + let cachedElementLocal: Local | null = null; + let cachedElementType: Type = Type.void; let readThisExpression: Expression | null = null; let readElementExpression: Expression | null = null; if (cacheTarget.kind == NodeKind.PropertyAccess) { let access = cacheTarget; let receiverExpression = access.expression; + assignmentThisExpression = receiverExpression; let receiverExpr = this.compileExpression(receiverExpression, Type.auto); let receiverType = this.currentType; let receiverTemp = flow.getTempLocal(receiverType); + cachedThisLocal = receiverTemp; + cachedThisType = receiverType; flow.setLocalFlag(receiverTemp.index, LocalFlags.Initialized); setupPrefixExprs = [ module.local_set(receiverTemp.index, receiverExpr, receiverType.isManaged) ]; - let receiverCachedExpression = Node.createCompiledExpression( - module.local_get(receiverTemp.index, receiverType.toRef()), - receiverType, - receiverExpression.range - ); - readThisExpression = receiverCachedExpression; - assignmentThisExpression = receiverCachedExpression; } else { let access = cacheTarget; let receiverExpression = access.expression; let elementExpression = access.elementExpression; - let receiverForRead: Expression = receiverExpression; - let elementForRead: Expression = elementExpression; + readThisExpression = receiverExpression; + readElementExpression = elementExpression; assignmentThisExpression = receiverExpression; assignmentElementExpression = elementExpression; @@ -4947,36 +4947,23 @@ export class Compiler extends DiagnosticEmitter { let receiverExpr = this.compileExpression(receiverExpression, Type.auto); let receiverType = this.currentType; let receiverTemp = flow.getTempLocal(receiverType); + cachedThisLocal = receiverTemp; + cachedThisType = receiverType; flow.setLocalFlag(receiverTemp.index, LocalFlags.Initialized); if (!setupPrefixExprs) setupPrefixExprs = []; setupPrefixExprs.push(module.local_set(receiverTemp.index, receiverExpr, receiverType.isManaged)); - let receiverCachedExpression = Node.createCompiledExpression( - module.local_get(receiverTemp.index, receiverType.toRef()), - receiverType, - receiverExpression.range - ); - receiverForRead = receiverCachedExpression; - assignmentThisExpression = receiverCachedExpression; } if (this.expressionHasSideEffects(elementExpression)) { let elementExpr = this.compileExpression(elementExpression, Type.auto); let elementType = this.currentType; let elementTemp = flow.getTempLocal(elementType); + cachedElementLocal = elementTemp; + cachedElementType = elementType; flow.setLocalFlag(elementTemp.index, LocalFlags.Initialized); if (!setupPrefixExprs) setupPrefixExprs = []; setupPrefixExprs.push(module.local_set(elementTemp.index, elementExpr, elementType.isManaged)); - let elementCachedExpression = Node.createCompiledExpression( - module.local_get(elementTemp.index, elementType.toRef()), - elementType, - elementExpression.range - ); - elementForRead = elementCachedExpression; - assignmentElementExpression = elementCachedExpression; } - - readThisExpression = receiverForRead; - readElementExpression = elementForRead; } let leftExpr: ExpressionRef; @@ -4992,13 +4979,37 @@ export class Compiler extends DiagnosticEmitter { let getterInstance = (target).getterInstance; if (!getterInstance) return null; if (getterInstance.is(CommonFlags.Instance)) { - let thisArg = this.compileExpression( - assert(readThisExpression), - assert(getterInstance.signature.thisType), - Constraints.ConvImplicit | Constraints.IsThis - ); - assignmentThisExpr = thisArg; - leftExpr = this.compileCallDirect(getterInstance, [], cacheTarget, thisArg); + let thisType = assert(getterInstance.signature.thisType); + if (cachedThisLocal) { + let thisRef = cachedThisType.toRef(); + let thisArg = this.convertExpression( + module.local_get(cachedThisLocal.index, thisRef), + cachedThisType, + thisType, + false, + cacheTarget + ); + assignmentThisExpr = this.convertExpression( + module.local_get(cachedThisLocal.index, thisRef), + cachedThisType, + thisType, + false, + cacheTarget + ); + leftExpr = this.compileCallDirect(getterInstance, [], cacheTarget, thisArg); + } else { + let thisArg = this.compileExpression( + assert(readThisExpression), + thisType, + Constraints.ConvImplicit | Constraints.IsThis + ); + assignmentThisExpr = this.compileExpression( + assert(assignmentThisExpression), + thisType, + Constraints.ConvImplicit | Constraints.IsThis + ); + leftExpr = this.compileCallDirect(getterInstance, [], cacheTarget, thisArg); + } } else { leftExpr = this.compileCallDirect(getterInstance, [], cacheTarget); } @@ -5019,18 +5030,66 @@ export class Compiler extends DiagnosticEmitter { ); return null; } - let thisArg = this.compileExpression( - assert(readThisExpression), - classInstance.type, - Constraints.ConvImplicit | Constraints.IsThis - ); - let indexArg = this.compileExpression( - assert(readElementExpression), - getterInstance.signature.parameterTypes[0], - Constraints.ConvImplicit - ); - assignmentThisExpr = thisArg; - assignmentElementExpr = indexArg; + let thisType = classInstance.type; + let thisArg: ExpressionRef; + if (cachedThisLocal) { + let thisRef = cachedThisType.toRef(); + thisArg = this.convertExpression( + module.local_get(cachedThisLocal.index, thisRef), + cachedThisType, + thisType, + false, + cacheTarget + ); + assignmentThisExpr = this.convertExpression( + module.local_get(cachedThisLocal.index, thisRef), + cachedThisType, + thisType, + false, + cacheTarget + ); + } else { + thisArg = this.compileExpression( + assert(readThisExpression), + thisType, + Constraints.ConvImplicit | Constraints.IsThis + ); + assignmentThisExpr = this.compileExpression( + assert(assignmentThisExpression), + thisType, + Constraints.ConvImplicit | Constraints.IsThis + ); + } + let indexType = getterInstance.signature.parameterTypes[0]; + let indexArg: ExpressionRef; + if (cachedElementLocal) { + let elementRef = cachedElementType.toRef(); + indexArg = this.convertExpression( + module.local_get(cachedElementLocal.index, elementRef), + cachedElementType, + indexType, + false, + cacheTarget + ); + assignmentElementExpr = this.convertExpression( + module.local_get(cachedElementLocal.index, elementRef), + cachedElementType, + indexType, + false, + cacheTarget + ); + } else { + indexArg = this.compileExpression( + assert(readElementExpression), + indexType, + Constraints.ConvImplicit + ); + assignmentElementExpr = this.compileExpression( + assert(assignmentElementExpression), + indexType, + Constraints.ConvImplicit + ); + } leftExpr = this.makeCallDirect(getterInstance, [ thisArg, indexArg ], cacheTarget); leftType = this.currentType; break; From c7348406a11eeca6be0c886d97f78735dfff8782 Mon Sep 17 00:00:00 2001 From: XMadrid Date: Fri, 13 Mar 2026 11:09:49 +0800 Subject: [PATCH 5/8] apply fixes to all compound assignment opeartor in compileBinaryExpression --- src/compiler.ts | 346 +++++++++++++++++++++++++++++++----------------- 1 file changed, 223 insertions(+), 123 deletions(-) diff --git a/src/compiler.ts b/src/compiler.ts index 4d285cf63c..adc2cf187e 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -4090,6 +4090,7 @@ export class Compiler extends DiagnosticEmitter { let expr: ExpressionRef; let compound = false; + let compoundAssignmentCacheContext: CompoundAssignmentCacheContext | null = null; let operator = expression.operator; switch (operator) { @@ -4110,8 +4111,21 @@ export class Compiler extends DiagnosticEmitter { } case Token.Plus_Equals: compound = true; case Token.Plus: { - leftExpr = this.compileExpression(left, contextualType); - leftType = this.currentType; + if (compound) { + let cacheTarget = this.getCompoundAssignmentSideEffectCacheTarget(left); + if (cacheTarget && this.needsCompoundAssignmentSideEffectCache(cacheTarget)) { + compoundAssignmentCacheContext = this.prepareCompoundAssignmentCache(cacheTarget, contextualType); + if (!compoundAssignmentCacheContext) return module.unreachable(); + leftExpr = compoundAssignmentCacheContext.leftExpr; + leftType = compoundAssignmentCacheContext.leftType; + } else { + leftExpr = this.compileExpression(left, contextualType); + leftType = this.currentType; + } + } else { + leftExpr = this.compileExpression(left, contextualType); + leftType = this.currentType; + } // check operator overload let classReference = leftType.getClassOrWrapper(this.program); @@ -4154,8 +4168,21 @@ export class Compiler extends DiagnosticEmitter { } case Token.Minus_Equals: compound = true; case Token.Minus: { - leftExpr = this.compileExpression(left, contextualType); - leftType = this.currentType; + if (compound) { + let cacheTarget = this.getCompoundAssignmentSideEffectCacheTarget(left); + if (cacheTarget && this.needsCompoundAssignmentSideEffectCache(cacheTarget)) { + compoundAssignmentCacheContext = this.prepareCompoundAssignmentCache(cacheTarget, contextualType); + if (!compoundAssignmentCacheContext) return module.unreachable(); + leftExpr = compoundAssignmentCacheContext.leftExpr; + leftType = compoundAssignmentCacheContext.leftType; + } else { + leftExpr = this.compileExpression(left, contextualType); + leftType = this.currentType; + } + } else { + leftExpr = this.compileExpression(left, contextualType); + leftType = this.currentType; + } // check operator overload let classReference = leftType.getClassOrWrapper(this.program); @@ -4199,8 +4226,21 @@ export class Compiler extends DiagnosticEmitter { } case Token.Asterisk_Equals: compound = true; case Token.Asterisk: { - leftExpr = this.compileExpression(left, contextualType); - leftType = this.currentType; + if (compound) { + let cacheTarget = this.getCompoundAssignmentSideEffectCacheTarget(left); + if (cacheTarget && this.needsCompoundAssignmentSideEffectCache(cacheTarget)) { + compoundAssignmentCacheContext = this.prepareCompoundAssignmentCache(cacheTarget, contextualType); + if (!compoundAssignmentCacheContext) return module.unreachable(); + leftExpr = compoundAssignmentCacheContext.leftExpr; + leftType = compoundAssignmentCacheContext.leftType; + } else { + leftExpr = this.compileExpression(left, contextualType); + leftType = this.currentType; + } + } else { + leftExpr = this.compileExpression(left, contextualType); + leftType = this.currentType; + } // check operator overload let classReference = leftType.getClassOrWrapper(this.program); @@ -4244,8 +4284,21 @@ export class Compiler extends DiagnosticEmitter { } case Token.Asterisk_Asterisk_Equals: compound = true; case Token.Asterisk_Asterisk: { - leftExpr = this.compileExpression(left, contextualType); - leftType = this.currentType; + if (compound) { + let cacheTarget = this.getCompoundAssignmentSideEffectCacheTarget(left); + if (cacheTarget && this.needsCompoundAssignmentSideEffectCache(cacheTarget)) { + compoundAssignmentCacheContext = this.prepareCompoundAssignmentCache(cacheTarget, contextualType); + if (!compoundAssignmentCacheContext) return module.unreachable(); + leftExpr = compoundAssignmentCacheContext.leftExpr; + leftType = compoundAssignmentCacheContext.leftType; + } else { + leftExpr = this.compileExpression(left, contextualType); + leftType = this.currentType; + } + } else { + leftExpr = this.compileExpression(left, contextualType); + leftType = this.currentType; + } // check operator overload let classReference = leftType.getClassOrWrapper(this.program); @@ -4289,8 +4342,21 @@ export class Compiler extends DiagnosticEmitter { } case Token.Slash_Equals: compound = true; case Token.Slash: { - leftExpr = this.compileExpression(left, contextualType); - leftType = this.currentType; + if (compound) { + let cacheTarget = this.getCompoundAssignmentSideEffectCacheTarget(left); + if (cacheTarget && this.needsCompoundAssignmentSideEffectCache(cacheTarget)) { + compoundAssignmentCacheContext = this.prepareCompoundAssignmentCache(cacheTarget, contextualType); + if (!compoundAssignmentCacheContext) return module.unreachable(); + leftExpr = compoundAssignmentCacheContext.leftExpr; + leftType = compoundAssignmentCacheContext.leftType; + } else { + leftExpr = this.compileExpression(left, contextualType); + leftType = this.currentType; + } + } else { + leftExpr = this.compileExpression(left, contextualType); + leftType = this.currentType; + } // check operator overload let classReference = leftType.getClassOrWrapper(this.program); @@ -4334,8 +4400,21 @@ export class Compiler extends DiagnosticEmitter { } case Token.Percent_Equals: compound = true; case Token.Percent: { - leftExpr = this.compileExpression(left, contextualType); - leftType = this.currentType; + if (compound) { + let cacheTarget = this.getCompoundAssignmentSideEffectCacheTarget(left); + if (cacheTarget && this.needsCompoundAssignmentSideEffectCache(cacheTarget)) { + compoundAssignmentCacheContext = this.prepareCompoundAssignmentCache(cacheTarget, contextualType); + if (!compoundAssignmentCacheContext) return module.unreachable(); + leftExpr = compoundAssignmentCacheContext.leftExpr; + leftType = compoundAssignmentCacheContext.leftType; + } else { + leftExpr = this.compileExpression(left, contextualType); + leftType = this.currentType; + } + } else { + leftExpr = this.compileExpression(left, contextualType); + leftType = this.currentType; + } // check operator overload let classReference = leftType.getClassOrWrapper(this.program); @@ -4379,8 +4458,21 @@ export class Compiler extends DiagnosticEmitter { } case Token.LessThan_LessThan_Equals: compound = true; case Token.LessThan_LessThan: { - leftExpr = this.compileExpression(left, contextualType.intType); - leftType = this.currentType; + if (compound) { + let cacheTarget = this.getCompoundAssignmentSideEffectCacheTarget(left); + if (cacheTarget && this.needsCompoundAssignmentSideEffectCache(cacheTarget)) { + compoundAssignmentCacheContext = this.prepareCompoundAssignmentCache(cacheTarget, contextualType.intType); + if (!compoundAssignmentCacheContext) return module.unreachable(); + leftExpr = compoundAssignmentCacheContext.leftExpr; + leftType = compoundAssignmentCacheContext.leftType; + } else { + leftExpr = this.compileExpression(left, contextualType.intType); + leftType = this.currentType; + } + } else { + leftExpr = this.compileExpression(left, contextualType.intType); + leftType = this.currentType; + } // check operator overload let classReference = leftType.getClassOrWrapper(this.program); @@ -4406,8 +4498,21 @@ export class Compiler extends DiagnosticEmitter { } case Token.GreaterThan_GreaterThan_Equals: compound = true; case Token.GreaterThan_GreaterThan: { - leftExpr = this.compileExpression(left, contextualType.intType); - leftType = this.currentType; + if (compound) { + let cacheTarget = this.getCompoundAssignmentSideEffectCacheTarget(left); + if (cacheTarget && this.needsCompoundAssignmentSideEffectCache(cacheTarget)) { + compoundAssignmentCacheContext = this.prepareCompoundAssignmentCache(cacheTarget, contextualType.intType); + if (!compoundAssignmentCacheContext) return module.unreachable(); + leftExpr = compoundAssignmentCacheContext.leftExpr; + leftType = compoundAssignmentCacheContext.leftType; + } else { + leftExpr = this.compileExpression(left, contextualType.intType); + leftType = this.currentType; + } + } else { + leftExpr = this.compileExpression(left, contextualType.intType); + leftType = this.currentType; + } // check operator overload let classReference = leftType.getClassOrWrapper(this.program); @@ -4434,8 +4539,21 @@ export class Compiler extends DiagnosticEmitter { } case Token.GreaterThan_GreaterThan_GreaterThan_Equals: compound = true; case Token.GreaterThan_GreaterThan_GreaterThan: { - leftExpr = this.compileExpression(left, contextualType.intType); - leftType = this.currentType; + if (compound) { + let cacheTarget = this.getCompoundAssignmentSideEffectCacheTarget(left); + if (cacheTarget && this.needsCompoundAssignmentSideEffectCache(cacheTarget)) { + compoundAssignmentCacheContext = this.prepareCompoundAssignmentCache(cacheTarget, contextualType.intType); + if (!compoundAssignmentCacheContext) return module.unreachable(); + leftExpr = compoundAssignmentCacheContext.leftExpr; + leftType = compoundAssignmentCacheContext.leftType; + } else { + leftExpr = this.compileExpression(left, contextualType.intType); + leftType = this.currentType; + } + } else { + leftExpr = this.compileExpression(left, contextualType.intType); + leftType = this.currentType; + } // check operator overload let classReference = leftType.getClassOrWrapper(this.program); @@ -4461,8 +4579,21 @@ export class Compiler extends DiagnosticEmitter { } case Token.Ampersand_Equals: compound = true; case Token.Ampersand: { - leftExpr = this.compileExpression(left, contextualType.intType); - leftType = this.currentType; + if (compound) { + let cacheTarget = this.getCompoundAssignmentSideEffectCacheTarget(left); + if (cacheTarget && this.needsCompoundAssignmentSideEffectCache(cacheTarget)) { + compoundAssignmentCacheContext = this.prepareCompoundAssignmentCache(cacheTarget, contextualType.intType); + if (!compoundAssignmentCacheContext) return module.unreachable(); + leftExpr = compoundAssignmentCacheContext.leftExpr; + leftType = compoundAssignmentCacheContext.leftType; + } else { + leftExpr = this.compileExpression(left, contextualType.intType); + leftType = this.currentType; + } + } else { + leftExpr = this.compileExpression(left, contextualType.intType); + leftType = this.currentType; + } // check operator overload let classReference = leftType.getClassOrWrapper(this.program); @@ -4504,14 +4635,19 @@ export class Compiler extends DiagnosticEmitter { expr = this.makeAnd(leftExpr, rightExpr, commonType); break; } - case Token.Bar_Equals: { - let cacheContext: CompoundAssignmentCacheContext | null = null; - let cacheTarget = this.getCompoundAssignmentSideEffectCacheTarget(left); - if (cacheTarget && this.needsCompoundAssignmentSideEffectCache(cacheTarget)) { - cacheContext = this.prepareCompoundAssignmentCache(cacheTarget, contextualType.intType); - if (!cacheContext) return module.unreachable(); - leftExpr = cacheContext.leftExpr; - leftType = cacheContext.leftType; + case Token.Bar_Equals: compound = true; + case Token.Bar: { + if (compound) { + let cacheTarget = this.getCompoundAssignmentSideEffectCacheTarget(left); + if (cacheTarget && this.needsCompoundAssignmentSideEffectCache(cacheTarget)) { + compoundAssignmentCacheContext = this.prepareCompoundAssignmentCache(cacheTarget, contextualType.intType); + if (!compoundAssignmentCacheContext) return module.unreachable(); + leftExpr = compoundAssignmentCacheContext.leftExpr; + leftType = compoundAssignmentCacheContext.leftType; + } else { + leftExpr = this.compileExpression(left, contextualType.intType); + leftType = this.currentType; + } } else { leftExpr = this.compileExpression(left, contextualType.intType); leftType = this.currentType; @@ -4523,19 +4659,11 @@ export class Compiler extends DiagnosticEmitter { let overload = classReference.lookupOverload(OperatorKind.BitwiseOr); if (overload) { expr = this.compileBinaryOverload(overload, left, leftExpr, leftType, right, expression); - } else { - if (!leftType.isIntegerValue) { - this.error( - DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, - expression.range, "|", leftType.toString() - ); - return module.unreachable(); - } - rightExpr = this.compileExpression(right, leftType, Constraints.ConvImplicit); - rightType = commonType = this.currentType; - expr = this.makeOr(leftExpr, rightExpr, commonType); + break; } - } else { + } + + if (compound) { if (!leftType.isIntegerValue) { this.error( DiagnosticCode.The_0_operator_cannot_be_applied_to_type_1, @@ -4545,91 +4673,44 @@ export class Compiler extends DiagnosticEmitter { } rightExpr = this.compileExpression(right, leftType, Constraints.ConvImplicit); rightType = commonType = this.currentType; - expr = this.makeOr(leftExpr, rightExpr, commonType); - } - - let resolver = this.resolver; - let target: Element | null; - let thisExpression: Expression | null; - let elementExpression: Expression | null; - let thisExpr: ExpressionRef = 0; - let indexExpr: ExpressionRef = 0; - if (cacheContext) { - target = cacheContext.target; - thisExpression = cacheContext.assignmentThisExpression; - elementExpression = cacheContext.assignmentElementExpression; - thisExpr = cacheContext.assignmentThisExpr; - indexExpr = cacheContext.assignmentElementExpr; } else { - target = resolver.lookupExpression(left, this.currentFlow); - if (!target) return module.unreachable(); - thisExpression = resolver.currentThisExpression; - elementExpression = resolver.currentElementExpression; - } - - target = assert(target); - let targetType = resolver.getTypeOfElement(target); - if (!targetType) targetType = Type.void; - if (!this.currentType.isStrictlyAssignableTo(targetType)) { - this.error( - DiagnosticCode.Type_0_is_not_assignable_to_type_1, - expression.range, this.currentType.toString(), targetType.toString() - ); - return module.unreachable(); - } - - let assignmentExpr = this.makeAssignment( - target, - expr, - this.currentType, - right, - thisExpression, - elementExpression, - contextualType != Type.void, - thisExpr, - indexExpr - ); - return cacheContext - ? this.prependSetupPrefixExpressions(cacheContext.setupPrefixExprs, assignmentExpr, contextualType != Type.void) - : assignmentExpr; - } - case Token.Bar: { - leftExpr = this.compileExpression(left, contextualType.intType); - leftType = this.currentType; - - // check operator overload - let classReference = leftType.getClassOrWrapper(this.program); - if (classReference) { - let overload = classReference.lookupOverload(OperatorKind.BitwiseOr); - if (overload) { - expr = this.compileBinaryOverload(overload, left, leftExpr, leftType, right, expression); - break; + rightExpr = this.compileExpression(right, leftType); + rightType = this.currentType; + commonType = Type.commonType(leftType, rightType, contextualType); + if (!commonType || !commonType.isIntegerValue) { + this.error( + DiagnosticCode.Operator_0_cannot_be_applied_to_types_1_and_2, + expression.range, "|", leftType.toString(), rightType.toString() + ); + this.currentType = contextualType; + return module.unreachable(); } + leftExpr = this.convertExpression(leftExpr, leftType, commonType, false, left); + leftType = commonType; + rightExpr = this.convertExpression(rightExpr, rightType, commonType, false, right); + rightType = commonType; } - rightExpr = this.compileExpression(right, leftType); - rightType = this.currentType; - commonType = Type.commonType(leftType, rightType, contextualType); - if (!commonType || !commonType.isIntegerValue) { - this.error( - DiagnosticCode.Operator_0_cannot_be_applied_to_types_1_and_2, - expression.range, "|", leftType.toString(), rightType.toString() - ); - this.currentType = contextualType; - return module.unreachable(); - } - leftExpr = this.convertExpression(leftExpr, leftType, commonType, false, left); - leftType = commonType; - rightExpr = this.convertExpression(rightExpr, rightType, commonType, false, right); - rightType = commonType; - expr = this.makeOr(leftExpr, rightExpr, commonType); break; } case Token.Caret_Equals: compound = true; case Token.Caret: { - leftExpr = this.compileExpression(left, contextualType.intType); - leftType = this.currentType; + if (compound) { + let cacheTarget = this.getCompoundAssignmentSideEffectCacheTarget(left); + if (cacheTarget && this.needsCompoundAssignmentSideEffectCache(cacheTarget)) { + compoundAssignmentCacheContext = this.prepareCompoundAssignmentCache(cacheTarget, contextualType.intType); + if (!compoundAssignmentCacheContext) return module.unreachable(); + leftExpr = compoundAssignmentCacheContext.leftExpr; + leftType = compoundAssignmentCacheContext.leftType; + } else { + leftExpr = this.compileExpression(left, contextualType.intType); + leftType = this.currentType; + } + } else { + leftExpr = this.compileExpression(left, contextualType.intType); + leftType = this.currentType; + } // check operator overload let classReference = leftType.getClassOrWrapper(this.program); @@ -4876,8 +4957,24 @@ export class Compiler extends DiagnosticEmitter { } if (!compound) return expr; let resolver = this.resolver; - let target = resolver.lookupExpression(left, this.currentFlow); - if (!target) return module.unreachable(); + let target: Element | null; + let thisExpression: Expression | null; + let elementExpression: Expression | null; + let thisExpr: ExpressionRef = 0; + let indexExpr: ExpressionRef = 0; + if (compoundAssignmentCacheContext) { + target = compoundAssignmentCacheContext.target; + thisExpression = compoundAssignmentCacheContext.assignmentThisExpression; + elementExpression = compoundAssignmentCacheContext.assignmentElementExpression; + thisExpr = compoundAssignmentCacheContext.assignmentThisExpr; + indexExpr = compoundAssignmentCacheContext.assignmentElementExpr; + } else { + target = resolver.lookupExpression(left, this.currentFlow); + if (!target) return module.unreachable(); + thisExpression = resolver.currentThisExpression; + elementExpression = resolver.currentElementExpression; + } + target = assert(target); let targetType = resolver.getTypeOfElement(target); if (!targetType) targetType = Type.void; if (!this.currentType.isStrictlyAssignableTo(targetType)) { @@ -4887,17 +4984,20 @@ export class Compiler extends DiagnosticEmitter { ); return module.unreachable(); } - return this.makeAssignment( + let assignmentExpr = this.makeAssignment( target, expr, this.currentType, right, - resolver.currentThisExpression, - resolver.currentElementExpression, + thisExpression, + elementExpression, contextualType != Type.void, - 0, - 0 + thisExpr, + indexExpr ); + return compoundAssignmentCacheContext + ? this.prependSetupPrefixExpressions(compoundAssignmentCacheContext.setupPrefixExprs, assignmentExpr, contextualType != Type.void) + : assignmentExpr; } private prepareCompoundAssignmentCache( From fe507c51840bfe0c8b07695d5721ed7c11a231bd Mon Sep 17 00:00:00 2001 From: XMadrid Date: Fri, 13 Mar 2026 15:34:10 +0800 Subject: [PATCH 6/8] update tests --- 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 | 38 +- .../compiler/class-overloading-cast.debug.wat | 20 +- .../class-overloading-cast.release.wat | 22 +- tests/compiler/class-overloading.debug.wat | 20 +- tests/compiler/class-overloading.release.wat | 120 +- 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 +- 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/2730.debug.wat | 3730 +++++++++++++++++ tests/compiler/issues/2730.release.wat | 2586 ++++++++++++ tests/compiler/issues/2730.ts | 101 + 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 | 20 +- 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 +- 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 +- .../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 +- .../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 +- 167 files changed, 7419 insertions(+), 1998 deletions(-) create mode 100644 tests/compiler/issues/2730.debug.wat create mode 100644 tests/compiler/issues/2730.release.wat create mode 100644 tests/compiler/issues/2730.ts 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 09936b2aba..7302a11c83 100644 --- a/tests/compiler/bindings/esm.release.wat +++ b/tests/compiler/bindings/esm.release.wat @@ -1351,7 +1351,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 @@ -1368,7 +1368,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 @@ -2160,7 +2160,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 @@ -2179,7 +2179,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 @@ -2893,7 +2893,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 @@ -2936,7 +2936,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 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 9a784f3d63..77f7e75719 100644 --- a/tests/compiler/bindings/noExportRuntime.release.wat +++ b/tests/compiler/bindings/noExportRuntime.release.wat @@ -156,7 +156,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 @@ -180,7 +180,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 @@ -1284,7 +1284,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 @@ -1301,7 +1301,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/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 dcd117d596..3c86bca572 100644 --- a/tests/compiler/bindings/raw.release.wat +++ b/tests/compiler/bindings/raw.release.wat @@ -1351,7 +1351,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 @@ -1368,7 +1368,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 @@ -2160,7 +2160,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 @@ -2179,7 +2179,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 @@ -2893,7 +2893,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 @@ -2936,7 +2936,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 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 bbbd16397b..5a9f5ccc59 100644 --- a/tests/compiler/call-inferred.release.wat +++ b/tests/compiler/call-inferred.release.wat @@ -118,7 +118,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 @@ -142,7 +142,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 @@ -1227,7 +1227,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 @@ -1244,7 +1244,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 6ff41f9bea..2bd5705da7 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 d1710e2690..450cb7f419 100644 --- a/tests/compiler/call-rest.release.wat +++ b/tests/compiler/call-rest.release.wat @@ -147,7 +147,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 @@ -171,7 +171,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 @@ -1275,7 +1275,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 @@ -1292,7 +1292,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 @@ -2024,7 +2024,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 @@ -2067,7 +2067,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 0c67fa96d2..9dd9a1817c 100644 --- a/tests/compiler/call-super.release.wat +++ b/tests/compiler/call-super.release.wat @@ -118,7 +118,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 @@ -142,7 +142,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 @@ -1227,7 +1227,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 @@ -1244,7 +1244,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/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 405b45c818..718871d01a 100644 --- a/tests/compiler/class-implements.release.wat +++ b/tests/compiler/class-implements.release.wat @@ -167,7 +167,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 @@ -191,7 +191,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 @@ -1276,7 +1276,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 @@ -1293,7 +1293,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 @@ -2167,7 +2167,7 @@ i32.const 0 call $class-implements/D#constructor global.set $class-implements/d - block $__inlined_func$class-implements/D#foo@override$163 (result i32) + block $__inlined_func$class-implements/D#foo@override$162 (result i32) global.get $~lib/memory/__stack_pointer global.get $class-implements/d local.tee $0 @@ -2179,7 +2179,7 @@ i32.load i32.const 11 i32.eq - br_if $__inlined_func$class-implements/D#foo@override$163 + br_if $__inlined_func$class-implements/D#foo@override$162 drop i32.const 3 end @@ -2224,7 +2224,7 @@ global.set $~lib/memory/__stack_pointer local.get $0 global.set $class-implements/e - block $__inlined_func$class-implements/D#foo@override$165 (result i32) + block $__inlined_func$class-implements/D#foo@override$164 (result i32) global.get $~lib/memory/__stack_pointer global.get $class-implements/e local.tee $0 @@ -2236,7 +2236,7 @@ i32.load i32.const 11 i32.eq - br_if $__inlined_func$class-implements/D#foo@override$165 + br_if $__inlined_func$class-implements/D#foo@override$164 drop i32.const 3 end @@ -2257,7 +2257,7 @@ i32.store call $class-implements/F#constructor global.set $class-implements/g - block $__inlined_func$class-implements/D#foo@override$166 (result i32) + block $__inlined_func$class-implements/D#foo@override$165 (result i32) global.get $~lib/memory/__stack_pointer global.get $class-implements/g local.tee $0 @@ -2269,7 +2269,7 @@ i32.load i32.const 11 i32.eq - br_if $__inlined_func$class-implements/D#foo@override$166 + br_if $__inlined_func$class-implements/D#foo@override$165 drop i32.const 3 end @@ -2289,7 +2289,7 @@ global.get $class-implements/h local.tee $0 i32.store - block $__inlined_func$class-implements/I#foo@override$167 + block $__inlined_func$class-implements/I#foo@override$166 block $default12 block $case3 block $case2 @@ -2305,19 +2305,19 @@ end i32.const 4 local.set $0 - br $__inlined_func$class-implements/I#foo@override$167 + br $__inlined_func$class-implements/I#foo@override$166 end i32.const 1 local.set $0 - br $__inlined_func$class-implements/I#foo@override$167 + br $__inlined_func$class-implements/I#foo@override$166 end i32.const 2 local.set $0 - br $__inlined_func$class-implements/I#foo@override$167 + br $__inlined_func$class-implements/I#foo@override$166 end i32.const 3 local.set $0 - br $__inlined_func$class-implements/I#foo@override$167 + br $__inlined_func$class-implements/I#foo@override$166 end unreachable end @@ -2364,7 +2364,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store - block $__inlined_func$class-implements/J#foo@override$169 + block $__inlined_func$class-implements/J#foo@override$168 block $default14 block $case315 block $case216 @@ -2382,15 +2382,15 @@ end i32.const 4 local.set $0 - br $__inlined_func$class-implements/J#foo@override$169 + br $__inlined_func$class-implements/J#foo@override$168 end i32.const 3 local.set $0 - br $__inlined_func$class-implements/J#foo@override$169 + br $__inlined_func$class-implements/J#foo@override$168 end i32.const 1 local.set $0 - br $__inlined_func$class-implements/J#foo@override$169 + br $__inlined_func$class-implements/J#foo@override$168 end unreachable 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 d40d976f0e..12c9f3e3bc 100644 --- a/tests/compiler/class-overloading-cast.release.wat +++ b/tests/compiler/class-overloading-cast.release.wat @@ -155,7 +155,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 @@ -179,7 +179,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 @@ -1181,7 +1181,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 @@ -1198,7 +1198,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 @@ -1620,7 +1620,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 @@ -1640,7 +1640,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 @@ -1838,7 +1838,7 @@ local.get $0 global.set $class-overloading-cast/v3 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) global.get $~lib/memory/__stack_pointer global.get $class-overloading-cast/v local.tee $0 @@ -1860,10 +1860,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 @@ -1900,7 +1900,7 @@ unreachable end global.get $~lib/memory/__stack_pointer - block $__inlined_func$class-overloading-cast/A#foo@override$137 (result i32) + block $__inlined_func$class-overloading-cast/A#foo@override$136 (result i32) global.get $~lib/memory/__stack_pointer global.get $class-overloading-cast/v3 local.tee $0 @@ -1912,7 +1912,7 @@ i32.load i32.const 7 i32.eq - br_if $__inlined_func$class-overloading-cast/A#foo@override$137 + br_if $__inlined_func$class-overloading-cast/A#foo@override$136 drop 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 02caf42072..b86ad671d8 100644 --- a/tests/compiler/class-overloading.release.wat +++ b/tests/compiler/class-overloading.release.wat @@ -177,7 +177,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 @@ -201,7 +201,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 @@ -1203,7 +1203,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 @@ -1220,7 +1220,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 @@ -1715,7 +1715,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 @@ -1735,7 +1735,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 @@ -1972,7 +1972,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 @@ -1987,15 +1987,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 @@ -2022,7 +2022,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 @@ -2037,15 +2037,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 @@ -2072,7 +2072,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 @@ -2087,15 +2087,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 @@ -2267,7 +2267,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 @@ -2282,15 +2282,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 @@ -2317,7 +2317,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 @@ -2332,15 +2332,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 @@ -2365,7 +2365,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 @@ -2380,15 +2380,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 @@ -2442,7 +2442,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 @@ -2457,15 +2457,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 @@ -2492,7 +2492,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 @@ -2507,15 +2507,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 @@ -2540,7 +2540,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 @@ -2555,15 +2555,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 @@ -2644,7 +2644,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 @@ -2659,15 +2659,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 @@ -2694,7 +2694,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 @@ -2709,15 +2709,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 @@ -2744,7 +2744,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 @@ -2759,15 +2759,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 @@ -2824,7 +2824,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 $default88 block $case189 local.get $0 @@ -2843,11 +2843,11 @@ 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 - br $__inlined_func$class-overloading/IA#foo@override$168 + br $__inlined_func$class-overloading/IA#foo@override$167 end unreachable end @@ -2903,7 +2903,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 $default91 block $case192 local.get $0 @@ -2922,11 +2922,11 @@ 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 - br $__inlined_func$class-overloading/IA#foo@override$170 + br $__inlined_func$class-overloading/IA#foo@override$169 end unreachable end 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 b1418a45d3..20ae60ce05 100644 --- a/tests/compiler/class-override.release.wat +++ b/tests/compiler/class-override.release.wat @@ -126,7 +126,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 @@ -150,7 +150,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 @@ -1152,7 +1152,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 @@ -1169,7 +1169,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 @@ -1631,7 +1631,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 @@ -1647,7 +1647,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 @@ -1673,7 +1673,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 992b686367..9eaeb42be5 100644 --- a/tests/compiler/class.release.wat +++ b/tests/compiler/class.release.wat @@ -109,7 +109,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 @@ -133,7 +133,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 @@ -1237,7 +1237,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 @@ -1254,7 +1254,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 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 bf036d6c77..0c88a65104 100644 --- a/tests/compiler/constructor.release.wat +++ b/tests/compiler/constructor.release.wat @@ -181,7 +181,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 @@ -205,7 +205,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 @@ -1290,7 +1290,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 @@ -1307,7 +1307,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 1b1313c49a..d069c47e7c 100644 --- a/tests/compiler/do.release.wat +++ b/tests/compiler/do.release.wat @@ -117,7 +117,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 @@ -141,7 +141,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 @@ -1143,7 +1143,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 @@ -1160,7 +1160,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 100107f6b6..6b747d969b 100644 --- a/tests/compiler/duplicate-fields.release.wat +++ b/tests/compiler/duplicate-fields.release.wat @@ -116,7 +116,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 @@ -140,7 +140,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 @@ -1244,7 +1244,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 @@ -1261,7 +1261,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-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 605d4f43c8..a941d2dd24 100644 --- a/tests/compiler/empty-exportruntime.release.wat +++ b/tests/compiler/empty-exportruntime.release.wat @@ -1245,7 +1245,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 @@ -1262,7 +1262,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 21625b2ae4..1ba54cbd3c 100644 --- a/tests/compiler/empty-new.release.wat +++ b/tests/compiler/empty-new.release.wat @@ -114,7 +114,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 @@ -138,7 +138,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 @@ -1140,7 +1140,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 @@ -1157,7 +1157,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 fbd6f1e267..f8a2599ca7 100644 --- a/tests/compiler/exportstar-rereexport.release.wat +++ b/tests/compiler/exportstar-rereexport.release.wat @@ -148,7 +148,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 @@ -172,7 +172,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 @@ -1174,7 +1174,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 @@ -1191,7 +1191,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 280a9a62c3..36e65e3ad9 100644 --- a/tests/compiler/extends-baseaggregate.release.wat +++ b/tests/compiler/extends-baseaggregate.release.wat @@ -120,7 +120,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 @@ -144,7 +144,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 @@ -1248,7 +1248,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 @@ -1265,7 +1265,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 @@ -1933,7 +1933,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 @@ -1976,7 +1976,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 b00fbf4cd8..e2507feef4 100644 --- a/tests/compiler/extends-recursive.release.wat +++ b/tests/compiler/extends-recursive.release.wat @@ -115,7 +115,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 @@ -139,7 +139,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 @@ -1224,7 +1224,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 @@ -1241,7 +1241,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 6f87390f7f..ad4c580e18 100644 --- a/tests/compiler/field-initialization.release.wat +++ b/tests/compiler/field-initialization.release.wat @@ -120,7 +120,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 @@ -144,7 +144,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 @@ -1248,7 +1248,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 @@ -1265,7 +1265,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 @@ -1883,7 +1883,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 @@ -1903,7 +1903,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 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 415b3934d5..c85ad0c24f 100644 --- a/tests/compiler/field.release.wat +++ b/tests/compiler/field.release.wat @@ -103,7 +103,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 @@ -127,7 +127,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 @@ -1231,7 +1231,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 @@ -1248,7 +1248,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/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 4f07612e6c..ef839d771a 100644 --- a/tests/compiler/for.release.wat +++ b/tests/compiler/for.release.wat @@ -117,7 +117,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 @@ -141,7 +141,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 @@ -1143,7 +1143,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 @@ -1160,7 +1160,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 fa80a471b8..046544610f 100644 --- a/tests/compiler/function-call.release.wat +++ b/tests/compiler/function-call.release.wat @@ -155,7 +155,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 @@ -179,7 +179,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 @@ -1181,7 +1181,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 @@ -1198,7 +1198,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 15aa15e36f..bb1d0c5cad 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 9272f39796..e9465c6f2d 100644 --- a/tests/compiler/function-expression.release.wat +++ b/tests/compiler/function-expression.release.wat @@ -166,7 +166,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 @@ -190,7 +190,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 @@ -1211,7 +1211,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 @@ -1228,7 +1228,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 b31fd6bd03..a183fc70c1 100644 --- a/tests/compiler/getter-call.release.wat +++ b/tests/compiler/getter-call.release.wat @@ -120,7 +120,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 @@ -144,7 +144,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 @@ -1146,7 +1146,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 @@ -1163,7 +1163,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 14a0518c9b..5053f94c8e 100644 --- a/tests/compiler/heap.release.wat +++ b/tests/compiler/heap.release.wat @@ -1044,7 +1044,7 @@ call $~lib/rt/tlsf/moveBlock local.set $0 else - block $__inlined_func$~lib/rt/tlsf/reallocateBlock$53 + block $__inlined_func$~lib/rt/tlsf/reallocateBlock$52 global.get $~lib/rt/tlsf/ROOT local.set $3 local.get $0 @@ -1065,7 +1065,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 @@ -1106,7 +1106,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 709def24e2..5189bea8ac 100644 --- a/tests/compiler/incremental-gc/call-indirect.release.wat +++ b/tests/compiler/incremental-gc/call-indirect.release.wat @@ -123,7 +123,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 @@ -147,7 +147,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 @@ -1232,7 +1232,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 @@ -1249,7 +1249,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 07fd25eb5e..9876096b2b 100644 --- a/tests/compiler/infer-array.release.wat +++ b/tests/compiler/infer-array.release.wat @@ -142,7 +142,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 @@ -166,7 +166,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 @@ -1270,7 +1270,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 @@ -1287,7 +1287,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 @@ -2079,7 +2079,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 $4 i32.const 1 @@ -2122,7 +2122,7 @@ i32.store offset=16 local.get $4 local.set $3 - br $__inlined_func$~lib/rt/itcms/__renew$149 + br $__inlined_func$~lib/rt/itcms/__renew$148 end local.get $5 local.get $7 diff --git a/tests/compiler/infer-generic.debug.wat b/tests/compiler/infer-generic.debug.wat index 4eba1f7c8d..90ac910b24 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 bfd2ec7d06..8db83cedc1 100644 --- a/tests/compiler/infer-generic.release.wat +++ b/tests/compiler/infer-generic.release.wat @@ -144,7 +144,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 @@ -168,7 +168,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 @@ -1253,7 +1253,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 @@ -1270,7 +1270,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 d8a449feae..f302445c8c 100644 --- a/tests/compiler/inlining.release.wat +++ b/tests/compiler/inlining.release.wat @@ -134,7 +134,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 @@ -158,7 +158,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 @@ -1243,7 +1243,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 @@ -1260,7 +1260,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 bdbf1e3b54..ff3dd6ae0f 100644 --- a/tests/compiler/instanceof.release.wat +++ b/tests/compiler/instanceof.release.wat @@ -222,7 +222,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 @@ -246,7 +246,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 @@ -1248,7 +1248,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 @@ -1265,7 +1265,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 @@ -1492,7 +1492,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 @@ -1504,7 +1504,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 @@ -1549,7 +1549,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 @@ -1564,7 +1564,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 @@ -1656,7 +1656,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 @@ -1671,7 +1671,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 @@ -2405,7 +2405,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 @@ -2420,7 +2420,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 @@ -2450,7 +2450,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 @@ -2465,7 +2465,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 @@ -2509,7 +2509,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 @@ -2524,7 +2524,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 @@ -2569,7 +2569,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 @@ -2584,7 +2584,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 @@ -2648,7 +2648,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 @@ -2663,7 +2663,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 @@ -2717,7 +2717,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 @@ -2732,7 +2732,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 @@ -2787,7 +2787,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 @@ -2802,7 +2802,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 b5ae2294e0..a0d1ff8751 100644 --- a/tests/compiler/issues/1095.release.wat +++ b/tests/compiler/issues/1095.release.wat @@ -106,7 +106,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 @@ -130,7 +130,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 @@ -1234,7 +1234,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 @@ -1251,7 +1251,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 10fcd3691c..65e637628a 100644 --- a/tests/compiler/issues/1225.release.wat +++ b/tests/compiler/issues/1225.release.wat @@ -126,7 +126,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 @@ -150,7 +150,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 @@ -1152,7 +1152,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 @@ -1169,7 +1169,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 0ba5679b98..1d97a1fad2 100644 --- a/tests/compiler/issues/1699.release.wat +++ b/tests/compiler/issues/1699.release.wat @@ -113,7 +113,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 @@ -137,7 +137,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 @@ -1241,7 +1241,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 @@ -1258,7 +1258,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 @@ -2129,7 +2129,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 $4 i32.const 1 @@ -2172,7 +2172,7 @@ i32.store offset=16 local.get $4 local.set $3 - br $__inlined_func$~lib/rt/itcms/__renew$145 + br $__inlined_func$~lib/rt/itcms/__renew$144 end local.get $5 local.get $7 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 d445b2d6cd..5da0871442 100644 --- a/tests/compiler/issues/2166.release.wat +++ b/tests/compiler/issues/2166.release.wat @@ -126,7 +126,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 @@ -150,7 +150,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 @@ -1152,7 +1152,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 @@ -1169,7 +1169,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 @@ -1719,7 +1719,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 @@ -1739,7 +1739,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 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 026f2c493b..43561d7f18 100644 --- a/tests/compiler/issues/2322/index.release.wat +++ b/tests/compiler/issues/2322/index.release.wat @@ -116,7 +116,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 @@ -140,7 +140,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 @@ -1225,7 +1225,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 @@ -1242,7 +1242,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 885743588e..9265b77954 100644 --- a/tests/compiler/issues/2622.release.wat +++ b/tests/compiler/issues/2622.release.wat @@ -155,7 +155,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 @@ -179,7 +179,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 @@ -1181,7 +1181,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 @@ -1198,7 +1198,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 58a64cf649..737e73469c 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 980e20a05d..156e0f3b41 100644 --- a/tests/compiler/issues/2707.release.wat +++ b/tests/compiler/issues/2707.release.wat @@ -109,7 +109,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 @@ -133,7 +133,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 @@ -1154,7 +1154,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 @@ -1171,7 +1171,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/2730.debug.wat b/tests/compiler/issues/2730.debug.wat new file mode 100644 index 0000000000..d57fe78af1 --- /dev/null +++ b/tests/compiler/issues/2730.debug.wat @@ -0,0 +1,3730 @@ +(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 $issues/2730/box (mut i32) (i32.const 0)) + (global $issues/2730/boxCalls (mut i32) (i32.const 0)) + (global $issues/2730/arr (mut i32) (i32.const 464)) + (global $issues/2730/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 640)) + (global $~lib/memory/__data_end i32 (i32.const 668)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 33436)) + (global $~lib/memory/__heap_base i32 (i32.const 33436)) + (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\00\1c\00\00\00i\00s\00s\00u\00e\00s\00/\002\007\003\000\00.\00t\00s\00") + (data $11 (i32.const 540) ",\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 588) ",\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 640) "\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 $issues/2730/Box#set:value (param $this i32) (param $value i32) + local.get $this + local.get $value + i32.store + ) + (func $issues/2730/getBox (result i32) + global.get $issues/2730/boxCalls + i32.const 1 + i32.add + global.set $issues/2730/boxCalls + global.get $issues/2730/box + return + ) + (func $issues/2730/Box#get:value (param $this i32) (result i32) + local.get $this + i32.load + ) + (func $issues/2730/assertOneBoxCall + global.get $issues/2730/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 $issues/2730/getIndex (result i32) + global.get $issues/2730/idxCalls + i32.const 1 + i32.add + global.set $issues/2730/idxCalls + i32.const 0 + return + ) + (func $start:issues/2730 + (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 $issues/2730/Box#constructor + global.set $issues/2730/box + call $issues/2730/testPropertyCompoundAssignments + call $issues/2730/testElementCompoundAssignments + ) + (func $~lib/rt/__visit_globals (param $0 i32) + (local $1 i32) + global.get $issues/2730/box + local.tee $1 + if + local.get $1 + local.get $0 + call $~lib/rt/itcms/__visit + end + global.get $issues/2730/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 608 + 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 $issues/2730/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 $issues/2730/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:issues/2730 + ) + (func $~stack_check + global.get $~lib/memory/__stack_pointer + global.get $~lib/memory/__data_end + i32.lt_s + if + i32.const 33456 + i32.const 33504 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + ) + (func $issues/2730/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 $issues/2730/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 $issues/2730/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 $issues/2730/box + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store + local.get $1 + local.get $value + call $issues/2730/Box#set:value + i32.const 0 + global.set $issues/2730/boxCalls + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $issues/2730/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 $issues/2730/resetBox + global.get $~lib/memory/__stack_pointer + call $issues/2730/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 $issues/2730/Box#get:value + i32.const 2 + i32.add + call $issues/2730/Box#set:value + global.get $issues/2730/box + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + call $issues/2730/Box#get:value + i32.const 10 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 33 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + call $issues/2730/assertOneBoxCall + i32.const 8 + call $issues/2730/resetBox + global.get $~lib/memory/__stack_pointer + call $issues/2730/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 $issues/2730/Box#get:value + i32.const 3 + i32.sub + call $issues/2730/Box#set:value + global.get $issues/2730/box + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + call $issues/2730/Box#get:value + i32.const 5 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 38 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + call $issues/2730/assertOneBoxCall + i32.const 8 + call $issues/2730/resetBox + global.get $~lib/memory/__stack_pointer + call $issues/2730/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 $issues/2730/Box#get:value + i32.const 3 + i32.mul + call $issues/2730/Box#set:value + global.get $issues/2730/box + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + call $issues/2730/Box#get:value + i32.const 24 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 43 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + call $issues/2730/assertOneBoxCall + i32.const 8 + call $issues/2730/resetBox + global.get $~lib/memory/__stack_pointer + call $issues/2730/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 $issues/2730/Box#get:value + i32.const 2 + i32.div_s + call $issues/2730/Box#set:value + global.get $issues/2730/box + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + call $issues/2730/Box#get:value + i32.const 4 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 48 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + call $issues/2730/assertOneBoxCall + i32.const 8 + call $issues/2730/resetBox + global.get $~lib/memory/__stack_pointer + call $issues/2730/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 $issues/2730/Box#get:value + i32.const 3 + i32.rem_s + call $issues/2730/Box#set:value + global.get $issues/2730/box + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + call $issues/2730/Box#get:value + i32.const 2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 53 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + call $issues/2730/assertOneBoxCall + i32.const 8 + call $issues/2730/resetBox + global.get $~lib/memory/__stack_pointer + call $issues/2730/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 $issues/2730/Box#get:value + i32.const 1 + i32.shl + call $issues/2730/Box#set:value + global.get $issues/2730/box + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + call $issues/2730/Box#get:value + i32.const 16 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 58 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + call $issues/2730/assertOneBoxCall + i32.const 8 + call $issues/2730/resetBox + global.get $~lib/memory/__stack_pointer + call $issues/2730/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 $issues/2730/Box#get:value + i32.const 1 + i32.shr_s + call $issues/2730/Box#set:value + global.get $issues/2730/box + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + call $issues/2730/Box#get:value + i32.const 4 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 63 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + call $issues/2730/assertOneBoxCall + i32.const -8 + call $issues/2730/resetBox + global.get $~lib/memory/__stack_pointer + call $issues/2730/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 $issues/2730/Box#get:value + i32.const 1 + i32.shr_u + call $issues/2730/Box#set:value + global.get $issues/2730/box + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + call $issues/2730/Box#get:value + i32.const 2147483644 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 68 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + call $issues/2730/assertOneBoxCall + i32.const 10 + call $issues/2730/resetBox + global.get $~lib/memory/__stack_pointer + call $issues/2730/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 $issues/2730/Box#get:value + i32.const 3 + i32.and + call $issues/2730/Box#set:value + global.get $issues/2730/box + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + call $issues/2730/Box#get:value + i32.const 2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 73 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + call $issues/2730/assertOneBoxCall + i32.const 8 + call $issues/2730/resetBox + global.get $~lib/memory/__stack_pointer + call $issues/2730/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 $issues/2730/Box#get:value + i32.const 3 + i32.or + call $issues/2730/Box#set:value + global.get $issues/2730/box + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + call $issues/2730/Box#get:value + i32.const 11 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 78 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + call $issues/2730/assertOneBoxCall + i32.const 8 + call $issues/2730/resetBox + global.get $~lib/memory/__stack_pointer + call $issues/2730/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 $issues/2730/Box#get:value + i32.const 3 + i32.xor + call $issues/2730/Box#set:value + global.get $issues/2730/box + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + call $issues/2730/Box#get:value + i32.const 11 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 83 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + call $issues/2730/assertOneBoxCall + i32.const 3 + call $issues/2730/resetBox + global.get $~lib/memory/__stack_pointer + call $issues/2730/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 $issues/2730/Box#get:value + i32.const 2 + call $~lib/math/ipow32 + call $issues/2730/Box#set:value + global.get $issues/2730/box + local.set $12 + global.get $~lib/memory/__stack_pointer + local.get $12 + i32.store offset=4 + local.get $12 + call $issues/2730/Box#get:value + i32.const 9 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 512 + i32.const 88 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + call $issues/2730/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 608 + i32.const 560 + 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 560 + 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 560 + 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 $issues/2730/testElementCompoundAssignments + (local $0 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 + i32.const 0 + global.set $issues/2730/idxCalls + global.get $issues/2730/arr + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store + local.get $1 + i32.const 0 + i32.const 1 + call $~lib/array/Array#__set + call $issues/2730/getIndex + local.set $0 + global.get $issues/2730/arr + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store + local.get $1 + local.get $0 + global.get $issues/2730/arr + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store offset=4 + local.get $1 + local.get $0 + call $~lib/array/Array#__get + i32.const 2 + i32.or + call $~lib/array/Array#__set + global.get $issues/2730/arr + local.set $1 + global.get $~lib/memory/__stack_pointer + local.get $1 + i32.store + local.get $1 + 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 $issues/2730/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 8 + 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/issues/2730.release.wat b/tests/compiler/issues/2730.release.wat new file mode 100644 index 0000000000..21f2a1aa2b --- /dev/null +++ b/tests/compiler/issues/2730.release.wat @@ -0,0 +1,2586 @@ +(module + (type $0 (func (param i32))) + (type $1 (func)) + (type $2 (func (param i32 i32))) + (type $3 (func (result i32))) + (type $4 (func (param i32 i32) (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 $issues/2730/box (mut i32) (i32.const 0)) + (global $issues/2730/boxCalls (mut i32) (i32.const 0)) + (global $issues/2730/idxCalls (mut i32) (i32.const 0)) + (global $~lib/memory/__stack_pointer (mut i32) (i32.const 34460)) + (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\00\1c\00\00\00i\00s\00s\00u\00e\00s\00/\002\007\003\000\00.\00t\00s") + (data $11 (i32.const 1564) ",") + (data $11.1 (i32.const 1576) "\02\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data $12 (i32.const 1612) ",") + (data $12.1 (i32.const 1624) "\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 1664) "\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 $~lib/rt/itcms/visitRoots + (local $0 i32) + (local $1 i32) + global.get $issues/2730/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 1632 + 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/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 34460 + 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 1664 + 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 1668 + 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/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/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/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 34464 + i32.const 0 + i32.store + i32.const 36032 + 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 34464 + 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 34464 + 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 34464 + i32.const 36036 + memory.size + i64.extend_i32_s + i64.const 16 + i64.shl + call $~lib/rt/tlsf/addMemory + i32.const 34464 + global.set $~lib/rt/tlsf/ROOT + ) + (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 34460 + 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 34460 + 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 34460 + 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 $~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/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 + memory.size + local.tee $2 + 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 + local.get $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.tee $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/__visit_members (param $0 i32) + block $invalid + block $~lib/array/Array + block $issues/2730/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 $issues/2730/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 1692 + i32.lt_s + if + i32.const 34480 + i32.const 34528 + 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 $~start + (local $0 i32) + (local $1 i32) + block $__inlined_func$start:issues/2730 + memory.size + i32.const 16 + i32.shl + i32.const 34460 + 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 1692 + 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 1692 + 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 $issues/2730/box + call $issues/2730/testPropertyCompoundAssignments + global.get $~lib/memory/__stack_pointer + i32.const 8 + i32.sub + global.set $~lib/memory/__stack_pointer + global.get $~lib/memory/__stack_pointer + i32.const 1692 + i32.lt_s + br_if $folding-inner0 + global.get $~lib/memory/__stack_pointer + i64.const 0 + i64.store + i32.const 0 + global.set $issues/2730/idxCalls + global.get $~lib/memory/__stack_pointer + i32.const 1488 + i32.store + i32.const 1 + call $~lib/array/Array#__set + global.get $issues/2730/idxCalls + i32.const 1 + i32.add + global.set $issues/2730/idxCalls + global.get $~lib/memory/__stack_pointer + i32.const 1488 + i32.store + global.get $~lib/memory/__stack_pointer + i32.const 1488 + i32.store offset=4 + 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 $issues/2730/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 8 + i32.add + global.set $~lib/memory/__stack_pointer + br $__inlined_func$start:issues/2730 + end + i32.const 34480 + i32.const 34528 + i32.const 1 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + ) + (func $issues/2730/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 1692 + i32.lt_s + if + i32.const 34480 + i32.const 34528 + 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 $issues/2730/box + local.tee $1 + i32.store + local.get $1 + local.get $0 + i32.store + i32.const 0 + global.set $issues/2730/boxCalls + global.get $~lib/memory/__stack_pointer + i32.const 4 + i32.add + global.set $~lib/memory/__stack_pointer + ) + (func $issues/2730/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 1692 + i32.lt_s + if + i32.const 34480 + i32.const 34528 + 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 $issues/2730/resetBox + global.get $issues/2730/boxCalls + i32.const 1 + i32.add + global.set $issues/2730/boxCalls + global.get $~lib/memory/__stack_pointer + global.get $issues/2730/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 $issues/2730/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 33 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + block $folding-inner0 + global.get $issues/2730/boxCalls + i32.const 1 + i32.ne + br_if $folding-inner0 + i32.const 8 + call $issues/2730/resetBox + global.get $issues/2730/boxCalls + i32.const 1 + i32.add + global.set $issues/2730/boxCalls + global.get $~lib/memory/__stack_pointer + global.get $issues/2730/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 $issues/2730/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 38 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $issues/2730/boxCalls + i32.const 1 + i32.ne + br_if $folding-inner0 + i32.const 8 + call $issues/2730/resetBox + global.get $issues/2730/boxCalls + i32.const 1 + i32.add + global.set $issues/2730/boxCalls + global.get $~lib/memory/__stack_pointer + global.get $issues/2730/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 $issues/2730/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 43 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $issues/2730/boxCalls + i32.const 1 + i32.ne + br_if $folding-inner0 + i32.const 8 + call $issues/2730/resetBox + global.get $issues/2730/boxCalls + i32.const 1 + i32.add + global.set $issues/2730/boxCalls + global.get $~lib/memory/__stack_pointer + global.get $issues/2730/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 $issues/2730/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 48 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $issues/2730/boxCalls + i32.const 1 + i32.ne + br_if $folding-inner0 + i32.const 8 + call $issues/2730/resetBox + global.get $issues/2730/boxCalls + i32.const 1 + i32.add + global.set $issues/2730/boxCalls + global.get $~lib/memory/__stack_pointer + global.get $issues/2730/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 $issues/2730/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 53 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $issues/2730/boxCalls + i32.const 1 + i32.ne + br_if $folding-inner0 + i32.const 8 + call $issues/2730/resetBox + global.get $issues/2730/boxCalls + i32.const 1 + i32.add + global.set $issues/2730/boxCalls + global.get $~lib/memory/__stack_pointer + global.get $issues/2730/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 $issues/2730/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 58 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $issues/2730/boxCalls + i32.const 1 + i32.ne + br_if $folding-inner0 + i32.const 8 + call $issues/2730/resetBox + global.get $issues/2730/boxCalls + i32.const 1 + i32.add + global.set $issues/2730/boxCalls + global.get $~lib/memory/__stack_pointer + global.get $issues/2730/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 $issues/2730/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 63 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $issues/2730/boxCalls + i32.const 1 + i32.ne + br_if $folding-inner0 + i32.const -8 + call $issues/2730/resetBox + global.get $issues/2730/boxCalls + i32.const 1 + i32.add + global.set $issues/2730/boxCalls + global.get $~lib/memory/__stack_pointer + global.get $issues/2730/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 $issues/2730/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 68 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $issues/2730/boxCalls + i32.const 1 + i32.ne + br_if $folding-inner0 + i32.const 10 + call $issues/2730/resetBox + global.get $issues/2730/boxCalls + i32.const 1 + i32.add + global.set $issues/2730/boxCalls + global.get $~lib/memory/__stack_pointer + global.get $issues/2730/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 $issues/2730/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 73 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $issues/2730/boxCalls + i32.const 1 + i32.ne + br_if $folding-inner0 + i32.const 8 + call $issues/2730/resetBox + global.get $issues/2730/boxCalls + i32.const 1 + i32.add + global.set $issues/2730/boxCalls + global.get $~lib/memory/__stack_pointer + global.get $issues/2730/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 $issues/2730/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 78 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $issues/2730/boxCalls + i32.const 1 + i32.ne + br_if $folding-inner0 + i32.const 8 + call $issues/2730/resetBox + global.get $issues/2730/boxCalls + i32.const 1 + i32.add + global.set $issues/2730/boxCalls + global.get $~lib/memory/__stack_pointer + global.get $issues/2730/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 $issues/2730/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 83 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $issues/2730/boxCalls + i32.const 1 + i32.ne + br_if $folding-inner0 + i32.const 3 + call $issues/2730/resetBox + global.get $issues/2730/boxCalls + i32.const 1 + i32.add + global.set $issues/2730/boxCalls + global.get $~lib/memory/__stack_pointer + global.get $issues/2730/box + local.tee $0 + i32.store offset=52 + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=4 + local.get $0 + block $__inlined_func$~lib/math/ipow32$141 (result i32) + global.get $~lib/memory/__stack_pointer + local.get $0 + i32.store offset=8 + i32.const 4 + local.get $0 + i32.load + local.tee $0 + i32.const 2 + i32.eq + br_if $__inlined_func$~lib/math/ipow32$141 + drop + local.get $0 + local.get $0 + i32.mul + end + i32.store + global.get $~lib/memory/__stack_pointer + global.get $issues/2730/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 88 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $issues/2730/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 + ) + (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 1692 + 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 1692 + 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 34480 + i32.const 34528 + 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 1692 + i32.lt_s + if + i32.const 34480 + i32.const 34528 + 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 1584 + 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 + ) +) diff --git a/tests/compiler/issues/2730.ts b/tests/compiler/issues/2730.ts new file mode 100644 index 0000000000..7780999d87 --- /dev/null +++ b/tests/compiler/issues/2730.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); +} + +let arr = [1, 2]; +let idxCalls: i32 = 0; + +function getIndex(): i32 { + idxCalls++; + return 0; +} + +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(); +} + +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/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 7cc4d874f8..7cf2ada359 100644 --- a/tests/compiler/issues/2873.release.wat +++ b/tests/compiler/issues/2873.release.wat @@ -1335,7 +1335,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 @@ -1359,7 +1359,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 @@ -2444,7 +2444,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 @@ -2461,7 +2461,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 @@ -3078,7 +3078,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 @@ -3092,7 +3092,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 @@ -3105,7 +3105,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 @@ -3201,7 +3201,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 @@ -3267,7 +3267,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 @@ -3281,7 +3281,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 @@ -3294,7 +3294,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 @@ -3394,7 +3394,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 @@ -3546,7 +3546,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 @@ -3566,7 +3566,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 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 5147bdfca1..c9aa23605e 100644 --- a/tests/compiler/logical.release.wat +++ b/tests/compiler/logical.release.wat @@ -139,7 +139,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 @@ -163,7 +163,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 @@ -1165,7 +1165,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 @@ -1182,7 +1182,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 62f92354e5..0918aaf2f0 100644 --- a/tests/compiler/managed-cast.release.wat +++ b/tests/compiler/managed-cast.release.wat @@ -121,7 +121,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 @@ -145,7 +145,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 @@ -1147,7 +1147,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 @@ -1164,7 +1164,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 @@ -1534,7 +1534,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $__inlined_func$~instanceof|managed-cast/Cat$85 (result i32) + block $__inlined_func$~instanceof|managed-cast/Cat$84 (result i32) global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=4 @@ -1545,7 +1545,7 @@ i32.load i32.const 4 i32.ne - br_if $__inlined_func$~instanceof|managed-cast/Cat$85 + br_if $__inlined_func$~instanceof|managed-cast/Cat$84 drop i32.const 1 end @@ -1584,7 +1584,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store offset=8 - block $__inlined_func$~instanceof|managed-cast/Cat$88 (result i32) + block $__inlined_func$~instanceof|managed-cast/Cat$87 (result i32) global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=4 @@ -1608,7 +1608,7 @@ i32.load i32.const 4 i32.ne - br_if $__inlined_func$~instanceof|managed-cast/Cat$88 + br_if $__inlined_func$~instanceof|managed-cast/Cat$87 drop i32.const 1 end @@ -1648,7 +1648,7 @@ i32.const 0 i32.store offset=8 global.get $~lib/memory/__stack_pointer - block $__inlined_func$~instanceof|managed-cast/Cat$91 (result i32) + block $__inlined_func$~instanceof|managed-cast/Cat$90 (result i32) global.get $~lib/memory/__stack_pointer local.get $0 i32.store @@ -1659,7 +1659,7 @@ i32.load i32.const 4 i32.ne - br_if $__inlined_func$~instanceof|managed-cast/Cat$91 + br_if $__inlined_func$~instanceof|managed-cast/Cat$90 drop i32.const 1 end 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 af7e02c097..fb01fbc091 100644 --- a/tests/compiler/new.release.wat +++ b/tests/compiler/new.release.wat @@ -157,7 +157,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 @@ -181,7 +181,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 @@ -1183,7 +1183,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 @@ -1200,7 +1200,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 5fbdeb3b8b..bf56aed2c7 100644 --- a/tests/compiler/number.release.wat +++ b/tests/compiler/number.release.wat @@ -166,7 +166,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 @@ -190,7 +190,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 @@ -1275,7 +1275,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 @@ -1292,7 +1292,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 @@ -1693,7 +1693,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 @@ -1703,7 +1703,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 @@ -2674,7 +2674,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 @@ -2694,7 +2694,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 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 e1bb4a66e6..91b8197b9a 100644 --- a/tests/compiler/object-literal.release.wat +++ b/tests/compiler/object-literal.release.wat @@ -71,7 +71,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 @@ -95,7 +95,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 @@ -1506,7 +1506,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 @@ -1523,7 +1523,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 @@ -1782,7 +1782,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 @@ -1802,7 +1802,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 @@ -2478,7 +2478,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 @@ -2499,7 +2499,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 @@ -2516,7 +2516,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 177a9d0d5c..22e03a3f64 100644 --- a/tests/compiler/operator-overload-non-ambiguity.release.wat +++ b/tests/compiler/operator-overload-non-ambiguity.release.wat @@ -117,7 +117,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 @@ -141,7 +141,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 @@ -1143,7 +1143,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 @@ -1160,7 +1160,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/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 86224fcc4c..ae5da630ef 100644 --- a/tests/compiler/optional-typeparameters.release.wat +++ b/tests/compiler/optional-typeparameters.release.wat @@ -143,7 +143,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 @@ -167,7 +167,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 @@ -1169,7 +1169,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 @@ -1186,7 +1186,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/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 a96b58bb2b..9fdffab58a 100644 --- a/tests/compiler/reexport.release.wat +++ b/tests/compiler/reexport.release.wat @@ -150,7 +150,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 @@ -174,7 +174,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 @@ -1176,7 +1176,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 @@ -1193,7 +1193,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 f61fba72ac..12edfc31ea 100644 --- a/tests/compiler/rereexport.release.wat +++ b/tests/compiler/rereexport.release.wat @@ -148,7 +148,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 @@ -172,7 +172,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 @@ -1174,7 +1174,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 @@ -1191,7 +1191,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 bc5cd261d7..927f9bad9d 100644 --- a/tests/compiler/resolve-access.release.wat +++ b/tests/compiler/resolve-access.release.wat @@ -124,7 +124,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 @@ -148,7 +148,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 @@ -1252,7 +1252,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 @@ -1269,7 +1269,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 @@ -1671,7 +1671,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 @@ -1681,7 +1681,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 @@ -2339,7 +2339,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 @@ -2349,7 +2349,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 d7685c983c..1ceca94904 100644 --- a/tests/compiler/resolve-binary.release.wat +++ b/tests/compiler/resolve-binary.release.wat @@ -348,7 +348,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 @@ -372,7 +372,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 @@ -1457,7 +1457,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 @@ -1474,7 +1474,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 @@ -1875,7 +1875,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 @@ -1885,7 +1885,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 @@ -3017,7 +3017,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 @@ -3037,7 +3037,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 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 82fe5bde30..02020238ee 100644 --- a/tests/compiler/resolve-function-expression.release.wat +++ b/tests/compiler/resolve-function-expression.release.wat @@ -158,7 +158,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 @@ -182,7 +182,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 @@ -1274,7 +1274,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 @@ -1284,7 +1284,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 @@ -1364,7 +1364,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 @@ -1381,7 +1381,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 @@ -2008,7 +2008,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 @@ -2028,7 +2028,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 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 2a19017969..97bad9f075 100644 --- a/tests/compiler/resolve-new.release.wat +++ b/tests/compiler/resolve-new.release.wat @@ -122,7 +122,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 @@ -146,7 +146,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 @@ -1148,7 +1148,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 @@ -1165,7 +1165,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 9ac4eb9778..c2f05bc7ec 100644 --- a/tests/compiler/resolve-propertyaccess.release.wat +++ b/tests/compiler/resolve-propertyaccess.release.wat @@ -157,7 +157,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 @@ -181,7 +181,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 @@ -1266,7 +1266,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 @@ -1283,7 +1283,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 @@ -1582,7 +1582,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 @@ -1592,7 +1592,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 @@ -1923,7 +1923,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 @@ -1943,7 +1943,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 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 91b5b3d064..5a9b498501 100644 --- a/tests/compiler/resolve-ternary.release.wat +++ b/tests/compiler/resolve-ternary.release.wat @@ -163,7 +163,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 @@ -187,7 +187,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 @@ -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 $1 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 $1 i32.const 0 @@ -2883,7 +2883,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 @@ -2903,7 +2903,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 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 b2115a2271..124f4bccd6 100644 --- a/tests/compiler/resolve-unary.release.wat +++ b/tests/compiler/resolve-unary.release.wat @@ -183,7 +183,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 @@ -207,7 +207,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 @@ -1292,7 +1292,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 @@ -1309,7 +1309,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 @@ -1608,7 +1608,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 @@ -1618,7 +1618,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 @@ -1983,7 +1983,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 @@ -2003,7 +2003,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 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 df64ee697c..89e3598f2b 100644 --- a/tests/compiler/return-unreachable.release.wat +++ b/tests/compiler/return-unreachable.release.wat @@ -108,7 +108,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 @@ -132,7 +132,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 @@ -1236,7 +1236,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 @@ -1253,7 +1253,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 5d8331afd3..23d97a16f4 100644 --- a/tests/compiler/rt/finalize.release.wat +++ b/tests/compiler/rt/finalize.release.wat @@ -120,7 +120,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 @@ -144,7 +144,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 @@ -1161,7 +1161,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 @@ -1178,7 +1178,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 0665cfc0ef..46d615a7a9 100644 --- a/tests/compiler/rt/issue-2719.release.wat +++ b/tests/compiler/rt/issue-2719.release.wat @@ -117,7 +117,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 @@ -141,7 +141,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 @@ -1226,7 +1226,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 @@ -1243,7 +1243,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 605d4f43c8..a941d2dd24 100644 --- a/tests/compiler/rt/runtime-incremental-export.release.wat +++ b/tests/compiler/rt/runtime-incremental-export.release.wat @@ -1245,7 +1245,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 @@ -1262,7 +1262,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 a554a20ba2..408442d12b 100644 --- a/tests/compiler/simd.release.wat +++ b/tests/compiler/simd.release.wat @@ -133,7 +133,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 @@ -157,7 +157,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 @@ -1458,7 +1458,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 @@ -1475,7 +1475,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 d53285989a..0791c20364 100644 --- a/tests/compiler/std/array-literal.release.wat +++ b/tests/compiler/std/array-literal.release.wat @@ -163,7 +163,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 @@ -187,7 +187,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 @@ -1291,7 +1291,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 @@ -1308,7 +1308,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 @@ -1967,7 +1967,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 @@ -2010,7 +2010,7 @@ i32.store offset=16 local.get $2 local.set $1 - 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 7c585db17c..d21df8e620 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 45106a414b..77886a938d 100644 --- a/tests/compiler/std/array.release.wat +++ b/tests/compiler/std/array.release.wat @@ -758,7 +758,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$731 + block $__inlined_func$~lib/rt/itcms/Object#unlink$730 local.get $0 i32.load offset=4 i32.const -4 @@ -782,7 +782,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$731 + br $__inlined_func$~lib/rt/itcms/Object#unlink$730 end local.get $0 i32.load offset=8 @@ -2094,7 +2094,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 @@ -2111,7 +2111,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 @@ -6892,7 +6892,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 @@ -6917,7 +6917,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 @@ -7187,7 +7187,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 @@ -7209,7 +7209,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 @@ -7589,7 +7589,7 @@ select local.set $1 end - block $__inlined_func$~lib/rt/itcms/__renew$653 + block $__inlined_func$~lib/rt/itcms/__renew$652 local.get $3 i32.const 20 i32.sub @@ -7607,7 +7607,7 @@ i32.store offset=16 local.get $3 local.set $2 - br $__inlined_func$~lib/rt/itcms/__renew$653 + br $__inlined_func$~lib/rt/itcms/__renew$652 end local.get $1 local.get $4 @@ -13082,7 +13082,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=8 - block $__inlined_func$std/array/isSorted$658 (result i32) + block $__inlined_func$std/array/isSorted$657 (result i32) global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=8 @@ -13150,7 +13150,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 0 - br $__inlined_func$std/array/isSorted$658 + br $__inlined_func$std/array/isSorted$657 end local.get $0 i32.const 1 @@ -14387,7 +14387,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=8 - block $__inlined_func$std/array/isSorted<~lib/array/Array>$660 (result i32) + block $__inlined_func$std/array/isSorted<~lib/array/Array>$659 (result i32) global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=8 @@ -14470,7 +14470,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 0 - br $__inlined_func$std/array/isSorted<~lib/array/Array>$660 + br $__inlined_func$std/array/isSorted<~lib/array/Array>$659 end local.get $1 i32.const 1 @@ -14897,7 +14897,7 @@ global.get $~lib/memory/__stack_pointer local.get $1 i32.store - block $__inlined_func$~lib/string/String#concat$736 + block $__inlined_func$~lib/string/String#concat$735 local.get $1 i32.const 20 i32.sub @@ -14916,7 +14916,7 @@ global.set $~lib/memory/__stack_pointer i32.const 11568 local.set $0 - br $__inlined_func$~lib/string/String#concat$736 + br $__inlined_func$~lib/string/String#concat$735 end global.get $~lib/memory/__stack_pointer local.get $0 @@ -15105,7 +15105,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $__inlined_func$~lib/util/string/joinIntegerArray$738 + block $__inlined_func$~lib/util/string/joinIntegerArray$737 local.get $0 i32.const 1 i32.sub @@ -15119,7 +15119,7 @@ global.set $~lib/memory/__stack_pointer i32.const 11568 local.set $0 - br $__inlined_func$~lib/util/string/joinIntegerArray$738 + br $__inlined_func$~lib/util/string/joinIntegerArray$737 end local.get $7 i32.eqz @@ -15132,7 +15132,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$738 + br $__inlined_func$~lib/util/string/joinIntegerArray$737 end global.get $~lib/memory/__stack_pointer local.get $1 @@ -15231,7 +15231,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$738 + br $__inlined_func$~lib/util/string/joinIntegerArray$737 end global.get $~lib/memory/__stack_pointer i32.const 8 @@ -15297,7 +15297,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $__inlined_func$~lib/util/string/joinIntegerArray$739 + block $__inlined_func$~lib/util/string/joinIntegerArray$738 local.get $0 i32.const 1 i32.sub @@ -15311,7 +15311,7 @@ global.set $~lib/memory/__stack_pointer i32.const 11568 local.set $0 - br $__inlined_func$~lib/util/string/joinIntegerArray$739 + br $__inlined_func$~lib/util/string/joinIntegerArray$738 end local.get $7 i32.eqz @@ -15324,7 +15324,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$739 + br $__inlined_func$~lib/util/string/joinIntegerArray$738 end global.get $~lib/memory/__stack_pointer local.get $1 @@ -15423,7 +15423,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$739 + br $__inlined_func$~lib/util/string/joinIntegerArray$738 end global.get $~lib/memory/__stack_pointer i32.const 8 @@ -16202,7 +16202,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $__inlined_func$~lib/util/string/joinIntegerArray$740 + block $__inlined_func$~lib/util/string/joinIntegerArray$739 local.get $0 i32.const 1 i32.sub @@ -16216,7 +16216,7 @@ global.set $~lib/memory/__stack_pointer i32.const 11568 local.set $0 - br $__inlined_func$~lib/util/string/joinIntegerArray$740 + br $__inlined_func$~lib/util/string/joinIntegerArray$739 end local.get $6 i32.eqz @@ -16229,7 +16229,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$740 + br $__inlined_func$~lib/util/string/joinIntegerArray$739 end global.get $~lib/memory/__stack_pointer i32.const 11856 @@ -16322,7 +16322,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$740 + br $__inlined_func$~lib/util/string/joinIntegerArray$739 end global.get $~lib/memory/__stack_pointer i32.const 8 @@ -16398,7 +16398,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 @@ -16408,7 +16408,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 @@ -16747,7 +16747,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 @@ -16761,7 +16761,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 $6 i32.eqz @@ -16774,7 +16774,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 11856 @@ -16867,7 +16867,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 @@ -21106,7 +21106,7 @@ global.get $~lib/memory/__stack_pointer local.get $2 i32.store - block $__inlined_func$~lib/array/Array#indexOf$714 + block $__inlined_func$~lib/array/Array#indexOf$713 local.get $2 i32.load offset=12 local.tee $4 @@ -21122,7 +21122,7 @@ global.set $~lib/memory/__stack_pointer i32.const -1 local.set $0 - br $__inlined_func$~lib/array/Array#indexOf$714 + br $__inlined_func$~lib/array/Array#indexOf$713 end global.get $~lib/memory/__stack_pointer local.get $2 @@ -21148,7 +21148,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/array/Array#indexOf$714 + br $__inlined_func$~lib/array/Array#indexOf$713 end local.get $0 i32.const 1 @@ -21200,7 +21200,7 @@ global.get $~lib/memory/__stack_pointer local.get $2 i32.store - block $__inlined_func$~lib/array/Array#indexOf$715 + block $__inlined_func$~lib/array/Array#indexOf$714 local.get $2 i32.load offset=12 local.tee $4 @@ -21216,7 +21216,7 @@ global.set $~lib/memory/__stack_pointer i32.const -1 local.set $0 - br $__inlined_func$~lib/array/Array#indexOf$715 + br $__inlined_func$~lib/array/Array#indexOf$714 end global.get $~lib/memory/__stack_pointer local.get $2 @@ -21242,7 +21242,7 @@ i32.const 4 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/array/Array#indexOf$715 + br $__inlined_func$~lib/array/Array#indexOf$714 end local.get $0 i32.const 1 @@ -21553,7 +21553,7 @@ call $~lib/builtins/abort unreachable end - block $__inlined_func$~lib/array/Array#includes$716 (result i32) + block $__inlined_func$~lib/array/Array#includes$715 (result i32) i32.const 1 i32.const 2 i32.const 9 @@ -21593,7 +21593,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 0 - br $__inlined_func$~lib/array/Array#includes$716 + br $__inlined_func$~lib/array/Array#includes$715 end global.get $~lib/memory/__stack_pointer local.get $2 @@ -21621,7 +21621,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 1 - br $__inlined_func$~lib/array/Array#includes$716 + br $__inlined_func$~lib/array/Array#includes$715 end local.get $0 i32.const 1 @@ -21645,7 +21645,7 @@ call $~lib/builtins/abort unreachable end - block $__inlined_func$~lib/array/Array#includes$717 (result i32) + block $__inlined_func$~lib/array/Array#includes$716 (result i32) i32.const 1 i32.const 3 i32.const 12 @@ -21685,7 +21685,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 0 - br $__inlined_func$~lib/array/Array#includes$717 + br $__inlined_func$~lib/array/Array#includes$716 end global.get $~lib/memory/__stack_pointer local.get $2 @@ -21713,7 +21713,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 1 - br $__inlined_func$~lib/array/Array#includes$717 + br $__inlined_func$~lib/array/Array#includes$716 end local.get $0 i32.const 1 @@ -27067,7 +27067,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store offset=8 - block $__inlined_func$std/array/isSorted<~lib/string/String|null>$662 (result i32) + block $__inlined_func$std/array/isSorted<~lib/string/String|null>$661 (result i32) global.get $~lib/memory/__stack_pointer local.get $0 i32.store offset=8 @@ -27148,7 +27148,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 0 - br $__inlined_func$std/array/isSorted<~lib/string/String|null>$662 + br $__inlined_func$std/array/isSorted<~lib/string/String|null>$661 end local.get $1 i32.const 1 @@ -27180,7 +27180,7 @@ i32.const 12 i32.add global.set $~lib/memory/__stack_pointer - block $__inlined_func$std/array/isArraysEqual<~lib/string/String|null>$748 (result i32) + block $__inlined_func$std/array/isArraysEqual<~lib/string/String|null>$747 (result i32) global.get $~lib/memory/__stack_pointer local.get $0 i32.store @@ -27220,7 +27220,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 0 - br $__inlined_func$std/array/isArraysEqual<~lib/string/String|null>$748 + br $__inlined_func$std/array/isArraysEqual<~lib/string/String|null>$747 end local.get $0 local.get $2 @@ -27231,7 +27231,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 1 - br $__inlined_func$std/array/isArraysEqual<~lib/string/String|null>$748 + br $__inlined_func$std/array/isArraysEqual<~lib/string/String|null>$747 end i32.const 0 local.set $1 @@ -27291,7 +27291,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 0 - br $__inlined_func$std/array/isArraysEqual<~lib/string/String|null>$748 + br $__inlined_func$std/array/isArraysEqual<~lib/string/String|null>$747 end local.get $1 i32.const 1 @@ -27491,7 +27491,7 @@ global.get $~lib/memory/__stack_pointer i32.const 10032 i32.store - block $__inlined_func$~lib/string/String#charAt$737 + block $__inlined_func$~lib/string/String#charAt$736 local.get $12 i32.const 10028 i32.load @@ -27505,7 +27505,7 @@ global.set $~lib/memory/__stack_pointer i32.const 11568 local.set $2 - br $__inlined_func$~lib/string/String#charAt$737 + br $__inlined_func$~lib/string/String#charAt$736 end global.get $~lib/memory/__stack_pointer i32.const 2 @@ -28309,7 +28309,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $__inlined_func$~lib/util/string/joinIntegerArray$741 + block $__inlined_func$~lib/util/string/joinIntegerArray$740 local.get $1 i32.const 1 i32.sub @@ -28323,7 +28323,7 @@ global.set $~lib/memory/__stack_pointer i32.const 11568 local.set $2 - br $__inlined_func$~lib/util/string/joinIntegerArray$741 + br $__inlined_func$~lib/util/string/joinIntegerArray$740 end local.get $1 i32.eqz @@ -28336,7 +28336,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$741 + br $__inlined_func$~lib/util/string/joinIntegerArray$740 end global.get $~lib/memory/__stack_pointer i32.const 11856 @@ -28433,7 +28433,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$741 + br $__inlined_func$~lib/util/string/joinIntegerArray$740 end global.get $~lib/memory/__stack_pointer i32.const 8 @@ -28527,7 +28527,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 $1 i32.const 1 i32.sub @@ -28541,7 +28541,7 @@ global.set $~lib/memory/__stack_pointer i32.const 11568 local.set $2 - br $__inlined_func$~lib/util/string/joinIntegerArray$742 + br $__inlined_func$~lib/util/string/joinIntegerArray$741 end local.get $1 i32.eqz @@ -28554,7 +28554,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 11856 @@ -28651,7 +28651,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 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 334f1c302e..f7252052ba 100644 --- a/tests/compiler/std/arraybuffer.release.wat +++ b/tests/compiler/std/arraybuffer.release.wat @@ -113,7 +113,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 @@ -137,7 +137,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 @@ -1241,7 +1241,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 @@ -1258,7 +1258,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/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 7a0b6705e9..a5597a736e 100644 --- a/tests/compiler/std/dataview.release.wat +++ b/tests/compiler/std/dataview.release.wat @@ -121,7 +121,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 @@ -145,7 +145,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 @@ -1249,7 +1249,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 @@ -1266,7 +1266,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/std/date.debug.wat b/tests/compiler/std/date.debug.wat index 69c2f16c5e..d0f6eac96b 100644 --- a/tests/compiler/std/date.debug.wat +++ b/tests/compiler/std/date.debug.wat @@ -2401,7 +2401,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 @@ -2467,21 +2467,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 @@ -2497,6 +2482,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 d97db8a353..ec67280830 100644 --- a/tests/compiler/std/date.release.wat +++ b/tests/compiler/std/date.release.wat @@ -504,7 +504,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$376 + block $__inlined_func$~lib/rt/itcms/Object#unlink$375 local.get $0 i32.load offset=4 i32.const -4 @@ -528,7 +528,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$376 + br $__inlined_func$~lib/rt/itcms/Object#unlink$375 end local.get $0 i32.load offset=8 @@ -1632,7 +1632,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 @@ -1649,7 +1649,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 @@ -2021,7 +2021,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 @@ -2031,7 +2031,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 @@ -3306,7 +3306,7 @@ global.get $~lib/memory/__stack_pointer i32.const 1872 i32.store - block $__inlined_func$~lib/string/String#padStart$384 + block $__inlined_func$~lib/string/String#padStart$383 i32.const 1868 i32.load i32.const -2 @@ -3325,7 +3325,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/string/String#padStart$384 + br $__inlined_func$~lib/string/String#padStart$383 end global.get $~lib/memory/__stack_pointer local.get $5 @@ -3762,7 +3762,7 @@ global.get $~lib/memory/__stack_pointer local.get $4 i32.store - block $__inlined_func$~lib/string/String#concat$385 + block $__inlined_func$~lib/string/String#concat$384 local.get $4 i32.const 20 i32.sub @@ -3781,7 +3781,7 @@ global.set $~lib/memory/__stack_pointer i32.const 3456 local.set $1 - br $__inlined_func$~lib/string/String#concat$385 + br $__inlined_func$~lib/string/String#concat$384 end global.get $~lib/memory/__stack_pointer local.get $1 @@ -5116,7 +5116,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 @@ -5131,7 +5131,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 @@ -5139,7 +5139,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 @@ -5174,7 +5174,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 @@ -5422,7 +5422,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store - block $__inlined_func$~lib/rt/itcms/__renew$363 + block $__inlined_func$~lib/rt/itcms/__renew$362 i32.const 1073741820 local.get $2 i32.const 1 @@ -5465,7 +5465,7 @@ i32.store offset=16 local.get $2 local.set $1 - br $__inlined_func$~lib/rt/itcms/__renew$363 + br $__inlined_func$~lib/rt/itcms/__renew$362 end local.get $3 local.get $4 @@ -6169,7 +6169,7 @@ global.get $~lib/memory/__stack_pointer local.get $2 i32.store - block $__inlined_func$~lib/string/String#charCodeAt$386 + block $__inlined_func$~lib/string/String#charCodeAt$385 local.get $3 local.get $2 i32.const 20 @@ -6185,7 +6185,7 @@ global.set $~lib/memory/__stack_pointer i32.const -1 local.set $0 - br $__inlined_func$~lib/string/String#charCodeAt$386 + br $__inlined_func$~lib/string/String#charCodeAt$385 end local.get $2 local.get $3 @@ -6436,7 +6436,7 @@ call $~lib/util/string/strtol local.set $6 global.get $~lib/memory/__stack_pointer - block $__inlined_func$~lib/string/String#substr$387 (result i32) + block $__inlined_func$~lib/string/String#substr$386 (result i32) global.get $~lib/memory/__stack_pointer local.get $2 i32.store offset=44 @@ -6499,7 +6499,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 3456 - br $__inlined_func$~lib/string/String#substr$387 + br $__inlined_func$~lib/string/String#substr$386 end global.get $~lib/memory/__stack_pointer local.get $8 @@ -6549,7 +6549,7 @@ global.get $~lib/memory/__stack_pointer i32.const 1872 i32.store - block $__inlined_func$~lib/string/String#padEnd$388 + block $__inlined_func$~lib/string/String#padEnd$387 i32.const 1868 i32.load i32.const -2 @@ -6565,7 +6565,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/string/String#padEnd$388 + br $__inlined_func$~lib/string/String#padEnd$387 end global.get $~lib/memory/__stack_pointer i32.const 6 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 835670c17a..fdf44efb59 100644 --- a/tests/compiler/std/map.release.wat +++ b/tests/compiler/std/map.release.wat @@ -134,7 +134,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 @@ -158,7 +158,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 @@ -1262,7 +1262,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 @@ -1279,7 +1279,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 @@ -2474,7 +2474,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 @@ -2492,7 +2492,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 @@ -3203,7 +3203,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 @@ -3227,7 +3227,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 @@ -5753,7 +5753,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 @@ -5777,7 +5777,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 @@ -7943,7 +7943,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 @@ -7967,7 +7967,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 @@ -9959,7 +9959,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 @@ -9983,7 +9983,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 @@ -15197,7 +15197,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 @@ -15219,7 +15219,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 @@ -17449,7 +17449,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 @@ -17471,7 +17471,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 @@ -22003,7 +22003,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 @@ -22025,7 +22025,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/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 1efa8f2c5c..0cbae9caa5 100644 --- a/tests/compiler/std/operator-overloading.release.wat +++ b/tests/compiler/std/operator-overloading.release.wat @@ -187,7 +187,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 @@ -211,7 +211,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 @@ -1213,7 +1213,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 @@ -1230,7 +1230,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 @@ -2359,7 +2359,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 @@ -2379,7 +2379,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 22fd0d652b..eabf352314 100644 --- a/tests/compiler/std/set.release.wat +++ b/tests/compiler/std/set.release.wat @@ -125,7 +125,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 @@ -149,7 +149,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 @@ -1253,7 +1253,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 @@ -1270,7 +1270,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 @@ -2466,7 +2466,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 @@ -2484,7 +2484,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 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 263534f48a..fe262cd375 100644 --- a/tests/compiler/std/static-array.release.wat +++ b/tests/compiler/std/static-array.release.wat @@ -137,7 +137,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 @@ -161,7 +161,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 @@ -1432,7 +1432,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 @@ -1470,7 +1470,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 @@ -1490,7 +1490,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 @@ -1507,7 +1507,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/std/staticarray.debug.wat b/tests/compiler/std/staticarray.debug.wat index 65ff72d2fc..55b34d025a 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 f04e217e60..f801dd89d8 100644 --- a/tests/compiler/std/staticarray.release.wat +++ b/tests/compiler/std/staticarray.release.wat @@ -260,7 +260,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$267 + block $__inlined_func$~lib/rt/itcms/Object#unlink$266 local.get $0 i32.load offset=4 i32.const -4 @@ -284,7 +284,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$267 + br $__inlined_func$~lib/rt/itcms/Object#unlink$266 end local.get $0 i32.load offset=8 @@ -1596,7 +1596,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 @@ -1613,7 +1613,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 @@ -3140,7 +3140,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 @@ -3160,7 +3160,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 @@ -3372,7 +3372,7 @@ global.get $~lib/memory/__stack_pointer local.get $0 i32.store - block $__inlined_func$~lib/staticarray/StaticArray<~lib/string/String>#indexOf$274 + block $__inlined_func$~lib/staticarray/StaticArray<~lib/string/String>#indexOf$273 local.get $0 i32.const 20 i32.sub @@ -3392,7 +3392,7 @@ global.set $~lib/memory/__stack_pointer i32.const -1 local.set $2 - br $__inlined_func$~lib/staticarray/StaticArray<~lib/string/String>#indexOf$274 + br $__inlined_func$~lib/staticarray/StaticArray<~lib/string/String>#indexOf$273 end local.get $2 i32.const 0 @@ -3434,7 +3434,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/staticarray/StaticArray<~lib/string/String>#indexOf$274 + br $__inlined_func$~lib/staticarray/StaticArray<~lib/string/String>#indexOf$273 end local.get $2 i32.const 1 @@ -4084,7 +4084,7 @@ global.get $~lib/memory/__stack_pointer local.get $10 i32.store - block $__inlined_func$~lib/rt/itcms/__renew$224 + block $__inlined_func$~lib/rt/itcms/__renew$223 i32.const 1073741820 local.get $1 i32.const 1 @@ -4127,7 +4127,7 @@ i32.store offset=16 local.get $1 local.set $2 - br $__inlined_func$~lib/rt/itcms/__renew$224 + br $__inlined_func$~lib/rt/itcms/__renew$223 end local.get $4 local.get $3 @@ -6296,7 +6296,7 @@ call $~lib/builtins/abort unreachable end - block $__inlined_func$~lib/staticarray/StaticArray#includes$276 (result i32) + block $__inlined_func$~lib/staticarray/StaticArray#includes$275 (result i32) i32.const 8 i32.const 10 call $~lib/rt/itcms/__new @@ -6337,7 +6337,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 0 - br $__inlined_func$~lib/staticarray/StaticArray#includes$276 + br $__inlined_func$~lib/staticarray/StaticArray#includes$275 end loop $while-continue|0 local.get $1 @@ -6359,7 +6359,7 @@ i32.add global.set $~lib/memory/__stack_pointer i32.const 1 - br $__inlined_func$~lib/staticarray/StaticArray#includes$276 + br $__inlined_func$~lib/staticarray/StaticArray#includes$275 end local.get $1 i32.const 1 @@ -6383,7 +6383,7 @@ call $~lib/builtins/abort unreachable end - block $__inlined_func$~lib/staticarray/StaticArray#includes$277 (result i32) + block $__inlined_func$~lib/staticarray/StaticArray#includes$276 (result i32) i32.const 4 i32.const 11 call $~lib/rt/itcms/__new @@ -6424,7 +6424,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|030 local.get $1 @@ -6446,7 +6446,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 $1 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 c93b01b017..1bc400e04d 100644 --- a/tests/compiler/std/string-casemapping.release.wat +++ b/tests/compiler/std/string-casemapping.release.wat @@ -571,7 +571,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 @@ -595,7 +595,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 @@ -1680,7 +1680,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 @@ -1697,7 +1697,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 @@ -2734,7 +2734,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 @@ -2754,7 +2754,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 @@ -3483,7 +3483,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 @@ -3502,7 +3502,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 1dd0f55a65..80e71d7f0b 100644 --- a/tests/compiler/std/string-encoding.release.wat +++ b/tests/compiler/std/string-encoding.release.wat @@ -158,7 +158,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 @@ -182,7 +182,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 @@ -1267,7 +1267,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 @@ -1284,7 +1284,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 @@ -2968,7 +2968,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 @@ -2988,7 +2988,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 @@ -4146,7 +4146,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 @@ -4165,7 +4165,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 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 57e9b4af89..4019aac16f 100644 --- a/tests/compiler/std/string.release.wat +++ b/tests/compiler/std/string.release.wat @@ -1149,7 +1149,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 @@ -1173,7 +1173,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 @@ -2277,7 +2277,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 @@ -2294,7 +2294,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 @@ -10235,7 +10235,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 @@ -10250,7 +10250,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 @@ -10289,7 +10289,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 @@ -10306,7 +10306,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 @@ -10324,7 +10324,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 @@ -10338,7 +10338,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 @@ -10799,7 +10799,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 @@ -10814,7 +10814,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 @@ -10891,7 +10891,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 @@ -10914,7 +10914,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 @@ -22179,7 +22179,7 @@ end else 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 $2 i64.extend_i32_u local.set $5 @@ -22200,7 +22200,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 @@ -22460,7 +22460,7 @@ end else 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 $0 i64.extend_i32_u local.set $4 @@ -22481,7 +22481,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 @@ -22799,7 +22799,7 @@ end else 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 $0 local.set $2 local.get $1 @@ -22819,7 +22819,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 @@ -23164,7 +23164,7 @@ end else 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 $0 local.set $2 local.get $1 @@ -23184,7 +23184,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 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 e2a9fd8b6d..04cab6190a 100644 --- a/tests/compiler/std/symbol.release.wat +++ b/tests/compiler/std/symbol.release.wat @@ -206,7 +206,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 @@ -230,7 +230,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 @@ -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 $2 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 $2 i32.const 0 @@ -2189,7 +2189,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 @@ -2209,7 +2209,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 @@ -3507,7 +3507,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 @@ -3526,7 +3526,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 1498ca5bde..e513278826 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 b0cdfab0ca..1d1a87dd7d 100644 --- a/tests/compiler/std/typedarray.release.wat +++ b/tests/compiler/std/typedarray.release.wat @@ -766,7 +766,7 @@ local.get $1 global.set $~lib/rt/itcms/iter end - block $__inlined_func$~lib/rt/itcms/Object#unlink$1403 + block $__inlined_func$~lib/rt/itcms/Object#unlink$1402 local.get $0 i32.load offset=4 i32.const -4 @@ -790,7 +790,7 @@ call $~lib/builtins/abort unreachable end - br $__inlined_func$~lib/rt/itcms/Object#unlink$1403 + br $__inlined_func$~lib/rt/itcms/Object#unlink$1402 end local.get $0 i32.load offset=8 @@ -2102,7 +2102,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 @@ -2119,7 +2119,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 @@ -12338,7 +12338,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 @@ -12363,7 +12363,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 @@ -35302,7 +35302,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $__inlined_func$~lib/util/string/joinIntegerArray$1408 + block $__inlined_func$~lib/util/string/joinIntegerArray$1407 local.get $0 i32.const 1 i32.sub @@ -35316,7 +35316,7 @@ global.set $~lib/memory/__stack_pointer i32.const 7776 local.set $0 - br $__inlined_func$~lib/util/string/joinIntegerArray$1408 + br $__inlined_func$~lib/util/string/joinIntegerArray$1407 end local.get $6 i32.eqz @@ -35329,7 +35329,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$1408 + br $__inlined_func$~lib/util/string/joinIntegerArray$1407 end global.get $~lib/memory/__stack_pointer i32.const 9584 @@ -35422,7 +35422,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$1408 + br $__inlined_func$~lib/util/string/joinIntegerArray$1407 end global.get $~lib/memory/__stack_pointer i32.const 8 @@ -35556,7 +35556,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 @@ -35576,7 +35576,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 @@ -35650,7 +35650,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $__inlined_func$~lib/util/string/joinIntegerArray$1409 + block $__inlined_func$~lib/util/string/joinIntegerArray$1408 local.get $0 i32.const 1 i32.sub @@ -35664,7 +35664,7 @@ global.set $~lib/memory/__stack_pointer i32.const 7776 local.set $0 - br $__inlined_func$~lib/util/string/joinIntegerArray$1409 + br $__inlined_func$~lib/util/string/joinIntegerArray$1408 end local.get $6 i32.eqz @@ -35677,7 +35677,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$1409 + br $__inlined_func$~lib/util/string/joinIntegerArray$1408 end global.get $~lib/memory/__stack_pointer i32.const 9584 @@ -35770,7 +35770,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$1409 + br $__inlined_func$~lib/util/string/joinIntegerArray$1408 end global.get $~lib/memory/__stack_pointer i32.const 8 @@ -35865,7 +35865,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $__inlined_func$~lib/util/string/joinIntegerArray$1410 + block $__inlined_func$~lib/util/string/joinIntegerArray$1409 local.get $0 i32.const 1 i32.sub @@ -35879,7 +35879,7 @@ global.set $~lib/memory/__stack_pointer i32.const 7776 local.set $0 - br $__inlined_func$~lib/util/string/joinIntegerArray$1410 + br $__inlined_func$~lib/util/string/joinIntegerArray$1409 end local.get $6 i32.eqz @@ -35892,7 +35892,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$1410 + br $__inlined_func$~lib/util/string/joinIntegerArray$1409 end global.get $~lib/memory/__stack_pointer i32.const 9584 @@ -35989,7 +35989,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$1410 + br $__inlined_func$~lib/util/string/joinIntegerArray$1409 end global.get $~lib/memory/__stack_pointer i32.const 8 @@ -36055,7 +36055,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $__inlined_func$~lib/util/string/joinIntegerArray$1411 + block $__inlined_func$~lib/util/string/joinIntegerArray$1410 local.get $0 i32.const 1 i32.sub @@ -36069,7 +36069,7 @@ global.set $~lib/memory/__stack_pointer i32.const 7776 local.set $0 - br $__inlined_func$~lib/util/string/joinIntegerArray$1411 + br $__inlined_func$~lib/util/string/joinIntegerArray$1410 end local.get $6 i32.eqz @@ -36082,7 +36082,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$1411 + br $__inlined_func$~lib/util/string/joinIntegerArray$1410 end global.get $~lib/memory/__stack_pointer i32.const 9584 @@ -36179,7 +36179,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$1411 + br $__inlined_func$~lib/util/string/joinIntegerArray$1410 end global.get $~lib/memory/__stack_pointer i32.const 8 @@ -36245,7 +36245,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $__inlined_func$~lib/util/string/joinIntegerArray$1412 + block $__inlined_func$~lib/util/string/joinIntegerArray$1411 local.get $0 i32.const 1 i32.sub @@ -36259,7 +36259,7 @@ global.set $~lib/memory/__stack_pointer i32.const 7776 local.set $0 - br $__inlined_func$~lib/util/string/joinIntegerArray$1412 + br $__inlined_func$~lib/util/string/joinIntegerArray$1411 end local.get $6 i32.eqz @@ -36272,7 +36272,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$1412 + br $__inlined_func$~lib/util/string/joinIntegerArray$1411 end global.get $~lib/memory/__stack_pointer i32.const 9584 @@ -36369,7 +36369,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$1412 + br $__inlined_func$~lib/util/string/joinIntegerArray$1411 end global.get $~lib/memory/__stack_pointer i32.const 8 @@ -36435,7 +36435,7 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - block $__inlined_func$~lib/util/string/joinIntegerArray$1413 + block $__inlined_func$~lib/util/string/joinIntegerArray$1412 local.get $0 i32.const 1 i32.sub @@ -36449,7 +36449,7 @@ global.set $~lib/memory/__stack_pointer i32.const 7776 local.set $0 - br $__inlined_func$~lib/util/string/joinIntegerArray$1413 + br $__inlined_func$~lib/util/string/joinIntegerArray$1412 end local.get $6 i32.eqz @@ -36462,7 +36462,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$1413 + br $__inlined_func$~lib/util/string/joinIntegerArray$1412 end global.get $~lib/memory/__stack_pointer i32.const 9584 @@ -36559,7 +36559,7 @@ i32.const 8 i32.add global.set $~lib/memory/__stack_pointer - br $__inlined_func$~lib/util/string/joinIntegerArray$1413 + br $__inlined_func$~lib/util/string/joinIntegerArray$1412 end global.get $~lib/memory/__stack_pointer i32.const 8 @@ -37004,7 +37004,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 @@ -37014,7 +37014,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 d6410645a6..a44f7f232d 100644 --- a/tests/compiler/std/uri.release.wat +++ b/tests/compiler/std/uri.release.wat @@ -238,7 +238,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 @@ -262,7 +262,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 @@ -1347,7 +1347,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 @@ -1364,7 +1364,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 @@ -2782,7 +2782,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 @@ -2802,7 +2802,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 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 35da8ff691..6fc02be23c 100644 --- a/tests/compiler/super-inline.release.wat +++ b/tests/compiler/super-inline.release.wat @@ -129,7 +129,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 @@ -153,7 +153,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 @@ -1155,7 +1155,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 @@ -1172,7 +1172,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 2b5172a5ea..642c1728a6 100644 --- a/tests/compiler/switch.release.wat +++ b/tests/compiler/switch.release.wat @@ -160,7 +160,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 @@ -184,7 +184,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 @@ -1269,7 +1269,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 @@ -1286,7 +1286,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 @@ -1708,7 +1708,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 @@ -1728,7 +1728,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 @@ -1880,7 +1880,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 @@ -1899,7 +1899,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 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 9256be15f6..ca25462f55 100644 --- a/tests/compiler/templateliteral.release.wat +++ b/tests/compiler/templateliteral.release.wat @@ -212,7 +212,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 @@ -236,7 +236,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 @@ -1340,7 +1340,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 @@ -1357,7 +1357,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 @@ -1817,7 +1817,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 @@ -1827,7 +1827,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 @@ -4077,7 +4077,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 @@ -4097,7 +4097,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 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 5a767c425a..a5228a3217 100644 --- a/tests/compiler/typeof.release.wat +++ b/tests/compiler/typeof.release.wat @@ -145,7 +145,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 @@ -169,7 +169,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 @@ -1171,7 +1171,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 @@ -1188,7 +1188,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 @@ -1572,7 +1572,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 @@ -1592,7 +1592,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 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 c90bf786b3..ab735cc6d9 100644 --- a/tests/compiler/while.release.wat +++ b/tests/compiler/while.release.wat @@ -117,7 +117,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 @@ -141,7 +141,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 @@ -1143,7 +1143,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 @@ -1160,7 +1160,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 From 8f9964aaed1a3ea3ecd84e7af16e98f823e0ed9b Mon Sep 17 00:00:00 2001 From: XMadrid Date: Fri, 13 Mar 2026 18:44:53 +0800 Subject: [PATCH 7/8] fix --- src/compiler.ts | 66 ++++++++++++++++++- tests/compiler/assignment-chain.debug.wat | 20 ++---- tests/compiler/assignment-chain.release.wat | 8 +-- .../compiler/resolve-elementaccess.debug.wat | 20 ++---- .../resolve-elementaccess.release.wat | 16 ++--- tests/compiler/std/new.debug.wat | 20 ++---- tests/compiler/std/new.release.wat | 8 +-- 7 files changed, 93 insertions(+), 65 deletions(-) diff --git a/src/compiler.ts b/src/compiler.ts index adc2cf187e..f586d04654 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -5273,7 +5273,71 @@ export class Compiler extends DiagnosticEmitter { while (expression.kind == NodeKind.Parenthesized) { expression = (expression).expression; } - return expression.kind != NodeKind.Identifier; + switch (expression.kind) { + case NodeKind.Call: + case NodeKind.New: + case NodeKind.UnaryPostfix: + return true; + case NodeKind.UnaryPrefix: { + let unaryPrefix = expression; + switch (unaryPrefix.operator) { + case Token.Plus_Plus: + case Token.Minus_Minus: + case Token.Delete: + case Token.Await: + case Token.Yield: + return true; + default: + return this.expressionHasSideEffects(unaryPrefix.operand); + } + } + 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 { 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 0200dad357..102fe9ad42 100644 --- a/tests/compiler/assignment-chain.release.wat +++ b/tests/compiler/assignment-chain.release.wat @@ -122,7 +122,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 @@ -146,7 +146,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 @@ -1231,7 +1231,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 @@ -1248,7 +1248,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-elementaccess.debug.wat b/tests/compiler/resolve-elementaccess.debug.wat index f6a7e9d7e2..7c84315bca 100644 --- a/tests/compiler/resolve-elementaccess.debug.wat +++ b/tests/compiler/resolve-elementaccess.debug.wat @@ -2045,7 +2045,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 @@ -2111,21 +2111,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 @@ -2141,6 +2126,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 bc80e8c9b3..0630fc5585 100644 --- a/tests/compiler/resolve-elementaccess.release.wat +++ b/tests/compiler/resolve-elementaccess.release.wat @@ -176,7 +176,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 @@ -200,7 +200,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 @@ -1304,7 +1304,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 @@ -1321,7 +1321,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 @@ -2880,7 +2880,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 @@ -2893,7 +2893,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 @@ -3268,7 +3268,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 @@ -3288,7 +3288,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 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 012ec7a6db..37d5b597a3 100644 --- a/tests/compiler/std/new.release.wat +++ b/tests/compiler/std/new.release.wat @@ -122,7 +122,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 @@ -146,7 +146,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 @@ -1148,7 +1148,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 @@ -1165,7 +1165,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 From 56e54e0f5151ed30cee41785d7f8001eead33e2e Mon Sep 17 00:00:00 2001 From: XMadrid Date: Fri, 13 Mar 2026 18:49:42 +0800 Subject: [PATCH 8/8] update --- src/compiler.ts | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/compiler.ts b/src/compiler.ts index f586d04654..1603e2709e 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -5280,16 +5280,13 @@ export class Compiler extends DiagnosticEmitter { return true; case NodeKind.UnaryPrefix: { let unaryPrefix = expression; - switch (unaryPrefix.operator) { - case Token.Plus_Plus: - case Token.Minus_Minus: - case Token.Delete: - case Token.Await: - case Token.Yield: - return true; - default: - return this.expressionHasSideEffects(unaryPrefix.operand); - } + let operator = unaryPrefix.operator; + return operator == Token.Plus_Plus + || operator == Token.Minus_Minus + || operator == Token.Delete + || operator == Token.Await + || operator == Token.Yield + || this.expressionHasSideEffects(unaryPrefix.operand); } case NodeKind.Assertion: return this.expressionHasSideEffects((expression).expression);