diff --git a/src/compiler.ts b/src/compiler.ts index 4300cbb34a..0970535974 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -2391,13 +2391,15 @@ export class Compiler extends DiagnosticEmitter { var outerFlow = this.currentFlow; // (block $break └►┐ flow - // (loop $continue ├◄───────────┐ recompile? - // (body) └─┐ bodyFlow │ - // ┌─┘ │ + // (loop $loop ├◄───────────┐ recompile? + // (?block $continue └─┐ │ + // (body) │ bodyFlow │ + // ) ┌─┘ │ // ┌◄┼►╢ │ breaks or terminates? - // (local.set $tcond (condition)) │ └─┐ condFlow │ + // │ └─┐ │ but does not continue + // (br_if (cond) $loop) │ │ condFlow │ // │ ┌─┘ │ - // (br_if (local.get $tcond) $continue) ├◄┴────────────┘ condition? + // ├◄┴────────────┘ condition? // ) └─┐ // ) ┌─┘ @@ -2411,6 +2413,7 @@ export class Compiler extends DiagnosticEmitter { flow.breakLabel = breakLabel; var continueLabel = "do-continue|" + label; flow.continueLabel = continueLabel; + var loopLabel = "do-loop|" + label; // Compile the body (always executes) var bodyFlow = flow.fork(); @@ -2424,7 +2427,8 @@ export class Compiler extends DiagnosticEmitter { } // Shortcut if body never falls through - if (bodyFlow.isAny(FlowFlags.TERMINATES | FlowFlags.BREAKS)) { + var possiblyContinues = bodyFlow.isAny(FlowFlags.CONTINUES | FlowFlags.CONDITIONALLY_CONTINUES); + if (bodyFlow.isAny(FlowFlags.TERMINATES | FlowFlags.BREAKS) && !possiblyContinues) { bodyStmts.push( module.unreachable() ); @@ -2441,6 +2445,12 @@ export class Compiler extends DiagnosticEmitter { ); let condKind = this.evaluateCondition(condExpr); + if (possiblyContinues) { + bodyStmts = [ + module.block(continueLabel, bodyStmts) + ]; + } + // Shortcut if condition is always false if (condKind == ConditionKind.FALSE) { bodyStmts.push( @@ -2454,21 +2464,16 @@ export class Compiler extends DiagnosticEmitter { module.drop(condExpr) ); bodyStmts.push( - module.br(continueLabel) + module.br(loopLabel) ); flow.set(FlowFlags.TERMINATES); } else { - let tcond = condFlow.getTempLocal(Type.bool); bodyStmts.push( - module.local_set(tcond.index, condExpr, false) // bool - ); - bodyStmts.push( - module.br(continueLabel, - module.local_get(tcond.index, TypeRef.I32) + module.br(loopLabel, + condExpr ) ); - condFlow.freeTempLocal(tcond); flow.inherit(condFlow); // Detect if local flags are incompatible before and after looping, and @@ -2488,7 +2493,7 @@ export class Compiler extends DiagnosticEmitter { outerFlow.popBreakLabel(); this.currentFlow = outerFlow; var expr = module.block(breakLabel, [ - module.loop(continueLabel, + module.loop(loopLabel, module.flatten(bodyStmts) ) ]); diff --git a/tests/compiler/NonNullable.optimized.wat b/tests/compiler/NonNullable.optimized.wat index 1d95881da0..74e9f4ab52 100644 --- a/tests/compiler/NonNullable.optimized.wat +++ b/tests/compiler/NonNullable.optimized.wat @@ -74,7 +74,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $3 i64.load local.get $1 @@ -95,7 +95,7 @@ local.tee $0 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/NonNullable.untouched.wat b/tests/compiler/NonNullable.untouched.wat index 3ab9ac7798..ddf742b16d 100644 --- a/tests/compiler/NonNullable.untouched.wat +++ b/tests/compiler/NonNullable.untouched.wat @@ -69,7 +69,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -93,9 +93,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/builtins.optimized.wat b/tests/compiler/builtins.optimized.wat index df61b5b695..3e37054af4 100644 --- a/tests/compiler/builtins.optimized.wat +++ b/tests/compiler/builtins.optimized.wat @@ -130,7 +130,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $3 i64.load local.get $1 @@ -151,7 +151,7 @@ local.tee $0 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/builtins.untouched.wat b/tests/compiler/builtins.untouched.wat index 80f25dedf6..d999b82b85 100644 --- a/tests/compiler/builtins.untouched.wat +++ b/tests/compiler/builtins.untouched.wat @@ -147,7 +147,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -171,9 +171,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index c1a35f7016..2d3cd0117c 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -1246,7 +1246,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $3 - loop $do-continue|0 + loop $do-loop|0 local.get $3 call $~lib/rt/itcms/step i32.sub @@ -1269,7 +1269,7 @@ local.get $3 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $3 diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index 8a4cce9c44..c5905141bf 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -1510,7 +1510,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1521,7 +1520,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1549,9 +1548,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/class-implements.optimized.wat b/tests/compiler/class-implements.optimized.wat index 3bb34d32c7..b993737908 100644 --- a/tests/compiler/class-implements.optimized.wat +++ b/tests/compiler/class-implements.optimized.wat @@ -1184,7 +1184,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $1 - loop $do-continue|0 + loop $do-loop|0 local.get $1 call $~lib/rt/itcms/step i32.sub @@ -1207,7 +1207,7 @@ local.get $1 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $1 diff --git a/tests/compiler/class-implements.untouched.wat b/tests/compiler/class-implements.untouched.wat index b2fd1e69c1..20b4df005b 100644 --- a/tests/compiler/class-implements.untouched.wat +++ b/tests/compiler/class-implements.untouched.wat @@ -1520,7 +1520,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1531,7 +1530,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1559,9 +1558,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/class-overloading-cast.optimized.wat b/tests/compiler/class-overloading-cast.optimized.wat index 2a0569c480..072354d642 100644 --- a/tests/compiler/class-overloading-cast.optimized.wat +++ b/tests/compiler/class-overloading-cast.optimized.wat @@ -1198,7 +1198,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $1 - loop $do-continue|0 + loop $do-loop|0 local.get $1 call $~lib/rt/itcms/step i32.sub @@ -1221,7 +1221,7 @@ local.get $1 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $1 @@ -1469,7 +1469,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $3 i64.load local.get $1 @@ -1490,7 +1490,7 @@ local.tee $0 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/class-overloading-cast.untouched.wat b/tests/compiler/class-overloading-cast.untouched.wat index c6ef378905..19a34533b6 100644 --- a/tests/compiler/class-overloading-cast.untouched.wat +++ b/tests/compiler/class-overloading-cast.untouched.wat @@ -1520,7 +1520,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1531,7 +1530,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1559,9 +1558,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -2405,7 +2402,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -2429,9 +2426,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/class-overloading.optimized.wat b/tests/compiler/class-overloading.optimized.wat index 80ec4e221b..5f2453d86b 100644 --- a/tests/compiler/class-overloading.optimized.wat +++ b/tests/compiler/class-overloading.optimized.wat @@ -1222,7 +1222,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $1 - loop $do-continue|0 + loop $do-loop|0 local.get $1 call $~lib/rt/itcms/step i32.sub @@ -1245,7 +1245,7 @@ local.get $1 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $1 @@ -1493,7 +1493,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $3 i64.load local.get $1 @@ -1514,7 +1514,7 @@ local.tee $0 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/class-overloading.untouched.wat b/tests/compiler/class-overloading.untouched.wat index 5942c725e6..2facadbbcd 100644 --- a/tests/compiler/class-overloading.untouched.wat +++ b/tests/compiler/class-overloading.untouched.wat @@ -1526,7 +1526,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1537,7 +1536,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1565,9 +1564,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -2412,7 +2409,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -2436,9 +2433,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/class.optimized.wat b/tests/compiler/class.optimized.wat index 6b28ef8193..13f507fb7a 100644 --- a/tests/compiler/class.optimized.wat +++ b/tests/compiler/class.optimized.wat @@ -1434,7 +1434,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $2 - loop $do-continue|0 + loop $do-loop|0 local.get $2 call $~lib/rt/itcms/step i32.sub @@ -1457,7 +1457,7 @@ local.get $2 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $2 diff --git a/tests/compiler/class.untouched.wat b/tests/compiler/class.untouched.wat index e5adca90d1..ddea6b07eb 100644 --- a/tests/compiler/class.untouched.wat +++ b/tests/compiler/class.untouched.wat @@ -1622,7 +1622,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1633,7 +1632,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1661,9 +1660,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index 8681487ce4..eb2ba60aac 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -1323,7 +1323,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $3 - loop $do-continue|0 + loop $do-loop|0 local.get $3 call $~lib/rt/itcms/step i32.sub @@ -1346,7 +1346,7 @@ local.get $3 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $3 diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index e774c2657e..89a0c648ba 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -1522,7 +1522,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1533,7 +1532,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1561,9 +1560,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index 769ebdd80b..ddba997211 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -1157,7 +1157,7 @@ (local $3 i32) i32.const 10 local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $2 i32.const 1 i32.add @@ -1166,7 +1166,7 @@ i32.const 1 i32.sub local.tee $0 - br_if $do-continue|0 + br_if $do-loop|0 end local.get $0 if @@ -1190,14 +1190,14 @@ end i32.const 10 local.set $0 - loop $do-continue|00 + loop $do-loop|00 local.get $0 local.tee $1 i32.const 1 i32.sub local.set $0 local.get $1 - br_if $do-continue|00 + br_if $do-loop|00 end local.get $0 i32.const -1 @@ -1214,7 +1214,7 @@ local.set $2 i32.const 10 local.set $0 - loop $do-continue|01 + loop $do-loop|01 local.get $0 i32.const 1 i32.sub @@ -1223,7 +1223,7 @@ i32.const 1 i32.add local.set $3 - loop $do-continue|1 + loop $do-loop|1 local.get $2 i32.const 1 i32.add @@ -1232,7 +1232,7 @@ i32.const 1 i32.sub local.tee $0 - br_if $do-continue|1 + br_if $do-loop|1 end local.get $0 if @@ -1255,7 +1255,7 @@ unreachable end local.get $0 - br_if $do-continue|01 + br_if $do-loop|01 end local.get $0 if @@ -1290,14 +1290,14 @@ end i32.const 0 local.set $0 - loop $do-continue|02 + loop $do-loop|02 local.get $0 i32.const 1 i32.add local.tee $0 i32.const 10 i32.ne - br_if $do-continue|02 + br_if $do-loop|02 end local.get $0 i32.const 10 @@ -1312,14 +1312,14 @@ end i32.const 0 local.set $0 - loop $do-continue|03 + loop $do-loop|03 local.get $0 i32.const 1 i32.add local.tee $0 i32.const 10 i32.ne - br_if $do-continue|03 + br_if $do-loop|03 end local.get $0 i32.const 10 @@ -1334,14 +1334,17 @@ end i32.const 0 local.set $0 - loop $do-continue|04 + loop $do-loop|04 local.get $0 i32.const 1 i32.add local.tee $0 i32.const 10 i32.ne - br_if $do-continue|04 + i32.const 0 + local.get $0 + select + br_if $do-loop|04 end local.get $0 i32.const 10 @@ -1358,7 +1361,7 @@ local.set $0 i32.const 0 local.set $2 - loop $do-continue|05 + loop $do-loop|06 local.get $0 i32.const 1 i32.add @@ -1366,16 +1369,20 @@ i32.const 10 i32.ne if - loop $do-continue|17 + loop $do-loop|18 local.get $2 i32.const 1 i32.add local.tee $2 i32.const 10 i32.rem_s - br_if $do-continue|17 + i32.const 0 + local.get $2 + select + br_if $do-loop|18 end - br $do-continue|05 + local.get $0 + br_if $do-loop|06 end end local.get $0 @@ -1450,7 +1457,7 @@ local.get $1 call $do/Ref#constructor i32.store - loop $do-continue|08 + loop $do-loop|09 local.get $2 i32.const 1 i32.add @@ -1467,7 +1474,7 @@ i32.store end local.get $0 - br_if $do-continue|08 + br_if $do-loop|09 end local.get $2 i32.const 10 @@ -1511,8 +1518,8 @@ call $do/Ref#constructor local.tee $0 i32.store - loop $do-continue|06 - block $do-break|07 + loop $do-loop|07 + block $do-break|08 local.get $2 i32.const 1 i32.add @@ -1522,10 +1529,10 @@ if i32.const 0 local.set $0 - br $do-break|07 + br $do-break|08 end call $do/Ref#constructor - br_if $do-continue|06 + br_if $do-loop|07 end end local.get $2 @@ -1658,7 +1665,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1681,7 +1688,7 @@ local.get $0 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $0 diff --git a/tests/compiler/do.untouched.wat b/tests/compiler/do.untouched.wat index 60dfd762ec..7320a8c2e2 100644 --- a/tests/compiler/do.untouched.wat +++ b/tests/compiler/do.untouched.wat @@ -44,12 +44,11 @@ (func $do/testSimple (local $0 i32) (local $1 i32) - (local $2 i32) i32.const 10 local.set $0 i32.const 0 local.set $1 - loop $do-continue|0 + loop $do-loop|0 local.get $0 i32.const 1 i32.sub @@ -59,9 +58,7 @@ i32.add local.set $1 local.get $0 - local.set $2 - local.get $2 - br_if $do-continue|0 + br_if $do-loop|0 end local.get $0 i32.const 0 @@ -95,7 +92,7 @@ (local $1 i32) i32.const 10 local.set $0 - loop $do-continue|0 + loop $do-loop|0 nop local.get $0 local.tee $1 @@ -103,9 +100,7 @@ i32.sub local.set $0 local.get $1 - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end local.get $0 i32.const -1 @@ -126,14 +121,13 @@ (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) i32.const 10 local.set $0 i32.const 0 local.set $1 i32.const 0 local.set $2 - loop $do-continue|0 + loop $do-loop|0 local.get $0 i32.const 1 i32.sub @@ -142,7 +136,7 @@ i32.const 1 i32.add local.set $1 - loop $do-continue|1 + loop $do-loop|1 local.get $0 i32.const 1 i32.sub @@ -152,9 +146,7 @@ i32.add local.set $2 local.get $0 - local.set $3 - local.get $3 - br_if $do-continue|1 + br_if $do-loop|1 end local.get $0 i32.const 0 @@ -181,9 +173,7 @@ unreachable end local.get $0 - local.set $3 - local.get $3 - br_if $do-continue|0 + br_if $do-loop|0 end local.get $0 i32.const 0 @@ -226,11 +216,10 @@ ) (func $do/testAlwaysTrue (local $0 i32) - (local $1 i32) i32.const 0 local.set $0 block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 i32.const 1 i32.add @@ -241,9 +230,7 @@ br $do-break|0 end i32.const 1 - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end end local.get $0 @@ -265,7 +252,7 @@ (local $0 i32) i32.const 0 local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 i32.const 1 i32.add @@ -278,7 +265,7 @@ end i32.const 1 drop - br $do-continue|0 + br $do-loop|0 end unreachable ) @@ -286,7 +273,7 @@ (local $0 i32) i32.const 0 local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 i32.const 1 i32.add @@ -314,7 +301,7 @@ i32.const 0 local.set $0 block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 i32.const 1 i32.add @@ -342,7 +329,7 @@ (local $0 i32) i32.const 0 local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 i32.const 1 i32.add @@ -358,19 +345,22 @@ i32.const 0 local.set $0 block $do-break|0 - loop $do-continue|0 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - i32.const 10 - i32.eq - if - br $do-break|0 + loop $do-loop|0 + block $do-continue|0 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + i32.const 10 + i32.eq + if + br $do-break|0 + end + br $do-continue|0 end - br $do-continue|0 + local.get $0 + br_if $do-loop|0 end - unreachable end local.get $0 i32.const 10 @@ -395,36 +385,42 @@ i32.const 0 local.set $1 block $do-break|0 - loop $do-continue|0 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - i32.const 10 - i32.eq - if - br $do-break|0 - end - block $do-break|1 - loop $do-continue|1 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.const 10 - i32.rem_s - i32.const 0 - i32.eq - if - br $do-break|1 + loop $do-loop|0 + block $do-continue|0 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + i32.const 10 + i32.eq + if + br $do-break|0 + end + block $do-break|1 + loop $do-loop|1 + block $do-continue|1 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.const 10 + i32.rem_s + i32.const 0 + i32.eq + if + br $do-break|1 + end + br $do-continue|1 + end + local.get $1 + br_if $do-loop|1 end - br $do-continue|1 end - unreachable + br $do-continue|0 end - br $do-continue|0 + local.get $0 + br_if $do-loop|0 end - unreachable end local.get $0 i32.const 10 @@ -1923,7 +1919,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1934,7 +1929,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1962,9 +1957,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -2761,7 +2754,6 @@ (func $do/testRef (local $0 i32) (local $1 i32) - (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -2777,7 +2769,7 @@ call $do/Ref#constructor local.tee $1 i32.store - loop $do-continue|0 + loop $do-loop|0 local.get $0 i32.const 1 i32.add @@ -2795,9 +2787,7 @@ i32.store end local.get $1 - local.set $2 - local.get $2 - br_if $do-continue|0 + br_if $do-loop|0 end local.get $0 i32.const 10 @@ -2836,7 +2826,6 @@ (func $do/testRefAutorelease (local $0 i32) (local $1 i32) - (local $2 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -2853,7 +2842,7 @@ local.tee $1 i32.store block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 i32.const 1 i32.add @@ -2866,9 +2855,7 @@ br $do-break|0 end call $do/getRef - local.set $2 - local.get $2 - br_if $do-continue|0 + br_if $do-loop|0 end end local.get $0 diff --git a/tests/compiler/empty-exportruntime.optimized.wat b/tests/compiler/empty-exportruntime.optimized.wat index 1fe41540de..6cffd17c15 100644 --- a/tests/compiler/empty-exportruntime.optimized.wat +++ b/tests/compiler/empty-exportruntime.optimized.wat @@ -1264,7 +1264,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $3 - loop $do-continue|0 + loop $do-loop|0 local.get $3 call $~lib/rt/itcms/step i32.sub @@ -1287,7 +1287,7 @@ local.get $3 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $3 diff --git a/tests/compiler/empty-exportruntime.untouched.wat b/tests/compiler/empty-exportruntime.untouched.wat index 5eef51e823..1d8dc9fe14 100644 --- a/tests/compiler/empty-exportruntime.untouched.wat +++ b/tests/compiler/empty-exportruntime.untouched.wat @@ -1516,7 +1516,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1527,7 +1526,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1555,9 +1554,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/empty-new.optimized.wat b/tests/compiler/empty-new.optimized.wat index 53bb82de6d..cf783e1948 100644 --- a/tests/compiler/empty-new.optimized.wat +++ b/tests/compiler/empty-new.optimized.wat @@ -1216,7 +1216,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1239,7 +1239,7 @@ local.get $0 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $0 diff --git a/tests/compiler/empty-new.untouched.wat b/tests/compiler/empty-new.untouched.wat index 01f6f1e0ac..0cbc855010 100644 --- a/tests/compiler/empty-new.untouched.wat +++ b/tests/compiler/empty-new.untouched.wat @@ -1509,7 +1509,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1520,7 +1519,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1548,9 +1547,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index c891abccb7..aeb72df942 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -1212,7 +1212,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $1 - loop $do-continue|0 + loop $do-loop|0 local.get $1 call $~lib/rt/itcms/step i32.sub @@ -1235,7 +1235,7 @@ local.get $1 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $1 diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index ba6f0c0360..e7b3081595 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -1573,7 +1573,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1584,7 +1583,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1612,9 +1611,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/exportstar-rereexport.optimized.wat b/tests/compiler/exportstar-rereexport.optimized.wat index 98532485b9..c5d90544eb 100644 --- a/tests/compiler/exportstar-rereexport.optimized.wat +++ b/tests/compiler/exportstar-rereexport.optimized.wat @@ -1401,7 +1401,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1424,7 +1424,7 @@ local.get $0 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $0 diff --git a/tests/compiler/exportstar-rereexport.untouched.wat b/tests/compiler/exportstar-rereexport.untouched.wat index a5edbf7713..3e97865cd4 100644 --- a/tests/compiler/exportstar-rereexport.untouched.wat +++ b/tests/compiler/exportstar-rereexport.untouched.wat @@ -1554,7 +1554,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1565,7 +1564,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1593,9 +1592,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index 3c00c1f698..33fe5c45e3 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -1440,7 +1440,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $2 - loop $do-continue|0 + loop $do-loop|0 local.get $2 call $~lib/rt/itcms/step i32.sub @@ -1463,7 +1463,7 @@ local.get $2 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $2 diff --git a/tests/compiler/extends-baseaggregate.untouched.wat b/tests/compiler/extends-baseaggregate.untouched.wat index 523a4b35e8..09f205cc84 100644 --- a/tests/compiler/extends-baseaggregate.untouched.wat +++ b/tests/compiler/extends-baseaggregate.untouched.wat @@ -1518,7 +1518,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1529,7 +1528,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1557,9 +1556,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/extends-recursive.optimized.wat b/tests/compiler/extends-recursive.optimized.wat index d9e47c1ab2..9647a38b22 100644 --- a/tests/compiler/extends-recursive.optimized.wat +++ b/tests/compiler/extends-recursive.optimized.wat @@ -1169,7 +1169,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $1 - loop $do-continue|0 + loop $do-loop|0 local.get $1 call $~lib/rt/itcms/step i32.sub @@ -1192,7 +1192,7 @@ local.get $1 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $1 diff --git a/tests/compiler/extends-recursive.untouched.wat b/tests/compiler/extends-recursive.untouched.wat index dabc4a9489..f66a3affff 100644 --- a/tests/compiler/extends-recursive.untouched.wat +++ b/tests/compiler/extends-recursive.untouched.wat @@ -1514,7 +1514,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1525,7 +1524,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1553,9 +1552,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/field-initialization.optimized.wat b/tests/compiler/field-initialization.optimized.wat index 698c7420d1..bc05a86e76 100644 --- a/tests/compiler/field-initialization.optimized.wat +++ b/tests/compiler/field-initialization.optimized.wat @@ -1447,7 +1447,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $2 - loop $do-continue|0 + loop $do-loop|0 local.get $2 call $~lib/rt/itcms/step i32.sub @@ -1470,7 +1470,7 @@ local.get $2 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $2 @@ -1842,7 +1842,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $3 i64.load local.get $1 @@ -1863,7 +1863,7 @@ local.tee $0 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/field-initialization.untouched.wat b/tests/compiler/field-initialization.untouched.wat index ccd54580ff..061989af79 100644 --- a/tests/compiler/field-initialization.untouched.wat +++ b/tests/compiler/field-initialization.untouched.wat @@ -1518,7 +1518,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1529,7 +1528,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1557,9 +1556,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -2597,7 +2594,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -2621,9 +2618,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index 3714775f39..671fc61a00 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -1660,7 +1660,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1683,7 +1683,7 @@ local.get $0 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $0 diff --git a/tests/compiler/for.untouched.wat b/tests/compiler/for.untouched.wat index 2241f76de1..a533f2a6cd 100644 --- a/tests/compiler/for.untouched.wat +++ b/tests/compiler/for.untouched.wat @@ -1936,7 +1936,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1947,7 +1946,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1975,9 +1974,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/function-call.optimized.wat b/tests/compiler/function-call.optimized.wat index 4a8e784af0..6c96a509aa 100644 --- a/tests/compiler/function-call.optimized.wat +++ b/tests/compiler/function-call.optimized.wat @@ -1349,7 +1349,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1372,7 +1372,7 @@ local.get $0 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $0 diff --git a/tests/compiler/function-call.untouched.wat b/tests/compiler/function-call.untouched.wat index 766c79061d..b82907c3b2 100644 --- a/tests/compiler/function-call.untouched.wat +++ b/tests/compiler/function-call.untouched.wat @@ -1544,7 +1544,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1555,7 +1554,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1583,9 +1582,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/function-expression.optimized.wat b/tests/compiler/function-expression.optimized.wat index a26ecf5317..9174601471 100644 --- a/tests/compiler/function-expression.optimized.wat +++ b/tests/compiler/function-expression.optimized.wat @@ -1332,7 +1332,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1355,7 +1355,7 @@ local.get $0 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $0 diff --git a/tests/compiler/function-expression.untouched.wat b/tests/compiler/function-expression.untouched.wat index 35ba15b769..e42698f3cb 100644 --- a/tests/compiler/function-expression.untouched.wat +++ b/tests/compiler/function-expression.untouched.wat @@ -1700,7 +1700,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1711,7 +1710,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1739,9 +1738,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index 01065000cb..64a781b647 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -1264,7 +1264,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1287,7 +1287,7 @@ local.get $0 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $0 diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index 51f30819f0..691f91bf28 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -1512,7 +1512,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1523,7 +1522,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1551,9 +1550,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index bc89635562..7ac15c9898 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -1175,7 +1175,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $1 - loop $do-continue|0 + loop $do-loop|0 local.get $1 call $~lib/rt/itcms/step i32.sub @@ -1198,7 +1198,7 @@ local.get $1 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $1 diff --git a/tests/compiler/implicit-getter-setter.untouched.wat b/tests/compiler/implicit-getter-setter.untouched.wat index 238e45538d..846ece1d20 100644 --- a/tests/compiler/implicit-getter-setter.untouched.wat +++ b/tests/compiler/implicit-getter-setter.untouched.wat @@ -1519,7 +1519,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1530,7 +1529,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1558,9 +1557,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/infer-array.optimized.wat b/tests/compiler/infer-array.optimized.wat index 153caa2238..e0719f3a8f 100644 --- a/tests/compiler/infer-array.optimized.wat +++ b/tests/compiler/infer-array.optimized.wat @@ -1285,7 +1285,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $3 - loop $do-continue|0 + loop $do-loop|0 local.get $3 call $~lib/rt/itcms/step i32.sub @@ -1308,7 +1308,7 @@ local.get $3 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $3 diff --git a/tests/compiler/infer-array.untouched.wat b/tests/compiler/infer-array.untouched.wat index 6f489bfa5c..a7a74136c7 100644 --- a/tests/compiler/infer-array.untouched.wat +++ b/tests/compiler/infer-array.untouched.wat @@ -1528,7 +1528,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1539,7 +1538,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1567,9 +1566,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/infer-generic.optimized.wat b/tests/compiler/infer-generic.optimized.wat index a59c5eb68b..74adc9c662 100644 --- a/tests/compiler/infer-generic.optimized.wat +++ b/tests/compiler/infer-generic.optimized.wat @@ -1336,7 +1336,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $2 - loop $do-continue|0 + loop $do-loop|0 local.get $2 call $~lib/rt/itcms/step i32.sub @@ -1359,7 +1359,7 @@ local.get $2 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $0 diff --git a/tests/compiler/infer-generic.untouched.wat b/tests/compiler/infer-generic.untouched.wat index 79b87293f0..b7cf289aa2 100644 --- a/tests/compiler/infer-generic.untouched.wat +++ b/tests/compiler/infer-generic.untouched.wat @@ -1598,7 +1598,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1609,7 +1608,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1637,9 +1636,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index 50cca54290..553f6c931d 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -1258,7 +1258,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $3 - loop $do-continue|0 + loop $do-loop|0 local.get $3 call $~lib/rt/itcms/step i32.sub @@ -1281,7 +1281,7 @@ local.get $3 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $3 diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index 2bd7d123a9..19773dbe73 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -1718,7 +1718,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1729,7 +1728,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1757,9 +1756,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/instanceof-class.optimized.wat b/tests/compiler/instanceof-class.optimized.wat index ef47c477d7..416e6b86fd 100644 --- a/tests/compiler/instanceof-class.optimized.wat +++ b/tests/compiler/instanceof-class.optimized.wat @@ -1176,7 +1176,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $1 - loop $do-continue|0 + loop $do-loop|0 local.get $1 call $~lib/rt/itcms/step i32.sub @@ -1199,7 +1199,7 @@ local.get $1 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $1 @@ -1546,7 +1546,7 @@ i32.load i32.le_u if - loop $do-continue|0 + loop $do-loop|0 i32.const 1 local.get $0 i32.const 3 @@ -1560,7 +1560,7 @@ i32.add i32.load offset=4 local.tee $0 - br_if $do-continue|0 + br_if $do-loop|0 end end i32.const 0 @@ -1578,7 +1578,7 @@ i32.load i32.le_u if - loop $do-continue|07 + loop $do-loop|07 i32.const 1 local.get $0 i32.const 6 @@ -1592,7 +1592,7 @@ i32.add i32.load offset=4 local.tee $0 - br_if $do-continue|07 + br_if $do-loop|07 end end i32.const 0 diff --git a/tests/compiler/instanceof-class.untouched.wat b/tests/compiler/instanceof-class.untouched.wat index 0d7ced0f57..26f3db7e58 100644 --- a/tests/compiler/instanceof-class.untouched.wat +++ b/tests/compiler/instanceof-class.untouched.wat @@ -1512,7 +1512,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1523,7 +1522,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1551,9 +1550,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -2398,7 +2395,6 @@ (func $~lib/rt/__instanceof (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 i32.const 20 i32.sub @@ -2411,7 +2407,7 @@ i32.load i32.le_u if - loop $do-continue|0 + loop $do-loop|0 local.get $2 local.get $1 i32.eq @@ -2428,9 +2424,7 @@ i32.add i32.load offset=4 local.tee $2 - local.set $4 - local.get $4 - br_if $do-continue|0 + br_if $do-loop|0 end end i32.const 0 diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index 3463ebbed7..d53529b195 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -1308,7 +1308,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1331,7 +1331,7 @@ local.get $0 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $0 diff --git a/tests/compiler/issues/1095.untouched.wat b/tests/compiler/issues/1095.untouched.wat index 607298b673..758618249b 100644 --- a/tests/compiler/issues/1095.untouched.wat +++ b/tests/compiler/issues/1095.untouched.wat @@ -1512,7 +1512,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1523,7 +1522,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1551,9 +1550,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/issues/1225.optimized.wat b/tests/compiler/issues/1225.optimized.wat index eb12e5c29e..efd7f853c4 100644 --- a/tests/compiler/issues/1225.optimized.wat +++ b/tests/compiler/issues/1225.optimized.wat @@ -1171,7 +1171,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $1 - loop $do-continue|0 + loop $do-loop|0 local.get $1 call $~lib/rt/itcms/step i32.sub @@ -1194,7 +1194,7 @@ local.get $1 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $0 diff --git a/tests/compiler/issues/1225.untouched.wat b/tests/compiler/issues/1225.untouched.wat index c156c32316..95d7aa20ca 100644 --- a/tests/compiler/issues/1225.untouched.wat +++ b/tests/compiler/issues/1225.untouched.wat @@ -1523,7 +1523,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1534,7 +1533,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1562,9 +1561,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/issues/1699.optimized.wat b/tests/compiler/issues/1699.optimized.wat index bd83374505..8c314a75f9 100644 --- a/tests/compiler/issues/1699.optimized.wat +++ b/tests/compiler/issues/1699.optimized.wat @@ -1436,7 +1436,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $2 - loop $do-continue|0 + loop $do-loop|0 local.get $2 call $~lib/rt/itcms/step i32.sub @@ -1459,7 +1459,7 @@ local.get $2 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $2 diff --git a/tests/compiler/issues/1699.untouched.wat b/tests/compiler/issues/1699.untouched.wat index 8f4da51041..cc83e450b9 100644 --- a/tests/compiler/issues/1699.untouched.wat +++ b/tests/compiler/issues/1699.untouched.wat @@ -1513,7 +1513,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1524,7 +1523,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1552,9 +1551,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/logical.optimized.wat b/tests/compiler/logical.optimized.wat index fa16156fa7..4746759e4f 100644 --- a/tests/compiler/logical.optimized.wat +++ b/tests/compiler/logical.optimized.wat @@ -1333,7 +1333,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1356,7 +1356,7 @@ local.get $0 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $0 diff --git a/tests/compiler/logical.untouched.wat b/tests/compiler/logical.untouched.wat index d52369f724..f5d48e94c7 100644 --- a/tests/compiler/logical.untouched.wat +++ b/tests/compiler/logical.untouched.wat @@ -1535,7 +1535,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1546,7 +1545,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1574,9 +1573,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/loop-flow.optimized.wat b/tests/compiler/loop-flow.optimized.wat index 9812a7bc0e..df5214e620 100644 --- a/tests/compiler/loop-flow.optimized.wat +++ b/tests/compiler/loop-flow.optimized.wat @@ -70,21 +70,23 @@ end ) (func $loop-flow/doAny (param $0 i32) (result i32) - loop $do-continue|0 + loop $do-loop|0 local.get $0 i32.const 1 i32.ne if local.get $0 i32.const 2 - i32.ne - br_if $do-continue|0 - i32.const 1104 - i32.const 1056 - i32.const 78 - i32.const 22 - call $~lib/builtins/abort - unreachable + i32.eq + if + i32.const 1104 + i32.const 1056 + i32.const 78 + i32.const 22 + call $~lib/builtins/abort + unreachable + end + br $do-loop|0 end end i32.const 1 diff --git a/tests/compiler/loop-flow.untouched.wat b/tests/compiler/loop-flow.untouched.wat index d28c1bb319..223de9fde1 100644 --- a/tests/compiler/loop-flow.untouched.wat +++ b/tests/compiler/loop-flow.untouched.wat @@ -123,37 +123,42 @@ unreachable ) (func $loop-flow/doReturn (result i32) - loop $do-continue|0 + loop $do-loop|0 i32.const 1 return end unreachable ) (func $loop-flow/doAny (param $0 i32) (result i32) - loop $do-continue|0 - local.get $0 - i32.const 1 - i32.eq - if - i32.const 1 - return - else + loop $do-loop|0 + block $do-continue|0 local.get $0 - i32.const 2 + i32.const 1 i32.eq if - i32.const 80 - i32.const 32 - i32.const 78 - i32.const 22 - call $~lib/builtins/abort - unreachable + i32.const 1 + return else - br $do-continue|0 + local.get $0 + i32.const 2 + i32.eq + if + i32.const 80 + i32.const 32 + i32.const 78 + i32.const 22 + call $~lib/builtins/abort + unreachable + else + br $do-continue|0 + end + unreachable end unreachable end - unreachable + i32.const 1 + drop + br $do-loop|0 end unreachable ) @@ -296,7 +301,7 @@ unreachable ) (func $loop-flow/doThrow (result i32) - loop $do-continue|0 + loop $do-loop|0 i32.const 80 i32.const 32 i32.const 71 diff --git a/tests/compiler/loop-wrap.optimized.wat b/tests/compiler/loop-wrap.optimized.wat index 89bf131a73..e85fe6c485 100644 --- a/tests/compiler/loop-wrap.optimized.wat +++ b/tests/compiler/loop-wrap.optimized.wat @@ -8,7 +8,7 @@ (export "memory" (memory $0)) (func $loop-wrap/testAlwaysWrapped (local $0 i32) - loop $do-continue|0 + loop $do-loop|0 local.get $0 i32.const 10 i32.ne @@ -19,13 +19,13 @@ i32.const 255 i32.and local.tee $0 - br_if $do-continue|0 + br_if $do-loop|0 end end ) (func $loop-wrap/testFirstWrapped (local $0 i32) - loop $do-continue|1 + loop $do-loop|1 local.get $0 i32.const 255 i32.and @@ -38,12 +38,12 @@ local.tee $0 i32.const 255 i32.and - br_if $do-continue|1 + br_if $do-loop|1 end end ) (func $loop-wrap/testSubsequentWrapped (param $0 i32) - loop $do-continue|0 + loop $do-loop|0 local.get $0 i32.const 255 i32.and @@ -56,7 +56,7 @@ i32.const 255 i32.and local.tee $0 - br_if $do-continue|0 + br_if $do-loop|0 end end ) diff --git a/tests/compiler/loop-wrap.untouched.wat b/tests/compiler/loop-wrap.untouched.wat index 43f9d007a9..5e31e7e380 100644 --- a/tests/compiler/loop-wrap.untouched.wat +++ b/tests/compiler/loop-wrap.untouched.wat @@ -13,11 +13,10 @@ (export "memory" (memory $0)) (func $loop-wrap/testAlwaysWrapped (local $0 i32) - (local $1 i32) i32.const 0 local.set $0 block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 i32.const 10 i32.eq @@ -30,19 +29,16 @@ i32.const 255 i32.and local.tee $0 - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end end ) (func $loop-wrap/testFirstWrapped (local $0 i32) - (local $1 i32) i32.const 0 local.set $0 block $do-break|1 - loop $do-continue|1 + loop $do-loop|1 local.get $0 i32.const 255 i32.and @@ -57,19 +53,16 @@ local.tee $0 i32.const 255 i32.and - local.set $1 - local.get $1 - br_if $do-continue|1 + br_if $do-loop|1 end end ) (func $loop-wrap/testSubsequentWrapped (param $0 i32) (local $1 i32) - (local $2 i32) local.get $0 local.set $1 block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $1 i32.const 255 i32.and @@ -84,9 +77,7 @@ i32.const 255 i32.and local.tee $1 - local.set $2 - local.get $2 - br_if $do-continue|0 + br_if $do-loop|0 end end ) diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index ad41c09de9..54ba89cd8c 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -1166,7 +1166,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $1 - loop $do-continue|0 + loop $do-loop|0 local.get $1 call $~lib/rt/itcms/step i32.sub @@ -1189,7 +1189,7 @@ local.get $1 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $1 @@ -1537,7 +1537,7 @@ i32.load i32.le_u if - loop $do-continue|0 + loop $do-loop|0 i32.const 1 local.get $2 i32.const 3 @@ -1551,7 +1551,7 @@ i32.add i32.load offset=4 local.tee $2 - br_if $do-continue|0 + br_if $do-loop|0 end end i32.const 0 @@ -1614,7 +1614,7 @@ i32.load i32.le_u if - loop $do-continue|012 + loop $do-loop|012 i32.const 1 local.get $1 i32.const 3 @@ -1628,7 +1628,7 @@ i32.add i32.load offset=4 local.tee $1 - br_if $do-continue|012 + br_if $do-loop|012 end end i32.const 0 @@ -1678,7 +1678,7 @@ i32.load i32.le_u if - loop $do-continue|015 + loop $do-loop|015 i32.const 1 local.get $2 i32.const 3 @@ -1692,7 +1692,7 @@ i32.add i32.load offset=4 local.tee $2 - br_if $do-continue|015 + br_if $do-loop|015 end end i32.const 0 @@ -1743,7 +1743,7 @@ i32.load i32.le_u if - loop $do-continue|018 + loop $do-loop|018 i32.const 1 local.get $2 i32.const 3 @@ -1757,7 +1757,7 @@ i32.add i32.load offset=4 local.tee $2 - br_if $do-continue|018 + br_if $do-loop|018 end end i32.const 0 diff --git a/tests/compiler/managed-cast.untouched.wat b/tests/compiler/managed-cast.untouched.wat index d0a0bfe294..b68dcba200 100644 --- a/tests/compiler/managed-cast.untouched.wat +++ b/tests/compiler/managed-cast.untouched.wat @@ -1512,7 +1512,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1523,7 +1522,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1551,9 +1550,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -2377,7 +2374,6 @@ (func $~lib/rt/__instanceof (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 i32.const 20 i32.sub @@ -2390,7 +2386,7 @@ i32.load i32.le_u if - loop $do-continue|0 + loop $do-loop|0 local.get $2 local.get $1 i32.eq @@ -2407,9 +2403,7 @@ i32.add i32.load offset=4 local.tee $2 - local.set $4 - local.get $4 - br_if $do-continue|0 + br_if $do-loop|0 end end i32.const 0 diff --git a/tests/compiler/new.optimized.wat b/tests/compiler/new.optimized.wat index 45d4e832e8..34913dc47e 100644 --- a/tests/compiler/new.optimized.wat +++ b/tests/compiler/new.optimized.wat @@ -1202,7 +1202,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $1 - loop $do-continue|0 + loop $do-loop|0 local.get $1 call $~lib/rt/itcms/step i32.sub @@ -1225,7 +1225,7 @@ local.get $1 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $1 diff --git a/tests/compiler/new.untouched.wat b/tests/compiler/new.untouched.wat index 2b52be241c..3a46f640eb 100644 --- a/tests/compiler/new.untouched.wat +++ b/tests/compiler/new.untouched.wat @@ -1515,7 +1515,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1526,7 +1525,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1554,9 +1553,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index fb560d0a27..a3546d088b 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -1293,7 +1293,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $1 - loop $do-continue|0 + loop $do-loop|0 local.get $1 call $~lib/rt/itcms/step i32.sub @@ -1316,7 +1316,7 @@ local.get $1 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $2 @@ -2025,7 +2025,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $3 i64.load local.get $1 @@ -2046,7 +2046,7 @@ local.tee $0 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/number.untouched.wat b/tests/compiler/number.untouched.wat index 659e2fc3fa..a44c71d806 100644 --- a/tests/compiler/number.untouched.wat +++ b/tests/compiler/number.untouched.wat @@ -1613,7 +1613,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1624,7 +1623,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1652,9 +1651,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -2719,7 +2716,6 @@ (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i32) local.get $3 i64.extend_i32_s local.set $4 @@ -2741,7 +2737,7 @@ i64.const 1 i64.sub local.set $6 - loop $do-continue|0 + loop $do-loop|0 local.get $2 i32.const 1 i32.sub @@ -2768,12 +2764,10 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end else - loop $do-continue|1 + loop $do-loop|1 local.get $2 i32.const 1 i32.sub @@ -2804,9 +2798,7 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|1 + br_if $do-loop|1 end end ) @@ -2862,7 +2854,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -2886,9 +2878,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/object-literal.optimized.wat index 19ea3c5369..d97952fd9d 100644 --- a/tests/compiler/object-literal.optimized.wat +++ b/tests/compiler/object-literal.optimized.wat @@ -1526,7 +1526,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $2 - loop $do-continue|0 + loop $do-loop|0 local.get $2 call $~lib/rt/itcms/step i32.sub @@ -1549,7 +1549,7 @@ local.get $2 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $2 @@ -1843,7 +1843,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $3 i64.load local.get $1 @@ -1864,7 +1864,7 @@ local.tee $0 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/object-literal.untouched.wat b/tests/compiler/object-literal.untouched.wat index e9b6db8f95..4c1f6cb3db 100644 --- a/tests/compiler/object-literal.untouched.wat +++ b/tests/compiler/object-literal.untouched.wat @@ -1602,7 +1602,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1613,7 +1612,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1641,9 +1640,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -2484,7 +2481,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -2508,9 +2505,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index 8216c35134..df70d58d8c 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -1174,7 +1174,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $1 - loop $do-continue|0 + loop $do-loop|0 local.get $1 call $~lib/rt/itcms/step i32.sub @@ -1197,7 +1197,7 @@ local.get $1 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $1 diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index 39eb4ada0e..e08253e6a4 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -1518,7 +1518,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1529,7 +1528,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1557,9 +1556,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/reexport.optimized.wat b/tests/compiler/reexport.optimized.wat index 679ede0cba..2b4310e1c7 100644 --- a/tests/compiler/reexport.optimized.wat +++ b/tests/compiler/reexport.optimized.wat @@ -1251,7 +1251,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $1 - loop $do-continue|0 + loop $do-loop|0 local.get $1 call $~lib/rt/itcms/step i32.sub @@ -1274,7 +1274,7 @@ local.get $1 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $1 diff --git a/tests/compiler/reexport.untouched.wat b/tests/compiler/reexport.untouched.wat index dfeefaf1a6..27af8da6f0 100644 --- a/tests/compiler/reexport.untouched.wat +++ b/tests/compiler/reexport.untouched.wat @@ -1602,7 +1602,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1613,7 +1612,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1641,9 +1640,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/rereexport.optimized.wat b/tests/compiler/rereexport.optimized.wat index 92939e7d2e..4c61049979 100644 --- a/tests/compiler/rereexport.optimized.wat +++ b/tests/compiler/rereexport.optimized.wat @@ -1399,7 +1399,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1422,7 +1422,7 @@ local.get $0 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $0 diff --git a/tests/compiler/rereexport.untouched.wat b/tests/compiler/rereexport.untouched.wat index 1bee66560a..a893c1756c 100644 --- a/tests/compiler/rereexport.untouched.wat +++ b/tests/compiler/rereexport.untouched.wat @@ -1554,7 +1554,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1565,7 +1564,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1593,9 +1592,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index 50bd0ea2dd..9c86007b10 100644 --- a/tests/compiler/resolve-access.optimized.wat +++ b/tests/compiler/resolve-access.optimized.wat @@ -1271,7 +1271,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $3 - loop $do-continue|0 + loop $do-loop|0 local.get $3 call $~lib/rt/itcms/step i32.sub @@ -1294,7 +1294,7 @@ local.get $3 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $3 diff --git a/tests/compiler/resolve-access.untouched.wat b/tests/compiler/resolve-access.untouched.wat index 3ebc948202..fcf2f3dc68 100644 --- a/tests/compiler/resolve-access.untouched.wat +++ b/tests/compiler/resolve-access.untouched.wat @@ -1528,7 +1528,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1539,7 +1538,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1567,9 +1566,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -4233,7 +4230,6 @@ (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i32) local.get $3 i64.extend_i32_s local.set $4 @@ -4255,7 +4251,7 @@ i64.const 1 i64.sub local.set $6 - loop $do-continue|0 + loop $do-loop|0 local.get $2 i32.const 1 i32.sub @@ -4282,12 +4278,10 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end else - loop $do-continue|1 + loop $do-loop|1 local.get $2 i32.const 1 i32.sub @@ -4318,9 +4312,7 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|1 + br_if $do-loop|1 end end ) diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index b29cfdffc0..77ecbd6323 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -293,7 +293,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $3 i64.load local.get $1 @@ -314,7 +314,7 @@ local.tee $0 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end @@ -1587,7 +1587,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $3 - loop $do-continue|0 + loop $do-loop|0 local.get $3 call $~lib/rt/itcms/step i32.sub @@ -1610,7 +1610,7 @@ local.get $3 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $3 diff --git a/tests/compiler/resolve-binary.untouched.wat b/tests/compiler/resolve-binary.untouched.wat index 5226bafe9d..d434e75855 100644 --- a/tests/compiler/resolve-binary.untouched.wat +++ b/tests/compiler/resolve-binary.untouched.wat @@ -153,7 +153,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -177,9 +177,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end @@ -1788,7 +1786,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1799,7 +1796,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1827,9 +1824,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -2894,7 +2889,6 @@ (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i32) local.get $3 i64.extend_i32_s local.set $4 @@ -2916,7 +2910,7 @@ i64.const 1 i64.sub local.set $6 - loop $do-continue|0 + loop $do-loop|0 local.get $2 i32.const 1 i32.sub @@ -2943,12 +2937,10 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end else - loop $do-continue|1 + loop $do-loop|1 local.get $2 i32.const 1 i32.sub @@ -2979,9 +2971,7 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|1 + br_if $do-loop|1 end end ) diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index eae73f314d..6f78d8f528 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -1499,7 +1499,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $2 - loop $do-continue|0 + loop $do-loop|0 local.get $2 call $~lib/rt/itcms/step i32.sub @@ -1522,7 +1522,7 @@ local.get $2 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $2 @@ -4089,7 +4089,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $3 i64.load local.get $1 @@ -4110,7 +4110,7 @@ local.tee $0 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/resolve-elementaccess.untouched.wat b/tests/compiler/resolve-elementaccess.untouched.wat index dc1d0b8529..0a67fc5010 100644 --- a/tests/compiler/resolve-elementaccess.untouched.wat +++ b/tests/compiler/resolve-elementaccess.untouched.wat @@ -1551,7 +1551,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1562,7 +1561,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1590,9 +1589,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -5271,7 +5268,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -5295,9 +5292,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end @@ -5551,7 +5546,6 @@ (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i32) local.get $3 i64.extend_i32_s local.set $4 @@ -5573,7 +5567,7 @@ i64.const 1 i64.sub local.set $6 - loop $do-continue|0 + loop $do-loop|0 local.get $2 i32.const 1 i32.sub @@ -5600,12 +5594,10 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end else - loop $do-continue|1 + loop $do-loop|1 local.get $2 i32.const 1 i32.sub @@ -5636,9 +5628,7 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|1 + br_if $do-loop|1 end end ) diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index 445a7cab22..6ebaf38a75 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -1286,7 +1286,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $1 - loop $do-continue|0 + loop $do-loop|0 local.get $1 call $~lib/rt/itcms/step i32.sub @@ -1309,7 +1309,7 @@ local.get $1 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $2 @@ -2106,7 +2106,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $2 i64.load local.get $3 @@ -2127,7 +2127,7 @@ local.tee $0 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/resolve-function-expression.untouched.wat b/tests/compiler/resolve-function-expression.untouched.wat index 7174e25b13..fa7aaca340 100644 --- a/tests/compiler/resolve-function-expression.untouched.wat +++ b/tests/compiler/resolve-function-expression.untouched.wat @@ -1595,7 +1595,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1606,7 +1605,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1634,9 +1633,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -2701,7 +2698,6 @@ (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i32) local.get $3 i64.extend_i32_s local.set $4 @@ -2723,7 +2719,7 @@ i64.const 1 i64.sub local.set $6 - loop $do-continue|0 + loop $do-loop|0 local.get $2 i32.const 1 i32.sub @@ -2750,12 +2746,10 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end else - loop $do-continue|1 + loop $do-loop|1 local.get $2 i32.const 1 i32.sub @@ -2786,9 +2780,7 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|1 + br_if $do-loop|1 end end ) @@ -2844,7 +2836,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -2868,9 +2860,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/resolve-nested.optimized.wat b/tests/compiler/resolve-nested.optimized.wat index 8916357988..9bcbc08a53 100644 --- a/tests/compiler/resolve-nested.optimized.wat +++ b/tests/compiler/resolve-nested.optimized.wat @@ -1171,7 +1171,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $1 - loop $do-continue|0 + loop $do-loop|0 local.get $1 call $~lib/rt/itcms/step i32.sub @@ -1194,7 +1194,7 @@ local.get $1 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $1 diff --git a/tests/compiler/resolve-nested.untouched.wat b/tests/compiler/resolve-nested.untouched.wat index 32ada90a5c..fe5299cb7b 100644 --- a/tests/compiler/resolve-nested.untouched.wat +++ b/tests/compiler/resolve-nested.untouched.wat @@ -1534,7 +1534,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1545,7 +1544,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1573,9 +1572,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/resolve-new.optimized.wat b/tests/compiler/resolve-new.optimized.wat index aa996c86d2..f3c97f501e 100644 --- a/tests/compiler/resolve-new.optimized.wat +++ b/tests/compiler/resolve-new.optimized.wat @@ -1280,7 +1280,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1303,7 +1303,7 @@ local.get $0 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $0 diff --git a/tests/compiler/resolve-new.untouched.wat b/tests/compiler/resolve-new.untouched.wat index 4e69d703fd..3ec3effe0f 100644 --- a/tests/compiler/resolve-new.untouched.wat +++ b/tests/compiler/resolve-new.untouched.wat @@ -1510,7 +1510,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1521,7 +1520,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1549,9 +1548,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/resolve-propertyaccess.optimized.wat b/tests/compiler/resolve-propertyaccess.optimized.wat index a90ff9db80..23f5f2986e 100644 --- a/tests/compiler/resolve-propertyaccess.optimized.wat +++ b/tests/compiler/resolve-propertyaccess.optimized.wat @@ -1286,7 +1286,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $3 - loop $do-continue|0 + loop $do-loop|0 local.get $3 call $~lib/rt/itcms/step i32.sub @@ -1309,7 +1309,7 @@ local.get $3 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $3 @@ -2014,7 +2014,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $3 i64.load local.get $1 @@ -2035,7 +2035,7 @@ local.tee $0 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/resolve-propertyaccess.untouched.wat b/tests/compiler/resolve-propertyaccess.untouched.wat index 43c71aa342..ca9881fdd1 100644 --- a/tests/compiler/resolve-propertyaccess.untouched.wat +++ b/tests/compiler/resolve-propertyaccess.untouched.wat @@ -1596,7 +1596,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1607,7 +1606,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1635,9 +1634,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -2702,7 +2699,6 @@ (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i32) local.get $3 i64.extend_i32_s local.set $4 @@ -2724,7 +2720,7 @@ i64.const 1 i64.sub local.set $6 - loop $do-continue|0 + loop $do-loop|0 local.get $2 i32.const 1 i32.sub @@ -2751,12 +2747,10 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end else - loop $do-continue|1 + loop $do-loop|1 local.get $2 i32.const 1 i32.sub @@ -2787,9 +2781,7 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|1 + br_if $do-loop|1 end end ) @@ -2845,7 +2837,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -2869,9 +2861,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index aa987b9856..456b46f485 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -1290,7 +1290,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $1 - loop $do-continue|0 + loop $do-loop|0 local.get $1 call $~lib/rt/itcms/step i32.sub @@ -1313,7 +1313,7 @@ local.get $1 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $2 @@ -1906,7 +1906,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $3 i64.load local.get $1 @@ -1927,7 +1927,7 @@ local.tee $0 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/resolve-ternary.untouched.wat b/tests/compiler/resolve-ternary.untouched.wat index 8c7ab33c96..922eca36b6 100644 --- a/tests/compiler/resolve-ternary.untouched.wat +++ b/tests/compiler/resolve-ternary.untouched.wat @@ -1603,7 +1603,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1614,7 +1613,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1642,9 +1641,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -2709,7 +2706,6 @@ (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i32) local.get $3 i64.extend_i32_s local.set $4 @@ -2731,7 +2727,7 @@ i64.const 1 i64.sub local.set $6 - loop $do-continue|0 + loop $do-loop|0 local.get $2 i32.const 1 i32.sub @@ -2758,12 +2754,10 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end else - loop $do-continue|1 + loop $do-loop|1 local.get $2 i32.const 1 i32.sub @@ -2794,9 +2788,7 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|1 + br_if $do-loop|1 end end ) @@ -2852,7 +2844,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -2876,9 +2868,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/resolve-unary.optimized.wat b/tests/compiler/resolve-unary.optimized.wat index 8856bdb4eb..316609fa6b 100644 --- a/tests/compiler/resolve-unary.optimized.wat +++ b/tests/compiler/resolve-unary.optimized.wat @@ -1306,7 +1306,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $3 - loop $do-continue|0 + loop $do-loop|0 local.get $3 call $~lib/rt/itcms/step i32.sub @@ -1329,7 +1329,7 @@ local.get $3 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $3 @@ -2034,7 +2034,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $3 i64.load local.get $1 @@ -2055,7 +2055,7 @@ local.tee $0 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/resolve-unary.untouched.wat b/tests/compiler/resolve-unary.untouched.wat index 93609cf020..921930f130 100644 --- a/tests/compiler/resolve-unary.untouched.wat +++ b/tests/compiler/resolve-unary.untouched.wat @@ -1593,7 +1593,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1604,7 +1603,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1632,9 +1631,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -2699,7 +2696,6 @@ (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i32) local.get $3 i64.extend_i32_s local.set $4 @@ -2721,7 +2717,7 @@ i64.const 1 i64.sub local.set $6 - loop $do-continue|0 + loop $do-loop|0 local.get $2 i32.const 1 i32.sub @@ -2748,12 +2744,10 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end else - loop $do-continue|1 + loop $do-loop|1 local.get $2 i32.const 1 i32.sub @@ -2784,9 +2778,7 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|1 + br_if $do-loop|1 end end ) @@ -2842,7 +2834,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -2866,9 +2858,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/rt/finalize.optimized.wat b/tests/compiler/rt/finalize.optimized.wat index 520c7591bc..bebac269d6 100644 --- a/tests/compiler/rt/finalize.optimized.wat +++ b/tests/compiler/rt/finalize.optimized.wat @@ -1232,7 +1232,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1255,7 +1255,7 @@ local.get $0 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $0 diff --git a/tests/compiler/rt/finalize.untouched.wat b/tests/compiler/rt/finalize.untouched.wat index dfa72a578f..fe37c5c7c1 100644 --- a/tests/compiler/rt/finalize.untouched.wat +++ b/tests/compiler/rt/finalize.untouched.wat @@ -1533,7 +1533,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1544,7 +1543,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1572,9 +1571,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/rt/instanceof.optimized.wat b/tests/compiler/rt/instanceof.optimized.wat index 6b303de27f..0cb166024f 100644 --- a/tests/compiler/rt/instanceof.optimized.wat +++ b/tests/compiler/rt/instanceof.optimized.wat @@ -1205,7 +1205,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $1 - loop $do-continue|0 + loop $do-loop|0 local.get $1 call $~lib/rt/itcms/step i32.sub @@ -1228,7 +1228,7 @@ local.get $1 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $1 @@ -1497,7 +1497,7 @@ i32.load i32.le_u if - loop $do-continue|0 + loop $do-loop|0 i32.const 1 local.get $0 i32.const 4 @@ -1511,7 +1511,7 @@ i32.add i32.load offset=4 local.tee $0 - br_if $do-continue|0 + br_if $do-loop|0 end end i32.const 0 @@ -1543,7 +1543,7 @@ i32.load i32.le_u if - loop $do-continue|01 + loop $do-loop|01 i32.const 1 local.get $0 i32.const 5 @@ -1557,7 +1557,7 @@ i32.add i32.load offset=4 local.tee $0 - br_if $do-continue|01 + br_if $do-loop|01 end end i32.const 0 @@ -1589,7 +1589,7 @@ i32.load i32.le_u if - loop $do-continue|03 + loop $do-loop|03 i32.const 1 local.get $0 i32.const 4 @@ -1603,7 +1603,7 @@ i32.add i32.load offset=4 local.tee $0 - br_if $do-continue|03 + br_if $do-loop|03 end end i32.const 0 @@ -1636,7 +1636,7 @@ i32.load i32.le_u if - loop $do-continue|05 + loop $do-loop|05 i32.const 1 local.get $0 i32.const 5 @@ -1650,7 +1650,7 @@ i32.add i32.load offset=4 local.tee $0 - br_if $do-continue|05 + br_if $do-loop|05 end end i32.const 0 @@ -1682,7 +1682,7 @@ i32.load i32.le_u if - loop $do-continue|07 + loop $do-loop|07 i32.const 1 local.get $0 i32.const 4 @@ -1696,7 +1696,7 @@ i32.add i32.load offset=4 local.tee $0 - br_if $do-continue|07 + br_if $do-loop|07 end end i32.const 0 @@ -1729,7 +1729,7 @@ i32.load i32.le_u if - loop $do-continue|09 + loop $do-loop|09 i32.const 1 local.get $0 i32.const 5 @@ -1743,7 +1743,7 @@ i32.add i32.load offset=4 local.tee $0 - br_if $do-continue|09 + br_if $do-loop|09 end end i32.const 0 @@ -1794,7 +1794,7 @@ i32.load i32.le_u if - loop $do-continue|011 + loop $do-loop|011 i32.const 1 local.get $0 i32.const 4 @@ -1808,7 +1808,7 @@ i32.add i32.load offset=4 local.tee $0 - br_if $do-continue|011 + br_if $do-loop|011 end end i32.const 0 @@ -1840,7 +1840,7 @@ i32.load i32.le_u if - loop $do-continue|013 + loop $do-loop|013 i32.const 1 local.get $0 i32.const 5 @@ -1854,7 +1854,7 @@ i32.add i32.load offset=4 local.tee $0 - br_if $do-continue|013 + br_if $do-loop|013 end end i32.const 0 @@ -1896,7 +1896,7 @@ i32.load i32.le_u if - loop $do-continue|015 + loop $do-loop|015 i32.const 1 local.get $0 i32.const 4 @@ -1910,7 +1910,7 @@ i32.add i32.load offset=4 local.tee $0 - br_if $do-continue|015 + br_if $do-loop|015 end end i32.const 0 @@ -1943,7 +1943,7 @@ i32.load i32.le_u if - loop $do-continue|017 + loop $do-loop|017 i32.const 1 local.get $0 i32.const 5 @@ -1957,7 +1957,7 @@ i32.add i32.load offset=4 local.tee $0 - br_if $do-continue|017 + br_if $do-loop|017 end end i32.const 0 @@ -1999,7 +1999,7 @@ i32.load i32.le_u if - loop $do-continue|019 + loop $do-loop|019 i32.const 1 local.get $0 i32.const 4 @@ -2013,7 +2013,7 @@ i32.add i32.load offset=4 local.tee $0 - br_if $do-continue|019 + br_if $do-loop|019 end end i32.const 0 @@ -2046,7 +2046,7 @@ i32.load i32.le_u if - loop $do-continue|021 + loop $do-loop|021 i32.const 1 local.get $0 i32.const 5 @@ -2060,7 +2060,7 @@ i32.add i32.load offset=4 local.tee $0 - br_if $do-continue|021 + br_if $do-loop|021 end end i32.const 0 diff --git a/tests/compiler/rt/instanceof.untouched.wat b/tests/compiler/rt/instanceof.untouched.wat index b0dd9f536a..d6ceab0b6b 100644 --- a/tests/compiler/rt/instanceof.untouched.wat +++ b/tests/compiler/rt/instanceof.untouched.wat @@ -1520,7 +1520,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1531,7 +1530,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1559,9 +1558,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -2358,7 +2355,6 @@ (func $~lib/rt/__instanceof (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 i32.const 20 i32.sub @@ -2371,7 +2367,7 @@ i32.load i32.le_u if - loop $do-continue|0 + loop $do-loop|0 local.get $2 local.get $1 i32.eq @@ -2388,9 +2384,7 @@ i32.add i32.load offset=4 local.tee $2 - local.set $4 - local.get $4 - br_if $do-continue|0 + br_if $do-loop|0 end end i32.const 0 diff --git a/tests/compiler/rt/runtime-incremental-export.optimized.wat b/tests/compiler/rt/runtime-incremental-export.optimized.wat index 1fe41540de..6cffd17c15 100644 --- a/tests/compiler/rt/runtime-incremental-export.optimized.wat +++ b/tests/compiler/rt/runtime-incremental-export.optimized.wat @@ -1264,7 +1264,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $3 - loop $do-continue|0 + loop $do-loop|0 local.get $3 call $~lib/rt/itcms/step i32.sub @@ -1287,7 +1287,7 @@ local.get $3 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $3 diff --git a/tests/compiler/rt/runtime-incremental-export.untouched.wat b/tests/compiler/rt/runtime-incremental-export.untouched.wat index 5eef51e823..1d8dc9fe14 100644 --- a/tests/compiler/rt/runtime-incremental-export.untouched.wat +++ b/tests/compiler/rt/runtime-incremental-export.untouched.wat @@ -1516,7 +1516,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1527,7 +1526,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1555,9 +1554,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/std-wasi/console.optimized.wat b/tests/compiler/std-wasi/console.optimized.wat index ef33924c32..ce06670682 100644 --- a/tests/compiler/std-wasi/console.optimized.wat +++ b/tests/compiler/std-wasi/console.optimized.wat @@ -574,7 +574,7 @@ i32.add i32.add local.set $4 - loop $do-continue|0 + loop $do-loop|0 local.get $4 i32.const 1 i32.sub @@ -589,7 +589,7 @@ i32.const 10 i32.div_u local.tee $2 - br_if $do-continue|0 + br_if $do-loop|0 end local.get $0 local.get $4 @@ -649,7 +649,7 @@ i32.add i32.add local.set $4 - loop $do-continue|1 + loop $do-loop|1 local.get $4 i32.const 1 i32.sub @@ -664,7 +664,7 @@ i32.const 10 i32.div_u local.tee $3 - br_if $do-continue|1 + br_if $do-loop|1 end local.get $0 local.get $4 @@ -2834,7 +2834,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $2 - loop $do-continue|0 + loop $do-loop|0 local.get $2 call $~lib/rt/itcms/step i32.sub @@ -2857,7 +2857,7 @@ local.get $2 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $2 @@ -3948,7 +3948,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $4 i64.load local.get $2 @@ -3969,7 +3969,7 @@ local.tee $0 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/std-wasi/console.untouched.wat b/tests/compiler/std-wasi/console.untouched.wat index 1da7ebf74a..ec52c64717 100644 --- a/tests/compiler/std-wasi/console.untouched.wat +++ b/tests/compiler/std-wasi/console.untouched.wat @@ -520,7 +520,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) i32.const 0 i32.const 12 call $~lib/bindings/wasi_snapshot_preview1/iovec#set:buf @@ -589,7 +588,7 @@ local.get $6 i32.add local.set $4 - loop $do-continue|0 + loop $do-loop|0 local.get $2 i32.const 10 i32.div_u @@ -607,9 +606,7 @@ local.get $5 local.set $2 local.get $2 - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end local.get $4 local.get $6 @@ -630,7 +627,7 @@ local.get $6 i32.add local.set $4 - loop $do-continue|1 + loop $do-loop|1 local.get $3 i32.const 10 i32.div_u @@ -648,9 +645,7 @@ local.get $7 local.set $3 local.get $3 - local.set $8 - local.get $8 - br_if $do-continue|1 + br_if $do-loop|1 end local.get $4 local.get $6 @@ -3564,7 +3559,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -3575,7 +3569,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -3603,9 +3597,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -4314,7 +4306,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -4338,9 +4330,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end @@ -5087,7 +5077,6 @@ (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i32) local.get $3 i64.extend_i32_s local.set $4 @@ -5109,7 +5098,7 @@ i64.const 1 i64.sub local.set $6 - loop $do-continue|0 + loop $do-loop|0 local.get $2 i32.const 1 i32.sub @@ -5136,12 +5125,10 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end else - loop $do-continue|1 + loop $do-loop|1 local.get $2 i32.const 1 i32.sub @@ -5172,9 +5159,7 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|1 + br_if $do-loop|1 end end ) diff --git a/tests/compiler/std-wasi/crypto.optimized.wat b/tests/compiler/std-wasi/crypto.optimized.wat index 9918702766..ec855ff8f2 100644 --- a/tests/compiler/std-wasi/crypto.optimized.wat +++ b/tests/compiler/std-wasi/crypto.optimized.wat @@ -530,7 +530,7 @@ i32.add i32.add local.set $4 - loop $do-continue|0 + loop $do-loop|0 local.get $4 i32.const 1 i32.sub @@ -545,7 +545,7 @@ i32.const 10 i32.div_u local.tee $2 - br_if $do-continue|0 + br_if $do-loop|0 end local.get $0 local.get $4 @@ -605,7 +605,7 @@ i32.add i32.add local.set $4 - loop $do-continue|1 + loop $do-loop|1 local.get $4 i32.const 1 i32.sub @@ -620,7 +620,7 @@ i32.const 10 i32.div_u local.tee $3 - br_if $do-continue|1 + br_if $do-loop|1 end local.get $0 local.get $4 @@ -2273,7 +2273,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $2 - loop $do-continue|0 + loop $do-loop|0 local.get $2 call $~lib/rt/itcms/step i32.sub @@ -2296,7 +2296,7 @@ local.get $2 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $2 diff --git a/tests/compiler/std-wasi/crypto.untouched.wat b/tests/compiler/std-wasi/crypto.untouched.wat index 44986180b1..a7ec6d72f6 100644 --- a/tests/compiler/std-wasi/crypto.untouched.wat +++ b/tests/compiler/std-wasi/crypto.untouched.wat @@ -494,7 +494,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) i32.const 0 i32.const 12 call $~lib/bindings/wasi_snapshot_preview1/iovec#set:buf @@ -563,7 +562,7 @@ local.get $6 i32.add local.set $4 - loop $do-continue|0 + loop $do-loop|0 local.get $2 i32.const 10 i32.div_u @@ -581,9 +580,7 @@ local.get $5 local.set $2 local.get $2 - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end local.get $4 local.get $6 @@ -604,7 +601,7 @@ local.get $6 i32.add local.set $4 - loop $do-continue|1 + loop $do-loop|1 local.get $3 i32.const 10 i32.div_u @@ -622,9 +619,7 @@ local.get $7 local.set $3 local.get $3 - local.set $8 - local.get $8 - br_if $do-continue|1 + br_if $do-loop|1 end local.get $4 local.get $6 @@ -2121,7 +2116,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -2132,7 +2126,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -2160,9 +2154,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -3963,7 +3955,6 @@ (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i32) local.get $3 i64.extend_i32_s local.set $4 @@ -3985,7 +3976,7 @@ i64.const 1 i64.sub local.set $6 - loop $do-continue|0 + loop $do-loop|0 local.get $2 i32.const 1 i32.sub @@ -4012,12 +4003,10 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end else - loop $do-continue|1 + loop $do-loop|1 local.get $2 i32.const 1 i32.sub @@ -4048,9 +4037,7 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|1 + br_if $do-loop|1 end end ) diff --git a/tests/compiler/std-wasi/process.optimized.wat b/tests/compiler/std-wasi/process.optimized.wat index 6367cbbb29..344d49e36c 100644 --- a/tests/compiler/std-wasi/process.optimized.wat +++ b/tests/compiler/std-wasi/process.optimized.wat @@ -560,7 +560,7 @@ i32.add i32.add local.set $4 - loop $do-continue|0 + loop $do-loop|0 local.get $4 i32.const 1 i32.sub @@ -575,7 +575,7 @@ i32.const 10 i32.div_u local.tee $2 - br_if $do-continue|0 + br_if $do-loop|0 end local.get $0 local.get $4 @@ -635,7 +635,7 @@ i32.add i32.add local.set $4 - loop $do-continue|1 + loop $do-loop|1 local.get $4 i32.const 1 i32.sub @@ -650,7 +650,7 @@ i32.const 10 i32.div_u local.tee $3 - br_if $do-continue|1 + br_if $do-loop|1 end local.get $0 local.get $4 @@ -2847,7 +2847,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $2 - loop $do-continue|0 + loop $do-loop|0 local.get $2 call $~lib/rt/itcms/step i32.sub @@ -2870,7 +2870,7 @@ local.get $2 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $2 @@ -4081,7 +4081,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $1 i64.load local.get $2 @@ -4102,7 +4102,7 @@ local.tee $3 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/std-wasi/process.untouched.wat b/tests/compiler/std-wasi/process.untouched.wat index 6d994379f4..0041c62cf0 100644 --- a/tests/compiler/std-wasi/process.untouched.wat +++ b/tests/compiler/std-wasi/process.untouched.wat @@ -518,7 +518,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) i32.const 0 i32.const 12 call $~lib/bindings/wasi_snapshot_preview1/iovec#set:buf @@ -587,7 +586,7 @@ local.get $6 i32.add local.set $4 - loop $do-continue|0 + loop $do-loop|0 local.get $2 i32.const 10 i32.div_u @@ -605,9 +604,7 @@ local.get $5 local.set $2 local.get $2 - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end local.get $4 local.get $6 @@ -628,7 +625,7 @@ local.get $6 i32.add local.set $4 - loop $do-continue|1 + loop $do-loop|1 local.get $3 i32.const 10 i32.div_u @@ -646,9 +643,7 @@ local.get $7 local.set $3 local.get $3 - local.set $8 - local.get $8 - br_if $do-continue|1 + br_if $do-loop|1 end local.get $4 local.get $6 @@ -3562,7 +3557,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -3573,7 +3567,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -3601,9 +3595,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -5530,7 +5522,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -5554,9 +5546,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end @@ -6631,7 +6621,6 @@ (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i32) local.get $3 i64.extend_i32_s local.set $4 @@ -6653,7 +6642,7 @@ i64.const 1 i64.sub local.set $6 - loop $do-continue|0 + loop $do-loop|0 local.get $2 i32.const 1 i32.sub @@ -6680,12 +6669,10 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end else - loop $do-continue|1 + loop $do-loop|1 local.get $2 i32.const 1 i32.sub @@ -6716,9 +6703,7 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|1 + br_if $do-loop|1 end end ) diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index 2f8c5a787e..cb72604bf0 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -67,7 +67,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $3 i64.load local.get $4 @@ -88,7 +88,7 @@ local.tee $1 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/std/array-access.untouched.wat b/tests/compiler/std/array-access.untouched.wat index fa88f14d96..39bd1eda85 100644 --- a/tests/compiler/std/array-access.untouched.wat +++ b/tests/compiler/std/array-access.untouched.wat @@ -96,7 +96,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -120,9 +120,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 2d1c9258ee..dd66dff450 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -1344,7 +1344,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $3 - loop $do-continue|0 + loop $do-loop|0 local.get $3 call $~lib/rt/itcms/step i32.sub @@ -1367,7 +1367,7 @@ local.get $3 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $3 diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index f897694f8b..29d006913b 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -1586,7 +1586,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1597,7 +1596,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1625,9 +1624,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 489be304c8..f6a99ebd5a 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -2354,7 +2354,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $2 - loop $do-continue|0 + loop $do-loop|0 local.get $2 call $~lib/rt/itcms/step i32.sub @@ -2377,7 +2377,7 @@ local.get $2 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $2 @@ -9074,7 +9074,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $0 i64.load local.get $1 @@ -9095,7 +9095,7 @@ local.tee $3 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end @@ -9195,7 +9195,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $3 i64.load local.get $1 @@ -9216,7 +9216,7 @@ local.tee $0 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index a5db53b7a7..41704bbf07 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -1923,7 +1923,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1934,7 +1933,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1962,9 +1961,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -14726,7 +14723,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -14750,9 +14747,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end @@ -16325,7 +16320,6 @@ (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i32) local.get $3 i64.extend_i32_s local.set $4 @@ -16347,7 +16341,7 @@ i64.const 1 i64.sub local.set $6 - loop $do-continue|0 + loop $do-loop|0 local.get $2 i32.const 1 i32.sub @@ -16374,12 +16368,10 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end else - loop $do-continue|1 + loop $do-loop|1 local.get $2 i32.const 1 i32.sub @@ -16410,9 +16402,7 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|1 + br_if $do-loop|1 end end ) diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 88486e11d5..9558268068 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1437,7 +1437,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $2 - loop $do-continue|0 + loop $do-loop|0 local.get $2 call $~lib/rt/itcms/step i32.sub @@ -1460,7 +1460,7 @@ local.get $2 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $2 diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index 6e027a368a..7ecfbcb398 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -1516,7 +1516,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1527,7 +1526,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1555,9 +1554,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 79fa20cf26..25c85b01f1 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -1443,7 +1443,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $2 - loop $do-continue|0 + loop $do-loop|0 local.get $2 call $~lib/rt/itcms/step i32.sub @@ -1466,7 +1466,7 @@ local.get $2 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $2 diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index fec69a0173..23b9b1b8e5 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -1523,7 +1523,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1534,7 +1533,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1562,9 +1561,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index d2136f4d4e..f3d2b4092c 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -1804,7 +1804,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $2 - loop $do-continue|0 + loop $do-loop|0 local.get $2 call $~lib/rt/itcms/step i32.sub @@ -1827,7 +1827,7 @@ local.get $2 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $2 @@ -3718,7 +3718,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $1 i64.load local.get $2 @@ -3739,7 +3739,7 @@ local.tee $3 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index b5d554b2ce..ab4c2824a1 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -1866,7 +1866,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1877,7 +1876,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1905,9 +1904,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -3492,7 +3489,6 @@ (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i32) local.get $3 i64.extend_i32_s local.set $4 @@ -3514,7 +3510,7 @@ i64.const 1 i64.sub local.set $6 - loop $do-continue|0 + loop $do-loop|0 local.get $2 i32.const 1 i32.sub @@ -3541,12 +3537,10 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end else - loop $do-continue|1 + loop $do-loop|1 local.get $2 i32.const 1 i32.sub @@ -3577,9 +3571,7 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|1 + br_if $do-loop|1 end end ) @@ -4924,7 +4916,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -4948,9 +4940,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index e0ae5df9e7..1123142e58 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -1451,7 +1451,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $2 - loop $do-continue|0 + loop $do-loop|0 local.get $2 call $~lib/rt/itcms/step i32.sub @@ -1474,7 +1474,7 @@ local.get $2 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $2 diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index 3894e64863..2a7dc6da68 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -1536,7 +1536,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1547,7 +1546,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1575,9 +1574,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/std/math.untouched.wat b/tests/compiler/std/math.untouched.wat index ace0e1b295..4a8d2022e9 100644 --- a/tests/compiler/std/math.untouched.wat +++ b/tests/compiler/std/math.untouched.wat @@ -11671,7 +11671,7 @@ i32.const 0 local.set $9 block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $4 local.get $5 i64.lt_s @@ -11987,7 +11987,7 @@ i32.const 0 local.set $8 block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $4 local.get $5 i32.lt_s diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index 37485b7a44..715b79212f 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -1219,7 +1219,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1242,7 +1242,7 @@ local.get $0 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $0 diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index 2e146335e4..6d70ba6747 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -1523,7 +1523,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1534,7 +1533,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1562,9 +1561,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/std/object.optimized.wat b/tests/compiler/std/object.optimized.wat index ffd1f42363..4f82e9c7b1 100644 --- a/tests/compiler/std/object.optimized.wat +++ b/tests/compiler/std/object.optimized.wat @@ -72,7 +72,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $3 i64.load local.get $1 @@ -93,7 +93,7 @@ local.tee $0 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/std/object.untouched.wat b/tests/compiler/std/object.untouched.wat index f6c40ec4a8..ea3d7177e7 100644 --- a/tests/compiler/std/object.untouched.wat +++ b/tests/compiler/std/object.untouched.wat @@ -140,7 +140,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -164,9 +164,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 2f5135eadb..4e367f31bb 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -1226,7 +1226,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $1 - loop $do-continue|0 + loop $do-loop|0 local.get $1 call $~lib/rt/itcms/step i32.sub @@ -1249,7 +1249,7 @@ local.get $1 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $1 diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 8e9cf23cca..332ef7d2e2 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -1577,7 +1577,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1588,7 +1587,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1616,9 +1615,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index ffd55b7272..a4618f1880 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -1444,7 +1444,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $2 - loop $do-continue|0 + loop $do-loop|0 local.get $2 call $~lib/rt/itcms/step i32.sub @@ -1467,7 +1467,7 @@ local.get $2 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $2 diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index 5c76bb8299..6fb03112b3 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -1531,7 +1531,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1542,7 +1541,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1570,9 +1569,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index 668d2cd2fe..6b6ce45d59 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -2216,7 +2216,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $1 - loop $do-continue|0 + loop $do-loop|0 local.get $1 call $~lib/rt/itcms/step i32.sub @@ -2239,7 +2239,7 @@ local.get $1 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $1 diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index d547a2e9bf..627fe6d822 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -1565,7 +1565,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1576,7 +1575,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1604,9 +1603,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index 807cc52cd7..6804073e83 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -1572,7 +1572,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $2 - loop $do-continue|0 + loop $do-loop|0 local.get $2 call $~lib/rt/itcms/step i32.sub @@ -1595,7 +1595,7 @@ local.get $2 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $2 @@ -2873,7 +2873,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $3 i64.load local.get $1 @@ -2894,7 +2894,7 @@ local.tee $0 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/std/staticarray.untouched.wat b/tests/compiler/std/staticarray.untouched.wat index 39b5976df0..6f50620563 100644 --- a/tests/compiler/std/staticarray.untouched.wat +++ b/tests/compiler/std/staticarray.untouched.wat @@ -1621,7 +1621,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1632,7 +1631,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1660,9 +1659,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -3899,7 +3896,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -3923,9 +3920,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 2733967504..2dcb63d1cd 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -1699,7 +1699,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $3 - loop $do-continue|0 + loop $do-loop|0 local.get $3 call $~lib/rt/itcms/step i32.sub @@ -1722,7 +1722,7 @@ local.get $3 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $3 @@ -3313,7 +3313,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $3 i64.load local.get $1 @@ -3334,7 +3334,7 @@ local.tee $0 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/std/string-casemapping.untouched.wat b/tests/compiler/std/string-casemapping.untouched.wat index 8bcea8fb01..69c093d509 100644 --- a/tests/compiler/std/string-casemapping.untouched.wat +++ b/tests/compiler/std/string-casemapping.untouched.wat @@ -1698,7 +1698,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1709,7 +1708,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1737,9 +1736,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -4068,7 +4065,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -4092,9 +4089,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end @@ -4778,7 +4773,6 @@ (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i32) local.get $3 i64.extend_i32_s local.set $4 @@ -4800,7 +4794,7 @@ i64.const 1 i64.sub local.set $6 - loop $do-continue|0 + loop $do-loop|0 local.get $2 i32.const 1 i32.sub @@ -4827,12 +4821,10 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end else - loop $do-continue|1 + loop $do-loop|1 local.get $2 i32.const 1 i32.sub @@ -4863,9 +4855,7 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|1 + br_if $do-loop|1 end end ) diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index dcb7a1ad25..c205a6bed6 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -1284,7 +1284,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $3 - loop $do-continue|0 + loop $do-loop|0 local.get $3 call $~lib/rt/itcms/step i32.sub @@ -1307,7 +1307,7 @@ local.get $3 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $3 @@ -2697,7 +2697,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $3 i64.load local.get $1 @@ -2718,7 +2718,7 @@ local.tee $0 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/std/string-encoding.untouched.wat b/tests/compiler/std/string-encoding.untouched.wat index 087585a46b..9b35842eba 100644 --- a/tests/compiler/std/string-encoding.untouched.wat +++ b/tests/compiler/std/string-encoding.untouched.wat @@ -1535,7 +1535,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1546,7 +1545,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1574,9 +1573,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -3694,7 +3691,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -3718,9 +3715,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index bc8051ae8a..9302607f35 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -963,7 +963,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $1 i64.load local.get $2 @@ -984,7 +984,7 @@ local.tee $3 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end @@ -2470,7 +2470,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $2 - loop $do-continue|0 + loop $do-loop|0 local.get $2 call $~lib/rt/itcms/step i32.sub @@ -2493,7 +2493,7 @@ local.get $2 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $2 @@ -6274,7 +6274,7 @@ local.get $3 i32.and if - loop $do-continue|1 + loop $do-loop|1 local.get $2 i32.const 1 i32.sub @@ -6302,7 +6302,7 @@ local.tee $1 i64.const 0 i64.ne - br_if $do-continue|1 + br_if $do-loop|1 end else local.get $3 @@ -6315,7 +6315,7 @@ i64.const 1 i64.sub local.set $5 - loop $do-continue|0 + loop $do-loop|0 local.get $2 i32.const 1 i32.sub @@ -6340,7 +6340,7 @@ local.tee $1 i64.const 0 i64.ne - br_if $do-continue|0 + br_if $do-loop|0 end end ) diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index ac40edd4b4..dfb1faca55 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -571,7 +571,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -595,9 +595,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end @@ -2234,7 +2232,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -2245,7 +2242,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -2273,9 +2270,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -7719,7 +7714,6 @@ (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i32) local.get $3 i64.extend_i32_s local.set $4 @@ -7741,7 +7735,7 @@ i64.const 1 i64.sub local.set $6 - loop $do-continue|0 + loop $do-loop|0 local.get $2 i32.const 1 i32.sub @@ -7768,12 +7762,10 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end else - loop $do-continue|1 + loop $do-loop|1 local.get $2 i32.const 1 i32.sub @@ -7804,9 +7796,7 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|1 + br_if $do-loop|1 end end ) diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 455b30883c..c50b5f8734 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -1528,7 +1528,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $2 - loop $do-continue|0 + loop $do-loop|0 local.get $2 call $~lib/rt/itcms/step i32.sub @@ -1551,7 +1551,7 @@ local.get $2 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $2 @@ -2121,7 +2121,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $3 i64.load local.get $1 @@ -2142,7 +2142,7 @@ local.tee $0 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index f22e508608..5acb40dd14 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -1568,7 +1568,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1579,7 +1578,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1607,9 +1606,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -2848,7 +2845,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -2872,9 +2869,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index a17d2b8ca1..18df4d77cd 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -2311,7 +2311,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $2 - loop $do-continue|0 + loop $do-loop|0 local.get $2 call $~lib/rt/itcms/step i32.sub @@ -2334,7 +2334,7 @@ local.get $2 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $2 @@ -24481,7 +24481,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $3 i64.load local.get $1 @@ -24502,7 +24502,7 @@ local.tee $0 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index a143a8165c..4af3dd3e29 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -1879,7 +1879,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1890,7 +1889,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1918,9 +1917,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -21786,7 +21783,6 @@ (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i32) local.get $3 i64.extend_i32_s local.set $4 @@ -21808,7 +21804,7 @@ i64.const 1 i64.sub local.set $6 - loop $do-continue|0 + loop $do-loop|0 local.get $2 i32.const 1 i32.sub @@ -21835,12 +21831,10 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end else - loop $do-continue|1 + loop $do-loop|1 local.get $2 i32.const 1 i32.sub @@ -21871,9 +21865,7 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|1 + br_if $do-loop|1 end end ) @@ -22016,7 +22008,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -22040,9 +22032,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/std/uri.optimized.wat b/tests/compiler/std/uri.optimized.wat index 9dfea1e60b..1cba4a4eec 100644 --- a/tests/compiler/std/uri.optimized.wat +++ b/tests/compiler/std/uri.optimized.wat @@ -1365,7 +1365,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $3 - loop $do-continue|0 + loop $do-loop|0 local.get $3 call $~lib/rt/itcms/step i32.sub @@ -1388,7 +1388,7 @@ local.get $3 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $3 @@ -2790,7 +2790,7 @@ block $while-break|0 local.get $7 local.set $5 - loop $do-continue|1 + loop $do-loop|1 block $do-break|1 local.get $7 i32.const 1 @@ -2817,7 +2817,7 @@ i32.add local.tee $7 i32.gt_u - br_if $do-continue|1 + br_if $do-loop|1 end end local.get $5 @@ -3278,7 +3278,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $3 i64.load local.get $1 @@ -3299,7 +3299,7 @@ local.tee $0 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/std/uri.untouched.wat b/tests/compiler/std/uri.untouched.wat index 5f09d01908..a5eddee6b7 100644 --- a/tests/compiler/std/uri.untouched.wat +++ b/tests/compiler/std/uri.untouched.wat @@ -1579,7 +1579,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1590,7 +1589,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1618,9 +1617,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -3779,7 +3776,7 @@ local.get $3 local.set $8 block $do-break|1 - loop $do-continue|1 + loop $do-loop|1 local.get $0 local.get $3 i32.const 1 @@ -3811,9 +3808,7 @@ local.tee $3 local.get $1 i32.lt_u - local.set $11 - local.get $11 - br_if $do-continue|1 + br_if $do-loop|1 end end local.get $3 @@ -4143,7 +4138,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -4167,9 +4162,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end diff --git a/tests/compiler/super-inline.optimized.wat b/tests/compiler/super-inline.optimized.wat index 5f28c3de51..54c425d215 100644 --- a/tests/compiler/super-inline.optimized.wat +++ b/tests/compiler/super-inline.optimized.wat @@ -1174,7 +1174,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $1 - loop $do-continue|0 + loop $do-loop|0 local.get $1 call $~lib/rt/itcms/step i32.sub @@ -1197,7 +1197,7 @@ local.get $1 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $1 diff --git a/tests/compiler/super-inline.untouched.wat b/tests/compiler/super-inline.untouched.wat index 3cbdbc3100..01fe2657f3 100644 --- a/tests/compiler/super-inline.untouched.wat +++ b/tests/compiler/super-inline.untouched.wat @@ -1511,7 +1511,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1522,7 +1521,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1550,9 +1549,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/templateliteral.optimized.wat b/tests/compiler/templateliteral.optimized.wat index fb837cd23e..b91240868a 100644 --- a/tests/compiler/templateliteral.optimized.wat +++ b/tests/compiler/templateliteral.optimized.wat @@ -183,7 +183,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $3 i64.load local.get $1 @@ -204,7 +204,7 @@ local.tee $0 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end @@ -1463,7 +1463,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $3 - loop $do-continue|0 + loop $do-loop|0 local.get $3 call $~lib/rt/itcms/step i32.sub @@ -1486,7 +1486,7 @@ local.get $3 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $3 diff --git a/tests/compiler/templateliteral.untouched.wat b/tests/compiler/templateliteral.untouched.wat index 5dc0782c75..9b05fd6b6b 100644 --- a/tests/compiler/templateliteral.untouched.wat +++ b/tests/compiler/templateliteral.untouched.wat @@ -146,7 +146,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -170,9 +170,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end @@ -1726,7 +1724,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1737,7 +1734,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1765,9 +1762,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -4251,7 +4246,6 @@ (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i32) local.get $3 i64.extend_i32_s local.set $4 @@ -4273,7 +4267,7 @@ i64.const 1 i64.sub local.set $6 - loop $do-continue|0 + loop $do-loop|0 local.get $2 i32.const 1 i32.sub @@ -4300,12 +4294,10 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end else - loop $do-continue|1 + loop $do-loop|1 local.get $2 i32.const 1 i32.sub @@ -4336,9 +4328,7 @@ local.get $1 i64.const 0 i64.ne - local.set $7 - local.get $7 - br_if $do-continue|1 + br_if $do-loop|1 end end ) diff --git a/tests/compiler/typeof.optimized.wat b/tests/compiler/typeof.optimized.wat index 51d427ca80..5a3c286aea 100644 --- a/tests/compiler/typeof.optimized.wat +++ b/tests/compiler/typeof.optimized.wat @@ -109,7 +109,7 @@ select i32.eqz if - loop $do-continue|0 + loop $do-loop|0 local.get $3 i64.load local.get $1 @@ -130,7 +130,7 @@ local.tee $0 i32.const 4 i32.ge_u - br_if $do-continue|0 + br_if $do-loop|0 end end end @@ -1748,7 +1748,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $1 - loop $do-continue|0 + loop $do-loop|0 local.get $1 call $~lib/rt/itcms/step i32.sub @@ -1771,7 +1771,7 @@ local.get $1 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $1 diff --git a/tests/compiler/typeof.untouched.wat b/tests/compiler/typeof.untouched.wat index ba3dca6777..422b7142f8 100644 --- a/tests/compiler/typeof.untouched.wat +++ b/tests/compiler/typeof.untouched.wat @@ -106,7 +106,7 @@ end if block $do-break|0 - loop $do-continue|0 + loop $do-loop|0 local.get $5 i64.load local.get $6 @@ -130,9 +130,7 @@ local.get $4 i32.const 4 i32.ge_u - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end end end @@ -1689,7 +1687,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1700,7 +1697,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1728,9 +1725,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop diff --git a/tests/compiler/unify-local-flags.optimized.wat b/tests/compiler/unify-local-flags.optimized.wat index 25d3f19a39..2169054d8d 100644 --- a/tests/compiler/unify-local-flags.optimized.wat +++ b/tests/compiler/unify-local-flags.optimized.wat @@ -24,7 +24,7 @@ ) (func $unify-local-flags/testDo (local $0 i32) - loop $do-continue|1 + loop $do-loop|1 local.get $0 i32.const 1 i32.add @@ -33,7 +33,7 @@ i32.and i32.const 255 i32.lt_u - br_if $do-continue|1 + br_if $do-loop|1 end ) ) diff --git a/tests/compiler/unify-local-flags.untouched.wat b/tests/compiler/unify-local-flags.untouched.wat index 8bc877793a..69c36bdeab 100644 --- a/tests/compiler/unify-local-flags.untouched.wat +++ b/tests/compiler/unify-local-flags.untouched.wat @@ -69,12 +69,11 @@ (func $unify-local-flags/testDo (local $0 i32) (local $1 i32) - (local $2 i32) i32.const 0 local.set $0 i32.const 0 local.set $1 - loop $do-continue|1 + loop $do-loop|1 local.get $1 local.set $0 local.get $1 @@ -85,9 +84,7 @@ i32.and i32.const 255 i32.lt_u - local.set $2 - local.get $2 - br_if $do-continue|1 + br_if $do-loop|1 end ) ) diff --git a/tests/compiler/wasi/abort.optimized.wat b/tests/compiler/wasi/abort.optimized.wat index e3ff15056e..c3bd25c45e 100644 --- a/tests/compiler/wasi/abort.optimized.wat +++ b/tests/compiler/wasi/abort.optimized.wat @@ -258,7 +258,7 @@ i32.const 2 i32.add local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 i32.const 1 i32.sub @@ -273,7 +273,7 @@ i32.const 10 i32.div_u local.tee $2 - br_if $do-continue|0 + br_if $do-loop|0 end local.get $0 i32.const 1 @@ -285,7 +285,7 @@ i32.const 2 i32.add local.set $0 - loop $do-continue|1 + loop $do-loop|1 local.get $0 i32.const 1 i32.sub @@ -300,7 +300,7 @@ i32.const 10 i32.div_u local.tee $1 - br_if $do-continue|1 + br_if $do-loop|1 end local.get $0 i32.const 1 diff --git a/tests/compiler/wasi/abort.untouched.wat b/tests/compiler/wasi/abort.untouched.wat index a2a52b41de..20215aa66f 100644 --- a/tests/compiler/wasi/abort.untouched.wat +++ b/tests/compiler/wasi/abort.untouched.wat @@ -364,7 +364,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) i32.const 0 i32.const 12 call $~lib/bindings/wasi_snapshot_preview1/iovec#set:buf @@ -433,7 +432,7 @@ local.get $6 i32.add local.set $4 - loop $do-continue|0 + loop $do-loop|0 local.get $2 i32.const 10 i32.div_u @@ -451,9 +450,7 @@ local.get $5 local.set $2 local.get $2 - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end local.get $4 local.get $6 @@ -474,7 +471,7 @@ local.get $6 i32.add local.set $4 - loop $do-continue|1 + loop $do-loop|1 local.get $3 i32.const 10 i32.div_u @@ -492,9 +489,7 @@ local.get $7 local.set $3 local.get $3 - local.set $8 - local.get $8 - br_if $do-continue|1 + br_if $do-loop|1 end local.get $4 local.get $6 diff --git a/tests/compiler/wasi/seed.optimized.wat b/tests/compiler/wasi/seed.optimized.wat index b7970b80d6..56faedd7f1 100644 --- a/tests/compiler/wasi/seed.optimized.wat +++ b/tests/compiler/wasi/seed.optimized.wat @@ -224,7 +224,7 @@ i32.const 5 i32.add local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 i32.const 1 i32.sub @@ -239,7 +239,7 @@ i32.const 10 i32.div_u local.tee $4 - br_if $do-continue|0 + br_if $do-loop|0 end local.get $0 i32.const 4 @@ -251,7 +251,7 @@ i32.const 2 i32.add local.set $0 - loop $do-continue|1 + loop $do-loop|1 local.get $0 i32.const 1 i32.sub @@ -266,7 +266,7 @@ i32.const 10 i32.div_u local.tee $3 - br_if $do-continue|1 + br_if $do-loop|1 end local.get $0 i32.const 1 @@ -300,7 +300,7 @@ i32.const 0 i64.load local.set $1 - loop $do-continue|0 + loop $do-loop|0 i32.const 0 i32.const 8 call $~lib/bindings/wasi_snapshot_preview1/random_get @@ -309,7 +309,7 @@ i64.load local.tee $2 i64.eqz - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 local.get $1 diff --git a/tests/compiler/wasi/seed.untouched.wat b/tests/compiler/wasi/seed.untouched.wat index f077ffba04..2a81120d61 100644 --- a/tests/compiler/wasi/seed.untouched.wat +++ b/tests/compiler/wasi/seed.untouched.wat @@ -34,11 +34,10 @@ (func $~lib/wasi/index/seed (result f64) (local $0 i64) (local $1 i64) - (local $2 i32) i32.const 0 i64.load local.set $0 - loop $do-continue|0 + loop $do-loop|0 i32.const 0 i32.const 8 call $~lib/bindings/wasi_snapshot_preview1/random_get @@ -50,9 +49,7 @@ i64.const 0 i64.ne i32.eqz - local.set $2 - local.get $2 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 local.get $0 @@ -466,7 +463,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) i32.const 0 i32.const 12 call $~lib/bindings/wasi_snapshot_preview1/iovec#set:buf @@ -535,7 +531,7 @@ local.get $6 i32.add local.set $4 - loop $do-continue|0 + loop $do-loop|0 local.get $2 i32.const 10 i32.div_u @@ -553,9 +549,7 @@ local.get $5 local.set $2 local.get $2 - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end local.get $4 local.get $6 @@ -576,7 +570,7 @@ local.get $6 i32.add local.set $4 - loop $do-continue|1 + loop $do-loop|1 local.get $3 i32.const 10 i32.div_u @@ -594,9 +588,7 @@ local.get $7 local.set $3 local.get $3 - local.set $8 - local.get $8 - br_if $do-continue|1 + br_if $do-loop|1 end local.get $4 local.get $6 diff --git a/tests/compiler/wasi/trace.optimized.wat b/tests/compiler/wasi/trace.optimized.wat index 883d189a7b..ae31d07581 100644 --- a/tests/compiler/wasi/trace.optimized.wat +++ b/tests/compiler/wasi/trace.optimized.wat @@ -334,7 +334,7 @@ i32.add i32.add local.set $4 - loop $do-continue|0 + loop $do-loop|0 local.get $4 i32.const 1 i32.sub @@ -349,7 +349,7 @@ i32.const 10 i32.div_u local.tee $2 - br_if $do-continue|0 + br_if $do-loop|0 end local.get $0 local.get $4 @@ -409,7 +409,7 @@ i32.add i32.add local.set $4 - loop $do-continue|1 + loop $do-loop|1 local.get $4 i32.const 1 i32.sub @@ -424,7 +424,7 @@ i32.const 10 i32.div_u local.tee $3 - br_if $do-continue|1 + br_if $do-loop|1 end local.get $0 local.get $4 diff --git a/tests/compiler/wasi/trace.untouched.wat b/tests/compiler/wasi/trace.untouched.wat index 5083c95ab0..13b2f46cb4 100644 --- a/tests/compiler/wasi/trace.untouched.wat +++ b/tests/compiler/wasi/trace.untouched.wat @@ -493,7 +493,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) i32.const 0 i32.const 12 call $~lib/bindings/wasi_snapshot_preview1/iovec#set:buf @@ -562,7 +561,7 @@ local.get $6 i32.add local.set $4 - loop $do-continue|0 + loop $do-loop|0 local.get $2 i32.const 10 i32.div_u @@ -580,9 +579,7 @@ local.get $5 local.set $2 local.get $2 - local.set $7 - local.get $7 - br_if $do-continue|0 + br_if $do-loop|0 end local.get $4 local.get $6 @@ -603,7 +600,7 @@ local.get $6 i32.add local.set $4 - loop $do-continue|1 + loop $do-loop|1 local.get $3 i32.const 10 i32.div_u @@ -621,9 +618,7 @@ local.get $7 local.set $3 local.get $3 - local.set $8 - local.get $8 - br_if $do-continue|1 + br_if $do-loop|1 end local.get $4 local.get $6 diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 995f0147ed..3105313e7f 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -1602,6 +1602,28 @@ i32.lt_s br_if $while-continue|010 end + i32.const 0 + local.set $0 + loop $do-loop|0 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + i32.const 3 + i32.lt_s + br_if $do-loop|0 + end + local.get $0 + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1056 + i32.const 217 + i32.const 3 + call $~lib/builtins/abort + unreachable + end global.get $~lib/rt/itcms/state i32.const 0 i32.gt_s @@ -1708,7 +1730,7 @@ block $__inlined_func$~lib/rt/itcms/interrupt i32.const 2048 local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -1731,7 +1753,7 @@ local.get $0 i32.const 0 i32.gt_s - br_if $do-continue|0 + br_if $do-loop|0 end global.get $~lib/rt/itcms/total local.tee $0 diff --git a/tests/compiler/while.ts b/tests/compiler/while.ts index c2d1c752ef..1133b27c9f 100644 --- a/tests/compiler/while.ts +++ b/tests/compiler/while.ts @@ -208,4 +208,17 @@ ran = false; testIfImplicitContinueElse(); assert(ran); +function testConditionalContinue(): void { + let i = 0; + do { + i++; + continue; + } while (i < 3); + assert(i == 3); + ran = true; +} +ran = false; +testConditionalContinue(); +assert(ran); + __collect(); diff --git a/tests/compiler/while.untouched.wat b/tests/compiler/while.untouched.wat index 03da42279b..024fa87b47 100644 --- a/tests/compiler/while.untouched.wat +++ b/tests/compiler/while.untouched.wat @@ -1965,7 +1965,6 @@ ) (func $~lib/rt/itcms/interrupt (local $0 i32) - (local $1 i32) i32.const 0 drop i32.const 0 @@ -1976,7 +1975,7 @@ i32.const 100 i32.div_u local.set $0 - loop $do-continue|0 + loop $do-loop|0 local.get $0 call $~lib/rt/itcms/step i32.sub @@ -2004,9 +2003,7 @@ local.get $0 i32.const 0 i32.gt_s - local.set $1 - local.get $1 - br_if $do-continue|0 + br_if $do-loop|0 end i32.const 0 drop @@ -3007,6 +3004,38 @@ i32.const 1 global.set $while/ran ) + (func $while/testConditionalContinue + (local $0 i32) + i32.const 0 + local.set $0 + loop $do-loop|0 + block $do-continue|0 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $do-continue|0 + end + local.get $0 + i32.const 3 + i32.lt_s + br_if $do-loop|0 + end + local.get $0 + i32.const 3 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 217 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $while/ran + ) (func $~lib/rt/itcms/__collect (local $0 i32) i32.const 0 @@ -3256,6 +3285,19 @@ call $~lib/builtins/abort unreachable end + i32.const 0 + global.set $while/ran + call $while/testConditionalContinue + global.get $while/ran + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 222 + i32.const 1 + call $~lib/builtins/abort + unreachable + end call $~lib/rt/itcms/__collect ) (func $~lib/rt/__visit_globals (param $0 i32)