Closed ktye closed 1 year ago
compare diff k.wasm vs j.wasm tee.awk:
$1~/local.tee/{
gsub("tee","set")
print $0
gsub("set","get")
print $0
next
}
{print}
wbjmp:{y;0x0c,_$[`~S x;1+I x;wbtrg x]}
wbtrg:{l:S x;c:-~I x /calculate target for labeled break/continue
x:1_{$[(`for;l)~(T x;S x);x;P x]}\:x /scan parents til for-with-label
x:x@&~`stm=T x /dont nest statements
c+-1+(#x)+/(`for=T x)&~I x} /simple loops add 1 level, others 2
break/continue with labels needs to calculate nesting level