github.com/tetratelabs/wazero@v1.7.3-0.20240513003603-48f702e154b5/internal/engine/wazevo/backend/isa/amd64/reflect.go (about) 1 //go:build !tinygo 2 3 package amd64 4 5 import "reflect" 6 7 // setSliceLimits sets both Cap and Len for the given reflected slice. 8 func setSliceLimits(s *reflect.SliceHeader, limit uintptr) { 9 s.Len = int(limit) 10 s.Cap = int(limit) 11 }