style: modernize to splitseq, cut, min, maps.copy and range-over-int

This commit is contained in:
2026-08-29 16:04:32 +02:00
parent eacf33d0f7
commit 9beff4ae85
40 changed files with 90 additions and 234 deletions
+3 -6
View File
@@ -61,8 +61,8 @@ func parseFuncSig(comment string) (funcSig, bool) {
if m == nil {
return funcSig{}, false
}
sig := funcSig{name: m[1]}
sig.params = parseParams(m[2])
sig := funcSig{name: m[1],
params: parseParams(m[2])}
// Results may be "(a int, b int)" or "int" or "(int, error)".
res := strings.TrimSpace(m[3])
res = strings.TrimPrefix(res, "(")
@@ -271,10 +271,7 @@ func genDualArgs(rng *rand.Rand, sig funcSig, argSize int) (gasmArgs, goArgs []b
case strings.HasPrefix(p.typ, "*["):
nElem := arrayLen(p.typ)
elem := elemSizeFor("[]" + p.typ[strings.Index(p.typ, "]")+1:])
size := nElem * elem
if size < 8 {
size = 8
}
size := max(nElem*elem, 8)
buf1 := make([]byte, size)
buf2 := make([]byte, size)
rng.Read(buf1)