From a830998617f810d86e5765903ec150bc2b381ab1 Mon Sep 17 00:00:00 2001 From: Camden Dixie O'Brien Date: Wed, 25 Feb 2026 21:29:14 +0000 Subject: [PATCH] Replace local set then get with tee --- wipforth.wat | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/wipforth.wat b/wipforth.wat index a1b9af6..db85b89 100644 --- a/wipforth.wat +++ b/wipforth.wat @@ -476,8 +476,7 @@ (func $addstore (local $tmp i32) call $pop - local.set $tmp - local.get $tmp + local.tee $tmp local.get $tmp i32.load call $pop @@ -487,8 +486,7 @@ (func $substore (local $tmp i32) call $pop - local.set $tmp - local.get $tmp + local.tee $tmp local.get $tmp i32.load call $pop @@ -571,8 +569,7 @@ loop $wait global.get $RXHEAD i32.atomic.load8_u - local.set $head - local.get $head + local.tee $head global.get $RXTAIL i32.atomic.load8_u i32.eq @@ -602,14 +599,12 @@ loop $wait global.get $TXTAIL i32.atomic.load8_u - local.set $tail - local.get $tail + local.tee $tail i32.const 1 i32.add i32.const 0x1f i32.and - local.set $next - local.get $next + local.tee $next global.get $TXHEAD i32.atomic.load8_u i32.eq