From 2bfb9e9ba36b89d2099b953ac215f29e776caae3 Mon Sep 17 00:00:00 2001 From: Miguel Young de la Sota Date: Tue, 10 Mar 2026 16:53:56 -0700 Subject: [PATCH 01/11] wip --- Makefile | 14 +- go.mod | 2 +- internal/tdp/vm/memory.go | 4 +- internal/tdp/vm/varint.go | 11 +- internal/tdp/vm/varint_amd64_128.go | 218 ++++++++++++++++++++++++++++ internal/xbits/xbits.go | 23 +++ internal/xsimd/xsimd.go | 19 +++ 7 files changed, 284 insertions(+), 7 deletions(-) create mode 100644 internal/tdp/vm/varint_amd64_128.go create mode 100644 internal/xbits/xbits.go create mode 100644 internal/xsimd/xsimd.go diff --git a/Makefile b/Makefile index ab0fa2c..4f31d08 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ export GOBIN := $(abspath $(BIN)) COPYRIGHT_YEARS := 2025 LICENSE_IGNORE := testdata/ -GO_VERSION := go1.25.0 +GO_VERSION := go1.26.1 BUF_VERSION := v1.56.0 # Keep in sync w/ .github/workflows/buf.yaml. LINT_VERSION := v2.4.0 # Keep in sync w/ .github/workflows/ci.yaml. @@ -41,8 +41,11 @@ GOARCH ?= GOAMD64 ?= GOARM64 ?= -HOST_ENV ?= GOTOOLCHAIN=local -EXEC_ENV ?= GOOS=$(GOOS) GOARCH=$(GOARCH) GOAMD64=$(GOAMD64) GOARM64=$(GOARM64) GOTOOLCHAIN=local +GOTOOLCHAIN ?= local +GOEXPERIMENT ?= simd + +HOST_ENV ?= GOTOOLCHAIN=$(GOTOOLCHAIN) GOEXPERIMENT=$(GOEXPERIMENT) +EXEC_ENV ?= GOOS=$(GOOS) GOARCH=$(GOARCH) GOAMD64=$(GOAMD64) GOARM64=$(GOARM64) GOTOOLCHAIN=$(GOTOOLCHAIN) GOEXPERIMENT=$(GOEXPERIMENT) # Go will carelessly pick these up on host-side builds if we don't unexport them. unexport GOOS @@ -123,6 +126,11 @@ asm: build ## Generate assembly output for manual inspection build: generate ## Build all packages $(GO) build -tags=$(TAGS) $(PKGS) +.PHONY: show-env +show-env: ## Print the Go tool's interpreted environment. + go version + $(GO) env + .PHONY: lint lint: $(BIN)/golangci-lint ## Lint $(GO_HOST) vet -unsafeptr=false ./... diff --git a/go.mod b/go.mod index 3ead856..5de5994 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module buf.build/go/hyperpb -go 1.24.0 +go 1.26.1 require ( al.essio.dev/pkg/shellescape v1.6.0 diff --git a/internal/tdp/vm/memory.go b/internal/tdp/vm/memory.go index 36d724b..b76fae8 100644 --- a/internal/tdp/vm/memory.go +++ b/internal/tdp/vm/memory.go @@ -44,13 +44,13 @@ const pageBoundary = 0x1000 func RelocatePageBoundary(data []byte, force bool) []byte { if !force { // Check if there is capacity to spare. - if cap(data)-len(data) >= 9 { + if cap(data)-len(data) >= 15 { return data } // If not, we need to check if there is a page boundary beyond this // slice. - if xunsafe.EndOf(data).Padding(pageBoundary) >= 9 { + if xunsafe.EndOf(data).Padding(pageBoundary) >= 15 { // All good, we have nine or more bytes ahead of us before the next // page boundary. return data diff --git a/internal/tdp/vm/varint.go b/internal/tdp/vm/varint.go index 473cc4f..a8dbf7e 100644 --- a/internal/tdp/vm/varint.go +++ b/internal/tdp/vm/varint.go @@ -20,10 +20,14 @@ import ( "buf.build/go/hyperpb/internal/debug" ) +// Overridable at runtime, if good SIMD features are detected. +var parseVarint = parseVarintScalar + // parseVarint is the core varint parsing implementation. // //go:nosplit -func parseVarint(p1 P1, p2 P2) (P1, P2, uint64) { +//go:noinline +func parseVarintScalar(p1 P1, p2 P2) (P1, P2, uint64) { // Inlined from protowire.ConsumeVarint to minimize spills and remove // bounds checks. var b byte @@ -179,3 +183,8 @@ fail: func parseVarintNoinline(p1 P1, p2 P2) (P1, P2, uint64) { return parseVarint(p1, p2) } + +//go:noinline +func parseVarintScalarNoinline(p1 P1, p2 P2) (P1, P2, uint64) { + return parseVarint(p1, p2) +} diff --git a/internal/tdp/vm/varint_amd64_128.go b/internal/tdp/vm/varint_amd64_128.go new file mode 100644 index 0000000..1cb8d15 --- /dev/null +++ b/internal/tdp/vm/varint_amd64_128.go @@ -0,0 +1,218 @@ +// Copyright 2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package varintsimd provides a SIMD-accelerated protobuf varint decoder +// using Go 1.26's simd/archsimd package (GOEXPERIMENT=simd). +// +// This is a port of the approach used in Google's protobuf C++ implementation +// (varint_shuffle.h), which uses SSSE3 PSHUFB to strip continuation bits from +// varint-encoded bytes and pack the 7-bit payloads into a 64-bit integer. +// +// The algorithm: +// 1. Load 16 bytes from the input buffer into an XMM register. +// 2. Detect the varint boundary by finding the first byte without the MSB set. +// 3. Use a precomputed PSHUFB shuffle mask (indexed by the continuation-bit pattern) +// to strip each byte's MSB and pack the 7-bit groups into a contiguous 64-bit value. +// 4. Return the decoded uint64 and the number of bytes consumed. + +//go:build amd64 + +package vm + +import ( + "math/bits" + "simd/archsimd" + + "buf.build/go/hyperpb/internal/xbits" + "buf.build/go/hyperpb/internal/xunsafe" +) + +var ( + signBits128 = archsimd.BroadcastUint8x16(0x7f) + + // And truncMasks[i] with a vector to zero all lanes i or greater, and all + // sign bits. + truncMasks = func() [16]archsimd.Uint8x16 { + var mask archsimd.Uint8x16 + var masks [16]archsimd.Uint8x16 + for i := range masks { + mask = mask.SetElem(uint8(i), 0xff) + masks[i] = mask.And(signBits128) + } + + return masks + }() + + mulShift = makeU16x8(func(i uint16) uint16 { return 1 << i }) + + shuffles = [...]archsimd.Int8x16{ + makeI8x16(func(i int8) int8 { + if i%2 == 1 { + return -1 + } + return i + }).AsInt16x8().TruncateToInt8(), + makeI8x16(func(i int8) int8 { + if i%2 == 1 { + return -1 + } + return i + 1 + }).AsInt16x8().TruncateToInt8(), + makeI8x16(func(i int8) int8 { + switch i { + case 13: + return 0 + case 14: + return 2 + default: + return -1 + } + }).AsInt16x8().TruncateToInt8(), + makeI8x16(func(i int8) int8 { + switch i { + case 13: + return 3 + default: + return -1 + } + }).AsInt16x8().TruncateToInt8(), + } + + rotate8Shuffle = makeI8x16(func(u int8) int8 { return (u - 8) % 8 }) +) + +func makeI8x16(f func(int8) int8) archsimd.Int8x16 { + var v archsimd.Int8x16 + for i := range int8(16) { + v = v.SetElem(uint8(i), f(i)) + } + return v +} + +func makeU16x8(f func(uint16) uint16) archsimd.Uint16x8 { + var v archsimd.Uint16x8 + for i := range uint16(8) { + v = v.SetElem(uint8(i), f(i)) + } + return v +} + +func split8to16(v archsimd.Uint8x16) (lo, hi archsimd.Uint16x8) { + lo = v.ExtendLo8ToUint16() + hi = v.PermuteOrZero(rotate8Shuffle).ExtendLo8ToUint16() + return lo, hi +} + +func init() { + if archsimd.X86.AVX() { + parseVarint = parseVarintAVX + } +} + +//go:nosplit +func parseVarintAVX(p1 P1, p2 P2) (P1, P2, uint64) { + if p1.Len() < 16 { + return parseVarintScalarNoinline(p1, p2) + } + + data := archsimd.LoadUint8x16(xunsafe.Cast[[16]uint8](p1.Ptr())) + + // Find all of the continuation bytes. ToBits produces pmovmskb which is + // what we want, although we have to do a redundant comparison here... + var zero archsimd.Int8x16 + signs := data.AsInt8x16().Less(zero).ToBits() + + len := bits.TrailingZeros16(^signs) + 1 + + // Discard extra bytes and the sign bits. + data = data.And(truncMasks[len&0xf]) + + lo, hi := split8to16(data) + + // lo and hi are now of the following form (highest bytes irrelevant, big + // endian u16s). + // + // 00000000 0aaaaaaa 00000000 0bbbbbbb 00000000 0ccccccc 00000000 0ddddddd + // 00000000 0eeeeeee 00000000 0fffffff 00000000 0ggggggg 00000000 0hhhhhhh + // + // 00000000 0iiiiiii 00000000 0jjjjjjj xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx + // xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx + // + // We want to get them into this form, which we can then shuffle into + // something we can or together. + // + // 00000000 0aaaaaaa b0000000 00bbbbbb cc000000 000ccccc ddd00000 0000dddd + // eeee0000 00000eee fffff000 000000ff gggggg00 0000000g hhhhhhh0 00000000 + // + // 00000000 0iiiiiii j0000000 00jjjjjj xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx + // xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx + // + // To convert 00000000 0bbbbbbb -> b0000000 00bbbbbb, we can left shift by + // 7 and then swap the bytes, then 6 bits, and so on. This can be realized + // as a multiply plus a shuffle. + // + // However, we want to overlay alternating bytes, like so: + // + // 0aaaaaaa 00000000 00bbbbbb 00000000 000ccccc 00000000 0000dddd 00000000 + // fffff000 00000000 gggggg00 000000ff hhhhhhh0 0000000g hhhhhhh0 00000000 + // + // b0000000 00000000 cc000000 00000000 00000000 00000000 00000000 00000000 + // 00000eee 00000000 000000ff 00000000 0000000g 00000000 00000000 00000000 + // + // 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 + // 00000000 00000000 00000000 00000000 00000000 0iiiiiii 00jjjjjj 00000000 + // + // 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 + // 00000000 00000000 00000000 00000000 00000000 j0000000 00000000 00000000 + // + // If we or all four vectors together, we get our desired result. + // + // The shuffle masks need to incorporate the byte shift, so this + // is what we have after the multiplies: + // + // 0aaaaaaa 00000000 00bbbbbb b0000000 000ccccc cc000000 0000dddd ddd00000 + // 00000eee eeee0000 000000ff fffff000 0000000g gggggg00 00000000 hhhhhhh0 + // + // 0iiiiiii 00000000 00jjjjjj j0000000 xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx + // xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx + // + // The first two masks are simple: [0, z, 2, z, 4, z, ...] and + // [1, z, 3, z, 5, z, ...]. The latter two need to incorporate the + // fact that we want to shift upwards, so those need to be + // [z x 13, 0, 2, z] and [z x 13, 3, z, z]. + // + // To make this even simpler, we can move each index down to skip the + // truncation step: [0, 2, 4, ...], [1, 3, 5, ...], etc + + lo = lo.Mul(mulShift) + hi = hi.Mul(mulShift) + + shuf0 := lo.AsUint8x16().PermuteOrZero(shuffles[0]) + shuf1 := lo.AsUint8x16().PermuteOrZero(shuffles[1]) + shuf2 := hi.AsUint8x16().PermuteOrZero(shuffles[2]) + shuf3 := hi.AsUint8x16().PermuteOrZero(shuffles[3]) + + out := shuf0.Or(shuf1).Or(shuf2).Or(shuf3).AsUint64x2().GetElem(0) + + // Now, some cleanup. We have overflow conditions in the following cases: + // + // 1. len == 10 and data[9] is greater than 1. + // 2. len > 10. + truncated := (xbits.Bit(len == 10) & xbits.Bit(data.GetElem(9) > 1)) | xbits.Bit(len > 10) + if truncated != 0 { + p1.Fail(p2, ErrorTruncated) + } + + return p1, p2, out +} diff --git a/internal/xbits/xbits.go b/internal/xbits/xbits.go new file mode 100644 index 0000000..8302a08 --- /dev/null +++ b/internal/xbits/xbits.go @@ -0,0 +1,23 @@ +// Copyright 2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package xbits + +// Bit converts a bool into 0 or 1. +func Bit(b bool) int { + if b { + return 1 + } + return 0 +} diff --git a/internal/xsimd/xsimd.go b/internal/xsimd/xsimd.go new file mode 100644 index 0000000..c8b2d89 --- /dev/null +++ b/internal/xsimd/xsimd.go @@ -0,0 +1,19 @@ +package xsimd + +import "buf.build/go/hyperpb/internal/xunsafe/layout" + +// ToSlice converts a vector into a slice. +func ToSlice[V vector[T], T any](v V) []T { + n := layout.Size[V]() / layout.Size[T]() + out := make([]T, n) + v.StoreSlice(out) + return out +} + +type vector[T any] interface { + StoreSlice([]T) +} + +type format[V vector[T], T any] struct { + v V +} From 385f2767b9b02699eb9f81fb8b52aa15d90e7ff1 Mon Sep 17 00:00:00 2001 From: Miguel Young de la Sota Date: Wed, 11 Mar 2026 13:09:48 -0700 Subject: [PATCH 02/11] fixes --- internal/cpu/cpu.go | 15 ++ internal/prototest/equal.go | 7 +- internal/tdp/vm/varint.go | 2 +- internal/tdp/vm/varint_amd64_128.go | 218 ----------------------- internal/tdp/vm/varint_avx.go | 267 ++++++++++++++++++++++++++++ internal/xsimd/xsimd.go | 54 +++++- 6 files changed, 334 insertions(+), 229 deletions(-) create mode 100644 internal/cpu/cpu.go delete mode 100644 internal/tdp/vm/varint_amd64_128.go create mode 100644 internal/tdp/vm/varint_avx.go diff --git a/internal/cpu/cpu.go b/internal/cpu/cpu.go new file mode 100644 index 0000000..35d6bfe --- /dev/null +++ b/internal/cpu/cpu.go @@ -0,0 +1,15 @@ +// Copyright 2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package cpu diff --git a/internal/prototest/equal.go b/internal/prototest/equal.go index 4ee3306..f584f5d 100644 --- a/internal/prototest/equal.go +++ b/internal/prototest/equal.go @@ -121,7 +121,12 @@ func (e *equal) any(v1, v2 any, rec bool) { slices.Reverse(b1) slices.Reverse(b2) - e.fail("expected %v:0x%x, got %v:0x%x (%T)", v1, b1, v2, b2, v2) + diff := slices.Clone(b1) + for i := range diff { + diff[i] ^= b2[i] + } + + e.fail("expected %v:0x%x, got %v:0x%x, diff: %x (%T)", v1, b1, v2, b2, diff, v2) } } diff --git a/internal/tdp/vm/varint.go b/internal/tdp/vm/varint.go index a8dbf7e..6487109 100644 --- a/internal/tdp/vm/varint.go +++ b/internal/tdp/vm/varint.go @@ -186,5 +186,5 @@ func parseVarintNoinline(p1 P1, p2 P2) (P1, P2, uint64) { //go:noinline func parseVarintScalarNoinline(p1 P1, p2 P2) (P1, P2, uint64) { - return parseVarint(p1, p2) + return parseVarintScalar(p1, p2) } diff --git a/internal/tdp/vm/varint_amd64_128.go b/internal/tdp/vm/varint_amd64_128.go deleted file mode 100644 index 1cb8d15..0000000 --- a/internal/tdp/vm/varint_amd64_128.go +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright 2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package varintsimd provides a SIMD-accelerated protobuf varint decoder -// using Go 1.26's simd/archsimd package (GOEXPERIMENT=simd). -// -// This is a port of the approach used in Google's protobuf C++ implementation -// (varint_shuffle.h), which uses SSSE3 PSHUFB to strip continuation bits from -// varint-encoded bytes and pack the 7-bit payloads into a 64-bit integer. -// -// The algorithm: -// 1. Load 16 bytes from the input buffer into an XMM register. -// 2. Detect the varint boundary by finding the first byte without the MSB set. -// 3. Use a precomputed PSHUFB shuffle mask (indexed by the continuation-bit pattern) -// to strip each byte's MSB and pack the 7-bit groups into a contiguous 64-bit value. -// 4. Return the decoded uint64 and the number of bytes consumed. - -//go:build amd64 - -package vm - -import ( - "math/bits" - "simd/archsimd" - - "buf.build/go/hyperpb/internal/xbits" - "buf.build/go/hyperpb/internal/xunsafe" -) - -var ( - signBits128 = archsimd.BroadcastUint8x16(0x7f) - - // And truncMasks[i] with a vector to zero all lanes i or greater, and all - // sign bits. - truncMasks = func() [16]archsimd.Uint8x16 { - var mask archsimd.Uint8x16 - var masks [16]archsimd.Uint8x16 - for i := range masks { - mask = mask.SetElem(uint8(i), 0xff) - masks[i] = mask.And(signBits128) - } - - return masks - }() - - mulShift = makeU16x8(func(i uint16) uint16 { return 1 << i }) - - shuffles = [...]archsimd.Int8x16{ - makeI8x16(func(i int8) int8 { - if i%2 == 1 { - return -1 - } - return i - }).AsInt16x8().TruncateToInt8(), - makeI8x16(func(i int8) int8 { - if i%2 == 1 { - return -1 - } - return i + 1 - }).AsInt16x8().TruncateToInt8(), - makeI8x16(func(i int8) int8 { - switch i { - case 13: - return 0 - case 14: - return 2 - default: - return -1 - } - }).AsInt16x8().TruncateToInt8(), - makeI8x16(func(i int8) int8 { - switch i { - case 13: - return 3 - default: - return -1 - } - }).AsInt16x8().TruncateToInt8(), - } - - rotate8Shuffle = makeI8x16(func(u int8) int8 { return (u - 8) % 8 }) -) - -func makeI8x16(f func(int8) int8) archsimd.Int8x16 { - var v archsimd.Int8x16 - for i := range int8(16) { - v = v.SetElem(uint8(i), f(i)) - } - return v -} - -func makeU16x8(f func(uint16) uint16) archsimd.Uint16x8 { - var v archsimd.Uint16x8 - for i := range uint16(8) { - v = v.SetElem(uint8(i), f(i)) - } - return v -} - -func split8to16(v archsimd.Uint8x16) (lo, hi archsimd.Uint16x8) { - lo = v.ExtendLo8ToUint16() - hi = v.PermuteOrZero(rotate8Shuffle).ExtendLo8ToUint16() - return lo, hi -} - -func init() { - if archsimd.X86.AVX() { - parseVarint = parseVarintAVX - } -} - -//go:nosplit -func parseVarintAVX(p1 P1, p2 P2) (P1, P2, uint64) { - if p1.Len() < 16 { - return parseVarintScalarNoinline(p1, p2) - } - - data := archsimd.LoadUint8x16(xunsafe.Cast[[16]uint8](p1.Ptr())) - - // Find all of the continuation bytes. ToBits produces pmovmskb which is - // what we want, although we have to do a redundant comparison here... - var zero archsimd.Int8x16 - signs := data.AsInt8x16().Less(zero).ToBits() - - len := bits.TrailingZeros16(^signs) + 1 - - // Discard extra bytes and the sign bits. - data = data.And(truncMasks[len&0xf]) - - lo, hi := split8to16(data) - - // lo and hi are now of the following form (highest bytes irrelevant, big - // endian u16s). - // - // 00000000 0aaaaaaa 00000000 0bbbbbbb 00000000 0ccccccc 00000000 0ddddddd - // 00000000 0eeeeeee 00000000 0fffffff 00000000 0ggggggg 00000000 0hhhhhhh - // - // 00000000 0iiiiiii 00000000 0jjjjjjj xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx - // xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx - // - // We want to get them into this form, which we can then shuffle into - // something we can or together. - // - // 00000000 0aaaaaaa b0000000 00bbbbbb cc000000 000ccccc ddd00000 0000dddd - // eeee0000 00000eee fffff000 000000ff gggggg00 0000000g hhhhhhh0 00000000 - // - // 00000000 0iiiiiii j0000000 00jjjjjj xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx - // xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx - // - // To convert 00000000 0bbbbbbb -> b0000000 00bbbbbb, we can left shift by - // 7 and then swap the bytes, then 6 bits, and so on. This can be realized - // as a multiply plus a shuffle. - // - // However, we want to overlay alternating bytes, like so: - // - // 0aaaaaaa 00000000 00bbbbbb 00000000 000ccccc 00000000 0000dddd 00000000 - // fffff000 00000000 gggggg00 000000ff hhhhhhh0 0000000g hhhhhhh0 00000000 - // - // b0000000 00000000 cc000000 00000000 00000000 00000000 00000000 00000000 - // 00000eee 00000000 000000ff 00000000 0000000g 00000000 00000000 00000000 - // - // 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 - // 00000000 00000000 00000000 00000000 00000000 0iiiiiii 00jjjjjj 00000000 - // - // 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 - // 00000000 00000000 00000000 00000000 00000000 j0000000 00000000 00000000 - // - // If we or all four vectors together, we get our desired result. - // - // The shuffle masks need to incorporate the byte shift, so this - // is what we have after the multiplies: - // - // 0aaaaaaa 00000000 00bbbbbb b0000000 000ccccc cc000000 0000dddd ddd00000 - // 00000eee eeee0000 000000ff fffff000 0000000g gggggg00 00000000 hhhhhhh0 - // - // 0iiiiiii 00000000 00jjjjjj j0000000 xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx - // xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx - // - // The first two masks are simple: [0, z, 2, z, 4, z, ...] and - // [1, z, 3, z, 5, z, ...]. The latter two need to incorporate the - // fact that we want to shift upwards, so those need to be - // [z x 13, 0, 2, z] and [z x 13, 3, z, z]. - // - // To make this even simpler, we can move each index down to skip the - // truncation step: [0, 2, 4, ...], [1, 3, 5, ...], etc - - lo = lo.Mul(mulShift) - hi = hi.Mul(mulShift) - - shuf0 := lo.AsUint8x16().PermuteOrZero(shuffles[0]) - shuf1 := lo.AsUint8x16().PermuteOrZero(shuffles[1]) - shuf2 := hi.AsUint8x16().PermuteOrZero(shuffles[2]) - shuf3 := hi.AsUint8x16().PermuteOrZero(shuffles[3]) - - out := shuf0.Or(shuf1).Or(shuf2).Or(shuf3).AsUint64x2().GetElem(0) - - // Now, some cleanup. We have overflow conditions in the following cases: - // - // 1. len == 10 and data[9] is greater than 1. - // 2. len > 10. - truncated := (xbits.Bit(len == 10) & xbits.Bit(data.GetElem(9) > 1)) | xbits.Bit(len > 10) - if truncated != 0 { - p1.Fail(p2, ErrorTruncated) - } - - return p1, p2, out -} diff --git a/internal/tdp/vm/varint_avx.go b/internal/tdp/vm/varint_avx.go new file mode 100644 index 0000000..db88ff7 --- /dev/null +++ b/internal/tdp/vm/varint_avx.go @@ -0,0 +1,267 @@ +// Copyright 2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package varintsimd provides a SIMD-accelerated protobuf varint decoder +// using Go 1.26's simd/archsimd package (GOEXPERIMENT=simd). +// +// This is a port of the approach used in Google's protobuf C++ implementation +// (varint_shuffle.h), which uses SSSE3 PSHUFB to strip continuation bits from +// varint-encoded bytes and pack the 7-bit payloads into a 64-bit integer. +// +// The algorithm: +// 1. Load 16 bytes from the input buffer into an XMM register. +// 2. Detect the varint boundary by finding the first byte without the MSB set. +// 3. Use a precomputed PSHUFB shuffle mask (indexed by the continuation-bit pattern) +// to strip each byte's MSB and pack the 7-bit groups into a contiguous 64-bit value. +// 4. Return the decoded uint64 and the number of bytes consumed. + +//go:build amd64 + +package vm + +import ( + "math/bits" + "runtime" + "simd/archsimd" + + "buf.build/go/hyperpb/internal/debug" + "buf.build/go/hyperpb/internal/xbits" + "buf.build/go/hyperpb/internal/xsimd" + "buf.build/go/hyperpb/internal/xunsafe" +) + +var ( + signBits128 = archsimd.BroadcastUint8x16(0x7f) + + // And truncMasks[i] with a vector to zero all lanes i or greater, and all + // sign bits. + truncMasks = func() [16]archsimd.Uint8x16 { + var mask archsimd.Uint8x16 + var masks [16]archsimd.Uint8x16 + for i := range masks { + mask = mask.SetElem(uint8(i), 0xff) + masks[i] = mask.And(signBits128) + } + + return masks + }() + + mulShift = makeU16x8(func(i uint16) uint16 { return 1 << (8 - i) }) + + shuffles = [...]archsimd.Int8x16{ + makeI8x16(func(i int8) int8 { + if i < 7 { + return i*2 + 1 + } + return -1 + }), + makeI8x16(func(i int8) int8 { + if i < 7 { + return i*2 + 2 + } + return -1 + }), + makeI8x16(func(i int8) int8 { + if i == 7 { + return 1 + } + return -1 + }), + makeI8x16(func(i int8) int8 { + if i == 7 { + return 2 + } + return -1 + }), + } + + rotate8Shuffle = makeI8x16(func(u int8) int8 { return (u + 8) % 16 }) +) + +func makeI8x16(f func(int8) int8) archsimd.Int8x16 { + var v archsimd.Int8x16 + for i := range int8(16) { + v = v.SetElem(uint8(i), f(i)) + } + return v +} + +func makeU16x8(f func(uint16) uint16) archsimd.Uint16x8 { + var v archsimd.Uint16x8 + for i := range uint16(8) { + v = v.SetElem(uint8(i), f(i)) + } + return v +} + +func split8to16(v archsimd.Uint8x16) (lo, hi archsimd.Uint16x8) { + lo = v.ExtendLo8ToUint16() + hi = v.PermuteOrZero(rotate8Shuffle).ExtendLo8ToUint16() + return lo, hi +} + +func init() { + if archsimd.X86.AVX() { + parseVarint = parseVarintAVX + } +} + +//go:nosplit +func parseVarintAVX(p1 P1, p2 P2) (P1, P2, uint64) { + start := p1.PtrAddr + var x uint64 + + { + // Fast paths from the scalar variant. + var b byte + var i int + b = *p1.PtrAddr.AssertValid() + p1.PtrAddr++ + x |= uint64(b) << (i * 7) + if int8(b) >= 0 { + goto exit + } + x -= 0x80 << (i * 7) + i++ + + if p1.PtrAddr == p1.EndAddr { + goto fail + } + b = *p1.PtrAddr.AssertValid() + p1.PtrAddr++ + x |= uint64(b) << (i * 7) + if int8(b) >= 0 { + goto exit + } + x -= 0x80 << (i * 7) + i++ + + p1.PtrAddr -= 2 + + if p1.Len() < 16 { + return parseVarintScalarNoinline(p1, p2) + } + + data := archsimd.LoadUint8x16(xunsafe.Cast[[16]uint8](p1.Ptr())) + p1.Log(p2, "varint-avx", "data: %b", xsimd.Formatter(data)) + + // Find all of the continuation bytes. ToBits produces pmovmskb which is + // what we want, although we have to do a redundant comparison here... + var zero archsimd.Int8x16 + signs := data.AsInt8x16().Less(zero).ToBits() + + len := bits.TrailingZeros16(^signs) + 1 + + // Discard extra bytes and the sign bits. + data = data.And(truncMasks[(len-1)&0xf]) + p1.Log(p2, "varint-avx", "len: %d, trunc: %b", len, xsimd.Formatter(data)) + + lo, hi := split8to16(data) + p1.Log(p2, "varint-avx", "lo: %b, hi: %b", xsimd.Formatter(lo), xsimd.Formatter(hi)) + + // lo and hi are now of the following form (highest bytes irrelevant, big + // endian u16s). + // + // 00000000 0aaaaaaa 00000000 0bbbbbbb 00000000 0ccccccc 00000000 0ddddddd + // 00000000 0eeeeeee 00000000 0fffffff 00000000 0ggggggg 00000000 0hhhhhhh + // + // 00000000 0iiiiiii 00000000 0jjjjjjj xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx + // xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx + // + // We want to get them into this form, which we can then shuffle into + // something we can or together. + // + // 00000000 0aaaaaaa b0000000 00bbbbbb cc000000 000ccccc ddd00000 0000dddd + // eeee0000 00000eee fffff000 000000ff gggggg00 0000000g hhhhhhh0 00000000 + // + // 00000000 0iiiiiii j0000000 00jjjjjj xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx + // xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx + // + // To convert 00000000 0bbbbbbb -> b0000000 00bbbbbb, we can left shift by + // 7 and then swap the bytes, then 6 bits, and so on. This can be realized + // as a multiply plus a shuffle. + // + // However, we want to overlay alternating bytes, like so: + // + // 0aaaaaaa 00bbbbbb 000ccccc 0000dddd fffff000 gggggg00 hhhhhhh0 00000000 + // 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 + // + // b0000000 cc000000 ddd00000 eeee0000 00000eee 000000ff 0000000g 00000000 + // 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 + // + // 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0iiiiiii + // 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 + // + // 00000000 00000000 00000000 00000000 00000000 00000000 00000000 j0000000 + // 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 + // + // If we or all four vectors together, we get our desired result. + // + // The shuffle masks need to incorporate the byte shift, so this + // is what we have after the multiplies: + // + // 0aaaaaaa 00000000 00bbbbbb b0000000 000ccccc cc000000 0000dddd ddd00000 + // 00000eee eeee0000 000000ff fffff000 0000000g gggggg00 00000000 hhhhhhh0 + // + // 0iiiiiii 00000000 00jjjjjj j0000000 xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx + // xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx + // + // The shuffles are straightforward from this, remembering that the above + // is big-endian. + + lo = lo.Mul(mulShift) + hi = hi.Mul(mulShift) + p1.Log(p2, "varint-avx", "lo: %b, hi: %b", xsimd.Formatter(lo), xsimd.Formatter(hi)) + + shuf0 := lo.AsUint8x16().PermuteOrZero(shuffles[0]) + shuf1 := lo.AsUint8x16().PermuteOrZero(shuffles[1]) + shuf2 := hi.AsUint8x16().PermuteOrZero(shuffles[2]) + shuf3 := hi.AsUint8x16().PermuteOrZero(shuffles[3]) + + p1.Log(p2, "varint-avx", "0: %b, 1: %b, 2: %b, 3: %b", + xsimd.Formatter(shuf0), xsimd.Formatter(shuf1), + xsimd.Formatter(shuf2), xsimd.Formatter(shuf3)) + + or := shuf0.Or(shuf1).Or(shuf2).Or(shuf3) + p1.Log(p2, "varint-avx", "or: %b", xsimd.Formatter(or)) + x = or.AsUint64x2().GetElem(0) + p1.Log(p2, "varint-avx", "out: %d, %b", x, x) + + // Now, some cleanup. We have overflow conditions in the following cases: + // + // 1. len == 10 and data[9] is greater than 1. The unused byte hi[3] records + // this overflow information. + // 2. len > 10. + truncated := xbits.Bit(hi.GetElem(3) != 0)|xbits.Bit(len > 10) != 0 + if truncated { + goto fail + } + + p1.PtrAddr = p1.PtrAddr.Add(len) + } + +exit: + if debug.Enabled { + len := int(p1.PtrAddr - start) // For debug only. + p1.Log(p2, "varint", "%d:%#x (%d bytes)", x, x, len) + runtime.GC() // This checks for the above crash bug. + } + + return p1, p2, x + +fail: + p1.Fail(p2, ErrorTruncated) + for { + } +} diff --git a/internal/xsimd/xsimd.go b/internal/xsimd/xsimd.go index c8b2d89..4bc9204 100644 --- a/internal/xsimd/xsimd.go +++ b/internal/xsimd/xsimd.go @@ -1,19 +1,55 @@ +// Copyright 2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package xsimd -import "buf.build/go/hyperpb/internal/xunsafe/layout" +import ( + "fmt" + "reflect" + "unsafe" + + "buf.build/go/hyperpb/internal/xunsafe/layout" +) -// ToSlice converts a vector into a slice. -func ToSlice[V vector[T], T any](v V) []T { - n := layout.Size[V]() / layout.Size[T]() - out := make([]T, n) - v.StoreSlice(out) - return out +// Formatter returns a value wrapping v which formats it as if it were a slice. +func Formatter[T any](v vector[T]) any { + return &format[T]{v} } type vector[T any] interface { StoreSlice([]T) } -type format[V vector[T], T any] struct { - v V +type format[T any] struct { + v any +} + +func (f format[T]) Format(s fmt.State, v rune) { + r := reflect.ValueOf(f.v) + d := reflect.New(r.Type()) + d.Elem().Set(r) + + n := int(r.Type().Size()) / layout.Size[T]() + p := unsafe.Slice((*T)(d.UnsafePointer()), n) + + format := fmt.FormatString(s, v) + fmt.Fprint(s, "[") + for i, v := range p { + if i > 0 { + fmt.Fprint(s, " ") + } + fmt.Fprintf(s, format, v) + } + fmt.Fprint(s, "]") } From 62fe2e987c397d705b0cd2d1d3aed1cb95ffa986 Mon Sep 17 00:00:00 2001 From: Miguel Young de la Sota Date: Wed, 11 Mar 2026 18:10:33 -0700 Subject: [PATCH 03/11] refactor --- internal/debug/debug.go | 5 + internal/tdp/compiler/compile.go | 2 +- internal/tdp/{vm => }/error.go | 26 +- internal/tdp/thunks/map.go | 37 +- internal/tdp/thunks/oneof.go | 3 +- internal/tdp/thunks/optional.go | 3 +- internal/tdp/thunks/repeated.go | 32 +- internal/tdp/thunks/repeated_message.go | 2 +- internal/tdp/thunks/singular.go | 29 +- internal/tdp/thunks/stencils.go | 807 +++++++++--------- internal/tdp/thunks/thunks.go | 12 + internal/tdp/vm/internal/state/p1p2.go | 383 +++++++++ internal/tdp/vm/internal/state/p3.go | 113 +++ internal/tdp/vm/{ => memory}/memory.go | 2 +- internal/tdp/vm/message.go | 2 +- internal/tdp/vm/options/options.go | 48 ++ internal/tdp/vm/run.go | 187 ++-- internal/tdp/vm/stencils.go | 4 +- internal/tdp/vm/utf8.go | 2 +- .../tdp/vm/{varint_avx.go => varint/avx.go} | 89 +- internal/tdp/vm/varint/empty.s | 1 + internal/tdp/vm/varint/no_avx.go | 27 + internal/tdp/vm/varint/split.go | 32 + internal/tdp/vm/varint/stencils.go | 234 +++++ internal/tdp/vm/{ => varint}/varint.go | 65 +- internal/tdp/vm/vm.go | 441 +--------- internal/testdata/testdata.go | 4 +- internal/tools/hyperstencil/main.go | 174 ++-- internal/xsimd/avx_dynamic.go | 21 + internal/{cpu/cpu.go => xsimd/avx_none.go} | 6 +- internal/xsimd/avx_static.go | 19 + internal/xsimd/{xsimd.go => format.go} | 33 +- message.go | 5 +- options.go | 16 +- 34 files changed, 1715 insertions(+), 1151 deletions(-) rename internal/tdp/{vm => }/error.go (76%) create mode 100644 internal/tdp/vm/internal/state/p1p2.go create mode 100644 internal/tdp/vm/internal/state/p3.go rename internal/tdp/vm/{ => memory}/memory.go (99%) create mode 100644 internal/tdp/vm/options/options.go rename internal/tdp/vm/{varint_avx.go => varint/avx.go} (78%) create mode 100644 internal/tdp/vm/varint/empty.s create mode 100644 internal/tdp/vm/varint/no_avx.go create mode 100644 internal/tdp/vm/varint/split.go create mode 100644 internal/tdp/vm/varint/stencils.go rename internal/tdp/vm/{ => varint}/varint.go (75%) create mode 100644 internal/xsimd/avx_dynamic.go rename internal/{cpu/cpu.go => xsimd/avx_none.go} (89%) create mode 100644 internal/xsimd/avx_static.go rename internal/xsimd/{xsimd.go => format.go} (60%) diff --git a/internal/debug/debug.go b/internal/debug/debug.go index 72aa2a3..d0932cf 100644 --- a/internal/debug/debug.go +++ b/internal/debug/debug.go @@ -27,6 +27,7 @@ import ( "strings" "buf.build/go/hyperpb/internal/xflag" + "buf.build/go/hyperpb/internal/xsimd" "github.com/timandy/routine" ) @@ -66,6 +67,10 @@ again: file = filepath.Base(file) + for i := range args { + args[i] = xsimd.Format(args[i]) + } + buf := new(strings.Builder) _, _ = fmt.Fprintf(buf, "%s/%s:%d [g%04d", pkg, file, line, routine.Goid()) diff --git a/internal/tdp/compiler/compile.go b/internal/tdp/compiler/compile.go index 826a884..730ff87 100644 --- a/internal/tdp/compiler/compile.go +++ b/internal/tdp/compiler/compile.go @@ -452,7 +452,7 @@ func (c *compiler) codegen(ir *ir) { ) mpf.Push(tdp.FieldParser{ Tag: mapValue, - Parse: uintptr(xunsafe.NewPC(vm.Thunk(vm.P1.ParseMapEntry))), + Parse: uintptr(xunsafe.NewPC(vm.Thunk(vm.ParseMapEntry))), }) // Write the fast-lookup lut. diff --git a/internal/tdp/vm/error.go b/internal/tdp/error.go similarity index 76% rename from internal/tdp/vm/error.go rename to internal/tdp/error.go index f69c675..5253885 100644 --- a/internal/tdp/vm/error.go +++ b/internal/tdp/error.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package vm +package tdp import ( "errors" @@ -46,26 +46,38 @@ var errs = [...]error{ ErrorTooBig: errors.New("input was larger than 4GB"), } -// ErrorCode is one of the possible types of errors in [ParseError]. +// ErrorCode is one of the possible types of errors in [Error]. type ErrorCode int -// ParseError is an error returned by the TDP parser. -type ParseError struct { +// ErrorAt returns a new error with this code. +func (c ErrorCode) ErrorAt(offset int) Error { + return Error{c, offset} +} + +// GetCode extracts the error code out of an [Error]. +func GetCode(e Error) ErrorCode { + return e.code +} + +// Error is an error returned by the TDP parser. +// +// Do not add new methods to this type, since those become public API. +type Error struct { code ErrorCode offset int } // Offset returns the offset at which the error occurred. -func (e *ParseError) Offset() int { +func (e *Error) Offset() int { return e.offset } // Unwrap implements error unwrapping viz [errors.Unwrap]. -func (e *ParseError) Unwrap() error { +func (e *Error) Unwrap() error { return errs[e.code] } // Error implements [error]. -func (e *ParseError) Error() string { +func (e *Error) Error() string { return fmt.Sprintf("hyperpb: parser error at offset %d/%#x: %v", e.offset, e.offset, e.Unwrap()) } diff --git a/internal/tdp/thunks/map.go b/internal/tdp/thunks/map.go index 9db33ac..93fd2c2 100644 --- a/internal/tdp/thunks/map.go +++ b/internal/tdp/thunks/map.go @@ -26,6 +26,7 @@ import ( "buf.build/go/hyperpb/internal/tdp/dynamic" "buf.build/go/hyperpb/internal/tdp/maps" "buf.build/go/hyperpb/internal/tdp/vm" + "buf.build/go/hyperpb/internal/tdp/vm/varint" "buf.build/go/hyperpb/internal/xprotoreflect" "buf.build/go/hyperpb/internal/xunsafe" "buf.build/go/hyperpb/internal/xunsafe/layout" @@ -677,33 +678,33 @@ func (bytesItem) kind() protowire.Type { return protowire.BytesType } // //go:nosplit // TODO(#30): Enable once upstream is fixed. func (varint32Item) parse(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2, uint32) { var n uint64 - p1, p2, n = p1.Varint(p2) + p1, p2, n = varint.Varint32(p1, p2) return p1, p2, uint32(n) } // //go:nosplit // TODO(#30): Enable once upstream is fixed. func (varint64Item) parse(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2, uint64) { - return p1.Varint(p2) + return varint.Varint64(p1, p2) } // //go:nosplit // TODO(#30): Enable once upstream is fixed. func (zigzag32Item) parse(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2, uint32) { var n uint64 - p1, p2, n = p1.Varint(p2) + p1, p2, n = varint.Varint32(p1, p2) return p1, p2, zigzag.Decode64[uint32](n) } // //go:nosplit // TODO(#30): Enable once upstream is fixed. func (zigzag64Item) parse(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2, uint64) { var n uint64 - p1, p2, n = p1.Varint(p2) + p1, p2, n = varint.Varint64(p1, p2) return p1, p2, zigzag.Decode64[uint64](n) } // //go:nosplit // TODO(#30): Enable once upstream is fixed. func (boolItem) parse(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2, uint8) { var n uint64 - p1, p2, n = p1.Varint(p2) + p1, p2, n = varint.Varint32(p1, p2) if n != 0 { n = 1 } @@ -712,25 +713,25 @@ func (boolItem) parse(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2, uint8) { //go:nosplit func (fixed32Item) parse(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2, uint32) { - return p1.Fixed32(p2) + return vm.Fixed32(p1, p2) } //go:nosplit func (fixed64Item) parse(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2, uint64) { - return p1.Fixed64(p2) + return vm.Fixed64(p1, p2) } //go:nosplit func (stringItem) parse(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2, uint64) { var r zc.Range - p1, p2, r = p1.UTF8(p2) + p1, p2, r = vm.UTF8(p1, p2) return p1, p2, uint64(r) } //go:nosplit func (bytesItem) parse(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2, uint64) { var r zc.Range - p1, p2, r = p1.Bytes(p2) + p1, p2, r = vm.Bytes(p1, p2) return p1, p2, uint64(r) } @@ -845,7 +846,7 @@ func parseMapKxV[ K swiss.Key, V any, ](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -889,7 +890,7 @@ func parseMapKxV[ // afford to call varint() each time we parse a tag. for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -899,7 +900,7 @@ func parseMapKxV[ n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -932,7 +933,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } @@ -949,7 +950,7 @@ insert: // parseMapKxM parses a map type whose value is a message type. func parseMapKxM[KI mapItem[K], K swiss.Key](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -980,7 +981,7 @@ func parseMapKxM[KI mapItem[K], K swiss.Key](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) p1.PtrAddr++ // Need to parse a length prefix and check if it reaches all the // way to the end of the message. - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) if p1.EndAddr > p1.PtrAddr.Add(n) { fast = true goto insert @@ -992,7 +993,7 @@ func parseMapKxM[KI mapItem[K], K swiss.Key](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) // afford to call varint() each time we parse a tag. for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -1000,7 +1001,7 @@ func parseMapKxM[KI mapItem[K], K swiss.Key](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -1044,7 +1045,7 @@ insert: xunsafe.StoreNoWBUntyped(vp, unsafe.Pointer(v)) // Unspill the old end pointer. - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) p1, p2 = p1.SetScratch(p2, uint64(n)) // Schedule a message parse. diff --git a/internal/tdp/thunks/oneof.go b/internal/tdp/thunks/oneof.go index 3c5903f..40819d2 100644 --- a/internal/tdp/thunks/oneof.go +++ b/internal/tdp/thunks/oneof.go @@ -23,6 +23,7 @@ import ( "buf.build/go/hyperpb/internal/tdp/dynamic" "buf.build/go/hyperpb/internal/tdp/empty" "buf.build/go/hyperpb/internal/tdp/vm" + "buf.build/go/hyperpb/internal/tdp/vm/varint" "buf.build/go/hyperpb/internal/xprotoreflect" "buf.build/go/hyperpb/internal/xunsafe" "buf.build/go/hyperpb/internal/xunsafe/layout" @@ -271,7 +272,7 @@ func parseOneofBytes(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { func parseOneofBool(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { var n uint64 - p1, p2, n = p1.Varint(p2) + p1, p2, n = varint.Varint32(p1, p2) if n != 0 { n = 1 } diff --git a/internal/tdp/thunks/optional.go b/internal/tdp/thunks/optional.go index d9013c4..0f910a4 100644 --- a/internal/tdp/thunks/optional.go +++ b/internal/tdp/thunks/optional.go @@ -22,6 +22,7 @@ import ( "buf.build/go/hyperpb/internal/tdp/compiler" "buf.build/go/hyperpb/internal/tdp/dynamic" "buf.build/go/hyperpb/internal/tdp/vm" + "buf.build/go/hyperpb/internal/tdp/vm/varint" "buf.build/go/hyperpb/internal/xprotoreflect" "buf.build/go/hyperpb/internal/xunsafe/layout" "buf.build/go/hyperpb/internal/zc" @@ -235,7 +236,7 @@ func parseOptionalBytes(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { // //go:nosplit // TODO(#30): Enable once upstream is fixed. func parseOptionalBool(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { var n uint64 - p1, p2, n = p1.Varint(p2) + p1, p2, n = varint.Varint32(p1, p2) p1, p2 = vm.SetBit(p1, p2) p2.Message().SetBit(p2.Field().Offset.Bit+1, n != 0) diff --git a/internal/tdp/thunks/repeated.go b/internal/tdp/thunks/repeated.go index c8b08aa..9320038 100644 --- a/internal/tdp/thunks/repeated.go +++ b/internal/tdp/thunks/repeated.go @@ -226,12 +226,12 @@ func getRepeatedBytes(m *dynamic.Message, _ *tdp.Type, getter *tdp.Accessor) pro // //go:nosplit // TODO(#30): Enable once upstream is fixed. // -//hyperpb:stencil parseRepeatedVarint8 parseRepeatedVarint[uint8] appendVarint -> appendVarint8 -//hyperpb:stencil parseRepeatedVarint32 parseRepeatedVarint[uint32] appendVarint -> appendVarint32 +//hyperpb:stencil parseRepeatedVarint8 parseRepeatedVarint[uint8] appendVarint -> appendVarint8 varint64 -> varint32 +//hyperpb:stencil parseRepeatedVarint32 parseRepeatedVarint[uint32] appendVarint -> appendVarint32 varint64 -> varint32 //hyperpb:stencil parseRepeatedVarint64 parseRepeatedVarint[uint64] appendVarint -> appendVarint64 func parseRepeatedVarint[T tdp.Int](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { var n uint64 - p1, p2, n = p1.Varint(p2) + p1, p2, n = varint64(p1, p2) var r *repeated.Scalars[byte, T] p1, p2, r = vm.GetMutableField[repeated.Scalars[byte, T]](p1, p2) @@ -271,12 +271,12 @@ func parseRepeatedVarint[T tdp.Int](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { // //go:nosplit // TODO(#30): Enable once upstream is fixed. // //go:norace // Race instrumentation causes this function to fail the nosplit check. -//hyperpb:stencil parsePackedVarint8 parsePackedVarint[uint8] -//hyperpb:stencil parsePackedVarint32 parsePackedVarint[uint32] +//hyperpb:stencil parsePackedVarint8 parsePackedVarint[uint8] varint32 -> varint64 +//hyperpb:stencil parsePackedVarint32 parsePackedVarint[uint32] varint32 -> varint64 //hyperpb:stencil parsePackedVarint64 parsePackedVarint[uint64] func parsePackedVarint[T tdp.Int](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) if n == 0 { return p1, p2 } @@ -319,7 +319,7 @@ func parsePackedVarint[T tdp.Int](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { p1.Log(p2, "zc", "%v", r.Raw) p1.PtrAddr = p1.EndAddr - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } s = s.Grow(p1.Arena(), count) @@ -376,7 +376,7 @@ func parsePackedVarint[T tdp.Int](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { x = uint64(*p1.Ptr()&0x7f) | uint64(*c.AssertValid())<<7 p1.PtrAddr += 2 } else { - p1, p2, x = p1.Varint(p2) + p1, p2, x = varint64(p1, p2) } *p.AssertValid() = T(x) @@ -390,7 +390,7 @@ func parsePackedVarint[T tdp.Int](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { default: for { var x uint64 - p1, p2, x = p1.Varint(p2) + p1, p2, x = varint64(p1, p2) *p.AssertValid() = T(x) p = p.Add(1) @@ -406,18 +406,18 @@ func parsePackedVarint[T tdp.Int](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { p1.Log(p2, "append", "%v", s.Addr()) r.Raw = s.Addr().Untyped() - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } //go:nosplit func parseRepeatedFixed32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { - return appendFixed32(p1.Fixed32(p2)) + return appendFixed32(vm.Fixed32(p1, p2)) } //go:nosplit func parseRepeatedFixed64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { - return appendFixed64(p1.Fixed64(p2)) + return appendFixed64(vm.Fixed64(p1, p2)) } // //go:nosplit // TODO(#30): Enable once upstream is fixed. @@ -459,14 +459,14 @@ func appendFixed[T uint32 | uint64](p1 vm.P1, p2 vm.P2, v T) (vm.P1, vm.P2) { //hyperpb:stencil parsePackedFixed64 parsePackedFixed[uint64] func parsePackedFixed[T tdp.Int](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) if n == 0 { return p1, p2 } size := layout.Size[T]() if n%size != 0 { - p1.Fail(p2, vm.ErrorTruncated) + p1.Fail(p2, tdp.ErrorTruncated) } var r *repeated.Scalars[T, T] @@ -519,7 +519,7 @@ exit: // //go:nosplit // TODO(#30): Enable once upstream is fixed. func parseRepeatedBytes(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { var v zc.Range - p1, p2, v = p1.Bytes(p2) + p1, p2, v = vm.Bytes(p1, p2) var r *repeated.Bytes p1, p2, r = vm.GetMutableField[repeated.Bytes](p1, p2) @@ -538,7 +538,7 @@ func parseRepeatedBytes(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { // //go:nosplit // TODO(#30): Enable once upstream is fixed. func parseRepeatedUTF8(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { var v zc.Range - p1, p2, v = p1.UTF8(p2) + p1, p2, v = vm.UTF8(p1, p2) var r *repeated.Strings p1, p2, r = vm.GetMutableField[repeated.Strings](p1, p2) diff --git a/internal/tdp/thunks/repeated_message.go b/internal/tdp/thunks/repeated_message.go index aa3cfae..e4442e2 100644 --- a/internal/tdp/thunks/repeated_message.go +++ b/internal/tdp/thunks/repeated_message.go @@ -34,7 +34,7 @@ func getRepeatedMessage(m *dynamic.Message, _ *tdp.Type, getter *tdp.Accessor) p // //go:nosplit // TODO(#30): Enable once upstream is fixed. func parseRepeatedMessage(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(n)) p1, p2, m := allocRepeatedMessage(p1, p2) return p1.PushMessage(p2, m) diff --git a/internal/tdp/thunks/singular.go b/internal/tdp/thunks/singular.go index c59e844..9fa3f3b 100644 --- a/internal/tdp/thunks/singular.go +++ b/internal/tdp/thunks/singular.go @@ -25,6 +25,7 @@ import ( "buf.build/go/hyperpb/internal/tdp/dynamic" "buf.build/go/hyperpb/internal/tdp/empty" "buf.build/go/hyperpb/internal/tdp/vm" + "buf.build/go/hyperpb/internal/tdp/vm/varint" "buf.build/go/hyperpb/internal/xprotoreflect" "buf.build/go/hyperpb/internal/xunsafe" "buf.build/go/hyperpb/internal/xunsafe/layout" @@ -258,29 +259,29 @@ func getMessage(m *dynamic.Message, ty *tdp.Type, getter *tdp.Accessor) protoref // //go:nosplit // TODO(#30): Enable once upstream is fixed. // -//hyperpb:stencil parseVarint32 parseVarint[uint32] StoreFromScratch -> StoreFromScratch32 +//hyperpb:stencil parseVarint32 parseVarint[uint32] StoreFromScratch -> StoreFromScratch32 varint64 -> varint32 //hyperpb:stencil parseVarint64 parseVarint[uint64] StoreFromScratch -> StoreFromScratch64 func parseVarint[T tdp.Int](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { - p1, p2 = vm.P1.SetScratch(p1.Varint(p2)) + p1, p2 = vm.P1.SetScratch(varint64(p1, p2)) var p *T p1, p2, p = vm.GetMutableField[T](p1, p2) - *p = T(p2.Scratch()) + *p = T(p2.Scratch) return p1, p2 } // //go:nosplit // TODO(#30): Enable once upstream is fixed. // -//hyperpb:stencil parseZigZag32 parseZigZag[uint32] StoreFromScratch -> StoreFromScratch32 +//hyperpb:stencil parseZigZag32 parseZigZag[uint32] StoreFromScratch -> StoreFromScratch32 varint64 -> varint32 //hyperpb:stencil parseZigZag64 parseZigZag[uint64] StoreFromScratch -> StoreFromScratch64 func parseZigZag[T tdp.Int](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { - p1, p2 = vm.P1.SetScratch(p1.Varint(p2)) - p1, p2 = p1.SetScratch(p2, uint64(zigzag.Decode64[T](p2.Scratch()))) + p1, p2 = vm.P1.SetScratch(varint64(p1, p2)) + p1, p2 = p1.SetScratch(p2, uint64(zigzag.Decode64[T](p2.Scratch))) var p *T p1, p2, p = vm.GetMutableField[T](p1, p2) - *p = T(p2.Scratch()) + *p = T(p2.Scratch) return p1, p2 } @@ -290,7 +291,7 @@ func parseZigZag[T tdp.Int](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { //hyperpb:stencil parseFixed64 parseFixed[uint64] func parseFixed[T tdp.Int](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { if p1.Len() < layout.Size[T]() { - p1.Fail(p2, vm.ErrorTruncated) + p1.Fail(p2, tdp.ErrorTruncated) } var p *T p1, p2, p = vm.GetMutableField[T](p1, p2) @@ -303,12 +304,12 @@ func parseFixed[T tdp.Int](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { // //go:nosplit // TODO(#30): Enable once upstream is fixed. func parseString(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { var r zc.Range - p1, p2, r = p1.UTF8(p2) + p1, p2, r = vm.UTF8(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(r)) var p *zc.Range p1, p2, p = vm.GetMutableField[zc.Range](p1, p2) - *p = zc.Range(p2.Scratch()) + *p = zc.Range(p2.Scratch) return p1, p2 } @@ -316,12 +317,12 @@ func parseString(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { // //go:nosplit // TODO(#30): Enable once upstream is fixed. func parseBytes(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { var r zc.Range - p1, p2, r = p1.Bytes(p2) + p1, p2, r = vm.Bytes(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(r)) var p *zc.Range p1, p2, p = vm.GetMutableField[zc.Range](p1, p2) - *p = zc.Range(p2.Scratch()) + *p = zc.Range(p2.Scratch) return p1, p2 } @@ -329,7 +330,7 @@ func parseBytes(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { // //go:nosplit // TODO(#30): Enable once upstream is fixed. func parseBool(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { var n uint64 - p1, p2, n = p1.Varint(p2) + p1, p2, n = varint.Varint32(p1, p2) p2.Message().SetBit(p2.Field().Offset.Bit, n != 0) return p1, p2 @@ -338,7 +339,7 @@ func parseBool(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { // //go:nosplit // TODO(#30): Enable once upstream is fixed. func parseMessage(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(n)) var mp **dynamic.Message diff --git a/internal/tdp/thunks/stencils.go b/internal/tdp/thunks/stencils.go index 91ca73b..d213509 100644 --- a/internal/tdp/thunks/stencils.go +++ b/internal/tdp/thunks/stencils.go @@ -24,6 +24,7 @@ import ( "buf.build/go/hyperpb/internal/tdp/dynamic" "buf.build/go/hyperpb/internal/tdp/repeated" "buf.build/go/hyperpb/internal/tdp/vm" + "buf.build/go/hyperpb/internal/tdp/vm/varint" "buf.build/go/hyperpb/internal/xunsafe" "buf.build/go/hyperpb/internal/xunsafe/layout" "buf.build/go/hyperpb/internal/zigzag" @@ -36,7 +37,7 @@ func parseMapV32xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[varint32Item, varint32Item, uint32, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -76,7 +77,7 @@ func parseMapV32xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -86,7 +87,7 @@ func parseMapV32xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -119,14 +120,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapV32xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[varint32Item, varint64Item, uint32, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -166,7 +167,7 @@ func parseMapV32xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -176,7 +177,7 @@ func parseMapV32xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -209,14 +210,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapV32xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[varint32Item, zigzag32Item, uint32, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -256,7 +257,7 @@ func parseMapV32xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -266,7 +267,7 @@ func parseMapV32xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -299,14 +300,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapV32xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[varint32Item, zigzag64Item, uint32, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -346,7 +347,7 @@ func parseMapV32xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -356,7 +357,7 @@ func parseMapV32xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -389,14 +390,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapV32xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[varint32Item, fixed32Item, uint32, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -436,7 +437,7 @@ func parseMapV32xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -446,7 +447,7 @@ func parseMapV32xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -479,14 +480,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapV32xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[varint32Item, fixed64Item, uint32, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -526,7 +527,7 @@ func parseMapV32xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -536,7 +537,7 @@ func parseMapV32xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -569,14 +570,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapV32x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[varint32Item, boolItem, uint32, uint8] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -616,7 +617,7 @@ func parseMapV32x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -626,7 +627,7 @@ func parseMapV32x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -659,14 +660,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapV32xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[varint32Item, stringItem, uint32, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -706,7 +707,7 @@ func parseMapV32xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -716,7 +717,7 @@ func parseMapV32xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -749,14 +750,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapV32xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[varint32Item, bytesItem, uint32, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -796,7 +797,7 @@ func parseMapV32xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -806,7 +807,7 @@ func parseMapV32xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -839,14 +840,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapV64xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[varint64Item, varint32Item, uint64, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -886,7 +887,7 @@ func parseMapV64xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -896,7 +897,7 @@ func parseMapV64xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -929,14 +930,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapV64xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[varint64Item, varint64Item, uint64, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -976,7 +977,7 @@ func parseMapV64xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -986,7 +987,7 @@ func parseMapV64xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -1019,14 +1020,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapV64xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[varint64Item, zigzag32Item, uint64, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -1066,7 +1067,7 @@ func parseMapV64xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -1076,7 +1077,7 @@ func parseMapV64xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -1109,14 +1110,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapV64xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[varint64Item, zigzag64Item, uint64, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -1156,7 +1157,7 @@ func parseMapV64xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -1166,7 +1167,7 @@ func parseMapV64xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -1199,14 +1200,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapV64xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[varint64Item, fixed32Item, uint64, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -1246,7 +1247,7 @@ func parseMapV64xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -1256,7 +1257,7 @@ func parseMapV64xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -1289,14 +1290,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapV64xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[varint64Item, fixed64Item, uint64, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -1336,7 +1337,7 @@ func parseMapV64xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -1346,7 +1347,7 @@ func parseMapV64xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -1379,14 +1380,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapV64x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[varint64Item, boolItem, uint64, uint8] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -1426,7 +1427,7 @@ func parseMapV64x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -1436,7 +1437,7 @@ func parseMapV64x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -1469,14 +1470,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapV64xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[varint64Item, stringItem, uint64, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -1516,7 +1517,7 @@ func parseMapV64xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -1526,7 +1527,7 @@ func parseMapV64xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -1559,14 +1560,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapV64xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[varint64Item, bytesItem, uint64, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -1606,7 +1607,7 @@ func parseMapV64xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -1616,7 +1617,7 @@ func parseMapV64xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -1649,14 +1650,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapZ32xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[zigzag32Item, varint32Item, uint32, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -1696,7 +1697,7 @@ func parseMapZ32xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -1706,7 +1707,7 @@ func parseMapZ32xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -1739,14 +1740,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapZ32xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[zigzag32Item, varint64Item, uint32, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -1786,7 +1787,7 @@ func parseMapZ32xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -1796,7 +1797,7 @@ func parseMapZ32xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -1829,14 +1830,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapZ32xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[zigzag32Item, zigzag32Item, uint32, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -1876,7 +1877,7 @@ func parseMapZ32xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -1886,7 +1887,7 @@ func parseMapZ32xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -1919,14 +1920,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapZ32xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[zigzag32Item, zigzag64Item, uint32, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -1966,7 +1967,7 @@ func parseMapZ32xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -1976,7 +1977,7 @@ func parseMapZ32xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -2009,14 +2010,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapZ32xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[zigzag32Item, fixed32Item, uint32, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -2056,7 +2057,7 @@ func parseMapZ32xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -2066,7 +2067,7 @@ func parseMapZ32xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -2099,14 +2100,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapZ32xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[zigzag32Item, fixed64Item, uint32, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -2146,7 +2147,7 @@ func parseMapZ32xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -2156,7 +2157,7 @@ func parseMapZ32xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -2189,14 +2190,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapZ32x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[zigzag32Item, boolItem, uint32, uint8] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -2236,7 +2237,7 @@ func parseMapZ32x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -2246,7 +2247,7 @@ func parseMapZ32x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -2279,14 +2280,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapZ32xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[zigzag32Item, stringItem, uint32, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -2326,7 +2327,7 @@ func parseMapZ32xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -2336,7 +2337,7 @@ func parseMapZ32xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -2369,14 +2370,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapZ32xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[zigzag32Item, bytesItem, uint32, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -2416,7 +2417,7 @@ func parseMapZ32xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -2426,7 +2427,7 @@ func parseMapZ32xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -2459,14 +2460,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapZ64xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[zigzag64Item, varint32Item, uint64, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -2506,7 +2507,7 @@ func parseMapZ64xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -2516,7 +2517,7 @@ func parseMapZ64xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -2549,14 +2550,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapZ64xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[zigzag64Item, varint64Item, uint64, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -2596,7 +2597,7 @@ func parseMapZ64xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -2606,7 +2607,7 @@ func parseMapZ64xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -2639,14 +2640,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapZ64xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[zigzag64Item, zigzag32Item, uint64, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -2686,7 +2687,7 @@ func parseMapZ64xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -2696,7 +2697,7 @@ func parseMapZ64xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -2729,14 +2730,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapZ64xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[zigzag64Item, zigzag64Item, uint64, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -2776,7 +2777,7 @@ func parseMapZ64xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -2786,7 +2787,7 @@ func parseMapZ64xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -2819,14 +2820,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapZ64xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[zigzag64Item, fixed32Item, uint64, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -2866,7 +2867,7 @@ func parseMapZ64xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -2876,7 +2877,7 @@ func parseMapZ64xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -2909,14 +2910,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapZ64xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[zigzag64Item, fixed64Item, uint64, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -2956,7 +2957,7 @@ func parseMapZ64xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -2966,7 +2967,7 @@ func parseMapZ64xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -2999,14 +3000,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapZ64x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[zigzag64Item, boolItem, uint64, uint8] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -3046,7 +3047,7 @@ func parseMapZ64x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -3056,7 +3057,7 @@ func parseMapZ64x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -3089,14 +3090,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapZ64xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[zigzag64Item, stringItem, uint64, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -3136,7 +3137,7 @@ func parseMapZ64xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -3146,7 +3147,7 @@ func parseMapZ64xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -3179,14 +3180,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapZ64xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[zigzag64Item, bytesItem, uint64, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -3226,7 +3227,7 @@ func parseMapZ64xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -3236,7 +3237,7 @@ func parseMapZ64xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -3269,14 +3270,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapF32xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[fixed32Item, varint32Item, uint32, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -3316,7 +3317,7 @@ func parseMapF32xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -3326,7 +3327,7 @@ func parseMapF32xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -3359,14 +3360,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapF32xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[fixed32Item, varint64Item, uint32, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -3406,7 +3407,7 @@ func parseMapF32xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -3416,7 +3417,7 @@ func parseMapF32xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -3449,14 +3450,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapF32xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[fixed32Item, zigzag32Item, uint32, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -3496,7 +3497,7 @@ func parseMapF32xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -3506,7 +3507,7 @@ func parseMapF32xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -3539,14 +3540,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapF32xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[fixed32Item, zigzag64Item, uint32, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -3586,7 +3587,7 @@ func parseMapF32xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -3596,7 +3597,7 @@ func parseMapF32xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -3629,14 +3630,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapF32xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[fixed32Item, fixed32Item, uint32, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -3676,7 +3677,7 @@ func parseMapF32xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -3686,7 +3687,7 @@ func parseMapF32xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -3719,14 +3720,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapF32xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[fixed32Item, fixed64Item, uint32, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -3766,7 +3767,7 @@ func parseMapF32xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -3776,7 +3777,7 @@ func parseMapF32xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -3809,14 +3810,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapF32x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[fixed32Item, boolItem, uint32, uint8] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -3856,7 +3857,7 @@ func parseMapF32x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -3866,7 +3867,7 @@ func parseMapF32x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -3899,14 +3900,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapF32xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[fixed32Item, stringItem, uint32, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -3946,7 +3947,7 @@ func parseMapF32xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -3956,7 +3957,7 @@ func parseMapF32xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -3989,14 +3990,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapF32xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[fixed32Item, bytesItem, uint32, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -4036,7 +4037,7 @@ func parseMapF32xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -4046,7 +4047,7 @@ func parseMapF32xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -4079,14 +4080,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapF64xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[fixed64Item, varint32Item, uint64, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -4126,7 +4127,7 @@ func parseMapF64xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -4136,7 +4137,7 @@ func parseMapF64xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -4169,14 +4170,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapF64xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[fixed64Item, varint64Item, uint64, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -4216,7 +4217,7 @@ func parseMapF64xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -4226,7 +4227,7 @@ func parseMapF64xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -4259,14 +4260,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapF64xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[fixed64Item, zigzag32Item, uint64, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -4306,7 +4307,7 @@ func parseMapF64xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -4316,7 +4317,7 @@ func parseMapF64xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -4349,14 +4350,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapF64xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[fixed64Item, zigzag64Item, uint64, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -4396,7 +4397,7 @@ func parseMapF64xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -4406,7 +4407,7 @@ func parseMapF64xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -4439,14 +4440,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapF64xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[fixed64Item, fixed32Item, uint64, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -4486,7 +4487,7 @@ func parseMapF64xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -4496,7 +4497,7 @@ func parseMapF64xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -4529,14 +4530,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapF64xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[fixed64Item, fixed64Item, uint64, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -4576,7 +4577,7 @@ func parseMapF64xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -4586,7 +4587,7 @@ func parseMapF64xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -4619,14 +4620,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapF64x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[fixed64Item, boolItem, uint64, uint8] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -4666,7 +4667,7 @@ func parseMapF64x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -4676,7 +4677,7 @@ func parseMapF64x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -4709,14 +4710,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapF64xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[fixed64Item, stringItem, uint64, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -4756,7 +4757,7 @@ func parseMapF64xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -4766,7 +4767,7 @@ func parseMapF64xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -4799,14 +4800,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapF64xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[fixed64Item, bytesItem, uint64, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -4846,7 +4847,7 @@ func parseMapF64xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -4856,7 +4857,7 @@ func parseMapF64xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -4889,14 +4890,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapSxV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[stringItem, varint32Item, uint64, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -4936,7 +4937,7 @@ func parseMapSxV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -4946,7 +4947,7 @@ func parseMapSxV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -4979,14 +4980,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapSxV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[stringItem, varint64Item, uint64, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -5026,7 +5027,7 @@ func parseMapSxV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -5036,7 +5037,7 @@ func parseMapSxV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -5069,14 +5070,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapSxZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[stringItem, zigzag32Item, uint64, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -5116,7 +5117,7 @@ func parseMapSxZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -5126,7 +5127,7 @@ func parseMapSxZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -5159,14 +5160,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapSxZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[stringItem, zigzag64Item, uint64, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -5206,7 +5207,7 @@ func parseMapSxZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -5216,7 +5217,7 @@ func parseMapSxZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -5249,14 +5250,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapSxF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[stringItem, fixed32Item, uint64, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -5296,7 +5297,7 @@ func parseMapSxF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -5306,7 +5307,7 @@ func parseMapSxF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -5339,14 +5340,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapSxF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[stringItem, fixed64Item, uint64, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -5386,7 +5387,7 @@ func parseMapSxF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -5396,7 +5397,7 @@ func parseMapSxF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -5429,14 +5430,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapSx2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[stringItem, boolItem, uint64, uint8] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -5476,7 +5477,7 @@ func parseMapSx2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -5486,7 +5487,7 @@ func parseMapSx2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -5519,14 +5520,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapSxS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[stringItem, stringItem, uint64, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -5566,7 +5567,7 @@ func parseMapSxS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -5576,7 +5577,7 @@ func parseMapSxS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -5609,14 +5610,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapSxB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[stringItem, bytesItem, uint64, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -5656,7 +5657,7 @@ func parseMapSxB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -5666,7 +5667,7 @@ func parseMapSxB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -5699,14 +5700,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapBxV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[bytesItem, varint32Item, uint64, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -5746,7 +5747,7 @@ func parseMapBxV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -5756,7 +5757,7 @@ func parseMapBxV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -5789,14 +5790,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapBxV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[bytesItem, varint64Item, uint64, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -5836,7 +5837,7 @@ func parseMapBxV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -5846,7 +5847,7 @@ func parseMapBxV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -5879,14 +5880,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapBxZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[bytesItem, zigzag32Item, uint64, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -5926,7 +5927,7 @@ func parseMapBxZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -5936,7 +5937,7 @@ func parseMapBxZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -5969,14 +5970,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapBxZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[bytesItem, zigzag64Item, uint64, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -6016,7 +6017,7 @@ func parseMapBxZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -6026,7 +6027,7 @@ func parseMapBxZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -6059,14 +6060,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapBxF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[bytesItem, fixed32Item, uint64, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -6106,7 +6107,7 @@ func parseMapBxF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -6116,7 +6117,7 @@ func parseMapBxF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -6149,14 +6150,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapBxF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[bytesItem, fixed64Item, uint64, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -6196,7 +6197,7 @@ func parseMapBxF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -6206,7 +6207,7 @@ func parseMapBxF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -6239,14 +6240,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapBx2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[bytesItem, boolItem, uint64, uint8] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -6286,7 +6287,7 @@ func parseMapBx2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -6296,7 +6297,7 @@ func parseMapBx2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -6329,14 +6330,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapBxS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[bytesItem, stringItem, uint64, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -6376,7 +6377,7 @@ func parseMapBxS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -6386,7 +6387,7 @@ func parseMapBxS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -6419,14 +6420,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapBxB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[bytesItem, bytesItem, uint64, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -6466,7 +6467,7 @@ func parseMapBxB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -6476,7 +6477,7 @@ func parseMapBxB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -6509,14 +6510,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMap2xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[boolItem, varint32Item, uint8, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -6556,7 +6557,7 @@ func parseMap2xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -6566,7 +6567,7 @@ func parseMap2xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -6599,14 +6600,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMap2xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[boolItem, varint64Item, uint8, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -6646,7 +6647,7 @@ func parseMap2xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -6656,7 +6657,7 @@ func parseMap2xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -6689,14 +6690,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMap2xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[boolItem, zigzag32Item, uint8, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -6736,7 +6737,7 @@ func parseMap2xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -6746,7 +6747,7 @@ func parseMap2xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -6779,14 +6780,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMap2xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[boolItem, zigzag64Item, uint8, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -6826,7 +6827,7 @@ func parseMap2xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -6836,7 +6837,7 @@ func parseMap2xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -6869,14 +6870,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMap2xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[boolItem, fixed32Item, uint8, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -6916,7 +6917,7 @@ func parseMap2xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -6926,7 +6927,7 @@ func parseMap2xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -6959,14 +6960,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMap2xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[boolItem, fixed64Item, uint8, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -7006,7 +7007,7 @@ func parseMap2xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -7016,7 +7017,7 @@ func parseMap2xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -7049,14 +7050,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMap2x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[boolItem, boolItem, uint8, uint8] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -7096,7 +7097,7 @@ func parseMap2x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -7106,7 +7107,7 @@ func parseMap2x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -7139,14 +7140,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMap2xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[boolItem, stringItem, uint8, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -7186,7 +7187,7 @@ func parseMap2xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -7196,7 +7197,7 @@ func parseMap2xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -7229,14 +7230,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMap2xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxV[boolItem, bytesItem, uint8, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -7276,7 +7277,7 @@ func parseMap2xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -7286,7 +7287,7 @@ func parseMap2xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -7319,14 +7320,14 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } func parseMapV32xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxM[varint32Item, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -7354,7 +7355,7 @@ func parseMapV32xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { if *p1.Ptr() == byte(vTag) { p1.PtrAddr++ - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) if p1.EndAddr > p1.PtrAddr.Add(n) { fast = true goto insert @@ -7364,7 +7365,7 @@ func parseMapV32xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -7372,7 +7373,7 @@ func parseMapV32xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -7412,7 +7413,7 @@ insert: p1, p2, v = vm.AllocMessage(p1, p2) xunsafe.StoreNoWBUntyped(vp, unsafe.Pointer(v)) - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) p1, p2 = p1.SetScratch(p2, uint64(n)) if fast { @@ -7426,7 +7427,7 @@ insert: func parseMapV64xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxM[varint64Item, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -7454,7 +7455,7 @@ func parseMapV64xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { if *p1.Ptr() == byte(vTag) { p1.PtrAddr++ - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) if p1.EndAddr > p1.PtrAddr.Add(n) { fast = true goto insert @@ -7464,7 +7465,7 @@ func parseMapV64xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -7472,7 +7473,7 @@ func parseMapV64xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -7512,7 +7513,7 @@ insert: p1, p2, v = vm.AllocMessage(p1, p2) xunsafe.StoreNoWBUntyped(vp, unsafe.Pointer(v)) - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) p1, p2 = p1.SetScratch(p2, uint64(n)) if fast { @@ -7526,7 +7527,7 @@ insert: func parseMapZ32xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxM[zigzag32Item, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -7554,7 +7555,7 @@ func parseMapZ32xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { if *p1.Ptr() == byte(vTag) { p1.PtrAddr++ - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) if p1.EndAddr > p1.PtrAddr.Add(n) { fast = true goto insert @@ -7564,7 +7565,7 @@ func parseMapZ32xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -7572,7 +7573,7 @@ func parseMapZ32xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -7612,7 +7613,7 @@ insert: p1, p2, v = vm.AllocMessage(p1, p2) xunsafe.StoreNoWBUntyped(vp, unsafe.Pointer(v)) - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) p1, p2 = p1.SetScratch(p2, uint64(n)) if fast { @@ -7626,7 +7627,7 @@ insert: func parseMapZ64xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxM[zigzag64Item, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -7654,7 +7655,7 @@ func parseMapZ64xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { if *p1.Ptr() == byte(vTag) { p1.PtrAddr++ - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) if p1.EndAddr > p1.PtrAddr.Add(n) { fast = true goto insert @@ -7664,7 +7665,7 @@ func parseMapZ64xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -7672,7 +7673,7 @@ func parseMapZ64xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -7712,7 +7713,7 @@ insert: p1, p2, v = vm.AllocMessage(p1, p2) xunsafe.StoreNoWBUntyped(vp, unsafe.Pointer(v)) - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) p1, p2 = p1.SetScratch(p2, uint64(n)) if fast { @@ -7726,7 +7727,7 @@ insert: func parseMapF32xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxM[fixed32Item, uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -7754,7 +7755,7 @@ func parseMapF32xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { if *p1.Ptr() == byte(vTag) { p1.PtrAddr++ - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) if p1.EndAddr > p1.PtrAddr.Add(n) { fast = true goto insert @@ -7764,7 +7765,7 @@ func parseMapF32xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -7772,7 +7773,7 @@ func parseMapF32xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -7812,7 +7813,7 @@ insert: p1, p2, v = vm.AllocMessage(p1, p2) xunsafe.StoreNoWBUntyped(vp, unsafe.Pointer(v)) - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) p1, p2 = p1.SetScratch(p2, uint64(n)) if fast { @@ -7826,7 +7827,7 @@ insert: func parseMapF64xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxM[fixed64Item, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -7854,7 +7855,7 @@ func parseMapF64xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { if *p1.Ptr() == byte(vTag) { p1.PtrAddr++ - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) if p1.EndAddr > p1.PtrAddr.Add(n) { fast = true goto insert @@ -7864,7 +7865,7 @@ func parseMapF64xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -7872,7 +7873,7 @@ func parseMapF64xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -7912,7 +7913,7 @@ insert: p1, p2, v = vm.AllocMessage(p1, p2) xunsafe.StoreNoWBUntyped(vp, unsafe.Pointer(v)) - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) p1, p2 = p1.SetScratch(p2, uint64(n)) if fast { @@ -7926,7 +7927,7 @@ insert: func parseMapSxM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxM[stringItem, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -7954,7 +7955,7 @@ func parseMapSxM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { if *p1.Ptr() == byte(vTag) { p1.PtrAddr++ - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) if p1.EndAddr > p1.PtrAddr.Add(n) { fast = true goto insert @@ -7964,7 +7965,7 @@ func parseMapSxM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -7972,7 +7973,7 @@ func parseMapSxM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -8012,7 +8013,7 @@ insert: p1, p2, v = vm.AllocMessage(p1, p2) xunsafe.StoreNoWBUntyped(vp, unsafe.Pointer(v)) - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) p1, p2 = p1.SetScratch(p2, uint64(n)) if fast { @@ -8026,7 +8027,7 @@ insert: func parseMapBxM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxM[bytesItem, uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -8054,7 +8055,7 @@ func parseMapBxM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { if *p1.Ptr() == byte(vTag) { p1.PtrAddr++ - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) if p1.EndAddr > p1.PtrAddr.Add(n) { fast = true goto insert @@ -8064,7 +8065,7 @@ func parseMapBxM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -8072,7 +8073,7 @@ func parseMapBxM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -8112,7 +8113,7 @@ insert: p1, p2, v = vm.AllocMessage(p1, p2) xunsafe.StoreNoWBUntyped(vp, unsafe.Pointer(v)) - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) p1, p2 = p1.SetScratch(p2, uint64(n)) if fast { @@ -8126,7 +8127,7 @@ insert: func parseMap2xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseMapKxM[boolItem, uint8] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(p1.EndAddr)) p1.EndAddr = p1.PtrAddr.Add(n) @@ -8154,7 +8155,7 @@ func parseMap2xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { if *p1.Ptr() == byte(vTag) { p1.PtrAddr++ - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) if p1.EndAddr > p1.PtrAddr.Add(n) { fast = true goto insert @@ -8164,7 +8165,7 @@ func parseMap2xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = p1.Varint(p2) + p1, p2, tag = varint.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -8172,7 +8173,7 @@ func parseMap2xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { n, t := protowire.DecodeTag(tag) m := protowire.ConsumeFieldValue(n, t, p1.Buf()) if m < 0 { - p1.Fail(p2, -vm.ErrorCode(m)) + p1.Fail(p2, -tdp.ErrorCode(m)) } p1.PtrAddr = p1.PtrAddr.Add(m) } @@ -8212,7 +8213,7 @@ insert: p1, p2, v = vm.AllocMessage(p1, p2) xunsafe.StoreNoWBUntyped(vp, unsafe.Pointer(v)) - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) p1, p2 = p1.SetScratch(p2, uint64(n)) if fast { @@ -8226,7 +8227,7 @@ insert: func parseRepeatedVarint8(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseRepeatedVarint[uint8] var n uint64 - p1, p2, n = p1.Varint(p2) + p1, p2, n = varint32(p1, p2) var r *repeated.Scalars[byte, uint8] p1, p2, r = vm.GetMutableField[repeated.Scalars[byte, uint8]](p1, p2) @@ -8263,7 +8264,7 @@ func parseRepeatedVarint8(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { func parseRepeatedVarint32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseRepeatedVarint[uint32] var n uint64 - p1, p2, n = p1.Varint(p2) + p1, p2, n = varint32(p1, p2) var r *repeated.Scalars[byte, uint32] p1, p2, r = vm.GetMutableField[repeated.Scalars[byte, uint32]](p1, p2) @@ -8300,7 +8301,7 @@ func parseRepeatedVarint32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { func parseRepeatedVarint64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseRepeatedVarint[uint64] var n uint64 - p1, p2, n = p1.Varint(p2) + p1, p2, n = varint64(p1, p2) var r *repeated.Scalars[byte, uint64] p1, p2, r = vm.GetMutableField[repeated.Scalars[byte, uint64]](p1, p2) @@ -8339,7 +8340,7 @@ func parseRepeatedVarint64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { func parsePackedVarint8(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parsePackedVarint[uint8] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) if n == 0 { return p1, p2 } @@ -8379,7 +8380,7 @@ func parsePackedVarint8(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { p1.Log(p2, "zc", "%v", r.Raw) p1.PtrAddr = p1.EndAddr - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } s = s.Grow(p1.Arena(), count) @@ -8430,7 +8431,7 @@ func parsePackedVarint8(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { x = uint64(*p1.Ptr()&0x7f) | uint64(*c.AssertValid())<<7 p1.PtrAddr += 2 } else { - p1, p2, x = p1.Varint(p2) + p1, p2, x = varint64(p1, p2) } *p.AssertValid() = uint8(x) @@ -8444,7 +8445,7 @@ func parsePackedVarint8(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { default: for { var x uint64 - p1, p2, x = p1.Varint(p2) + p1, p2, x = varint64(p1, p2) *p.AssertValid() = uint8(x) p = p.Add(1) @@ -8460,7 +8461,7 @@ func parsePackedVarint8(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { p1.Log(p2, "append", "%v", s.Addr()) r.Raw = s.Addr().Untyped() - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } @@ -8468,7 +8469,7 @@ func parsePackedVarint8(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { func parsePackedVarint32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parsePackedVarint[uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) if n == 0 { return p1, p2 } @@ -8508,7 +8509,7 @@ func parsePackedVarint32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { p1.Log(p2, "zc", "%v", r.Raw) p1.PtrAddr = p1.EndAddr - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } s = s.Grow(p1.Arena(), count) @@ -8559,7 +8560,7 @@ func parsePackedVarint32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { x = uint64(*p1.Ptr()&0x7f) | uint64(*c.AssertValid())<<7 p1.PtrAddr += 2 } else { - p1, p2, x = p1.Varint(p2) + p1, p2, x = varint64(p1, p2) } *p.AssertValid() = uint32(x) @@ -8573,7 +8574,7 @@ func parsePackedVarint32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { default: for { var x uint64 - p1, p2, x = p1.Varint(p2) + p1, p2, x = varint64(p1, p2) *p.AssertValid() = uint32(x) p = p.Add(1) @@ -8589,7 +8590,7 @@ func parsePackedVarint32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { p1.Log(p2, "append", "%v", s.Addr()) r.Raw = s.Addr().Untyped() - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } @@ -8597,7 +8598,7 @@ func parsePackedVarint32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { func parsePackedVarint64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parsePackedVarint[uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) if n == 0 { return p1, p2 } @@ -8637,7 +8638,7 @@ func parsePackedVarint64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { p1.Log(p2, "zc", "%v", r.Raw) p1.PtrAddr = p1.EndAddr - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } s = s.Grow(p1.Arena(), count) @@ -8688,7 +8689,7 @@ func parsePackedVarint64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { x = uint64(*p1.Ptr()&0x7f) | uint64(*c.AssertValid())<<7 p1.PtrAddr += 2 } else { - p1, p2, x = p1.Varint(p2) + p1, p2, x = varint64(p1, p2) } *p.AssertValid() = uint64(x) @@ -8702,7 +8703,7 @@ func parsePackedVarint64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { default: for { var x uint64 - p1, p2, x = p1.Varint(p2) + p1, p2, x = varint64(p1, p2) *p.AssertValid() = uint64(x) p = p.Add(1) @@ -8718,7 +8719,7 @@ func parsePackedVarint64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { p1.Log(p2, "append", "%v", s.Addr()) r.Raw = s.Addr().Untyped() - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) return p1, p2 } @@ -8782,14 +8783,14 @@ func appendFixed64(p1 vm.P1, p2 vm.P2, v uint64) (vm.P1, vm.P2) { func parsePackedFixed32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parsePackedFixed[uint32] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) if n == 0 { return p1, p2 } size := layout.Size[uint32]() if n%size != 0 { - p1.Fail(p2, vm.ErrorTruncated) + p1.Fail(p2, tdp.ErrorTruncated) } var r *repeated.Scalars[uint32, uint32] @@ -8839,14 +8840,14 @@ exit: func parsePackedFixed64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parsePackedFixed[uint64] var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = vm.LengthPrefix(p1, p2) if n == 0 { return p1, p2 } size := layout.Size[uint64]() if n%size != 0 { - p1.Fail(p2, vm.ErrorTruncated) + p1.Fail(p2, tdp.ErrorTruncated) } var r *repeated.Scalars[uint64, uint64] @@ -8895,44 +8896,44 @@ exit: } func parseVarint32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseVarint[uint32] - p1, p2 = vm.P1.SetScratch(p1.Varint(p2)) + p1, p2 = vm.P1.SetScratch(varint32(p1, p2)) var p *uint32 p1, p2, p = vm.GetMutableField[uint32](p1, p2) - *p = uint32(p2.Scratch()) + *p = uint32(p2.Scratch) return p1, p2 } func parseVarint64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseVarint[uint64] - p1, p2 = vm.P1.SetScratch(p1.Varint(p2)) + p1, p2 = vm.P1.SetScratch(varint64(p1, p2)) var p *uint64 p1, p2, p = vm.GetMutableField[uint64](p1, p2) - *p = uint64(p2.Scratch()) + *p = uint64(p2.Scratch) return p1, p2 } func parseZigZag32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseZigZag[uint32] - p1, p2 = vm.P1.SetScratch(p1.Varint(p2)) - p1, p2 = p1.SetScratch(p2, uint64(zigzag.Decode64[uint32](p2.Scratch()))) + p1, p2 = vm.P1.SetScratch(varint32(p1, p2)) + p1, p2 = p1.SetScratch(p2, uint64(zigzag.Decode64[uint32](p2.Scratch))) var p *uint32 p1, p2, p = vm.GetMutableField[uint32](p1, p2) - *p = uint32(p2.Scratch()) + *p = uint32(p2.Scratch) return p1, p2 } func parseZigZag64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseZigZag[uint64] - p1, p2 = vm.P1.SetScratch(p1.Varint(p2)) - p1, p2 = p1.SetScratch(p2, uint64(zigzag.Decode64[uint64](p2.Scratch()))) + p1, p2 = vm.P1.SetScratch(varint64(p1, p2)) + p1, p2 = p1.SetScratch(p2, uint64(zigzag.Decode64[uint64](p2.Scratch))) var p *uint64 p1, p2, p = vm.GetMutableField[uint64](p1, p2) - *p = uint64(p2.Scratch()) + *p = uint64(p2.Scratch) return p1, p2 } @@ -8941,7 +8942,7 @@ func parseZigZag64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { func parseFixed32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseFixed[uint32] if p1.Len() < layout.Size[uint32]() { - p1.Fail(p2, vm.ErrorTruncated) + p1.Fail(p2, tdp.ErrorTruncated) } var p *uint32 p1, p2, p = vm.GetMutableField[uint32](p1, p2) @@ -8955,7 +8956,7 @@ func parseFixed32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { func parseFixed64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseFixed[uint64] if p1.Len() < layout.Size[uint64]() { - p1.Fail(p2, vm.ErrorTruncated) + p1.Fail(p2, tdp.ErrorTruncated) } var p *uint64 p1, p2, p = vm.GetMutableField[uint64](p1, p2) diff --git a/internal/tdp/thunks/thunks.go b/internal/tdp/thunks/thunks.go index d841c20..89cfaf0 100644 --- a/internal/tdp/thunks/thunks.go +++ b/internal/tdp/thunks/thunks.go @@ -22,6 +22,8 @@ import ( "buf.build/go/hyperpb/internal/tdp/compiler" "buf.build/go/hyperpb/internal/tdp/profile" + "buf.build/go/hyperpb/internal/tdp/vm" + "buf.build/go/hyperpb/internal/tdp/vm/varint" ) //go:generate go run ../../tools/hyperstencil @@ -70,3 +72,13 @@ func fieldKind(fd protoreflect.FieldDescriptor, prof profile.Field) protoreflect return k } } + +//go:nosplit +func varint32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2, uint64) { + return varint.Varint32(p1, p2) +} + +//go:nosplit +func varint64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2, uint64) { + return varint.Varint64(p1, p2) +} diff --git a/internal/tdp/vm/internal/state/p1p2.go b/internal/tdp/vm/internal/state/p1p2.go new file mode 100644 index 0000000..c36954f --- /dev/null +++ b/internal/tdp/vm/internal/state/p1p2.go @@ -0,0 +1,383 @@ +// Copyright 2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package state contains the definition of the VM's state. +// +// This package exists so that vm/internal packages can access these types +// without being part of the vm package. +package state + +import ( + "unsafe" + + "buf.build/go/hyperpb/internal/arena" + "buf.build/go/hyperpb/internal/debug" + "buf.build/go/hyperpb/internal/swiss" + "buf.build/go/hyperpb/internal/tdp" + "buf.build/go/hyperpb/internal/tdp/dynamic" + "buf.build/go/hyperpb/internal/xunsafe" +) + +const NotAGroup = ^tdp.Tag(0) + +// P1 is half of the state for the TDP parser. +// +// This struct must no more than four fields, and all four fields must be +// word-sized or smaller, so that it fits in registers AND does not trigger +// go.dev/issue/72897. +// +// For this reason, the parser state is split into two structs that will fit +// in registers and will not be spilled. This means that functions with the +// [parseFunc] signature will keep all of the parser data in registers with +// minimal spillage. Ideally this would all be in a single struct, but see the +// above bug. +// +// Moreover, these structs should contain no pointers; pointers have instead +// been replaced with addresses, all of which are rooted at the call to +// startParse. This avoids unnecessary spilling for GC stack scanning, since +// those pointers are already findable elsewhere. +// +// Generic parser functions are homed under P1, with a parser2 argument, +// such that these functions have the following signature: +// +// func(P1, parser2) (P1, parser2) +// +// Some functions do not have the signature because they are guaranteed inline +// candidates. +// +// Note that returning no values is slower than returning the parser state: this +// is because it will force the caller to spill the parser state across the +// call. +// +// The Go register ABI means P1 and P2 occupy the following registers: +// +// x86: rax, rbx, rcx, rdi, rsi, r8, r9, r10 +// aarch64: r0, r1, r2, r3, r4, r5, r6, r7 +type P1 struct { + PtrAddr xunsafe.Addr[byte] + EndAddr xunsafe.Addr[byte] // One past the end of the stream. + + SharedPtr xunsafe.Addr[dynamic.Shared] + EndGroup tdp.Tag // End-of-group tag. +} + +// P2 is the other half of the state for the TDP parser. See [P1]. +type P2 struct { + MessageAddr xunsafe.Addr[dynamic.Message] + FieldAddr xunsafe.Addr[tdp.FieldParser] + P3Addr xunsafe.Addr[P3] + + // A Scratch register that is preserved across *most* calls. Thunks + // do not preserve the Scratch register, and some functions in this file + // do not either. + Scratch uint64 +} + +func (p1 P1) Shared() *dynamic.Shared { + return p1.SharedPtr.AssertValid() +} + +func (p1 P1) Arena() *arena.Arena { + return p1.SharedPtr.AssertValid().Arena() +} + +func (p1 P1) Src() *byte { + return p1.SharedPtr.AssertValid().Src +} + +func (p1 P1) Ptr() *byte { + // There is an exciting bug that can occur where we dereference p1.b_ + // while it points to the end of the input slice. Being able to do have + // p1.b_ equal the one-past-the-end spot is nice, but if we dereference it, + // Go may scan through this pointer, and mark the allocation it points to. + // If it happens to point to freed memory, the GC panics, because this is + // an unrecoverable constraint violation. + // + // This assert makes sure that none of our large test suite accidentally + // performs this illegal maneuver. + // + // Annoyingly this means we also need to be careful in parser1.buf(), + // because we cannot form a zero-sized slice to the end of an allocation. + debug.Assert(p1.PtrAddr < p1.EndAddr, + "p1.PtrAddr cannot point one past the end: need %v < %v", p1.PtrAddr, p1.EndAddr) + return p1.PtrAddr.AssertValid() +} + +func (p2 P2) Message() *dynamic.Message { + return p2.MessageAddr.AssertValid() +} + +func (p2 P2) Type() *tdp.TypeParser { + return p2.P3().Type.AssertValid() +} + +func (p2 P2) Field() *tdp.FieldParser { + return p2.FieldAddr.AssertValid() +} + +func (p2 P2) P3() *P3 { //nolint:funcorder + return p2.P3Addr.AssertValid() +} + +func (p1 P1) SetScratch(p2 P2, v uint64) (P1, P2) { + p1.Log(p2, "scratch", "%d:%#x", v, v) + p2.Scratch = v + return p1, p2 +} + +func (p1 P1) Len() int { + return int(p1.EndAddr - p1.PtrAddr) +} + +// Fail causes a parse failure by panicking with the given error code. +func (p1 P1) Fail(p2 P2, err tdp.ErrorCode) { + p2.P3().Err = err.ErrorAt(p1.PtrAddr.Sub(xunsafe.AddrOf(p1.Src()))) + + _ = *(*byte)(nil) // Trigger a panic without calling runtime.gopanic. Linters hate this! + for { //nolint:staticcheck // This code is unreachable. + } +} + +// Log logs debugging information during a parse. +func (p1 P1) Log(p2 P2, op, format string, args ...any) { + if !debug.Enabled { + return + } + + start := p1.PtrAddr.Sub(xunsafe.AddrOf(p1.Src())) + end := p1.EndAddr.Sub(xunsafe.AddrOf(p1.Src())) + height := p2.P3().Stack.Bottom.Sub(p2.P3().Stack.Ptr) + var b byte + if p1.PtrAddr < p1.EndAddr { + b = *p1.Ptr() + } + debug.Log( + []any{ + "%p:%p:%d %v [%d:%d] = 0x%02x", + p1.Shared(), p2.Message(), height, p1.EndGroup, start, end, b, + }, + op, format, args..., + ) +} + +// AtLeast fails the parse if there aren't at least n bytes left to parse. +// +//go:nosplit +func (p1 P1) AtLeast(p2 P2, n uint64) (P1, P2) { + if n <= uint64(p1.Len()) { + return p1, p2 + } + + p1.Fail(p2, tdp.ErrorTruncated) + return p1, p2 +} + +// Buf returns the data left to parse. +func (p1 P1) Buf() []byte { + if p1.Len() == 0 { + return nil + } + return unsafe.Slice(p1.Ptr(), p1.Len()) +} + +func (p1 P1) Advance(n int) P1 { + debug.Assert(p1.Len() >= n, "parser overflow") + + p1.PtrAddr = p1.PtrAddr.Add(n) + return p1 +} + +func (p1 P1) ByTag(p2 P2, tag2 uint64) (P1, P2, uint64) { + t := p2.Type() + p := swiss.LookupI32xU32(t.Tags, int32(tag2)) + if p == nil { + p2.FieldAddr = 0 + return p1, p2, tag2 + } + p2.FieldAddr = xunsafe.AddrOf(t.Fields().Get(int(*p))) + return p1, p2, tag2 +} + +// PushMessage pushes a new message to be parsed onto the parser stack. +// +// The length of the message should be in p2.Scratch. +// +//go:nosplit +func (p1 P1) PushMessage(p2 P2, m *dynamic.Message) (P1, P2) { + len := int(p2.Scratch) + if len == 0 { + return p1, p2 + } + + p1.Log(p2, "n", "%d", len) + + if p1.EndGroup != NotAGroup || p1.PtrAddr.Add(len) != p1.EndAddr { + // We don't need to push a new frame if the new message would cause + // the current frame to be empty once it gets popped. + p1, p2 = p1.push(p2, p1.PtrAddr.Add(len)) + } + + p1.EndGroup = NotAGroup + p2.MessageAddr = xunsafe.AddrOf(m) + + t := p2.Message().Type().Parser + p2.P3().Type = xunsafe.AddrOf(t) + if debug.Enabled { + p1, p2 = logMessage(p1, p2) + } + + p2.FieldAddr = xunsafe.AddrOf(&t.Entrypoint) + + return p1, p2 +} + +// PushMapEntry pushes a new map entry to be parsed onto the parser stack. +// +//go:nosplit +func (p1 P1) PushMapEntry(p2 P2, m *dynamic.Message) (P1, P2) { + len := int(p2.Scratch) + if len == 0 { + return p1, p2 + } + + if p1.EndGroup != NotAGroup || p1.PtrAddr.Add(len) != p1.EndAddr { + // We don't need to push a new frame if the new message would cause + // the current frame to be empty once it gets popped. + p1, p2 = p1.push(p2, p1.PtrAddr.Add(len)) + } + + p1.EndGroup = NotAGroup + p2.MessageAddr = xunsafe.AddrOf(m) + + t := p2.Message().Type().Parser.MapEntry + p2.P3().Type = xunsafe.AddrOf(t) + if debug.Enabled { + p1, p2 = logMessage(p1, p2) + } + + p2.FieldAddr = xunsafe.AddrOf(&t.Entrypoint) + + return p1, p2 +} + +// PushGroup pushes a new group to be parsed onto the parser stack. +// +//go:nosplit +func (p1 P1) PushGroup(p2 P2, m *dynamic.Message) (P1, P2) { + start := tdp.Tag(p2.Scratch) + + // Indeed, we can just +1, because we need to replace the low three + // 0b011 bits with 0b100. Much simpler than clearing and overwriting those + // bits! + end := start + 1 + + p1, p2 = p1.push(p2, p1.EndAddr) + + p1.EndGroup = end + p2.MessageAddr = xunsafe.AddrOf(m) + + t := p2.Message().Type().Parser + p2.P3().Type = xunsafe.AddrOf(t) + if debug.Enabled { + p1, p2 = logMessage(p1, p2) + } + + p2.FieldAddr = xunsafe.AddrOf(&t.Entrypoint) + + return p1, p2 +} + +// Outlined so that push() does not hit the stack size limit for nosplit. +// +//go:noinline +func logMessage(p1 P1, p2 P2) (P1, P2) { + p1.Log( + p2, "new", "%#x, %v", + p2.MessageAddr, + p2.Message().Type(), + ) + return p1, p2 +} + +func (p3 *P3) stackSlice() []Frame { + n := p3.Stack.Bottom.Sub(p3.Stack.Ptr) + return unsafe.Slice(p3.Stack.Ptr.AssertValid(), n) +} + +// push pushes a parser frame. +// +//go:nosplit +func (p1 P1) push(p2 P2, end xunsafe.Addr[byte]) (P1, P2) { + if debug.Enabled { + p1, p2 = logPush(p1, p2) + } + + if p2.P3().Stack.Ptr == p2.P3().Stack.Top { + p1.Fail(p2, tdp.ErrorRecursionDepth) + } + + p2.P3().Stack.Ptr = p2.P3().Stack.Ptr.Add(-1) + + // Note: a single frame is just too large to hit Go's SROA pass (same bug + // that results in p1/p2 being two structs). Thus, we write each field + // separately to avoid wasteful stack traffic. + frame := p2.P3().Stack.Ptr.AssertValid() + frame.End = p1.EndAddr + frame.Group = p1.EndGroup + frame.Message = p2.MessageAddr + frame.Type = p2.P3().Type + frame.Field = p2.FieldAddr + + p1.EndAddr = end + return p1, p2 +} + +// Outlined so that push() does not hit the stack size limit for nosplit. +// +//go:noinline +func logPush(p1 P1, p2 P2) (P1, P2) { + p1.Log(p2, "push", "%v/%v/%v", p2.P3().Stack.Top, p2.P3().Stack.Ptr, p2.P3().Stack.Bottom) + return p1, p2 +} + +// Pop pops a parser frame. +// +// Returns whether the last frame was popped. +// +//go:nosplit +func (p1 P1) Pop(p2 P2) (P1, P2, bool) { + if debug.Enabled { + p1.Log( + p2, "finish", "%v, ty: %p:%s %v", + p2.MessageAddr, + p2.Message().Type(), + p2.Message().Type().Descriptor.FullName(), + p2.Message().Type(), + ) + + s := &p2.P3().Stack + p1.Log(p2, "pop", "%v/%v/%v\n%s", s.Top, s.Ptr, s.Bottom, + p2.Message().Dump()) + } + + last := p2.P3().Stack.Ptr.AssertValid() + p1.EndAddr = last.End + p1.EndGroup = last.Group + p2.MessageAddr = last.Message + p2.P3().Type = last.Type + p2.FieldAddr = last.Field + p2.P3().Stack.Ptr = p2.P3().Stack.Ptr.Add(1) + + return p1, p2, p2.P3().Stack.Ptr == p2.P3().Stack.Bottom +} diff --git a/internal/tdp/vm/internal/state/p3.go b/internal/tdp/vm/internal/state/p3.go new file mode 100644 index 0000000..a94f2a3 --- /dev/null +++ b/internal/tdp/vm/internal/state/p3.go @@ -0,0 +1,113 @@ +// Copyright 2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package state + +import ( + "fmt" + "strings" + "unsafe" + + "buf.build/go/hyperpb/internal/debug" + "buf.build/go/hyperpb/internal/tdp" + "buf.build/go/hyperpb/internal/tdp/dynamic" + "buf.build/go/hyperpb/internal/tdp/vm/memory" + "buf.build/go/hyperpb/internal/tdp/vm/options" + "buf.build/go/hyperpb/internal/xsync" + "buf.build/go/hyperpb/internal/xunsafe" +) + +var ( + stackPool = xsync.Pool[[]Frame]{} + p3Pool = xsync.Pool[P3]{ + Reset: func(pp *P3) { *pp = P3{} }, + } +) + +// P3 is parser state that is passed behind a pointer. +type P3 struct { + _ xunsafe.NoCopy + + Err tdp.Error + Stack struct { + Ptr xunsafe.Addr[Frame] + Top, Bottom xunsafe.Addr[Frame] + } + + Type xunsafe.Addr[tdp.TypeParser] + options.Options + + Frames *[]Frame +} + +// Frame is a recursion frame for the parser. +type Frame struct { + End xunsafe.Addr[byte] + Group tdp.Tag + Message xunsafe.Addr[dynamic.Message] + Type xunsafe.Addr[tdp.TypeParser] + Field xunsafe.Addr[tdp.FieldParser] +} + +func NewP3(data []byte, shared *dynamic.Shared, options *options.Options) *P3 { + shared.Lock.Lock() + + p3 := p3Pool.Get() + p3.Options = *options + + data = memory.RelocatePageBoundary(data, !p3.AllowAlias) + shared.Src = unsafe.SliceData(data) + shared.Len = len(data) + // The arena keeps m.context alive, so we don't need to KeepAlive src. + + p3.Frames = stackPool.Get() + if cap(*p3.Frames) < p3.MaxDepth { + *p3.Frames = make([]Frame, p3.MaxDepth) + } + + p3.Stack.Top = xunsafe.AddrOf(unsafe.SliceData(*p3.Frames)) + p3.Stack.Bottom = p3.Stack.Top.Add(p3.MaxDepth) + + p3.Stack.Ptr = p3.Stack.Bottom + + return p3 +} + +func (p3 *P3) Done(shared *dynamic.Shared, err *error) { + if tdp.GetCode(p3.Err) != tdp.ErrorOk && recover() != nil { + // Make a copy of the error, since pp will get re-used by a future + // run of this function. + parseErr := p3.Err + *err = &parseErr + + if debug.Enabled { + buf := new(strings.Builder) + for _, frame := range p3.stackSlice() { + fmt.Fprintf(buf, "- %#v\n", frame) + } + + debug.Log(nil, "fail", + "%v\n"+ + "trace to fail() call:\n%s"+ + "stack:\n%s", err, debug.Stack(6), buf) + } + } + + // These would all normally go in their own defers, but having a single + // defer is noticeably faster. + stackPool.Put(p3.Frames) + p3.Frames = nil + p3Pool.Put(p3) + shared.Lock.Unlock() +} diff --git a/internal/tdp/vm/memory.go b/internal/tdp/vm/memory/memory.go similarity index 99% rename from internal/tdp/vm/memory.go rename to internal/tdp/vm/memory/memory.go index b76fae8..a876c75 100644 --- a/internal/tdp/vm/memory.go +++ b/internal/tdp/vm/memory/memory.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package vm +package memory import ( "buf.build/go/hyperpb/internal/xunsafe" diff --git a/internal/tdp/vm/message.go b/internal/tdp/vm/message.go index ef64f31..e3b0ede 100644 --- a/internal/tdp/vm/message.go +++ b/internal/tdp/vm/message.go @@ -70,7 +70,7 @@ func StoreField[T any](p1 P1, p2 P2, v T) (P1, P2) { func StoreFromScratch[T tdp.Int](p1 P1, p2 P2) (P1, P2) { var p unsafe.Pointer p1, p2, p = getUntypedMutableField(p1, p2) - *(*T)(p) = T(p2.Scratch()) + *(*T)(p) = T(p2.Scratch) return p1, p2 } diff --git a/internal/tdp/vm/options/options.go b/internal/tdp/vm/options/options.go new file mode 100644 index 0000000..9cc846a --- /dev/null +++ b/internal/tdp/vm/options/options.go @@ -0,0 +1,48 @@ +// Copyright 2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package options defines the options for the VM. +package options + +import "buf.build/go/hyperpb/internal/tdp/profile" + +// Options is options for [Run]. +type Options struct { + // Max tries before hitting the tag table. + MaxMisses int + + // Maximum recursion depth. + MaxDepth int + + // If set, unknown fields are discarded. + DiscardUnknown bool + + // If set, all string fields behave as if they are defined in proto2. + AllowInvalidUTF8 bool + + // If set, the input data will not be copied before the parse begins. + AllowAlias bool + + // Profiler fields. + Recorder *profile.Recorder + ProfileRate float64 +} + +// Defaults returns the default settings for [Options]. +func Defaults() Options { + return Options{ + MaxMisses: 4, + MaxDepth: 1000, + } +} diff --git a/internal/tdp/vm/run.go b/internal/tdp/vm/run.go index 20ad81c..b18ca7d 100644 --- a/internal/tdp/vm/run.go +++ b/internal/tdp/vm/run.go @@ -15,12 +15,10 @@ package vm import ( - "fmt" "math" "math/bits" "math/rand/v2" "runtime" - "strings" "unsafe" "google.golang.org/protobuf/encoding/protowire" @@ -28,113 +26,42 @@ import ( "buf.build/go/hyperpb/internal/debug" "buf.build/go/hyperpb/internal/tdp" "buf.build/go/hyperpb/internal/tdp/dynamic" - "buf.build/go/hyperpb/internal/tdp/profile" + "buf.build/go/hyperpb/internal/tdp/vm/internal/state" + "buf.build/go/hyperpb/internal/tdp/vm/options" + "buf.build/go/hyperpb/internal/tdp/vm/varint" "buf.build/go/hyperpb/internal/xunsafe" "buf.build/go/hyperpb/internal/zc" ) -// Options is options for [Run]. -type Options struct { - // Max tries before hitting the tag table. - MaxMisses int - - // Maximum recursion depth. - MaxDepth int - - // If set, unknown fields are discarded. - DiscardUnknown bool - - // If set, all string fields behave as if they are defined in proto2. - AllowInvalidUTF8 bool - - // If set, the input data will not be copied before the parse begins. - AllowAlias bool - - // Profiler fields. - Recorder *profile.Recorder - ProfileRate float64 -} - -// NewOptions returns the default settings for [Options]. -func NewOptions() Options { - return Options{ - MaxMisses: 4, - MaxDepth: 1000, - } -} - // Thunk is a callback for parsing a field. This is the "true" type of // [tdp.FieldParser].Parser. type Thunk func(P1, P2) (P1, P2) // Run is the top-level entry point for message parsing. -func Run(m *dynamic.Message, data []byte, options Options) (err error) { +func Run(m *dynamic.Message, data []byte, options *options.Options) (err error) { if m.Shared.Src != nil { panic("hyperpb: attempted to parse message using in-use Context") } if len(data) > math.MaxUint32 { - return &ParseError{code: ErrorTooBig} + err := tdp.ErrorTooBig.ErrorAt(0) + return &err } if len(data) == 0 { return nil } - m.Shared.Lock.Lock() - - p3 := p3Pool.Get() - p3.Options = options - - data = RelocatePageBoundary(data, !p3.AllowAlias) - m.Shared.Src = unsafe.SliceData(data) - m.Shared.Len = len(data) - // The arena keeps m.context alive, so we don't need to KeepAlive src. - - stack := stackPool.Get() - if cap(*stack) < p3.MaxDepth { - *stack = make([]frame, p3.MaxDepth) - } - - p3.stack.top = xunsafe.AddrOf(unsafe.SliceData(*stack)) - p3.stack.bottom = p3.stack.top.Add(p3.MaxDepth) - - p3.stack.ptr = p3.stack.bottom - - defer func() { - if p3.err.code != 0 && recover() != nil { - // Make a copy of the error, since pp will get re-used by a future - // run of this function. - parseErr := p3.err - err = &parseErr - - if debug.Enabled { - buf := new(strings.Builder) - for _, frame := range p3.stackSlice() { - fmt.Fprintf(buf, "- %#v\n", frame) - } - - debug.Log(nil, "fail", - "%v\n"+ - "trace to fail() call:\n%s"+ - "stack:\n%s", err, debug.Stack(6), buf) - } - } - - // These would all normally go in their own defers, but having a single - // defer is noticeably faster. - stackPool.Put(stack) - p3Pool.Put(p3) - m.Shared.Lock.Unlock() - }() + p3 := state.NewP3(data, m.Shared, options) + defer p3.Done(m.Shared, &err) p1 := P1{ - shared: xunsafe.AddrOf(m.Shared), - PtrAddr: xunsafe.AddrOf(m.Shared.Src), + SharedPtr: xunsafe.AddrOf(m.Shared), + PtrAddr: xunsafe.AddrOf(m.Shared.Src), } p2 := P2{ - p3Addr: xunsafe.AddrOf(p3), - scratch: uint64(m.Shared.Len), + P3Addr: xunsafe.AddrOf(p3), + Scratch: uint64(m.Shared.Len), } if debug.Enabled { @@ -157,13 +84,13 @@ func Run(m *dynamic.Message, data []byte, options Options) (err error) { // loop is the core parser loop. This function is not recursive. func loop(p1 P1, p2 P2) { // Need this to match the ABI of returning from a thunk. - p2.fieldAddr = p2.Field().NextOk + p2.FieldAddr = p2.Field().NextOk checkDone: if p1.Len() == 0 { - if p1.endGroup != notAGroup { + if p1.EndGroup != state.NotAGroup { // If we run out of buffer while we're still - p1.Fail(p2, ErrorEndGroup) + p1.Fail(p2, tdp.ErrorEndGroup) } goto pop } @@ -204,16 +131,16 @@ number: // Fast path: if the low sign bit is cleared, this is a one-byte tag. p1, p2 = p1.SetScratch(p2, uint64(*p1.Ptr())) - if p2.Scratch()&0x80 == 0 { + if p2.Scratch&0x80 == 0 { p1 = p1.Advance(1) t := p2.Type() lut := xunsafe.ByteAdd[byte](t, unsafe.Offsetof(t.TagLUT)) - offset := xunsafe.Load(lut, p2.Scratch()) - p1.Log(p2, "small tag", "%v -> %#x", tdp.Tag(p2.Scratch()), offset) + offset := xunsafe.Load(lut, p2.Scratch) + p1.Log(p2, "small tag", "%v -> %#x", tdp.Tag(p2.Scratch), offset) if offset != 0xff { - p2.fieldAddr = xunsafe.AddrOf(t.Fields().Get(int(offset))) + p2.FieldAddr = xunsafe.AddrOf(t.Fields().Get(int(offset))) goto parseField } goto field @@ -221,22 +148,22 @@ number: // Load up to eight bytes for the varint (at most 5 will be used). p1, p2 = p1.SetScratch(p2, xunsafe.ByteLoad[uint64](p1.Ptr(), 0)) - p1.Log(p2, "raw number", "%#x", p2.Scratch()) + p1.Log(p2, "raw number", "%#x", p2.Scratch) // Flip all of the sign bits. This essentially clears the sign bits // of all of the varint bytes except the highest one's. - p1, p2 = p1.SetScratch(p2, p2.Scratch()^tdp.SignBits) + p1, p2 = p1.SetScratch(p2, p2.Scratch^tdp.SignBits) // Determine the number of cleared sign bits. This will tell us how // many bits to mask off as "irrelevant". // // In a varint (big-endian order) like 0a8b8c8d, this will be looking // at ctz(80000000) = 31. Thus we need to mask off 64 - 31 = 33 bits. - tagBits := uint(bits.TrailingZeros64(p2.Scratch() & tdp.SignBits)) + tagBits := uint(bits.TrailingZeros64(p2.Scratch & tdp.SignBits)) // The &63 is to ensure that Go does not generate a cmov to implement // the x<<64 == 0 case. - masked = tdp.Tag(p2.Scratch() &^ (^uint64(0) << (tagBits & 63))) + masked = tdp.Tag(p2.Scratch &^ (^uint64(0) << (tagBits & 63))) // No need to strip the sign bits, the ^= above already did that. @@ -258,8 +185,8 @@ number: field: { - tries := p2.p3().MaxMisses - tag := tdp.Tag(p2.Scratch()) + tries := p2.P3().MaxMisses + tag := tdp.Tag(p2.Scratch) for { p1.Log(p2, "try", "%v, %v, %v", tag, tries, p2.Field()) @@ -274,7 +201,7 @@ field: break } - p2.fieldAddr = p2.Field().NextErr + p2.FieldAddr = p2.Field().NextErr tries-- if tries == 0 { @@ -293,15 +220,15 @@ parseField: xunsafe.Ping(p1.Shared()) thunk := (*xunsafe.PC[Thunk])(&p2.Field().Parse).Get() - p1.Log(p2, "call", "%v, %#x", debug.Func(thunk), p2.fieldAddr) + p1.Log(p2, "call", "%v, %#x", debug.Func(thunk), p2.FieldAddr) - // NOTE: Thunks are allowed to rely on p2.Scratch() still containing + // NOTE: Thunks are allowed to rely on p2.Scratch still containing // the full field tag! p1, p2 = thunk(p1, p2) - p1.Log(p2, "ret", "%v, %#x", debug.Func(thunk), p2.fieldAddr) + p1.Log(p2, "ret", "%v, %#x", debug.Func(thunk), p2.FieldAddr) - p2.fieldAddr = p2.Field().NextOk + p2.FieldAddr = p2.Field().NextOk p1, p2 = p1.SetScratch(p2, 0) // Make sure no one relies on this being preserved. goto checkDone @@ -309,10 +236,10 @@ parseField: missedField: { - tag := tdp.Tag(p2.Scratch()) + tag := tdp.Tag(p2.Scratch) p1, p2 = p1.SetScratch(p2, 0) // Make sure no one relies on this being preserved. - if tag == p1.endGroup { + if tag == p1.EndGroup { p1.Log(p2, "end group", "%v", tag) goto pop } @@ -320,7 +247,7 @@ missedField: // Check for tag overflow. if tag.Overflows() { - p1.Fail(p2, ErrorOverflow) + p1.Fail(p2, tdp.ErrorOverflow) } // Finish parsing number into a varint. @@ -349,7 +276,7 @@ missedField: _, _ = i, mask // Check if we know about this field number. - p1, p2, tag2 = p1.byTag(p2, tag2) + p1, p2, tag2 = p1.ByTag(p2, tag2) if p2.Field() != nil { p1.Log(p2, "goto field", "%d", tag2) goto parseField @@ -364,9 +291,9 @@ missedField: } p1, p2 = p1.SetScratch(p2, uint64(p1.PtrAddr)) - p1, p2, tag2 = p1.Varint(p2) + p1, p2, tag2 = varint.Varint64(p1, p2) if tag2 > math.MaxInt32<<3 { - p1.Fail(p2, ErrorOverflow) + p1.Fail(p2, tdp.ErrorOverflow) } if protowire.Type(tag2&0b111) == protowire.EndGroupType { @@ -374,15 +301,15 @@ missedField: // great way to check if this is the end tag for the group // we're in at this position, so we just send this to the main // parsing loop. - p2.fieldAddr = p2.Type().Entrypoint.NextOk - p1.PtrAddr = xunsafe.Addr[byte](p2.Scratch()) + p2.FieldAddr = p2.Type().Entrypoint.NextOk + p1.PtrAddr = xunsafe.Addr[byte](p2.Scratch) p1.Log(p2, "goto end group", "%d", tag2) goto number } - p1, p2, tag2 = p1.byTag(p2, tag2) + p1, p2, tag2 = p1.ByTag(p2, tag2) if p2.Field() != nil { - p1.PtrAddr = xunsafe.Addr[byte](p2.Scratch()) + p1.PtrAddr = xunsafe.Addr[byte](p2.Scratch) p1.Log(p2, "goto number", "%d", tag2) goto number } @@ -392,7 +319,7 @@ missedField: pop: { var done bool - p1, p2, done = p1.pop(p2) + p1, p2, done = p1.Pop(p2) if done { return } @@ -402,7 +329,7 @@ pop: truncated: // Route all failures in loop() here to force Go to schedule them as the // cold side of the branch leading to it. - p1.Fail(p2, ErrorTruncated) + p1.Fail(p2, tdp.ErrorTruncated) } // handleUnknown handles an handleUnknown field with the given tag. Outlined to improve @@ -411,7 +338,7 @@ truncated: //go:noinline func handleUnknown(p1 P1, p2 P2, tag uint64) (P1, P2) { if tag&^0xffffffff != 0 { - p1.Fail(p2, ErrorOverflow) + p1.Fail(p2, tdp.ErrorOverflow) } // Rewind the stream to find the start offset of this field. We can do this @@ -426,11 +353,11 @@ func handleUnknown(p1 P1, p2 P2, tag uint64) (P1, P2) { start = start.Add(1 - protowire.SizeVarint(tag)) p1, p2 = p1.SetScratch(p2, tag) - p1, p2 = skipRecord(p1, p2, p2.p3().MaxDepth) + p1, p2 = skipRecord(p1, p2, p2.P3().MaxDepth) n := int(p1.PtrAddr - start) p1.Log(p2, "unknown", "%d bytes", n) - if !p2.p3().DiscardUnknown && !p2.Type().DiscardUnknown { + if !p2.P3().DiscardUnknown && !p2.Type().DiscardUnknown { r := zc.New(p1.Src(), start.AssertValid(), n) cold := p2.Message().MutableCold() if cold.Unknown.Len() > 0 { @@ -447,34 +374,34 @@ func handleUnknown(p1 P1, p2 P2, tag uint64) (P1, P2) { } func skipRecord(p1 P1, p2 P2, depth int) (P1, P2) { - tag := p2.Scratch() + tag := p2.Scratch num := protowire.Number(tag >> 3) ty := protowire.Type(tag & 0b111) p1.Log(p2, "skipping", "%d, %d", num, ty) if num == 0 { - p1.Fail(p2, ErrorFieldNumber) + p1.Fail(p2, tdp.ErrorFieldNumber) } switch ty { case protowire.VarintType: - p1, p2, _ = p1.Varint(p2) + p1, p2, _ = varint.Varint64(p1, p2) case protowire.BytesType: - p1, p2, _ = p1.Bytes(p2) + p1, p2, _ = Bytes(p1, p2) case protowire.Fixed32Type: - p1, p2, _ = p1.Fixed32(p2) + p1, p2, _ = Fixed32(p1, p2) case protowire.Fixed64Type: - p1, p2, _ = p1.Fixed64(p2) + p1, p2, _ = Fixed64(p1, p2) case protowire.StartGroupType: if depth < 0 { - p1.Fail(p2, ErrorRecursionDepth) + p1.Fail(p2, tdp.ErrorRecursionDepth) } end := protowire.EncodeTag(num, protowire.EndGroupType) for { var raw uint64 - p1, p2, raw = p1.Varint(p2) + p1, p2, raw = varint.Varint64(p1, p2) if raw == end { break @@ -485,9 +412,9 @@ func skipRecord(p1 P1, p2 P2, depth int) (P1, P2) { } case protowire.EndGroupType: - p1.Fail(p2, ErrorEndGroup) + p1.Fail(p2, tdp.ErrorEndGroup) default: - p1.Fail(p2, ErrorReserved) + p1.Fail(p2, tdp.ErrorReserved) } return p1, p2 @@ -506,11 +433,11 @@ func checkLargeVarint(p1 P1, p2 P2) (P1, P2) { case 0x00: case 0x80: if *p1.Ptr() != 0x00 { - p1.Fail(p2, ErrorOverflow) + p1.Fail(p2, tdp.ErrorOverflow) } p1 = p1.Advance(1) default: - p1.Fail(p2, ErrorOverflow) + p1.Fail(p2, tdp.ErrorOverflow) } return p1, p2 diff --git a/internal/tdp/vm/stencils.go b/internal/tdp/vm/stencils.go index 9ec868a..bead3c1 100644 --- a/internal/tdp/vm/stencils.go +++ b/internal/tdp/vm/stencils.go @@ -24,13 +24,13 @@ func StoreFromScratch32(p1 P1, p2 P2) (P1, P2) { _ = StoreFromScratch[uint32] var p unsafe.Pointer p1, p2, p = getUntypedMutableField(p1, p2) - *(*uint32)(p) = uint32(p2.Scratch()) + *(*uint32)(p) = uint32(p2.Scratch) return p1, p2 } func StoreFromScratch64(p1 P1, p2 P2) (P1, P2) { _ = StoreFromScratch[uint64] var p unsafe.Pointer p1, p2, p = getUntypedMutableField(p1, p2) - *(*uint64)(p) = uint64(p2.Scratch()) + *(*uint64)(p) = uint64(p2.Scratch) return p1, p2 } diff --git a/internal/tdp/vm/utf8.go b/internal/tdp/vm/utf8.go index 9ea9c67..97b918b 100644 --- a/internal/tdp/vm/utf8.go +++ b/internal/tdp/vm/utf8.go @@ -187,6 +187,6 @@ unicode: } fail: - p1.Fail(p2, ErrorUTF8) + p1.Fail(p2, tdp.ErrorUTF8) return p1, p2, 0 } diff --git a/internal/tdp/vm/varint_avx.go b/internal/tdp/vm/varint/avx.go similarity index 78% rename from internal/tdp/vm/varint_avx.go rename to internal/tdp/vm/varint/avx.go index db88ff7..a910767 100644 --- a/internal/tdp/vm/varint_avx.go +++ b/internal/tdp/vm/varint/avx.go @@ -28,7 +28,7 @@ //go:build amd64 -package vm +package varint import ( "math/bits" @@ -36,9 +36,10 @@ import ( "simd/archsimd" "buf.build/go/hyperpb/internal/debug" - "buf.build/go/hyperpb/internal/xbits" - "buf.build/go/hyperpb/internal/xsimd" + "buf.build/go/hyperpb/internal/tdp" + "buf.build/go/hyperpb/internal/tdp/vm/internal/state" "buf.build/go/hyperpb/internal/xunsafe" + "buf.build/go/hyperpb/internal/xunsafe/layout" ) var ( @@ -46,11 +47,13 @@ var ( // And truncMasks[i] with a vector to zero all lanes i or greater, and all // sign bits. - truncMasks = func() [16]archsimd.Uint8x16 { + truncMasks = func() [17]archsimd.Uint8x16 { var mask archsimd.Uint8x16 - var masks [16]archsimd.Uint8x16 + var masks [17]archsimd.Uint8x16 for i := range masks { - mask = mask.SetElem(uint8(i), 0xff) + if i < 16 { + mask = mask.SetElem(uint8(i), 0xff) + } masks[i] = mask.And(signBits128) } @@ -111,14 +114,15 @@ func split8to16(v archsimd.Uint8x16) (lo, hi archsimd.Uint16x8) { return lo, hi } -func init() { - if archsimd.X86.AVX() { - parseVarint = parseVarintAVX - } -} +//hyperpb:stencil AVX32 AVX[uint32] +//hyperpb:stencil AVX64 AVX[uint64] +// AVX is an AVX-accelerated varint parsing function. +// //go:nosplit -func parseVarintAVX(p1 P1, p2 P2) (P1, P2, uint64) { +func AVX[T uint32 | uint64](p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) { + long := layout.Size[T]() == 8 + start := p1.PtrAddr var x uint64 @@ -150,25 +154,30 @@ func parseVarintAVX(p1 P1, p2 P2) (P1, P2, uint64) { p1.PtrAddr -= 2 if p1.Len() < 16 { - return parseVarintScalarNoinline(p1, p2) + return ScalarSplit(p1, p2) } data := archsimd.LoadUint8x16(xunsafe.Cast[[16]uint8](p1.Ptr())) - p1.Log(p2, "varint-avx", "data: %b", xsimd.Formatter(data)) + p1.Log(p2, "varint-avx", "data: %b", data) // Find all of the continuation bytes. ToBits produces pmovmskb which is // what we want, although we have to do a redundant comparison here... - var zero archsimd.Int8x16 - signs := data.AsInt8x16().Less(zero).ToBits() + signs := archsimd.Mask8x16(data.AsInt8x16()).ToBits() + n := bits.TrailingZeros16(^signs) len := bits.TrailingZeros16(^signs) + 1 // Discard extra bytes and the sign bits. - data = data.And(truncMasks[(len-1)&0xf]) - p1.Log(p2, "varint-avx", "len: %d, trunc: %b", len, xsimd.Formatter(data)) - - lo, hi := split8to16(data) - p1.Log(p2, "varint-avx", "lo: %b, hi: %b", xsimd.Formatter(lo), xsimd.Formatter(hi)) + data = data.And(truncMasks[n]) + p1.Log(p2, "varint-avx", "len: %d, trunc: %b", len, data) + + var lo, hi archsimd.Uint16x8 + if long { + lo, hi = split8to16(data) + } else { + lo = data.ExtendLo8ToUint16() + } + p1.Log(p2, "varint-avx", "lo: %b, hi: %b", lo, hi) // lo and hi are now of the following form (highest bytes irrelevant, big // endian u16s). @@ -221,30 +230,36 @@ func parseVarintAVX(p1 P1, p2 P2) (P1, P2, uint64) { // is big-endian. lo = lo.Mul(mulShift) - hi = hi.Mul(mulShift) - p1.Log(p2, "varint-avx", "lo: %b, hi: %b", xsimd.Formatter(lo), xsimd.Formatter(hi)) + if long { + hi = hi.Mul(mulShift) + } + p1.Log(p2, "varint-avx", "lo: %b, hi: %b", lo, hi) + + // TODO: we can replace two of these the below vmovdqus with a + // a vpbroadcastb of 1 and vpsubb of the resulting vector, reducing + // memory traffic. shuf0 := lo.AsUint8x16().PermuteOrZero(shuffles[0]) shuf1 := lo.AsUint8x16().PermuteOrZero(shuffles[1]) - shuf2 := hi.AsUint8x16().PermuteOrZero(shuffles[2]) - shuf3 := hi.AsUint8x16().PermuteOrZero(shuffles[3]) - - p1.Log(p2, "varint-avx", "0: %b, 1: %b, 2: %b, 3: %b", - xsimd.Formatter(shuf0), xsimd.Formatter(shuf1), - xsimd.Formatter(shuf2), xsimd.Formatter(shuf3)) + p1.Log(p2, "varint-avx", "0: %b, 1: %b", shuf0, shuf1) + or := shuf0.Or(shuf1) + + if long { + shuf2 := hi.AsUint8x16().PermuteOrZero(shuffles[2]) + shuf3 := hi.AsUint8x16().PermuteOrZero(shuffles[3]) + p1.Log(p2, "varint-avx", "2: %b, 3: %b", shuf2, shuf3) + or = or.Or(shuf2).Or(shuf3) + } - or := shuf0.Or(shuf1).Or(shuf2).Or(shuf3) - p1.Log(p2, "varint-avx", "or: %b", xsimd.Formatter(or)) + p1.Log(p2, "varint-avx", "or: %b", or) x = or.AsUint64x2().GetElem(0) p1.Log(p2, "varint-avx", "out: %d, %b", x, x) // Now, some cleanup. We have overflow conditions in the following cases: // - // 1. len == 10 and data[9] is greater than 1. The unused byte hi[3] records - // this overflow information. + // 1. len == 10 and data[9] is greater than 1. // 2. len > 10. - truncated := xbits.Bit(hi.GetElem(3) != 0)|xbits.Bit(len > 10) != 0 - if truncated { + if len >= 10 && (len > 10 || data.GetElem(9) > 1) { goto fail } @@ -254,14 +269,14 @@ func parseVarintAVX(p1 P1, p2 P2) (P1, P2, uint64) { exit: if debug.Enabled { len := int(p1.PtrAddr - start) // For debug only. - p1.Log(p2, "varint", "%d:%#x (%d bytes)", x, x, len) + p1.Log(p2, "varint-avx", "%d:%#x (%d bytes)", x, x, len) runtime.GC() // This checks for the above crash bug. } return p1, p2, x fail: - p1.Fail(p2, ErrorTruncated) + p1.Fail(p2, tdp.ErrorTruncated) for { } } diff --git a/internal/tdp/vm/varint/empty.s b/internal/tdp/vm/varint/empty.s new file mode 100644 index 0000000..bd78273 --- /dev/null +++ b/internal/tdp/vm/varint/empty.s @@ -0,0 +1 @@ +// For allowing function declarations. \ No newline at end of file diff --git a/internal/tdp/vm/varint/no_avx.go b/internal/tdp/vm/varint/no_avx.go new file mode 100644 index 0000000..2dd3805 --- /dev/null +++ b/internal/tdp/vm/varint/no_avx.go @@ -0,0 +1,27 @@ +// Copyright 2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:build !amd64 + +package varint + +import "buf.build/go/hyperpb/internal/tdp/vm/internal/state" + +func AVX32(p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) /*{ + // Unimplemented, calling this function causes a linker error. +}*/ + +func AVX64(p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) /*{ + // Unimplemented, calling this function causes a linker error. +}*/ diff --git a/internal/tdp/vm/varint/split.go b/internal/tdp/vm/varint/split.go new file mode 100644 index 0000000..d2a72f6 --- /dev/null +++ b/internal/tdp/vm/varint/split.go @@ -0,0 +1,32 @@ +// Copyright 2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package varint + +import "buf.build/go/hyperpb/internal/tdp/vm/internal/state" + +//go:noinline +func ScalarSplit(p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) { + return Scalar(p1, p2) +} + +//go:noinline +func AVX32Split(p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) { + return AVX32(p1, p2) +} + +//go:noinline +func AVX64Split(p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) { + return AVX64(p1, p2) +} diff --git a/internal/tdp/vm/varint/stencils.go b/internal/tdp/vm/varint/stencils.go new file mode 100644 index 0000000..25ff059 --- /dev/null +++ b/internal/tdp/vm/varint/stencils.go @@ -0,0 +1,234 @@ +// Copyright 2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by buf.build/go/hyperpb/internal/tools/hyperstencil. DO NOT EDIT. + +//go:build amd64 + +package varint + +import ( + "buf.build/go/hyperpb/internal/debug" + "buf.build/go/hyperpb/internal/tdp" + "buf.build/go/hyperpb/internal/tdp/vm/internal/state" + "buf.build/go/hyperpb/internal/xunsafe" + "buf.build/go/hyperpb/internal/xunsafe/layout" + "math/bits" + "runtime" + "simd/archsimd" +) + +//go:nosplit +func AVX32(p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) { + _ = AVX[uint32] + long := layout.Size[uint32]() == 8 + + start := p1.PtrAddr + var x uint64 + + { + // Fast paths from the scalar variant. + var b byte + var i int + b = *p1.PtrAddr.AssertValid() + p1.PtrAddr++ + x |= uint64(b) << (i * 7) + if int8(b) >= 0 { + goto exit + } + x -= 0x80 << (i * 7) + i++ + + if p1.PtrAddr == p1.EndAddr { + goto fail + } + b = *p1.PtrAddr.AssertValid() + p1.PtrAddr++ + x |= uint64(b) << (i * 7) + if int8(b) >= 0 { + goto exit + } + x -= 0x80 << (i * 7) + i++ + + p1.PtrAddr -= 2 + + if p1.Len() < 16 { + return ScalarSplit(p1, p2) + } + + data := archsimd.LoadUint8x16(xunsafe.Cast[[16]uint8](p1.Ptr())) + p1.Log(p2, "varint-avx", "data: %b", data) + + signs := archsimd.Mask8x16(data.AsInt8x16()).ToBits() + + n := bits.TrailingZeros16(^signs) + len := bits.TrailingZeros16(^signs) + 1 + + data = data.And(truncMasks[n]) + p1.Log(p2, "varint-avx", "len: %d, trunc: %b", len, data) + + var lo, hi archsimd.Uint16x8 + if long { + lo, hi = split8to16(data) + } else { + lo = data.ExtendLo8ToUint16() + } + p1.Log(p2, "varint-avx", "lo: %b, hi: %b", lo, hi) + + lo = lo.Mul(mulShift) + if long { + hi = hi.Mul(mulShift) + } + p1.Log(p2, "varint-avx", "lo: %b, hi: %b", lo, hi) + + shuf0 := lo.AsUint8x16().PermuteOrZero(shuffles[0]) + shuf1 := lo.AsUint8x16().PermuteOrZero(shuffles[1]) + p1.Log(p2, "varint-avx", "0: %b, 1: %b", shuf0, shuf1) + or := shuf0.Or(shuf1) + + if long { + shuf2 := hi.AsUint8x16().PermuteOrZero(shuffles[2]) + shuf3 := hi.AsUint8x16().PermuteOrZero(shuffles[3]) + p1.Log(p2, "varint-avx", "2: %b, 3: %b", shuf2, shuf3) + or = or.Or(shuf2).Or(shuf3) + } + + p1.Log(p2, "varint-avx", "or: %b", or) + x = or.AsUint64x2().GetElem(0) + p1.Log(p2, "varint-avx", "out: %d, %b", x, x) + + if len >= 10 && (len > 10 || data.GetElem(9) > 1) { + goto fail + } + + p1.PtrAddr = p1.PtrAddr.Add(len) + } + +exit: + if debug.Enabled { + len := int(p1.PtrAddr - start) + p1.Log(p2, "varint-avx", "%d:%#x (%d bytes)", x, x, len) + runtime.GC() + } + + return p1, p2, x + +fail: + p1.Fail(p2, tdp.ErrorTruncated) + for { + } +} + +//go:nosplit +func AVX64(p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) { + _ = AVX[uint64] + long := layout.Size[uint64]() == 8 + + start := p1.PtrAddr + var x uint64 + + { + // Fast paths from the scalar variant. + var b byte + var i int + b = *p1.PtrAddr.AssertValid() + p1.PtrAddr++ + x |= uint64(b) << (i * 7) + if int8(b) >= 0 { + goto exit + } + x -= 0x80 << (i * 7) + i++ + + if p1.PtrAddr == p1.EndAddr { + goto fail + } + b = *p1.PtrAddr.AssertValid() + p1.PtrAddr++ + x |= uint64(b) << (i * 7) + if int8(b) >= 0 { + goto exit + } + x -= 0x80 << (i * 7) + i++ + + p1.PtrAddr -= 2 + + if p1.Len() < 16 { + return ScalarSplit(p1, p2) + } + + data := archsimd.LoadUint8x16(xunsafe.Cast[[16]uint8](p1.Ptr())) + p1.Log(p2, "varint-avx", "data: %b", data) + + signs := archsimd.Mask8x16(data.AsInt8x16()).ToBits() + + n := bits.TrailingZeros16(^signs) + len := bits.TrailingZeros16(^signs) + 1 + + data = data.And(truncMasks[n]) + p1.Log(p2, "varint-avx", "len: %d, trunc: %b", len, data) + + var lo, hi archsimd.Uint16x8 + if long { + lo, hi = split8to16(data) + } else { + lo = data.ExtendLo8ToUint16() + } + p1.Log(p2, "varint-avx", "lo: %b, hi: %b", lo, hi) + + lo = lo.Mul(mulShift) + if long { + hi = hi.Mul(mulShift) + } + p1.Log(p2, "varint-avx", "lo: %b, hi: %b", lo, hi) + + shuf0 := lo.AsUint8x16().PermuteOrZero(shuffles[0]) + shuf1 := lo.AsUint8x16().PermuteOrZero(shuffles[1]) + p1.Log(p2, "varint-avx", "0: %b, 1: %b", shuf0, shuf1) + or := shuf0.Or(shuf1) + + if long { + shuf2 := hi.AsUint8x16().PermuteOrZero(shuffles[2]) + shuf3 := hi.AsUint8x16().PermuteOrZero(shuffles[3]) + p1.Log(p2, "varint-avx", "2: %b, 3: %b", shuf2, shuf3) + or = or.Or(shuf2).Or(shuf3) + } + + p1.Log(p2, "varint-avx", "or: %b", or) + x = or.AsUint64x2().GetElem(0) + p1.Log(p2, "varint-avx", "out: %d, %b", x, x) + + if len >= 10 && (len > 10 || data.GetElem(9) > 1) { + goto fail + } + + p1.PtrAddr = p1.PtrAddr.Add(len) + } + +exit: + if debug.Enabled { + len := int(p1.PtrAddr - start) + p1.Log(p2, "varint-avx", "%d:%#x (%d bytes)", x, x, len) + runtime.GC() + } + + return p1, p2, x + +fail: + p1.Fail(p2, tdp.ErrorTruncated) + for { + } +} diff --git a/internal/tdp/vm/varint.go b/internal/tdp/vm/varint/varint.go similarity index 75% rename from internal/tdp/vm/varint.go rename to internal/tdp/vm/varint/varint.go index 6487109..9a0f8bb 100644 --- a/internal/tdp/vm/varint.go +++ b/internal/tdp/vm/varint/varint.go @@ -12,22 +12,63 @@ // See the License for the specific language governing permissions and // limitations under the License. -package vm +//go:generate go run buf.build/go/hyperpb/internal/tools/hyperstencil + +package varint import ( "runtime" "buf.build/go/hyperpb/internal/debug" + "buf.build/go/hyperpb/internal/tdp" + "buf.build/go/hyperpb/internal/tdp/vm/internal/state" + "buf.build/go/hyperpb/internal/xsimd" ) -// Overridable at runtime, if good SIMD features are detected. -var parseVarint = parseVarintScalar +// Varint32 parses a 64-bit varint, but will perform less work by discarding +// arbitrary high bits beyond bit 31. +// +//go:nosplit +func Varint32(p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) { + switch { + case xsimd.AVX(): + if debug.Enabled { + return AVX32Split(p1, p2) + } + return AVX32(p1, p2) + default: + if debug.Enabled { + return ScalarSplit(p1, p2) + } + return Scalar(p1, p2) + } +} -// parseVarint is the core varint parsing implementation. +// Varint64 parses a 32-bit varint. +// +//go:nosplit +func Varint64(p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) { + switch { + case xsimd.AVX(): + if debug.Enabled { + return AVX64Split(p1, p2) + } + return AVX64(p1, p2) + default: + if debug.Enabled { + return ScalarSplit(p1, p2) + } + return Scalar(p1, p2) + } +} + +// Scalar is the core varint parsing implementation, using scalar operations +// only. // //go:nosplit //go:noinline -func parseVarintScalar(p1 P1, p2 P2) (P1, P2, uint64) { +func Scalar(p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) { + // Inlined from protowire.ConsumeVarint to minimize spills and remove // bounds checks. var b byte @@ -163,7 +204,7 @@ func parseVarintScalar(p1 P1, p2 P2) (P1, P2, uint64) { goto exit } - p1.Fail(p2, ErrorOverflow) + p1.Fail(p2, tdp.ErrorOverflow) exit: if debug.Enabled { @@ -175,16 +216,6 @@ exit: return p1, p2, x fail: - p1.Fail(p2, ErrorTruncated) + p1.Fail(p2, tdp.ErrorTruncated) goto fail } - -//go:noinline -func parseVarintNoinline(p1 P1, p2 P2) (P1, P2, uint64) { - return parseVarint(p1, p2) -} - -//go:noinline -func parseVarintScalarNoinline(p1 P1, p2 P2) (P1, P2, uint64) { - return parseVarintScalar(p1, p2) -} diff --git a/internal/tdp/vm/vm.go b/internal/tdp/vm/vm.go index 12efcc3..e8b26ef 100644 --- a/internal/tdp/vm/vm.go +++ b/internal/tdp/vm/vm.go @@ -26,240 +26,19 @@ package vm import ( - "unsafe" - - "buf.build/go/hyperpb/internal/arena" "buf.build/go/hyperpb/internal/debug" - "buf.build/go/hyperpb/internal/swiss" "buf.build/go/hyperpb/internal/tdp" - "buf.build/go/hyperpb/internal/tdp/dynamic" - "buf.build/go/hyperpb/internal/xsync" + "buf.build/go/hyperpb/internal/tdp/vm/internal/state" + "buf.build/go/hyperpb/internal/tdp/vm/varint" "buf.build/go/hyperpb/internal/xunsafe" "buf.build/go/hyperpb/internal/zc" ) -const notAGroup = ^tdp.Tag(0) - -var ( - stackPool = xsync.Pool[[]frame]{} - p3Pool = xsync.Pool[p3]{ - Reset: func(pp *p3) { *pp = p3{} }, - } -) - -// P1 is half of the state for the TDP parser. -// -// This struct must no more than four fields, and all four fields must be -// word-sized or smaller, so that it fits in registers AND does not trigger -// go.dev/issue/72897. -// -// For this reason, the parser state is split into two structs that will fit -// in registers and will not be spilled. This means that functions with the -// [parseFunc] signature will keep all of the parser data in registers with -// minimal spillage. Ideally this would all be in a single struct, but see the -// above bug. -// -// Moreover, these structs should contain no pointers; pointers have instead -// been replaced with addresses, all of which are rooted at the call to -// startParse. This avoids unnecessary spilling for GC stack scanning, since -// those pointers are already findable elsewhere. -// -// Generic parser functions are homed under P1, with a parser2 argument, -// such that these functions have the following signature: -// -// func(P1, parser2) (P1, parser2) -// -// Some functions do not have the signature because they are guaranteed inline -// candidates. -// -// Note that returning no values is slower than returning the parser state: this -// is because it will force the caller to spill the parser state across the -// call. -// -// The Go register ABI means P1 and P2 occupy the following registers: -// -// x86: rax, rbx, rcx, rdi, rsi, r8, r9, r10 -// aarch64: r0, r1, r2, r3, r4, r5, r6, r7 -type P1 struct { - PtrAddr xunsafe.Addr[byte] - EndAddr xunsafe.Addr[byte] // One past the end of the stream. - - shared xunsafe.Addr[dynamic.Shared] - endGroup tdp.Tag // End-of-group tag. -} - -// P2 is the other half of the state for the TDP parser. See [P1]. -type P2 struct { - messageAddr xunsafe.Addr[dynamic.Message] - fieldAddr xunsafe.Addr[tdp.FieldParser] - p3Addr xunsafe.Addr[p3] - - // A scratch register that is preserved across *most* calls. Thunks - // do not preserve the scratch register, and some functions in this file - // do not either. - scratch uint64 -} - -// p3 is parser state that is passed behind a pointer. -type p3 struct { - _ xunsafe.NoCopy - - err ParseError - stack struct { - ptr xunsafe.Addr[frame] - top, bottom xunsafe.Addr[frame] - } - - t_ xunsafe.Addr[tdp.TypeParser] - Options -} - -// frame is a recursion frame for the parser. -type frame struct { - end xunsafe.Addr[byte] - g tdp.Tag - message xunsafe.Addr[dynamic.Message] - ty xunsafe.Addr[tdp.TypeParser] - field xunsafe.Addr[tdp.FieldParser] -} - -func (p1 P1) Shared() *dynamic.Shared { - return p1.shared.AssertValid() -} - -func (p1 P1) Arena() *arena.Arena { - return p1.shared.AssertValid().Arena() -} - -func (p1 P1) Src() *byte { - return p1.shared.AssertValid().Src -} - -func (p1 P1) Ptr() *byte { - // There is an exciting bug that can occur where we dereference p1.b_ - // while it points to the end of the input slice. Being able to do have - // p1.b_ equal the one-past-the-end spot is nice, but if we dereference it, - // Go may scan through this pointer, and mark the allocation it points to. - // If it happens to point to freed memory, the GC panics, because this is - // an unrecoverable constraint violation. - // - // This assert makes sure that none of our large test suite accidentally - // performs this illegal maneuver. - // - // Annoyingly this means we also need to be careful in parser1.buf(), - // because we cannot form a zero-sized slice to the end of an allocation. - debug.Assert(p1.PtrAddr < p1.EndAddr, - "p1.PtrAddr cannot point one past the end: need %v < %v", p1.PtrAddr, p1.EndAddr) - return p1.PtrAddr.AssertValid() -} - -func (p2 P2) Message() *dynamic.Message { - return p2.messageAddr.AssertValid() -} - -func (p2 P2) Type() *tdp.TypeParser { - return p2.p3().t_.AssertValid() -} - -func (p2 P2) Field() *tdp.FieldParser { - return p2.fieldAddr.AssertValid() -} - -func (p2 P2) p3() *p3 { //nolint:funcorder - return p2.p3Addr.AssertValid() -} - -func (p2 P2) Scratch() uint64 { - return p2.scratch -} - -func (p1 P1) SetScratch(p2 P2, v uint64) (P1, P2) { - p1.Log(p2, "scratch", "%d:%#x", v, v) - p2.scratch = v - return p1, p2 -} - -func (p1 P1) Len() int { - return int(p1.EndAddr - p1.PtrAddr) -} - -// Fail causes a parse failure by panicking with the given error code. -func (p1 P1) Fail(p2 P2, err ErrorCode) { - p2.p3().err = ParseError{ - code: err, - offset: p1.PtrAddr.Sub(xunsafe.AddrOf(p1.Src())), - } - - _ = *(*byte)(nil) // Trigger a panic without calling runtime.gopanic. Linters hate this! - for { //nolint:staticcheck // This code is unreachable. - } -} - -// Log logs debugging information during a parse. -func (p1 P1) Log(p2 P2, op, format string, args ...any) { - if !debug.Enabled { - return - } - - start := p1.PtrAddr.Sub(xunsafe.AddrOf(p1.Src())) - end := p1.EndAddr.Sub(xunsafe.AddrOf(p1.Src())) - height := p2.p3().stack.bottom.Sub(p2.p3().stack.ptr) - var b byte - if p1.PtrAddr < p1.EndAddr { - b = *p1.Ptr() - } - debug.Log( - []any{ - "%p:%p:%d %v [%d:%d] = 0x%02x", - p1.Shared(), p2.Message(), height, p1.endGroup, start, end, b, - }, - op, format, args..., - ) -} - -// AtLeast fails the parse if there aren't at least n bytes left to parse. -// -//go:nosplit -func (p1 P1) AtLeast(p2 P2, n uint64) (P1, P2) { - if n <= uint64(p1.Len()) { - return p1, p2 - } - - p1.Fail(p2, ErrorTruncated) - return p1, p2 -} - -// Buf returns the data left to parse. -func (p1 P1) Buf() []byte { - if p1.Len() == 0 { - return nil - } - return unsafe.Slice(p1.Ptr(), p1.Len()) -} - -func (p1 P1) Advance(n int) P1 { - debug.Assert(p1.Len() >= n, "parser overflow") - - p1.PtrAddr = p1.PtrAddr.Add(n) - return p1 -} - -// Varint parses a 64-bit varint. -// -//go:nosplit -func (p1 P1) Varint(p2 P2) (P1, P2, uint64) { - if debug.Enabled { - // Force this function to behave as if it is not nosplit in debug mode, - // so that we don't overflow the nosplit stack when we turn on - // debugging. - return parseVarintNoinline(p1, p2) - } - - return parseVarint(p1, p2) -} +type P1 = state.P1 +type P2 = state.P2 // Fixed32 parses a 32-bit fixed-width integer. -func (p1 P1) Fixed32(p2 P2) (P1, P2, uint32) { +func Fixed32(p1 P1, p2 P2) (P1, P2, uint32) { p1, p2 = p1.AtLeast(p2, 4) x := xunsafe.ByteLoad[uint32](p1.Ptr(), 0) p1 = p1.Advance(4) @@ -269,7 +48,7 @@ func (p1 P1) Fixed32(p2 P2) (P1, P2, uint32) { } // Fixed64 parses a 64-bit fixed-width integer. -func (p1 P1) Fixed64(p2 P2) (P1, P2, uint64) { +func Fixed64(p1 P1, p2 P2) (P1, P2, uint64) { p1, p2 = p1.AtLeast(p2, 8) x := xunsafe.ByteLoad[uint64](p1.Ptr(), 0) p1 = p1.Advance(8) @@ -281,26 +60,26 @@ func (p1 P1) Fixed64(p2 P2) (P1, P2, uint64) { // LengthPrefix parses a varint up to the current length. // // //go:nosplit // TODO(#30): Enable once upstream is fixed. -func (p1 P1) LengthPrefix(p2 P2) (P1, P2, int) { +func LengthPrefix(p1 P1, p2 P2) (P1, P2, int) { if p1.Len() == 0 { - p1.Fail(p2, ErrorTruncated) + p1.Fail(p2, tdp.ErrorTruncated) } var n uint64 - p1, p2, n = p1.Varint(p2) + p1, p2, n = varint.Varint64(p1, p2) // Explicit inlining of atLeast(). len() is guaranteed to fit in a // uint32. if n > uint64(p1.Len()) { - p1.Fail(p2, ErrorTruncated) + p1.Fail(p2, tdp.ErrorTruncated) } return p1, p2, int(n) } // Bytes parses a length-delimited byte buffer. -func (p1 P1) Bytes(p2 P2) (P1, P2, zc.Range) { +func Bytes(p1 P1, p2 P2) (P1, P2, zc.Range) { var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = LengthPrefix(p1, p2) r := zc.NewRaw(p1.PtrAddr.Sub(xunsafe.AddrOf(p1.Src())), n) p1 = p1.Advance(n) @@ -313,207 +92,23 @@ func (p1 P1) Bytes(p2 P2) (P1, P2, zc.Range) { } // UTF8 parses a length-delimited byte buffer, and validates it for UTF8. -func (p1 P1) UTF8(p2 P2) (P1, P2, zc.Range) { - if p2.p3().AllowInvalidUTF8 { - return p1.Bytes(p2) +func UTF8(p1 P1, p2 P2) (P1, P2, zc.Range) { + if p2.P3().AllowInvalidUTF8 { + return Bytes(p1, p2) } - return verifyUTF8(p1.LengthPrefix(p2)) + return verifyUTF8(LengthPrefix(p1, p2)) } // ParseMapEntry is a shim over [PushMessage] used for map entries. // // //go:nosplit // TODO(#30): Enable once upstream is fixed. -func (p1 P1) ParseMapEntry(p2 P2) (P1, P2) { +func ParseMapEntry(p1 P1, p2 P2) (P1, P2) { var n int - p1, p2, n = p1.LengthPrefix(p2) + p1, p2, n = LengthPrefix(p1, p2) p1, p2 = p1.SetScratch(p2, uint64(n)) // This should *not* call PushMapEntry; this goes inside of the message that // gets pushed by PushMapEntry itself. return p1.PushMessage(p2, p2.Message()) } - -// PushMessage pushes a new message to be parsed onto the parser stack. -// -// The length of the message should be in p2.Scratch. -// -//go:nosplit -func (p1 P1) PushMessage(p2 P2, m *dynamic.Message) (P1, P2) { - len := int(p2.Scratch()) - if len == 0 { - return p1, p2 - } - - p1.Log(p2, "n", "%d", len) - - if p1.endGroup != notAGroup || p1.PtrAddr.Add(len) != p1.EndAddr { - // We don't need to push a new frame if the new message would cause - // the current frame to be empty once it gets popped. - p1, p2 = p1.push(p2, p1.PtrAddr.Add(len)) - } - - p1.endGroup = notAGroup - p2.messageAddr = xunsafe.AddrOf(m) - - t := p2.Message().Type().Parser - p2.p3().t_ = xunsafe.AddrOf(t) - if debug.Enabled { - p1, p2 = logMessage(p1, p2) - } - - p2.fieldAddr = xunsafe.AddrOf(&t.Entrypoint) - - return p1, p2 -} - -// PushMapEntry pushes a new map entry to be parsed onto the parser stack. -// -//go:nosplit -func (p1 P1) PushMapEntry(p2 P2, m *dynamic.Message) (P1, P2) { - len := int(p2.Scratch()) - if len == 0 { - return p1, p2 - } - - if p1.endGroup != notAGroup || p1.PtrAddr.Add(len) != p1.EndAddr { - // We don't need to push a new frame if the new message would cause - // the current frame to be empty once it gets popped. - p1, p2 = p1.push(p2, p1.PtrAddr.Add(len)) - } - - p1.endGroup = notAGroup - p2.messageAddr = xunsafe.AddrOf(m) - - t := p2.Message().Type().Parser.MapEntry - p2.p3().t_ = xunsafe.AddrOf(t) - if debug.Enabled { - p1, p2 = logMessage(p1, p2) - } - - p2.fieldAddr = xunsafe.AddrOf(&t.Entrypoint) - - return p1, p2 -} - -// PushGroup pushes a new group to be parsed onto the parser stack. -// -//go:nosplit -func (p1 P1) PushGroup(p2 P2, m *dynamic.Message) (P1, P2) { - start := tdp.Tag(p2.Scratch()) - - // Indeed, we can just +1, because we need to replace the low three - // 0b011 bits with 0b100. Much simpler than clearing and overwriting those - // bits! - end := start + 1 - - p1, p2 = p1.push(p2, p1.EndAddr) - - p1.endGroup = end - p2.messageAddr = xunsafe.AddrOf(m) - - t := p2.Message().Type().Parser - p2.p3().t_ = xunsafe.AddrOf(t) - if debug.Enabled { - p1, p2 = logMessage(p1, p2) - } - - p2.fieldAddr = xunsafe.AddrOf(&t.Entrypoint) - - return p1, p2 -} - -// Outlined so that push() does not hit the stack size limit for nosplit. -// -//go:noinline -func logMessage(p1 P1, p2 P2) (P1, P2) { - p1.Log( - p2, "new", "%#x, %v", - p2.messageAddr, - p2.Message().Type(), - ) - return p1, p2 -} - -func (p3 *p3) stackSlice() []frame { - n := p3.stack.bottom.Sub(p3.stack.ptr) - return unsafe.Slice(p3.stack.ptr.AssertValid(), n) -} - -// push pushes a parser frame. -// -//go:nosplit -func (p1 P1) push(p2 P2, end xunsafe.Addr[byte]) (P1, P2) { - if debug.Enabled { - p1, p2 = logPush(p1, p2) - } - - if p2.p3().stack.ptr == p2.p3().stack.top { - p1.Fail(p2, ErrorRecursionDepth) - } - - p2.p3().stack.ptr = p2.p3().stack.ptr.Add(-1) - - // Note: a single frame is just too large to hit Go's SROA pass (same bug - // that results in p1/p2 being two structs). Thus, we write each field - // separately to avoid wasteful stack traffic. - frame := p2.p3().stack.ptr.AssertValid() - frame.end = p1.EndAddr - frame.g = p1.endGroup - frame.message = p2.messageAddr - frame.ty = p2.p3().t_ - frame.field = p2.fieldAddr - - p1.EndAddr = end - return p1, p2 -} - -// Outlined so that push() does not hit the stack size limit for nosplit. -// -//go:noinline -func logPush(p1 P1, p2 P2) (P1, P2) { - p1.Log(p2, "push", "%v/%v/%v", p2.p3().stack.top, p2.p3().stack.ptr, p2.p3().stack.bottom) - return p1, p2 -} - -// pop pops a parser frame. -// -// Returns whether the last frame was popped. -// -//go:nosplit -func (p1 P1) pop(p2 P2) (P1, P2, bool) { - if debug.Enabled { - p1.Log( - p2, "finish", "%v, ty: %p:%s %v", - p2.messageAddr, - p2.Message().Type(), - p2.Message().Type().Descriptor.FullName(), - p2.Message().Type(), - ) - - s := &p2.p3().stack - p1.Log(p2, "pop", "%v/%v/%v\n%s", s.top, s.ptr, s.bottom, - p2.Message().Dump()) - } - - last := p2.p3().stack.ptr.AssertValid() - p1.EndAddr = last.end - p1.endGroup = last.g - p2.messageAddr = last.message - p2.p3().t_ = last.ty - p2.fieldAddr = last.field - p2.p3().stack.ptr = p2.p3().stack.ptr.Add(1) - - return p1, p2, p2.p3().stack.ptr == p2.p3().stack.bottom -} - -func (p1 P1) byTag(p2 P2, tag2 uint64) (P1, P2, uint64) { - t := p2.Type() - p := swiss.LookupI32xU32(t.Tags, int32(tag2)) - if p == nil { - p2.fieldAddr = 0 - return p1, p2, tag2 - } - p2.fieldAddr = xunsafe.AddrOf(t.Fields().Get(int(*p))) - return p1, p2, tag2 -} diff --git a/internal/testdata/testdata.go b/internal/testdata/testdata.go index cf410b4..2934a4a 100644 --- a/internal/testdata/testdata.go +++ b/internal/testdata/testdata.go @@ -19,7 +19,7 @@ import ( "buf.build/go/hyperpb/internal/tdp/compiler" "buf.build/go/hyperpb/internal/tdp/dynamic" "buf.build/go/hyperpb/internal/tdp/profile" - "buf.build/go/hyperpb/internal/tdp/vm" + "buf.build/go/hyperpb/internal/tdp/vm/memory" "buf.build/go/hyperpb/internal/xflag" "buf.build/go/hyperpb/internal/xunsafe" "github.com/protocolbuffers/protoscope" @@ -261,7 +261,7 @@ func parseTestCase(t testing.TB, path string, file []byte) *TestCase { for i := range test.Specimens { // Avoid confounding between the normal/zerocopy benchmarks by // making sure we have optimal message placement before we start. - test.Specimens[i] = vm.RelocatePageBoundary(test.Specimens[i], false) + test.Specimens[i] = memory.RelocatePageBoundary(test.Specimens[i], false) } } diff --git a/internal/tools/hyperstencil/main.go b/internal/tools/hyperstencil/main.go index e0772f5..9f3dcb9 100644 --- a/internal/tools/hyperstencil/main.go +++ b/internal/tools/hyperstencil/main.go @@ -35,6 +35,7 @@ import ( "go/parser" "go/printer" "go/token" + "maps" "os" "path/filepath" "regexp" @@ -55,6 +56,7 @@ import ( var ( directive = regexp.MustCompile(`^//hyperpb:stencil\s+(\w+)\s+([\w.]+)\s*\[(.+)\]\s*(:?(\w+\s*->\s*[\w.]+\s*)*)`) rename = regexp.MustCompile(`(\w+)\s*->\s*([\w.]+)`) + filename = regexp.MustCompile(`stencils(_test)?(\.\d+)?\.go`) toolPkg = func() string { info, _ := debug.ReadBuildInfo() @@ -311,17 +313,21 @@ func run() error { } isTest := strings.HasSuffix(path, "_test.go") - outPath := "stencils.go" - if isTest { - outPath = "stencils_test.go" - } - outPath = filepath.Join(dirname, outPath) // Check to see if this file is newer than the files it depends on to avoid // needing to regenerate. var mtime time.Time - if info, err := os.Stat(outPath); err == nil { - mtime = info.ModTime() + for _, file := range dir { + if !filename.MatchString(filepath.Base(file.Name())) { + continue + } + + if info, err := file.Info(); err == nil { + t := info.ModTime() + if mtime.IsZero() || mtime.After(t) { + mtime = t + } + } } var files []string //nolint:prealloc @@ -347,11 +353,9 @@ func run() error { slices.Sort(files) var ( - out = ast.File{Name: ast.NewIdent("x")} fset = token.NewFileSet() imports xsync.Map[string, *ast.ImportSpec] - bases xsync.Set[string] attrs xsync.Map[string, []string] pkgCache xsync.Map[string, []*packages.Package] ) @@ -365,8 +369,14 @@ func run() error { } }() + type output struct { + tags string + decls []ast.Decl + bases xsync.Set[string] + } + // Stenciling isn't super fast; parallelizing it helps a lot. - decls := make([][]ast.Decl, len(files)) + outs := make([]output, len(files)) for i, path := range files { wg.Add(1) go func() { @@ -388,6 +398,11 @@ func run() error { } path, _ := strconv.Unquote(imp.Path.Value) + if path == "simd/archsimd" { // Bug? + imports.Store("archsimd", imp) + continue + } + pkgs, ok := pkgCache.Load(path) if !ok { pkgs, err = packages.Load(nil, path) @@ -435,8 +450,21 @@ func run() error { directives := parseDirectives(file) - decls := &decls[i] - *decls = make([]ast.Decl, len(directives)) + out := &outs[i] + *out = output{ + decls: make([]ast.Decl, len(directives)), + } + + buildTag: + for _, c := range file.Comments { + for _, c := range c.List { + tags, ok := strings.CutPrefix(c.Text, "//go:build ") + if ok { + out.tags = tags + break buildTag + } + } + } for i, dir := range directives { wg.Add(1) @@ -445,14 +473,14 @@ func run() error { // Start by finding a func in file with this name. generic := funcs[dir.Source] - stencil, err := makeStencil(dir, generic, &bases, &attrs) + stencil, err := makeStencil(dir, generic, &out.bases, &attrs) if err != nil { ch <- err return } // Finally, append stencil to the output file. - (*decls)[i] = stencil + out.decls[i] = stencil }() } }() @@ -464,54 +492,104 @@ func run() error { return errs[0] } - out.Decls = slices.Concat(decls...) + // Figure out how many output files we need based on build tags we found. + tagMap := make(map[string][]*output) + for i := range outs { + out := &outs[i] + tagMap[out.tags] = append(tagMap[out.tags], out) + } - var imported []string - for base := range bases.All() { - imp, ok := imports.Load(base) - if ok { - imported = append(imported, imp.Path.Value) + groups := slices.Collect(maps.Values(tagMap)) + groups = slices.DeleteFunc(groups, func(s []*output) bool { + for _, v := range s { + if len(v.decls) > 0 { + return false + } } - } - slices.SortFunc(imported, func(a, b string) int { - stdA, stdB := !strings.Contains(a, "."), !strings.Contains(b, ".") - if stdA && !stdB { - return -1 + return true + }) + slices.SortFunc(groups, func(a, b []*output) int { + return cmp.Compare(a[0].tags, b[0].tags) + }) + + for i, group := range groups { + bases := make(map[string]struct{}) + for _, out := range group { + for base := range out.bases.All() { + bases[base] = struct{}{} + } } - if stdB && !stdA { - return 1 + + var imported []string + for base := range bases { + imp, ok := imports.Load(base) + if ok { + imported = append(imported, imp.Path.Value) + } } + slices.SortFunc(imported, func(a, b string) int { + stdA, stdB := !strings.Contains(a, "."), !strings.Contains(b, ".") + if stdA && !stdB { + return -1 + } + if stdB && !stdA { + return 1 + } - return cmp.Compare(a, b) - }) + return cmp.Compare(a, b) + }) + + out := ast.File{Name: ast.NewIdent("x")} + for _, output := range group { + out.Decls = append(out.Decls, output.decls...) + } + + var build string + if tags := group[0].tags; tags != "" { + build = fmt.Sprintf("//go:build %s\n", tags) + } - // Generating this in the AST is far too painful. - header := fmt.Sprintf(`// Code generated by %s. DO NOT EDIT. + // Generating this in the AST is far too painful. + header := fmt.Sprintf(`// Code generated by %s. DO NOT EDIT. -package %s +%spackage %s import (%s) -`, toolPkg, pkg, strings.Join(imported, ";")) +`, toolPkg, build, pkg, strings.Join(imported, ";")) - // Print to a string, so that we can add nosplit comments the "easy" way. - buf := new(strings.Builder) - if err := printer.Fprint(buf, fset, &out); err != nil { - return err - } - source := buf.String() + // Print to a string, so that we can add nosplit comments the "easy" way. + buf := new(strings.Builder) + if err := printer.Fprint(buf, fset, &out); err != nil { + return err + } + source := buf.String() - oldnew := []string{"package x\n", header} - for name, attrs := range attrs.All() { - oldnew = append(oldnew, "func "+name, strings.Join(attrs, "\n")+"\nfunc "+name) - } - source = strings.NewReplacer(oldnew...).Replace(source) - bytes, err := format.Source([]byte(source)) - if err != nil { - return err + oldnew := []string{"package x\n", header} + for name, attrs := range attrs.All() { + oldnew = append(oldnew, "func "+name, strings.Join(attrs, "\n")+"\nfunc "+name) + } + source = strings.NewReplacer(oldnew...).Replace(source) + bytes, err := format.Source([]byte(source)) + if err != nil { + return err + } + + name := "stencils" + if isTest { + name = "stencils_test" + } + if len(groups) > 1 { + name = fmt.Sprintf("%s.%d", name, i+1) + } + name += ".go" + + if err := os.WriteFile(filepath.Join(dirname, name), bytes, 0o666); err != nil { + return err + } } - return os.WriteFile(outPath, bytes, 0o666) + return nil } type visitor func(visitor, ast.Node) ast.Visitor diff --git a/internal/xsimd/avx_dynamic.go b/internal/xsimd/avx_dynamic.go new file mode 100644 index 0000000..58cfbbc --- /dev/null +++ b/internal/xsimd/avx_dynamic.go @@ -0,0 +1,21 @@ +// Copyright 2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:build amd64 && !amd64.v3 + +package xsimd + +import "simd/archsimd" + +func AVX() bool { return archsimd.X86.AVX() } diff --git a/internal/cpu/cpu.go b/internal/xsimd/avx_none.go similarity index 89% rename from internal/cpu/cpu.go rename to internal/xsimd/avx_none.go index 35d6bfe..82679dd 100644 --- a/internal/cpu/cpu.go +++ b/internal/xsimd/avx_none.go @@ -12,4 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -package cpu +//go:build !amd64 + +package xsimd + +func AVX() bool { return false } diff --git a/internal/xsimd/avx_static.go b/internal/xsimd/avx_static.go new file mode 100644 index 0000000..2104f62 --- /dev/null +++ b/internal/xsimd/avx_static.go @@ -0,0 +1,19 @@ +// Copyright 2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:build amd64.v3 + +package xsimd + +func AVX() bool { return true } diff --git a/internal/xsimd/xsimd.go b/internal/xsimd/format.go similarity index 60% rename from internal/xsimd/xsimd.go rename to internal/xsimd/format.go index 4bc9204..ea33862 100644 --- a/internal/xsimd/xsimd.go +++ b/internal/xsimd/format.go @@ -17,39 +17,40 @@ package xsimd import ( "fmt" "reflect" - "unsafe" - - "buf.build/go/hyperpb/internal/xunsafe/layout" ) -// Formatter returns a value wrapping v which formats it as if it were a slice. -func Formatter[T any](v vector[T]) any { - return &format[T]{v} -} - -type vector[T any] interface { - StoreSlice([]T) +// Format returns either v, or if v is a SIMD vector, a type which formats it +// as if it were a slice. +func Format(v any) any { + t := reflect.TypeOf(v) + if t == nil || t.Size() == 0 || t.PkgPath() != "simd/archsimd" { + return t + } + return &format{v} } -type format[T any] struct { +type format struct { v any } -func (f format[T]) Format(s fmt.State, v rune) { +func (f format) Format(s fmt.State, v rune) { r := reflect.ValueOf(f.v) d := reflect.New(r.Type()) d.Elem().Set(r) - n := int(r.Type().Size()) / layout.Size[T]() - p := unsafe.Slice((*T)(d.UnsafePointer()), n) + get, _ := r.Type().MethodByName("GetElem") + elem := get.Type.Out(0) + + n := int(r.Type().Size() / elem.Size()) + a := reflect.NewAt(reflect.ArrayOf(n, elem), d.UnsafePointer()) format := fmt.FormatString(s, v) fmt.Fprint(s, "[") - for i, v := range p { + for i := range n { if i > 0 { fmt.Fprint(s, " ") } - fmt.Fprintf(s, format, v) + fmt.Fprintf(s, format, a.Index(i)) } fmt.Fprint(s, "]") } diff --git a/message.go b/message.go index 81374a4..339fafe 100644 --- a/message.go +++ b/message.go @@ -28,6 +28,7 @@ import ( "buf.build/go/hyperpb/internal/tdp/dynamic" "buf.build/go/hyperpb/internal/tdp/empty" "buf.build/go/hyperpb/internal/tdp/vm" + vmoptions "buf.build/go/hyperpb/internal/tdp/vm/options" "buf.build/go/hyperpb/internal/xprotoreflect" "buf.build/go/hyperpb/internal/xunsafe" ) @@ -68,7 +69,7 @@ func NewMessage(ty *MessageType) *Message { // This function will return the approximate offset into data at which the // error occurred. func (m *Message) Unmarshal(data []byte, options ...UnmarshalOption) error { - opts := vm.NewOptions() + opts := vmoptions.Defaults() for _, opt := range options { if opt.apply != nil { // Avoid having opt pointlessly escape to the heap. @@ -77,7 +78,7 @@ func (m *Message) Unmarshal(data []byte, options ...UnmarshalOption) error { opt.apply(xunsafe.NoEscape(&opts)) } } - return vm.Run(&m.impl, data, opts) + return vm.Run(&m.impl, data, &opts) } // Shared returns state shared by this message and its submessages. diff --git a/options.go b/options.go index 05899bc..f0ff672 100644 --- a/options.go +++ b/options.go @@ -20,7 +20,7 @@ import ( "google.golang.org/protobuf/reflect/protoregistry" "buf.build/go/hyperpb/internal/tdp/compiler" - "buf.build/go/hyperpb/internal/tdp/vm" + "buf.build/go/hyperpb/internal/tdp/vm/options" ) // The below are not interfaces because of https://github.com/golang/go/issues/74356, @@ -60,7 +60,7 @@ func WithProfile(profile *Profile) CompileOption { } // UnmarshalOption is a configuration setting for [Message.Unmarshal]. -type UnmarshalOption struct{ apply func(*vm.Options) } +type UnmarshalOption struct{ apply func(*options.Options) } // WithMaxDecodeMisses sets the number of decode misses allowed in the parser before // switching to the slow path. @@ -69,14 +69,14 @@ type UnmarshalOption struct{ apply func(*vm.Options) } // potential DoS vector due to quadratic worst case performance. The default // is 4. func WithMaxDecodeMisses(maxMisses int) UnmarshalOption { - return UnmarshalOption{func(opts *vm.Options) { opts.MaxMisses = maxMisses }} + return UnmarshalOption{func(opts *options.Options) { opts.MaxMisses = maxMisses }} } // WithMaxDepth sets the maximum recursion depth for the parser. // // Setting a large value enables potential DoS vectors. func WithMaxDepth(depth int) UnmarshalOption { - return UnmarshalOption{func(opts *vm.Options) { opts.MaxDepth = min(depth, math.MaxUint32) }} + return UnmarshalOption{func(opts *options.Options) { opts.MaxDepth = min(depth, math.MaxUint32) }} } // WithDiscardUnknown sets whether unknown fields should be discarded while @@ -85,13 +85,13 @@ func WithMaxDepth(depth int) UnmarshalOption { // Setting this option will break round-tripping, but will also improve parse // speeds of messages with many unknown fields. func WithDiscardUnknown(discard bool) UnmarshalOption { - return UnmarshalOption{func(opts *vm.Options) { opts.DiscardUnknown = discard }} + return UnmarshalOption{func(opts *options.Options) { opts.DiscardUnknown = discard }} } // WithAllowInvalidUTF8 sets whether UTF-8 is validated when parsing string // fields originating from non-proto2 files. func WithAllowInvalidUTF8(allow bool) UnmarshalOption { - return UnmarshalOption{func(opts *vm.Options) { opts.AllowInvalidUTF8 = allow }} + return UnmarshalOption{func(opts *options.Options) { opts.AllowInvalidUTF8 = allow }} } // WithAllowAlias sets whether aliasing the input buffer is allowed. This avoids @@ -99,7 +99,7 @@ func WithAllowInvalidUTF8(allow bool) UnmarshalOption { // // Analogous to [protoimpl.UnmarshalAliasBuffer]. func WithAllowAlias(allow bool) UnmarshalOption { - return UnmarshalOption{func(opts *vm.Options) { opts.AllowAlias = allow }} + return UnmarshalOption{func(opts *options.Options) { opts.AllowAlias = allow }} } // WithRecordProfile sets a profiler for an unmarshaling operation. Rate is a @@ -111,7 +111,7 @@ func WithAllowAlias(allow bool) UnmarshalOption { // which can be used to recompile this type to be more efficient using // [MessageType.Recompile]. func WithRecordProfile(profile *Profile, rate float64) UnmarshalOption { - return UnmarshalOption{func(opts *vm.Options) { + return UnmarshalOption{func(opts *options.Options) { if profile == nil { opts.Recorder = nil } else { From 6d7faeeed9eace92598df3f74fd8e407038f42c4 Mon Sep 17 00:00:00 2001 From: Miguel Young de la Sota Date: Wed, 11 Mar 2026 19:10:06 -0700 Subject: [PATCH 04/11] remove fast path --- internal/tdp/vm/varint/avx.go | 28 +--------------- internal/tdp/vm/varint/stencils.go | 52 ------------------------------ internal/tools/hypertest/exec.go | 1 + 3 files changed, 2 insertions(+), 79 deletions(-) diff --git a/internal/tdp/vm/varint/avx.go b/internal/tdp/vm/varint/avx.go index a910767..d7b6646 100644 --- a/internal/tdp/vm/varint/avx.go +++ b/internal/tdp/vm/varint/avx.go @@ -127,32 +127,7 @@ func AVX[T uint32 | uint64](p1 state.P1, p2 state.P2) (state.P1, state.P2, uint6 var x uint64 { - // Fast paths from the scalar variant. - var b byte - var i int - b = *p1.PtrAddr.AssertValid() - p1.PtrAddr++ - x |= uint64(b) << (i * 7) - if int8(b) >= 0 { - goto exit - } - x -= 0x80 << (i * 7) - i++ - - if p1.PtrAddr == p1.EndAddr { - goto fail - } - b = *p1.PtrAddr.AssertValid() - p1.PtrAddr++ - x |= uint64(b) << (i * 7) - if int8(b) >= 0 { - goto exit - } - x -= 0x80 << (i * 7) - i++ - - p1.PtrAddr -= 2 - + // Callers often have an inlined fast-path. if p1.Len() < 16 { return ScalarSplit(p1, p2) } @@ -266,7 +241,6 @@ func AVX[T uint32 | uint64](p1 state.P1, p2 state.P2) (state.P1, state.P2, uint6 p1.PtrAddr = p1.PtrAddr.Add(len) } -exit: if debug.Enabled { len := int(p1.PtrAddr - start) // For debug only. p1.Log(p2, "varint-avx", "%d:%#x (%d bytes)", x, x, len) diff --git a/internal/tdp/vm/varint/stencils.go b/internal/tdp/vm/varint/stencils.go index 25ff059..a12fe13 100644 --- a/internal/tdp/vm/varint/stencils.go +++ b/internal/tdp/vm/varint/stencils.go @@ -38,31 +38,6 @@ func AVX32(p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) { var x uint64 { - // Fast paths from the scalar variant. - var b byte - var i int - b = *p1.PtrAddr.AssertValid() - p1.PtrAddr++ - x |= uint64(b) << (i * 7) - if int8(b) >= 0 { - goto exit - } - x -= 0x80 << (i * 7) - i++ - - if p1.PtrAddr == p1.EndAddr { - goto fail - } - b = *p1.PtrAddr.AssertValid() - p1.PtrAddr++ - x |= uint64(b) << (i * 7) - if int8(b) >= 0 { - goto exit - } - x -= 0x80 << (i * 7) - i++ - - p1.PtrAddr -= 2 if p1.Len() < 16 { return ScalarSplit(p1, p2) @@ -116,7 +91,6 @@ func AVX32(p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) { p1.PtrAddr = p1.PtrAddr.Add(len) } -exit: if debug.Enabled { len := int(p1.PtrAddr - start) p1.Log(p2, "varint-avx", "%d:%#x (%d bytes)", x, x, len) @@ -140,31 +114,6 @@ func AVX64(p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) { var x uint64 { - // Fast paths from the scalar variant. - var b byte - var i int - b = *p1.PtrAddr.AssertValid() - p1.PtrAddr++ - x |= uint64(b) << (i * 7) - if int8(b) >= 0 { - goto exit - } - x -= 0x80 << (i * 7) - i++ - - if p1.PtrAddr == p1.EndAddr { - goto fail - } - b = *p1.PtrAddr.AssertValid() - p1.PtrAddr++ - x |= uint64(b) << (i * 7) - if int8(b) >= 0 { - goto exit - } - x -= 0x80 << (i * 7) - i++ - - p1.PtrAddr -= 2 if p1.Len() < 16 { return ScalarSplit(p1, p2) @@ -218,7 +167,6 @@ func AVX64(p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) { p1.PtrAddr = p1.PtrAddr.Add(len) } -exit: if debug.Enabled { len := int(p1.PtrAddr - start) p1.Log(p2, "varint-avx", "%d:%#x (%d bytes)", x, x, len) diff --git a/internal/tools/hypertest/exec.go b/internal/tools/hypertest/exec.go index d7500fe..019b655 100644 --- a/internal/tools/hypertest/exec.go +++ b/internal/tools/hypertest/exec.go @@ -223,6 +223,7 @@ func (r *runner) runOverSSH(remote string, tests []test) (string, error) { go func() { defer wg.Done() { + fmt.Printf("uploading %s...\n", test.binary(r, "")) start := time.Now() src, err := os.Open(test.binary(r, "")) if err != nil { From c3197d33b9eb9bb117a417d4bd67470008d16311 Mon Sep 17 00:00:00 2001 From: Miguel Young de la Sota Date: Thu, 12 Mar 2026 10:27:00 -0700 Subject: [PATCH 05/11] make ssh upload faster --- internal/tools/hypertest/exec.go | 36 ++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/internal/tools/hypertest/exec.go b/internal/tools/hypertest/exec.go index 019b655..fee7cf4 100644 --- a/internal/tools/hypertest/exec.go +++ b/internal/tools/hypertest/exec.go @@ -212,36 +212,48 @@ func (r *runner) runOverSSH(remote string, tests []test) (string, error) { fmt.Printf("created remote tempdir: %s\n", tmpdir) // Upload all of the tests in parallel. - sftp, err := ssh.NewSftp() - if err != nil { - return "", err - } wg := new(sync.WaitGroup) syncErr := new(atomic.Pointer[error]) for _, test := range tests { wg.Add(1) go func() { defer wg.Done() + var err error { fmt.Printf("uploading %s...\n", test.binary(r, "")) start := time.Now() - src, err := os.Open(test.binary(r, "")) + var src *os.File + src, err = os.Open(test.binary(r, "")) if err != nil { goto error } defer src.Close() - dst, err := sftp.Create(test.binary(r, tmpdir)) + var cmd *goph.Cmd + cmd, err = ssh.Command("tee", test.binary(r, tmpdir)) if err != nil { + err = fmt.Errorf("exec: tee: %w", err) goto error } - defer dst.Close() + cmd.Stdout = nil + cmd.Stdin = src + cmd.Stderr = os.Stderr - if err := dst.Chmod(0o777); err != nil { + err = cmd.Run() + if err != nil { + err = fmt.Errorf("exec: tee: %w", err) goto error } - if _, err := io.Copy(dst, src); err != nil { + cmd, err = ssh.Command("chmod", "+x", test.binary(r, tmpdir)) + if err != nil { + err = fmt.Errorf("exec: chmod: %w", err) + goto error + } + cmd.Stderr = os.Stderr + err = cmd.Run() + if err != nil { + err = fmt.Errorf("exec: chmod: %w", err) goto error } @@ -249,11 +261,17 @@ func (r *runner) runOverSSH(remote string, tests []test) (string, error) { return } error: + if err == nil { + panic("got spurious nil error") + } syncErr.CompareAndSwap(nil, &err) }() } wg.Wait() if err := syncErr.Load(); err != nil { + if *err == nil { + panic("got spurious nil error") + } return "", *err } From 7cbbe46ae7dc3545afd23838d33d4929b5c67efe Mon Sep 17 00:00:00 2001 From: Miguel Young de la Sota Date: Thu, 12 Mar 2026 13:09:34 -0700 Subject: [PATCH 06/11] more refactor --- internal/tdp/thunks/map.go | 19 +- internal/tdp/thunks/oneof.go | 3 +- internal/tdp/thunks/optional.go | 3 +- internal/tdp/thunks/repeated.go | 4 +- internal/tdp/thunks/singular.go | 13 +- internal/tdp/thunks/stencils.go | 390 +++++++++--------- internal/tdp/thunks/thunks.go | 8 +- internal/tdp/vm/internal/impl/impl.go | 226 ++++++++++ .../vm/internal/{state/p3.go => impl/init.go} | 84 ++-- internal/tdp/vm/internal/impl/stack.go | 212 ++++++++++ .../tdp/vm/{ => internal}/options/options.go | 2 +- internal/tdp/vm/internal/state/p1p2.go | 383 ----------------- internal/tdp/vm/{ => internal/utf8}/utf8.go | 7 +- internal/tdp/vm/{ => internal}/varint/avx.go | 0 internal/tdp/vm/{ => internal}/varint/empty.s | 0 .../tdp/vm/{ => internal}/varint/no_avx.go | 6 +- .../tdp/vm/{ => internal}/varint/split.go | 8 +- .../tdp/vm/{ => internal}/varint/stencils.go | 1 - .../tdp/vm/{ => internal}/varint/varint.go | 9 +- internal/tdp/vm/memory/memory.go | 16 +- internal/tdp/vm/message.go | 2 +- internal/tdp/vm/run.go | 70 ++-- internal/tdp/vm/stencils.go | 4 +- internal/tdp/vm/vm.go | 31 +- internal/testdata/testdata.go | 2 +- message.go | 3 +- options.go | 16 +- 27 files changed, 788 insertions(+), 734 deletions(-) create mode 100644 internal/tdp/vm/internal/impl/impl.go rename internal/tdp/vm/internal/{state/p3.go => impl/init.go} (57%) create mode 100644 internal/tdp/vm/internal/impl/stack.go rename internal/tdp/vm/{ => internal}/options/options.go (97%) delete mode 100644 internal/tdp/vm/internal/state/p1p2.go rename internal/tdp/vm/{ => internal/utf8}/utf8.go (95%) rename internal/tdp/vm/{ => internal}/varint/avx.go (100%) rename internal/tdp/vm/{ => internal}/varint/empty.s (100%) rename internal/tdp/vm/{ => internal}/varint/no_avx.go (79%) rename internal/tdp/vm/{ => internal}/varint/split.go (72%) rename internal/tdp/vm/{ => internal}/varint/stencils.go (98%) rename internal/tdp/vm/{ => internal}/varint/varint.go (94%) diff --git a/internal/tdp/thunks/map.go b/internal/tdp/thunks/map.go index 93fd2c2..cd62115 100644 --- a/internal/tdp/thunks/map.go +++ b/internal/tdp/thunks/map.go @@ -26,7 +26,6 @@ import ( "buf.build/go/hyperpb/internal/tdp/dynamic" "buf.build/go/hyperpb/internal/tdp/maps" "buf.build/go/hyperpb/internal/tdp/vm" - "buf.build/go/hyperpb/internal/tdp/vm/varint" "buf.build/go/hyperpb/internal/xprotoreflect" "buf.build/go/hyperpb/internal/xunsafe" "buf.build/go/hyperpb/internal/xunsafe/layout" @@ -678,33 +677,33 @@ func (bytesItem) kind() protowire.Type { return protowire.BytesType } // //go:nosplit // TODO(#30): Enable once upstream is fixed. func (varint32Item) parse(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2, uint32) { var n uint64 - p1, p2, n = varint.Varint32(p1, p2) + p1, p2, n = vm.Varint32(p1, p2) return p1, p2, uint32(n) } // //go:nosplit // TODO(#30): Enable once upstream is fixed. func (varint64Item) parse(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2, uint64) { - return varint.Varint64(p1, p2) + return vm.Varint64(p1, p2) } // //go:nosplit // TODO(#30): Enable once upstream is fixed. func (zigzag32Item) parse(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2, uint32) { var n uint64 - p1, p2, n = varint.Varint32(p1, p2) + p1, p2, n = vm.Varint32(p1, p2) return p1, p2, zigzag.Decode64[uint32](n) } // //go:nosplit // TODO(#30): Enable once upstream is fixed. func (zigzag64Item) parse(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2, uint64) { var n uint64 - p1, p2, n = varint.Varint64(p1, p2) + p1, p2, n = vm.Varint64(p1, p2) return p1, p2, zigzag.Decode64[uint64](n) } // //go:nosplit // TODO(#30): Enable once upstream is fixed. func (boolItem) parse(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2, uint8) { var n uint64 - p1, p2, n = varint.Varint32(p1, p2) + p1, p2, n = vm.Varint32(p1, p2) if n != 0 { n = 1 } @@ -890,7 +889,7 @@ func parseMapKxV[ // afford to call varint() each time we parse a tag. for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -933,7 +932,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } @@ -993,7 +992,7 @@ func parseMapKxM[KI mapItem[K], K swiss.Key](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) // afford to call varint() each time we parse a tag. for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -1045,7 +1044,7 @@ insert: xunsafe.StoreNoWBUntyped(vp, unsafe.Pointer(v)) // Unspill the old end pointer. - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) p1, p2 = p1.SetScratch(p2, uint64(n)) // Schedule a message parse. diff --git a/internal/tdp/thunks/oneof.go b/internal/tdp/thunks/oneof.go index 40819d2..7b1cf90 100644 --- a/internal/tdp/thunks/oneof.go +++ b/internal/tdp/thunks/oneof.go @@ -23,7 +23,6 @@ import ( "buf.build/go/hyperpb/internal/tdp/dynamic" "buf.build/go/hyperpb/internal/tdp/empty" "buf.build/go/hyperpb/internal/tdp/vm" - "buf.build/go/hyperpb/internal/tdp/vm/varint" "buf.build/go/hyperpb/internal/xprotoreflect" "buf.build/go/hyperpb/internal/xunsafe" "buf.build/go/hyperpb/internal/xunsafe/layout" @@ -272,7 +271,7 @@ func parseOneofBytes(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { func parseOneofBool(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { var n uint64 - p1, p2, n = varint.Varint32(p1, p2) + p1, p2, n = vm.Varint32(p1, p2) if n != 0 { n = 1 } diff --git a/internal/tdp/thunks/optional.go b/internal/tdp/thunks/optional.go index 0f910a4..9a3b073 100644 --- a/internal/tdp/thunks/optional.go +++ b/internal/tdp/thunks/optional.go @@ -22,7 +22,6 @@ import ( "buf.build/go/hyperpb/internal/tdp/compiler" "buf.build/go/hyperpb/internal/tdp/dynamic" "buf.build/go/hyperpb/internal/tdp/vm" - "buf.build/go/hyperpb/internal/tdp/vm/varint" "buf.build/go/hyperpb/internal/xprotoreflect" "buf.build/go/hyperpb/internal/xunsafe/layout" "buf.build/go/hyperpb/internal/zc" @@ -236,7 +235,7 @@ func parseOptionalBytes(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { // //go:nosplit // TODO(#30): Enable once upstream is fixed. func parseOptionalBool(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { var n uint64 - p1, p2, n = varint.Varint32(p1, p2) + p1, p2, n = vm.Varint32(p1, p2) p1, p2 = vm.SetBit(p1, p2) p2.Message().SetBit(p2.Field().Offset.Bit+1, n != 0) diff --git a/internal/tdp/thunks/repeated.go b/internal/tdp/thunks/repeated.go index 9320038..2d38a87 100644 --- a/internal/tdp/thunks/repeated.go +++ b/internal/tdp/thunks/repeated.go @@ -319,7 +319,7 @@ func parsePackedVarint[T tdp.Int](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { p1.Log(p2, "zc", "%v", r.Raw) p1.PtrAddr = p1.EndAddr - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } s = s.Grow(p1.Arena(), count) @@ -406,7 +406,7 @@ func parsePackedVarint[T tdp.Int](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { p1.Log(p2, "append", "%v", s.Addr()) r.Raw = s.Addr().Untyped() - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } diff --git a/internal/tdp/thunks/singular.go b/internal/tdp/thunks/singular.go index 9fa3f3b..29706bb 100644 --- a/internal/tdp/thunks/singular.go +++ b/internal/tdp/thunks/singular.go @@ -25,7 +25,6 @@ import ( "buf.build/go/hyperpb/internal/tdp/dynamic" "buf.build/go/hyperpb/internal/tdp/empty" "buf.build/go/hyperpb/internal/tdp/vm" - "buf.build/go/hyperpb/internal/tdp/vm/varint" "buf.build/go/hyperpb/internal/xprotoreflect" "buf.build/go/hyperpb/internal/xunsafe" "buf.build/go/hyperpb/internal/xunsafe/layout" @@ -266,7 +265,7 @@ func parseVarint[T tdp.Int](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { var p *T p1, p2, p = vm.GetMutableField[T](p1, p2) - *p = T(p2.Scratch) + *p = T(p2.Scratch()) return p1, p2 } @@ -277,11 +276,11 @@ func parseVarint[T tdp.Int](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { //hyperpb:stencil parseZigZag64 parseZigZag[uint64] StoreFromScratch -> StoreFromScratch64 func parseZigZag[T tdp.Int](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { p1, p2 = vm.P1.SetScratch(varint64(p1, p2)) - p1, p2 = p1.SetScratch(p2, uint64(zigzag.Decode64[T](p2.Scratch))) + p1, p2 = p1.SetScratch(p2, uint64(zigzag.Decode64[T](p2.Scratch()))) var p *T p1, p2, p = vm.GetMutableField[T](p1, p2) - *p = T(p2.Scratch) + *p = T(p2.Scratch()) return p1, p2 } @@ -309,7 +308,7 @@ func parseString(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { var p *zc.Range p1, p2, p = vm.GetMutableField[zc.Range](p1, p2) - *p = zc.Range(p2.Scratch) + *p = zc.Range(p2.Scratch()) return p1, p2 } @@ -322,7 +321,7 @@ func parseBytes(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { var p *zc.Range p1, p2, p = vm.GetMutableField[zc.Range](p1, p2) - *p = zc.Range(p2.Scratch) + *p = zc.Range(p2.Scratch()) return p1, p2 } @@ -330,7 +329,7 @@ func parseBytes(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { // //go:nosplit // TODO(#30): Enable once upstream is fixed. func parseBool(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { var n uint64 - p1, p2, n = varint.Varint32(p1, p2) + p1, p2, n = vm.Varint32(p1, p2) p2.Message().SetBit(p2.Field().Offset.Bit, n != 0) return p1, p2 diff --git a/internal/tdp/thunks/stencils.go b/internal/tdp/thunks/stencils.go index d213509..ce51ca1 100644 --- a/internal/tdp/thunks/stencils.go +++ b/internal/tdp/thunks/stencils.go @@ -17,6 +17,9 @@ package thunks import ( + "math/bits" + "unsafe" + "buf.build/go/hyperpb/internal/arena/slice" "buf.build/go/hyperpb/internal/debug" "buf.build/go/hyperpb/internal/swiss" @@ -24,13 +27,10 @@ import ( "buf.build/go/hyperpb/internal/tdp/dynamic" "buf.build/go/hyperpb/internal/tdp/repeated" "buf.build/go/hyperpb/internal/tdp/vm" - "buf.build/go/hyperpb/internal/tdp/vm/varint" "buf.build/go/hyperpb/internal/xunsafe" "buf.build/go/hyperpb/internal/xunsafe/layout" "buf.build/go/hyperpb/internal/zigzag" "google.golang.org/protobuf/encoding/protowire" - "math/bits" - "unsafe" ) func parseMapV32xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -77,7 +77,7 @@ func parseMapV32xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -120,7 +120,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapV32xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -167,7 +167,7 @@ func parseMapV32xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -210,7 +210,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapV32xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -257,7 +257,7 @@ func parseMapV32xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -300,7 +300,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapV32xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -347,7 +347,7 @@ func parseMapV32xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -390,7 +390,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapV32xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -437,7 +437,7 @@ func parseMapV32xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -480,7 +480,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapV32xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -527,7 +527,7 @@ func parseMapV32xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -570,7 +570,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapV32x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -617,7 +617,7 @@ func parseMapV32x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -660,7 +660,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapV32xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -707,7 +707,7 @@ func parseMapV32xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -750,7 +750,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapV32xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -797,7 +797,7 @@ func parseMapV32xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -840,7 +840,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapV64xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -887,7 +887,7 @@ func parseMapV64xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -930,7 +930,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapV64xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -977,7 +977,7 @@ func parseMapV64xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -1020,7 +1020,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapV64xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -1067,7 +1067,7 @@ func parseMapV64xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -1110,7 +1110,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapV64xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -1157,7 +1157,7 @@ func parseMapV64xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -1200,7 +1200,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapV64xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -1247,7 +1247,7 @@ func parseMapV64xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -1290,7 +1290,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapV64xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -1337,7 +1337,7 @@ func parseMapV64xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -1380,7 +1380,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapV64x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -1427,7 +1427,7 @@ func parseMapV64x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -1470,7 +1470,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapV64xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -1517,7 +1517,7 @@ func parseMapV64xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -1560,7 +1560,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapV64xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -1607,7 +1607,7 @@ func parseMapV64xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -1650,7 +1650,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapZ32xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -1697,7 +1697,7 @@ func parseMapZ32xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -1740,7 +1740,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapZ32xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -1787,7 +1787,7 @@ func parseMapZ32xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -1830,7 +1830,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapZ32xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -1877,7 +1877,7 @@ func parseMapZ32xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -1920,7 +1920,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapZ32xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -1967,7 +1967,7 @@ func parseMapZ32xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -2010,7 +2010,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapZ32xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -2057,7 +2057,7 @@ func parseMapZ32xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -2100,7 +2100,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapZ32xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -2147,7 +2147,7 @@ func parseMapZ32xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -2190,7 +2190,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapZ32x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -2237,7 +2237,7 @@ func parseMapZ32x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -2280,7 +2280,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapZ32xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -2327,7 +2327,7 @@ func parseMapZ32xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -2370,7 +2370,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapZ32xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -2417,7 +2417,7 @@ func parseMapZ32xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -2460,7 +2460,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapZ64xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -2507,7 +2507,7 @@ func parseMapZ64xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -2550,7 +2550,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapZ64xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -2597,7 +2597,7 @@ func parseMapZ64xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -2640,7 +2640,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapZ64xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -2687,7 +2687,7 @@ func parseMapZ64xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -2730,7 +2730,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapZ64xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -2777,7 +2777,7 @@ func parseMapZ64xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -2820,7 +2820,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapZ64xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -2867,7 +2867,7 @@ func parseMapZ64xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -2910,7 +2910,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapZ64xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -2957,7 +2957,7 @@ func parseMapZ64xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -3000,7 +3000,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapZ64x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -3047,7 +3047,7 @@ func parseMapZ64x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -3090,7 +3090,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapZ64xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -3137,7 +3137,7 @@ func parseMapZ64xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -3180,7 +3180,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapZ64xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -3227,7 +3227,7 @@ func parseMapZ64xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -3270,7 +3270,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapF32xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -3317,7 +3317,7 @@ func parseMapF32xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -3360,7 +3360,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapF32xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -3407,7 +3407,7 @@ func parseMapF32xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -3450,7 +3450,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapF32xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -3497,7 +3497,7 @@ func parseMapF32xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -3540,7 +3540,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapF32xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -3587,7 +3587,7 @@ func parseMapF32xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -3630,7 +3630,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapF32xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -3677,7 +3677,7 @@ func parseMapF32xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -3720,7 +3720,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapF32xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -3767,7 +3767,7 @@ func parseMapF32xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -3810,7 +3810,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapF32x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -3857,7 +3857,7 @@ func parseMapF32x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -3900,7 +3900,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapF32xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -3947,7 +3947,7 @@ func parseMapF32xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -3990,7 +3990,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapF32xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -4037,7 +4037,7 @@ func parseMapF32xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -4080,7 +4080,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapF64xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -4127,7 +4127,7 @@ func parseMapF64xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -4170,7 +4170,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapF64xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -4217,7 +4217,7 @@ func parseMapF64xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -4260,7 +4260,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapF64xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -4307,7 +4307,7 @@ func parseMapF64xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -4350,7 +4350,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapF64xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -4397,7 +4397,7 @@ func parseMapF64xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -4440,7 +4440,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapF64xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -4487,7 +4487,7 @@ func parseMapF64xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -4530,7 +4530,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapF64xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -4577,7 +4577,7 @@ func parseMapF64xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -4620,7 +4620,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapF64x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -4667,7 +4667,7 @@ func parseMapF64x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -4710,7 +4710,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapF64xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -4757,7 +4757,7 @@ func parseMapF64xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -4800,7 +4800,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapF64xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -4847,7 +4847,7 @@ func parseMapF64xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -4890,7 +4890,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapSxV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -4937,7 +4937,7 @@ func parseMapSxV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -4980,7 +4980,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapSxV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -5027,7 +5027,7 @@ func parseMapSxV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -5070,7 +5070,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapSxZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -5117,7 +5117,7 @@ func parseMapSxZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -5160,7 +5160,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapSxZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -5207,7 +5207,7 @@ func parseMapSxZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -5250,7 +5250,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapSxF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -5297,7 +5297,7 @@ func parseMapSxF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -5340,7 +5340,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapSxF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -5387,7 +5387,7 @@ func parseMapSxF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -5430,7 +5430,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapSx2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -5477,7 +5477,7 @@ func parseMapSx2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -5520,7 +5520,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapSxS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -5567,7 +5567,7 @@ func parseMapSxS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -5610,7 +5610,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapSxB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -5657,7 +5657,7 @@ func parseMapSxB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -5700,7 +5700,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapBxV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -5747,7 +5747,7 @@ func parseMapBxV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -5790,7 +5790,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapBxV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -5837,7 +5837,7 @@ func parseMapBxV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -5880,7 +5880,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapBxZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -5927,7 +5927,7 @@ func parseMapBxZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -5970,7 +5970,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapBxZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -6017,7 +6017,7 @@ func parseMapBxZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -6060,7 +6060,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapBxF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -6107,7 +6107,7 @@ func parseMapBxF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -6150,7 +6150,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapBxF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -6197,7 +6197,7 @@ func parseMapBxF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -6240,7 +6240,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapBx2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -6287,7 +6287,7 @@ func parseMapBx2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -6330,7 +6330,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapBxS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -6377,7 +6377,7 @@ func parseMapBxS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -6420,7 +6420,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMapBxB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -6467,7 +6467,7 @@ func parseMapBxB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -6510,7 +6510,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMap2xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -6557,7 +6557,7 @@ func parseMap2xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -6600,7 +6600,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMap2xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -6647,7 +6647,7 @@ func parseMap2xV64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -6690,7 +6690,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMap2xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -6737,7 +6737,7 @@ func parseMap2xZ32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -6780,7 +6780,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMap2xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -6827,7 +6827,7 @@ func parseMap2xZ64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -6870,7 +6870,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMap2xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -6917,7 +6917,7 @@ func parseMap2xF32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -6960,7 +6960,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMap2xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -7007,7 +7007,7 @@ func parseMap2xF64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -7050,7 +7050,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMap2x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -7097,7 +7097,7 @@ func parseMap2x2(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -7140,7 +7140,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMap2xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -7187,7 +7187,7 @@ func parseMap2xS(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -7230,7 +7230,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } func parseMap2xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { @@ -7277,7 +7277,7 @@ func parseMap2xB(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -7320,7 +7320,7 @@ insert: *vp = v - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } @@ -7365,7 +7365,7 @@ func parseMapV32xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -7413,7 +7413,7 @@ insert: p1, p2, v = vm.AllocMessage(p1, p2) xunsafe.StoreNoWBUntyped(vp, unsafe.Pointer(v)) - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) p1, p2 = p1.SetScratch(p2, uint64(n)) if fast { @@ -7465,7 +7465,7 @@ func parseMapV64xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -7513,7 +7513,7 @@ insert: p1, p2, v = vm.AllocMessage(p1, p2) xunsafe.StoreNoWBUntyped(vp, unsafe.Pointer(v)) - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) p1, p2 = p1.SetScratch(p2, uint64(n)) if fast { @@ -7565,7 +7565,7 @@ func parseMapZ32xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -7613,7 +7613,7 @@ insert: p1, p2, v = vm.AllocMessage(p1, p2) xunsafe.StoreNoWBUntyped(vp, unsafe.Pointer(v)) - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) p1, p2 = p1.SetScratch(p2, uint64(n)) if fast { @@ -7665,7 +7665,7 @@ func parseMapZ64xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -7713,7 +7713,7 @@ insert: p1, p2, v = vm.AllocMessage(p1, p2) xunsafe.StoreNoWBUntyped(vp, unsafe.Pointer(v)) - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) p1, p2 = p1.SetScratch(p2, uint64(n)) if fast { @@ -7765,7 +7765,7 @@ func parseMapF32xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -7813,7 +7813,7 @@ insert: p1, p2, v = vm.AllocMessage(p1, p2) xunsafe.StoreNoWBUntyped(vp, unsafe.Pointer(v)) - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) p1, p2 = p1.SetScratch(p2, uint64(n)) if fast { @@ -7865,7 +7865,7 @@ func parseMapF64xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -7913,7 +7913,7 @@ insert: p1, p2, v = vm.AllocMessage(p1, p2) xunsafe.StoreNoWBUntyped(vp, unsafe.Pointer(v)) - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) p1, p2 = p1.SetScratch(p2, uint64(n)) if fast { @@ -7965,7 +7965,7 @@ func parseMapSxM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -8013,7 +8013,7 @@ insert: p1, p2, v = vm.AllocMessage(p1, p2) xunsafe.StoreNoWBUntyped(vp, unsafe.Pointer(v)) - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) p1, p2 = p1.SetScratch(p2, uint64(n)) if fast { @@ -8065,7 +8065,7 @@ func parseMapBxM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -8113,7 +8113,7 @@ insert: p1, p2, v = vm.AllocMessage(p1, p2) xunsafe.StoreNoWBUntyped(vp, unsafe.Pointer(v)) - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) p1, p2 = p1.SetScratch(p2, uint64(n)) if fast { @@ -8165,7 +8165,7 @@ func parseMap2xM(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { for p1.PtrAddr < p1.EndAddr { var tag uint64 - p1, p2, tag = varint.Varint32(p1, p2) + p1, p2, tag = vm.Varint32(p1, p2) switch tag { case kTag: p1, p2, k = ki.parse(p1, p2) @@ -8213,7 +8213,7 @@ insert: p1, p2, v = vm.AllocMessage(p1, p2) xunsafe.StoreNoWBUntyped(vp, unsafe.Pointer(v)) - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) p1, p2 = p1.SetScratch(p2, uint64(n)) if fast { @@ -8380,7 +8380,7 @@ func parsePackedVarint8(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { p1.Log(p2, "zc", "%v", r.Raw) p1.PtrAddr = p1.EndAddr - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } s = s.Grow(p1.Arena(), count) @@ -8461,7 +8461,7 @@ func parsePackedVarint8(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { p1.Log(p2, "append", "%v", s.Addr()) r.Raw = s.Addr().Untyped() - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } @@ -8509,7 +8509,7 @@ func parsePackedVarint32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { p1.Log(p2, "zc", "%v", r.Raw) p1.PtrAddr = p1.EndAddr - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } s = s.Grow(p1.Arena(), count) @@ -8590,7 +8590,7 @@ func parsePackedVarint32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { p1.Log(p2, "append", "%v", s.Addr()) r.Raw = s.Addr().Untyped() - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } @@ -8638,7 +8638,7 @@ func parsePackedVarint64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { p1.Log(p2, "zc", "%v", r.Raw) p1.PtrAddr = p1.EndAddr - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } s = s.Grow(p1.Arena(), count) @@ -8719,7 +8719,7 @@ func parsePackedVarint64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { p1.Log(p2, "append", "%v", s.Addr()) r.Raw = s.Addr().Untyped() - p1.EndAddr = xunsafe.Addr[byte](p2.Scratch) + p1.EndAddr = xunsafe.Addr[byte](p2.Scratch()) return p1, p2 } @@ -8900,7 +8900,7 @@ func parseVarint32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { var p *uint32 p1, p2, p = vm.GetMutableField[uint32](p1, p2) - *p = uint32(p2.Scratch) + *p = uint32(p2.Scratch()) return p1, p2 } @@ -8910,7 +8910,7 @@ func parseVarint64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { var p *uint64 p1, p2, p = vm.GetMutableField[uint64](p1, p2) - *p = uint64(p2.Scratch) + *p = uint64(p2.Scratch()) return p1, p2 } @@ -8918,22 +8918,22 @@ func parseVarint64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { func parseZigZag32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseZigZag[uint32] p1, p2 = vm.P1.SetScratch(varint32(p1, p2)) - p1, p2 = p1.SetScratch(p2, uint64(zigzag.Decode64[uint32](p2.Scratch))) + p1, p2 = p1.SetScratch(p2, uint64(zigzag.Decode64[uint32](p2.Scratch()))) var p *uint32 p1, p2, p = vm.GetMutableField[uint32](p1, p2) - *p = uint32(p2.Scratch) + *p = uint32(p2.Scratch()) return p1, p2 } func parseZigZag64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseZigZag[uint64] p1, p2 = vm.P1.SetScratch(varint64(p1, p2)) - p1, p2 = p1.SetScratch(p2, uint64(zigzag.Decode64[uint64](p2.Scratch))) + p1, p2 = p1.SetScratch(p2, uint64(zigzag.Decode64[uint64](p2.Scratch()))) var p *uint64 p1, p2, p = vm.GetMutableField[uint64](p1, p2) - *p = uint64(p2.Scratch) + *p = uint64(p2.Scratch()) return p1, p2 } diff --git a/internal/tdp/thunks/thunks.go b/internal/tdp/thunks/thunks.go index 89cfaf0..35e4511 100644 --- a/internal/tdp/thunks/thunks.go +++ b/internal/tdp/thunks/thunks.go @@ -23,7 +23,6 @@ import ( "buf.build/go/hyperpb/internal/tdp/compiler" "buf.build/go/hyperpb/internal/tdp/profile" "buf.build/go/hyperpb/internal/tdp/vm" - "buf.build/go/hyperpb/internal/tdp/vm/varint" ) //go:generate go run ../../tools/hyperstencil @@ -73,12 +72,15 @@ func fieldKind(fd protoreflect.FieldDescriptor, prof profile.Field) protoreflect } } +// Helpers for allowing stencils to select between varint32 and varint64, since +// it does not support replacing free functions of the form a.F. + //go:nosplit func varint32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2, uint64) { - return varint.Varint32(p1, p2) + return vm.Varint32(p1, p2) } //go:nosplit func varint64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2, uint64) { - return varint.Varint64(p1, p2) + return vm.Varint64(p1, p2) } diff --git a/internal/tdp/vm/internal/impl/impl.go b/internal/tdp/vm/internal/impl/impl.go new file mode 100644 index 0000000..57ffc01 --- /dev/null +++ b/internal/tdp/vm/internal/impl/impl.go @@ -0,0 +1,226 @@ +// Copyright 2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package impl contains the definition of the VM's state, as well as core +// VM operations. The actual VM interpreter lives in the vm package. +// +// This package exists so that vm/internal packages can access these types +// without being part of the vm package. +package impl + +import ( + "unsafe" + + "buf.build/go/hyperpb/internal/arena" + "buf.build/go/hyperpb/internal/debug" + "buf.build/go/hyperpb/internal/swiss" + "buf.build/go/hyperpb/internal/tdp" + "buf.build/go/hyperpb/internal/tdp/dynamic" + "buf.build/go/hyperpb/internal/tdp/vm/internal/options" + "buf.build/go/hyperpb/internal/xunsafe" +) + +const NotAGroup = ^tdp.Tag(0) + +// P1 is half of the state for the TDP parser. +// +// This struct must no more than four fields, and all four fields must be +// word-sized or smaller, so that it fits in registers AND does not trigger +// go.dev/issue/72897. +// +// For this reason, the parser state is split into two structs that will fit +// in registers and will not be spilled. This means that functions with the +// [parseFunc] signature will keep all of the parser data in registers with +// minimal spillage. Ideally this would all be in a single struct, but see the +// above bug. +// +// Moreover, these structs should contain no pointers; pointers have instead +// been replaced with addresses, all of which are rooted at the call to +// startParse. This avoids unnecessary spilling for GC stack scanning, since +// those pointers are already findable elsewhere. +// +// Generic parser functions are homed under P1, with a P2 argument, +// such that these functions have the following signature: +// +// func(P1, P2) (P1, P2) +// +// Some functions do not have the signature because they are guaranteed inline +// candidates. +// +// Note that returning no values is slower than returning the parser state: this +// is because it will force the caller to spill the parser state across the +// call. +// +// The Go register ABI means P1 and P2 occupy the following registers: +// +// x86: rax, rbx, rcx, rdi, rsi, r8, r9, r10 +// aarch64: r0, r1, r2, r3, r4, r5, r6, r7 +type P1 struct { + PtrAddr xunsafe.Addr[byte] + EndAddr xunsafe.Addr[byte] // One past the end of the stream. + + shared xunsafe.Addr[dynamic.Shared] + EndGroup tdp.Tag // End-of-group tag. +} + +// P2 is the other half of the state for the TDP parser. See [P1]. +type P2 struct { + MessageAddr xunsafe.Addr[dynamic.Message] + FieldAddr xunsafe.Addr[tdp.FieldParser] + p3Addr xunsafe.Addr[P3] + + // A scratch register that is preserved across *most* calls. Thunks + // do not preserve the Scratch register, and some functions in this file + // do not either. + scratch uint64 +} + +// P3 is parser state that is passed behind a pointer. +type P3 struct { + _ xunsafe.NoCopy + + err tdp.Error + stack stack + + ty xunsafe.Addr[tdp.TypeParser] + options.Options + + frames *[]frame +} + +func (p1 P1) Shared() *dynamic.Shared { return p1.shared.AssertValid() } +func (p1 P1) Arena() *arena.Arena { return p1.shared.AssertValid().Arena() } +func (p1 P1) Src() *byte { return p1.shared.AssertValid().Src } + +func (p2 P2) Message() *dynamic.Message { return p2.MessageAddr.AssertValid() } +func (p2 P2) Field() *tdp.FieldParser { return p2.FieldAddr.AssertValid() } +func (p2 P2) P3() *P3 { return p2.p3Addr.AssertValid() } +func (p2 P2) Type() *tdp.TypeParser { return p2.P3().ty.AssertValid() } + +// Ptr returns the current cursor within the message. +// +// This is preferred to PtrAddr.AssertValid() because it checks for a specific +// GC-panicking bug. +func (p1 P1) Ptr() *byte { + // There is an exciting bug that can occur where we dereference p1.b_ + // while it points to the end of the input slice. Being able to do have + // p1.b_ equal the one-past-the-end spot is nice, but if we dereference it, + // Go may scan through this pointer, and mark the allocation it points to. + // If it happens to point to freed memory, the GC panics, because this is + // an unrecoverable constraint violation. + // + // This assert makes sure that none of our large test suite accidentally + // performs this illegal maneuver. + // + // Annoyingly this means we also need to be careful in parser1.buf(), + // because we cannot form a zero-sized slice to the end of an allocation. + debug.Assert(p1.PtrAddr < p1.EndAddr, + "p1.PtrAddr cannot point one past the end: need %v < %v", p1.PtrAddr, p1.EndAddr) + return p1.PtrAddr.AssertValid() +} + +// Len returns the length of [P1.Buf]. +func (p1 P1) Len() int { + return int(p1.EndAddr - p1.PtrAddr) +} + +// Buf returns the data left to parse. +func (p1 P1) Buf() []byte { + if p1.Len() == 0 { + return nil + } + return unsafe.Slice(p1.Ptr(), p1.Len()) +} + +// Scratch returns the scratch register. +func (p2 P2) Scratch() uint64 { + return p2.scratch +} + +// Scratch sets the scratch register. +// +// The caller is responsible for spilling this value if necessary. +func (p1 P1) SetScratch(p2 P2, v uint64) (P1, P2) { + p1.Log(p2, "scratch", "%d:%#x", v, v) + p2.scratch = v + return p1, p2 +} + +// Fail causes a parse failure by panicking with the given error code. +func (p1 P1) Fail(p2 P2, err tdp.ErrorCode) { + p2.P3().err = err.ErrorAt(p1.PtrAddr.Sub(xunsafe.AddrOf(p1.Src()))) + + // Trigger a panic without calling runtime.gopanic. + // The NoEscape is to silence clueless linters. + _ = *xunsafe.NoEscape[*byte](nil) + + for { //nolint:staticcheck // This code is unreachable. + } +} + +// Log logs debugging information during a parse. +func (p1 P1) Log(p2 P2, op, format string, args ...any) { + if !debug.Enabled { + return + } + + start := p1.PtrAddr.Sub(xunsafe.AddrOf(p1.Src())) + end := p1.EndAddr.Sub(xunsafe.AddrOf(p1.Src())) + height := p2.P3().stack.bottom.Sub(p2.P3().stack.ptr) + var b byte + if p1.PtrAddr < p1.EndAddr { + b = *p1.Ptr() + } + debug.Log( + []any{ + "%p:%p:%d %v [%d:%d] = 0x%02x", + p1.Shared(), p2.Message(), height, p1.EndGroup, start, end, b, + }, + op, format, args..., + ) +} + +// AtLeast fails the parse if there aren't at least n bytes left to parse. +// +//go:nosplit +func (p1 P1) AtLeast(p2 P2, n uint64) (P1, P2) { + if n <= uint64(p1.Len()) { + return p1, p2 + } + + p1.Fail(p2, tdp.ErrorTruncated) + return p1, p2 +} + +// Advance advances the cursor by n bytes. +func (p1 P1) Advance(n int) P1 { + debug.Assert(p1.Len() >= n, "parser overflow") + + p1.PtrAddr = p1.PtrAddr.Add(n) + return p1 +} + +// ByTag sets the current field to the field with the given tag. +// +// Sets the field to nil if no field with such a tag exists. +func (p1 P1) ByTag(p2 P2, tag uint64) (P1, P2, uint64) { + t := p2.Type() + p := swiss.LookupI32xU32(t.Tags, int32(tag)) + if p == nil { + p2.FieldAddr = 0 + return p1, p2, tag + } + p2.FieldAddr = xunsafe.AddrOf(t.Fields().Get(int(*p))) + return p1, p2, tag +} diff --git a/internal/tdp/vm/internal/state/p3.go b/internal/tdp/vm/internal/impl/init.go similarity index 57% rename from internal/tdp/vm/internal/state/p3.go rename to internal/tdp/vm/internal/impl/init.go index a94f2a3..98fd31e 100644 --- a/internal/tdp/vm/internal/state/p3.go +++ b/internal/tdp/vm/internal/impl/init.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package state +package impl import ( "fmt" @@ -22,73 +22,69 @@ import ( "buf.build/go/hyperpb/internal/debug" "buf.build/go/hyperpb/internal/tdp" "buf.build/go/hyperpb/internal/tdp/dynamic" + "buf.build/go/hyperpb/internal/tdp/vm/internal/options" "buf.build/go/hyperpb/internal/tdp/vm/memory" - "buf.build/go/hyperpb/internal/tdp/vm/options" "buf.build/go/hyperpb/internal/xsync" "buf.build/go/hyperpb/internal/xunsafe" ) var ( - stackPool = xsync.Pool[[]Frame]{} + stackPool = xsync.Pool[[]frame]{} p3Pool = xsync.Pool[P3]{ Reset: func(pp *P3) { *pp = P3{} }, } ) -// P3 is parser state that is passed behind a pointer. -type P3 struct { - _ xunsafe.NoCopy - - Err tdp.Error - Stack struct { - Ptr xunsafe.Addr[Frame] - Top, Bottom xunsafe.Addr[Frame] - } - - Type xunsafe.Addr[tdp.TypeParser] - options.Options - - Frames *[]Frame -} - -// Frame is a recursion frame for the parser. -type Frame struct { - End xunsafe.Addr[byte] - Group tdp.Tag - Message xunsafe.Addr[dynamic.Message] - Type xunsafe.Addr[tdp.TypeParser] - Field xunsafe.Addr[tdp.FieldParser] -} - -func NewP3(data []byte, shared *dynamic.Shared, options *options.Options) *P3 { - shared.Lock.Lock() +// New creates new VM state. +// +// Make sure to defer [Done] after calling this function. +func New(data []byte, m *dynamic.Message, options *options.Options) (P1, P2) { + m.Shared.Lock.Lock() p3 := p3Pool.Get() p3.Options = *options - data = memory.RelocatePageBoundary(data, !p3.AllowAlias) - shared.Src = unsafe.SliceData(data) - shared.Len = len(data) + data = memory.RelocatePageBoundary(data, !p3.AllowAlias, 15) + m.Shared.Src = unsafe.SliceData(data) + m.Shared.Len = len(data) // The arena keeps m.context alive, so we don't need to KeepAlive src. - p3.Frames = stackPool.Get() - if cap(*p3.Frames) < p3.MaxDepth { - *p3.Frames = make([]Frame, p3.MaxDepth) + p3.frames = stackPool.Get() + if cap(*p3.frames) < p3.MaxDepth { + *p3.frames = make([]frame, p3.MaxDepth) } - p3.Stack.Top = xunsafe.AddrOf(unsafe.SliceData(*p3.Frames)) - p3.Stack.Bottom = p3.Stack.Top.Add(p3.MaxDepth) + p3.stack.top = xunsafe.AddrOf(unsafe.SliceData(*p3.frames)) + p3.stack.bottom = p3.stack.top.Add(p3.MaxDepth) + + p3.stack.ptr = p3.stack.bottom + + p1 := P1{ + shared: xunsafe.AddrOf(m.Shared), + PtrAddr: xunsafe.AddrOf(m.Shared.Src), + } + p2 := P2{ + p3Addr: xunsafe.AddrOf(p3), + } + + if debug.Enabled { + p1.Log(p2, "start", "%p:%d `%x`, %p:%v", + m.Shared.Src, m.Shared.Len, data, m.Type(), m.Type().Descriptor.FullName()) + } - p3.Stack.Ptr = p3.Stack.Bottom + p1, p2 = p1.SetScratch(p2, uint64(m.Shared.Len)) + p1, p2 = p1.PushMessage(p2, m) + p1, p2 = p1.SetScratch(p2, 0) - return p3 + return p1, p2 } +// Done should be called in a defer immediately after [New]. func (p3 *P3) Done(shared *dynamic.Shared, err *error) { - if tdp.GetCode(p3.Err) != tdp.ErrorOk && recover() != nil { + if tdp.GetCode(p3.err) != tdp.ErrorOk && recover() != nil { // Make a copy of the error, since pp will get re-used by a future // run of this function. - parseErr := p3.Err + parseErr := p3.err *err = &parseErr if debug.Enabled { @@ -106,8 +102,8 @@ func (p3 *P3) Done(shared *dynamic.Shared, err *error) { // These would all normally go in their own defers, but having a single // defer is noticeably faster. - stackPool.Put(p3.Frames) - p3.Frames = nil + stackPool.Put(p3.frames) + p3.frames = nil p3Pool.Put(p3) shared.Lock.Unlock() } diff --git a/internal/tdp/vm/internal/impl/stack.go b/internal/tdp/vm/internal/impl/stack.go new file mode 100644 index 0000000..8e4f4e1 --- /dev/null +++ b/internal/tdp/vm/internal/impl/stack.go @@ -0,0 +1,212 @@ +// Copyright 2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package impl + +import ( + "unsafe" + + "buf.build/go/hyperpb/internal/debug" + "buf.build/go/hyperpb/internal/tdp" + "buf.build/go/hyperpb/internal/tdp/dynamic" + "buf.build/go/hyperpb/internal/xunsafe" +) + +// stack is the recursion stack for the VM. +type stack struct { + ptr xunsafe.Addr[frame] + top, bottom xunsafe.Addr[frame] +} + +// frame is a recursion frame for the parser. +type frame struct { + end xunsafe.Addr[byte] + group tdp.Tag + message xunsafe.Addr[dynamic.Message] + Type xunsafe.Addr[tdp.TypeParser] + field xunsafe.Addr[tdp.FieldParser] +} + +// PushMessage pushes a new message to be parsed onto the parser stack. +// +// The length of the message should be in p2.Scratch(). +// +//go:nosplit +func (p1 P1) PushMessage(p2 P2, m *dynamic.Message) (P1, P2) { + len := int(p2.Scratch()) + if len == 0 { + return p1, p2 + } + + p1.Log(p2, "n", "%d", len) + + if p1.EndGroup != NotAGroup || p1.PtrAddr.Add(len) != p1.EndAddr { + // We don't need to push a new frame if the new message would cause + // the current frame to be empty once it gets popped. + p1, p2 = p1.push(p2, p1.PtrAddr.Add(len)) + } + + p1.EndGroup = NotAGroup + p2.MessageAddr = xunsafe.AddrOf(m) + + t := p2.Message().Type().Parser + p2.P3().ty = xunsafe.AddrOf(t) + if debug.Enabled { + p1, p2 = _PushMessage_log(p1, p2) + } + + p2.FieldAddr = xunsafe.AddrOf(&t.Entrypoint) + + return p1, p2 +} + +// PushMapEntry pushes a new map entry to be parsed onto the parser stack. +// +//go:nosplit +func (p1 P1) PushMapEntry(p2 P2, m *dynamic.Message) (P1, P2) { + len := int(p2.Scratch()) + if len == 0 { + return p1, p2 + } + + if p1.EndGroup != NotAGroup || p1.PtrAddr.Add(len) != p1.EndAddr { + // We don't need to push a new frame if the new message would cause + // the current frame to be empty once it gets popped. + p1, p2 = p1.push(p2, p1.PtrAddr.Add(len)) + } + + p1.EndGroup = NotAGroup + p2.MessageAddr = xunsafe.AddrOf(m) + + t := p2.Message().Type().Parser.MapEntry + p2.P3().ty = xunsafe.AddrOf(t) + if debug.Enabled { + p1, p2 = _PushMessage_log(p1, p2) + } + + p2.FieldAddr = xunsafe.AddrOf(&t.Entrypoint) + + return p1, p2 +} + +// PushGroup pushes a new group to be parsed onto the parser stack. +// +//go:nosplit +func (p1 P1) PushGroup(p2 P2, m *dynamic.Message) (P1, P2) { + start := tdp.Tag(p2.Scratch()) + + // Indeed, we can just +1, because we need to replace the low three + // 0b011 bits with 0b100. Much simpler than clearing and overwriting those + // bits! + end := start + 1 + + p1, p2 = p1.push(p2, p1.EndAddr) + + p1.EndGroup = end + p2.MessageAddr = xunsafe.AddrOf(m) + + t := p2.Message().Type().Parser + p2.P3().ty = xunsafe.AddrOf(t) + if debug.Enabled { + p1, p2 = _PushMessage_log(p1, p2) + } + + p2.FieldAddr = xunsafe.AddrOf(&t.Entrypoint) + + return p1, p2 +} + +func (p3 *P3) stackSlice() []frame { + n := p3.stack.bottom.Sub(p3.stack.ptr) + return unsafe.Slice(p3.stack.ptr.AssertValid(), n) +} + +// push pushes a parser frame. +// +//go:nosplit +func (p1 P1) push(p2 P2, end xunsafe.Addr[byte]) (P1, P2) { + if debug.Enabled { + p1, p2 = _push_log(p1, p2) + } + + if p2.P3().stack.ptr == p2.P3().stack.top { + p1.Fail(p2, tdp.ErrorRecursionDepth) + } + + p2.P3().stack.ptr = p2.P3().stack.ptr.Add(-1) + + // Note: a single frame is just too large to hit Go's SROA pass (same bug + // that results in p1/p2 being two structs). Thus, we write each field + // separately to avoid wasteful stack traffic. + frame := p2.P3().stack.ptr.AssertValid() + frame.end = p1.EndAddr + frame.group = p1.EndGroup + frame.message = p2.MessageAddr + frame.Type = p2.P3().ty + frame.field = p2.FieldAddr + + p1.EndAddr = end + return p1, p2 +} + +// Pop pops a parser frame. +// +// Returns whether the last frame was popped. +// +//go:nosplit +func (p1 P1) Pop(p2 P2) (P1, P2, bool) { + if debug.Enabled { + p1.Log( + p2, "finish", "%v, ty: %p:%s %v", + p2.MessageAddr, + p2.Message().Type(), + p2.Message().Type().Descriptor.FullName(), + p2.Message().Type(), + ) + + s := &p2.P3().stack + p1.Log(p2, "pop", "%v/%v/%v\n%s", s.top, s.ptr, s.bottom, + p2.Message().Dump()) + } + + last := p2.P3().stack.ptr.AssertValid() + p1.EndAddr = last.end + p1.EndGroup = last.group + p2.MessageAddr = last.message + p2.P3().ty = last.Type + p2.FieldAddr = last.field + p2.P3().stack.ptr = p2.P3().stack.ptr.Add(1) + + return p1, p2, p2.P3().stack.ptr == p2.P3().stack.bottom +} + +// Outlined so that push() does not hit the stack size limit for nosplit. +// +//go:noinline +func _PushMessage_log(p1 P1, p2 P2) (P1, P2) { + p1.Log( + p2, "new", "%#x, %v", + p2.MessageAddr, + p2.Message().Type(), + ) + return p1, p2 +} + +// Outlined so that push() does not hit the stack size limit for nosplit. +// +//go:noinline +func _push_log(p1 P1, p2 P2) (P1, P2) { + p1.Log(p2, "push", "%v/%v/%v", p2.P3().stack.top, p2.P3().stack.ptr, p2.P3().stack.bottom) + return p1, p2 +} diff --git a/internal/tdp/vm/options/options.go b/internal/tdp/vm/internal/options/options.go similarity index 97% rename from internal/tdp/vm/options/options.go rename to internal/tdp/vm/internal/options/options.go index 9cc846a..1244a45 100644 --- a/internal/tdp/vm/options/options.go +++ b/internal/tdp/vm/internal/options/options.go @@ -17,7 +17,7 @@ package options import "buf.build/go/hyperpb/internal/tdp/profile" -// Options is options for [Run]. +// Options is options for the vm. type Options struct { // Max tries before hitting the tag table. MaxMisses int diff --git a/internal/tdp/vm/internal/state/p1p2.go b/internal/tdp/vm/internal/state/p1p2.go deleted file mode 100644 index c36954f..0000000 --- a/internal/tdp/vm/internal/state/p1p2.go +++ /dev/null @@ -1,383 +0,0 @@ -// Copyright 2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package state contains the definition of the VM's state. -// -// This package exists so that vm/internal packages can access these types -// without being part of the vm package. -package state - -import ( - "unsafe" - - "buf.build/go/hyperpb/internal/arena" - "buf.build/go/hyperpb/internal/debug" - "buf.build/go/hyperpb/internal/swiss" - "buf.build/go/hyperpb/internal/tdp" - "buf.build/go/hyperpb/internal/tdp/dynamic" - "buf.build/go/hyperpb/internal/xunsafe" -) - -const NotAGroup = ^tdp.Tag(0) - -// P1 is half of the state for the TDP parser. -// -// This struct must no more than four fields, and all four fields must be -// word-sized or smaller, so that it fits in registers AND does not trigger -// go.dev/issue/72897. -// -// For this reason, the parser state is split into two structs that will fit -// in registers and will not be spilled. This means that functions with the -// [parseFunc] signature will keep all of the parser data in registers with -// minimal spillage. Ideally this would all be in a single struct, but see the -// above bug. -// -// Moreover, these structs should contain no pointers; pointers have instead -// been replaced with addresses, all of which are rooted at the call to -// startParse. This avoids unnecessary spilling for GC stack scanning, since -// those pointers are already findable elsewhere. -// -// Generic parser functions are homed under P1, with a parser2 argument, -// such that these functions have the following signature: -// -// func(P1, parser2) (P1, parser2) -// -// Some functions do not have the signature because they are guaranteed inline -// candidates. -// -// Note that returning no values is slower than returning the parser state: this -// is because it will force the caller to spill the parser state across the -// call. -// -// The Go register ABI means P1 and P2 occupy the following registers: -// -// x86: rax, rbx, rcx, rdi, rsi, r8, r9, r10 -// aarch64: r0, r1, r2, r3, r4, r5, r6, r7 -type P1 struct { - PtrAddr xunsafe.Addr[byte] - EndAddr xunsafe.Addr[byte] // One past the end of the stream. - - SharedPtr xunsafe.Addr[dynamic.Shared] - EndGroup tdp.Tag // End-of-group tag. -} - -// P2 is the other half of the state for the TDP parser. See [P1]. -type P2 struct { - MessageAddr xunsafe.Addr[dynamic.Message] - FieldAddr xunsafe.Addr[tdp.FieldParser] - P3Addr xunsafe.Addr[P3] - - // A Scratch register that is preserved across *most* calls. Thunks - // do not preserve the Scratch register, and some functions in this file - // do not either. - Scratch uint64 -} - -func (p1 P1) Shared() *dynamic.Shared { - return p1.SharedPtr.AssertValid() -} - -func (p1 P1) Arena() *arena.Arena { - return p1.SharedPtr.AssertValid().Arena() -} - -func (p1 P1) Src() *byte { - return p1.SharedPtr.AssertValid().Src -} - -func (p1 P1) Ptr() *byte { - // There is an exciting bug that can occur where we dereference p1.b_ - // while it points to the end of the input slice. Being able to do have - // p1.b_ equal the one-past-the-end spot is nice, but if we dereference it, - // Go may scan through this pointer, and mark the allocation it points to. - // If it happens to point to freed memory, the GC panics, because this is - // an unrecoverable constraint violation. - // - // This assert makes sure that none of our large test suite accidentally - // performs this illegal maneuver. - // - // Annoyingly this means we also need to be careful in parser1.buf(), - // because we cannot form a zero-sized slice to the end of an allocation. - debug.Assert(p1.PtrAddr < p1.EndAddr, - "p1.PtrAddr cannot point one past the end: need %v < %v", p1.PtrAddr, p1.EndAddr) - return p1.PtrAddr.AssertValid() -} - -func (p2 P2) Message() *dynamic.Message { - return p2.MessageAddr.AssertValid() -} - -func (p2 P2) Type() *tdp.TypeParser { - return p2.P3().Type.AssertValid() -} - -func (p2 P2) Field() *tdp.FieldParser { - return p2.FieldAddr.AssertValid() -} - -func (p2 P2) P3() *P3 { //nolint:funcorder - return p2.P3Addr.AssertValid() -} - -func (p1 P1) SetScratch(p2 P2, v uint64) (P1, P2) { - p1.Log(p2, "scratch", "%d:%#x", v, v) - p2.Scratch = v - return p1, p2 -} - -func (p1 P1) Len() int { - return int(p1.EndAddr - p1.PtrAddr) -} - -// Fail causes a parse failure by panicking with the given error code. -func (p1 P1) Fail(p2 P2, err tdp.ErrorCode) { - p2.P3().Err = err.ErrorAt(p1.PtrAddr.Sub(xunsafe.AddrOf(p1.Src()))) - - _ = *(*byte)(nil) // Trigger a panic without calling runtime.gopanic. Linters hate this! - for { //nolint:staticcheck // This code is unreachable. - } -} - -// Log logs debugging information during a parse. -func (p1 P1) Log(p2 P2, op, format string, args ...any) { - if !debug.Enabled { - return - } - - start := p1.PtrAddr.Sub(xunsafe.AddrOf(p1.Src())) - end := p1.EndAddr.Sub(xunsafe.AddrOf(p1.Src())) - height := p2.P3().Stack.Bottom.Sub(p2.P3().Stack.Ptr) - var b byte - if p1.PtrAddr < p1.EndAddr { - b = *p1.Ptr() - } - debug.Log( - []any{ - "%p:%p:%d %v [%d:%d] = 0x%02x", - p1.Shared(), p2.Message(), height, p1.EndGroup, start, end, b, - }, - op, format, args..., - ) -} - -// AtLeast fails the parse if there aren't at least n bytes left to parse. -// -//go:nosplit -func (p1 P1) AtLeast(p2 P2, n uint64) (P1, P2) { - if n <= uint64(p1.Len()) { - return p1, p2 - } - - p1.Fail(p2, tdp.ErrorTruncated) - return p1, p2 -} - -// Buf returns the data left to parse. -func (p1 P1) Buf() []byte { - if p1.Len() == 0 { - return nil - } - return unsafe.Slice(p1.Ptr(), p1.Len()) -} - -func (p1 P1) Advance(n int) P1 { - debug.Assert(p1.Len() >= n, "parser overflow") - - p1.PtrAddr = p1.PtrAddr.Add(n) - return p1 -} - -func (p1 P1) ByTag(p2 P2, tag2 uint64) (P1, P2, uint64) { - t := p2.Type() - p := swiss.LookupI32xU32(t.Tags, int32(tag2)) - if p == nil { - p2.FieldAddr = 0 - return p1, p2, tag2 - } - p2.FieldAddr = xunsafe.AddrOf(t.Fields().Get(int(*p))) - return p1, p2, tag2 -} - -// PushMessage pushes a new message to be parsed onto the parser stack. -// -// The length of the message should be in p2.Scratch. -// -//go:nosplit -func (p1 P1) PushMessage(p2 P2, m *dynamic.Message) (P1, P2) { - len := int(p2.Scratch) - if len == 0 { - return p1, p2 - } - - p1.Log(p2, "n", "%d", len) - - if p1.EndGroup != NotAGroup || p1.PtrAddr.Add(len) != p1.EndAddr { - // We don't need to push a new frame if the new message would cause - // the current frame to be empty once it gets popped. - p1, p2 = p1.push(p2, p1.PtrAddr.Add(len)) - } - - p1.EndGroup = NotAGroup - p2.MessageAddr = xunsafe.AddrOf(m) - - t := p2.Message().Type().Parser - p2.P3().Type = xunsafe.AddrOf(t) - if debug.Enabled { - p1, p2 = logMessage(p1, p2) - } - - p2.FieldAddr = xunsafe.AddrOf(&t.Entrypoint) - - return p1, p2 -} - -// PushMapEntry pushes a new map entry to be parsed onto the parser stack. -// -//go:nosplit -func (p1 P1) PushMapEntry(p2 P2, m *dynamic.Message) (P1, P2) { - len := int(p2.Scratch) - if len == 0 { - return p1, p2 - } - - if p1.EndGroup != NotAGroup || p1.PtrAddr.Add(len) != p1.EndAddr { - // We don't need to push a new frame if the new message would cause - // the current frame to be empty once it gets popped. - p1, p2 = p1.push(p2, p1.PtrAddr.Add(len)) - } - - p1.EndGroup = NotAGroup - p2.MessageAddr = xunsafe.AddrOf(m) - - t := p2.Message().Type().Parser.MapEntry - p2.P3().Type = xunsafe.AddrOf(t) - if debug.Enabled { - p1, p2 = logMessage(p1, p2) - } - - p2.FieldAddr = xunsafe.AddrOf(&t.Entrypoint) - - return p1, p2 -} - -// PushGroup pushes a new group to be parsed onto the parser stack. -// -//go:nosplit -func (p1 P1) PushGroup(p2 P2, m *dynamic.Message) (P1, P2) { - start := tdp.Tag(p2.Scratch) - - // Indeed, we can just +1, because we need to replace the low three - // 0b011 bits with 0b100. Much simpler than clearing and overwriting those - // bits! - end := start + 1 - - p1, p2 = p1.push(p2, p1.EndAddr) - - p1.EndGroup = end - p2.MessageAddr = xunsafe.AddrOf(m) - - t := p2.Message().Type().Parser - p2.P3().Type = xunsafe.AddrOf(t) - if debug.Enabled { - p1, p2 = logMessage(p1, p2) - } - - p2.FieldAddr = xunsafe.AddrOf(&t.Entrypoint) - - return p1, p2 -} - -// Outlined so that push() does not hit the stack size limit for nosplit. -// -//go:noinline -func logMessage(p1 P1, p2 P2) (P1, P2) { - p1.Log( - p2, "new", "%#x, %v", - p2.MessageAddr, - p2.Message().Type(), - ) - return p1, p2 -} - -func (p3 *P3) stackSlice() []Frame { - n := p3.Stack.Bottom.Sub(p3.Stack.Ptr) - return unsafe.Slice(p3.Stack.Ptr.AssertValid(), n) -} - -// push pushes a parser frame. -// -//go:nosplit -func (p1 P1) push(p2 P2, end xunsafe.Addr[byte]) (P1, P2) { - if debug.Enabled { - p1, p2 = logPush(p1, p2) - } - - if p2.P3().Stack.Ptr == p2.P3().Stack.Top { - p1.Fail(p2, tdp.ErrorRecursionDepth) - } - - p2.P3().Stack.Ptr = p2.P3().Stack.Ptr.Add(-1) - - // Note: a single frame is just too large to hit Go's SROA pass (same bug - // that results in p1/p2 being two structs). Thus, we write each field - // separately to avoid wasteful stack traffic. - frame := p2.P3().Stack.Ptr.AssertValid() - frame.End = p1.EndAddr - frame.Group = p1.EndGroup - frame.Message = p2.MessageAddr - frame.Type = p2.P3().Type - frame.Field = p2.FieldAddr - - p1.EndAddr = end - return p1, p2 -} - -// Outlined so that push() does not hit the stack size limit for nosplit. -// -//go:noinline -func logPush(p1 P1, p2 P2) (P1, P2) { - p1.Log(p2, "push", "%v/%v/%v", p2.P3().Stack.Top, p2.P3().Stack.Ptr, p2.P3().Stack.Bottom) - return p1, p2 -} - -// Pop pops a parser frame. -// -// Returns whether the last frame was popped. -// -//go:nosplit -func (p1 P1) Pop(p2 P2) (P1, P2, bool) { - if debug.Enabled { - p1.Log( - p2, "finish", "%v, ty: %p:%s %v", - p2.MessageAddr, - p2.Message().Type(), - p2.Message().Type().Descriptor.FullName(), - p2.Message().Type(), - ) - - s := &p2.P3().Stack - p1.Log(p2, "pop", "%v/%v/%v\n%s", s.Top, s.Ptr, s.Bottom, - p2.Message().Dump()) - } - - last := p2.P3().Stack.Ptr.AssertValid() - p1.EndAddr = last.End - p1.EndGroup = last.Group - p2.MessageAddr = last.Message - p2.P3().Type = last.Type - p2.FieldAddr = last.Field - p2.P3().Stack.Ptr = p2.P3().Stack.Ptr.Add(1) - - return p1, p2, p2.P3().Stack.Ptr == p2.P3().Stack.Bottom -} diff --git a/internal/tdp/vm/utf8.go b/internal/tdp/vm/internal/utf8/utf8.go similarity index 95% rename from internal/tdp/vm/utf8.go rename to internal/tdp/vm/internal/utf8/utf8.go index 97b918b..6ad8f6e 100644 --- a/internal/tdp/vm/utf8.go +++ b/internal/tdp/vm/internal/utf8/utf8.go @@ -12,24 +12,25 @@ // See the License for the specific language governing permissions and // limitations under the License. -package vm +package utf8 import ( "math/bits" "buf.build/go/hyperpb/internal/debug" "buf.build/go/hyperpb/internal/tdp" + "buf.build/go/hyperpb/internal/tdp/vm/internal/impl" "buf.build/go/hyperpb/internal/xunsafe" "buf.build/go/hyperpb/internal/xunsafe/layout" "buf.build/go/hyperpb/internal/zc" ) -// verifyUTF8 validates that the next n bytes after p1.Ptr() are valid UTF-8. +// Verify validates that the next n bytes after p1.Ptr() are valid UTF-8. // // Fails the parse if validation fails. // // //go:nosplit // TODO(#30): Enable once upstream is fixed. -func verifyUTF8(p1 P1, p2 P2, n int) (P1, P2, zc.Range) { +func Verify(p1 impl.P1, p2 impl.P2, n int) (impl.P1, impl.P2, zc.Range) { if n == 0 { return p1, p2, 0 } diff --git a/internal/tdp/vm/varint/avx.go b/internal/tdp/vm/internal/varint/avx.go similarity index 100% rename from internal/tdp/vm/varint/avx.go rename to internal/tdp/vm/internal/varint/avx.go diff --git a/internal/tdp/vm/varint/empty.s b/internal/tdp/vm/internal/varint/empty.s similarity index 100% rename from internal/tdp/vm/varint/empty.s rename to internal/tdp/vm/internal/varint/empty.s diff --git a/internal/tdp/vm/varint/no_avx.go b/internal/tdp/vm/internal/varint/no_avx.go similarity index 79% rename from internal/tdp/vm/varint/no_avx.go rename to internal/tdp/vm/internal/varint/no_avx.go index 2dd3805..1934500 100644 --- a/internal/tdp/vm/varint/no_avx.go +++ b/internal/tdp/vm/internal/varint/no_avx.go @@ -16,12 +16,12 @@ package varint -import "buf.build/go/hyperpb/internal/tdp/vm/internal/state" +import "buf.build/go/hyperpb/internal/tdp/vm/internal/impl" -func AVX32(p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) /*{ +func AVX32(p1 impl.P1, p2 impl.P2) (impl.P1, impl.P2, uint64) /*{ // Unimplemented, calling this function causes a linker error. }*/ -func AVX64(p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) /*{ +func AVX64(p1 impl.P1, p2 impl.P2) (impl.P1, impl.P2, uint64) /*{ // Unimplemented, calling this function causes a linker error. }*/ diff --git a/internal/tdp/vm/varint/split.go b/internal/tdp/vm/internal/varint/split.go similarity index 72% rename from internal/tdp/vm/varint/split.go rename to internal/tdp/vm/internal/varint/split.go index d2a72f6..349aadc 100644 --- a/internal/tdp/vm/varint/split.go +++ b/internal/tdp/vm/internal/varint/split.go @@ -14,19 +14,19 @@ package varint -import "buf.build/go/hyperpb/internal/tdp/vm/internal/state" +import "buf.build/go/hyperpb/internal/tdp/vm/internal/impl" //go:noinline -func ScalarSplit(p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) { +func ScalarSplit(p1 impl.P1, p2 impl.P2) (impl.P1, impl.P2, uint64) { return Scalar(p1, p2) } //go:noinline -func AVX32Split(p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) { +func AVX32Split(p1 impl.P1, p2 impl.P2) (impl.P1, impl.P2, uint64) { return AVX32(p1, p2) } //go:noinline -func AVX64Split(p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) { +func AVX64Split(p1 impl.P1, p2 impl.P2) (impl.P1, impl.P2, uint64) { return AVX64(p1, p2) } diff --git a/internal/tdp/vm/varint/stencils.go b/internal/tdp/vm/internal/varint/stencils.go similarity index 98% rename from internal/tdp/vm/varint/stencils.go rename to internal/tdp/vm/internal/varint/stencils.go index a12fe13..c8f83d4 100644 --- a/internal/tdp/vm/varint/stencils.go +++ b/internal/tdp/vm/internal/varint/stencils.go @@ -21,7 +21,6 @@ package varint import ( "buf.build/go/hyperpb/internal/debug" "buf.build/go/hyperpb/internal/tdp" - "buf.build/go/hyperpb/internal/tdp/vm/internal/state" "buf.build/go/hyperpb/internal/xunsafe" "buf.build/go/hyperpb/internal/xunsafe/layout" "math/bits" diff --git a/internal/tdp/vm/varint/varint.go b/internal/tdp/vm/internal/varint/varint.go similarity index 94% rename from internal/tdp/vm/varint/varint.go rename to internal/tdp/vm/internal/varint/varint.go index 9a0f8bb..483a480 100644 --- a/internal/tdp/vm/varint/varint.go +++ b/internal/tdp/vm/internal/varint/varint.go @@ -21,7 +21,7 @@ import ( "buf.build/go/hyperpb/internal/debug" "buf.build/go/hyperpb/internal/tdp" - "buf.build/go/hyperpb/internal/tdp/vm/internal/state" + "buf.build/go/hyperpb/internal/tdp/vm/internal/impl" "buf.build/go/hyperpb/internal/xsimd" ) @@ -29,7 +29,7 @@ import ( // arbitrary high bits beyond bit 31. // //go:nosplit -func Varint32(p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) { +func Varint32(p1 impl.P1, p2 impl.P2) (impl.P1, impl.P2, uint64) { switch { case xsimd.AVX(): if debug.Enabled { @@ -47,7 +47,7 @@ func Varint32(p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) { // Varint64 parses a 32-bit varint. // //go:nosplit -func Varint64(p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) { +func Varint64(p1 impl.P1, p2 impl.P2) (impl.P1, impl.P2, uint64) { switch { case xsimd.AVX(): if debug.Enabled { @@ -67,8 +67,7 @@ func Varint64(p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) { // //go:nosplit //go:noinline -func Scalar(p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) { - +func Scalar(p1 impl.P1, p2 impl.P2) (impl.P1, impl.P2, uint64) { // Inlined from protowire.ConsumeVarint to minimize spills and remove // bounds checks. var b byte diff --git a/internal/tdp/vm/memory/memory.go b/internal/tdp/vm/memory/memory.go index a876c75..7ae8a78 100644 --- a/internal/tdp/vm/memory/memory.go +++ b/internal/tdp/vm/memory/memory.go @@ -18,18 +18,18 @@ import ( "buf.build/go/hyperpb/internal/xunsafe" ) -// pageBoundary is the alignment of the smallest physical memory page on any +// PageBoundary is the alignment of the smallest physical memory page on any // system we support (4K). If we are allowed to load memory from any address in // a page, we assume that loading (and discarding) memory from anywhere else is // also ok. -const pageBoundary = 0x1000 +const PageBoundary = 0x1000 -// RelocatePageBoundary ensures that it is always possible to read nine bytes +// RelocatePageBoundary ensures that it is always possible to read extra bytes // beyond the end of data. This allows us to elide virtually all bounds checks -// in the parser, since it will only ever look ahead at most nine bytes (to +// in the parser, since it will only ever look ahead at most extra bytes (to // parse a rare ten-byte varint). // -// This function accomplishes this by checking that loading nine bytes from the +// This function accomplishes this by checking that loading extra bytes from the // end of data does not cross a 4K page boundary. If it does not, it means that // we can always load past the end a little bit, because page protection is not // more granular than that on any platform we care about. If this condition is @@ -41,16 +41,16 @@ const pageBoundary = 0x1000 // Exported for use by benchmarks. // //go:nosplit -func RelocatePageBoundary(data []byte, force bool) []byte { +func RelocatePageBoundary(data []byte, force bool, extra int) []byte { if !force { // Check if there is capacity to spare. - if cap(data)-len(data) >= 15 { + if cap(data)-len(data) >= extra { return data } // If not, we need to check if there is a page boundary beyond this // slice. - if xunsafe.EndOf(data).Padding(pageBoundary) >= 15 { + if xunsafe.EndOf(data).Padding(PageBoundary) >= extra { // All good, we have nine or more bytes ahead of us before the next // page boundary. return data diff --git a/internal/tdp/vm/message.go b/internal/tdp/vm/message.go index e3b0ede..ef64f31 100644 --- a/internal/tdp/vm/message.go +++ b/internal/tdp/vm/message.go @@ -70,7 +70,7 @@ func StoreField[T any](p1 P1, p2 P2, v T) (P1, P2) { func StoreFromScratch[T tdp.Int](p1 P1, p2 P2) (P1, P2) { var p unsafe.Pointer p1, p2, p = getUntypedMutableField(p1, p2) - *(*T)(p) = T(p2.Scratch) + *(*T)(p) = T(p2.Scratch()) return p1, p2 } diff --git a/internal/tdp/vm/run.go b/internal/tdp/vm/run.go index b18ca7d..997f226 100644 --- a/internal/tdp/vm/run.go +++ b/internal/tdp/vm/run.go @@ -26,9 +26,8 @@ import ( "buf.build/go/hyperpb/internal/debug" "buf.build/go/hyperpb/internal/tdp" "buf.build/go/hyperpb/internal/tdp/dynamic" - "buf.build/go/hyperpb/internal/tdp/vm/internal/state" - "buf.build/go/hyperpb/internal/tdp/vm/options" - "buf.build/go/hyperpb/internal/tdp/vm/varint" + "buf.build/go/hyperpb/internal/tdp/vm/internal/impl" + "buf.build/go/hyperpb/internal/tdp/vm/internal/options" "buf.build/go/hyperpb/internal/xunsafe" "buf.build/go/hyperpb/internal/zc" ) @@ -37,6 +36,12 @@ import ( // [tdp.FieldParser].Parser. type Thunk func(P1, P2) (P1, P2) +// Options is options for the vm. +type Options = options.Options + +// Defaults returns the default settings for [Options]. +func Defaults() options.Options { return options.Defaults() } + // Run is the top-level entry point for message parsing. func Run(m *dynamic.Message, data []byte, options *options.Options) (err error) { if m.Shared.Src != nil { @@ -52,25 +57,8 @@ func Run(m *dynamic.Message, data []byte, options *options.Options) (err error) return nil } - p3 := state.NewP3(data, m.Shared, options) - defer p3.Done(m.Shared, &err) - - p1 := P1{ - SharedPtr: xunsafe.AddrOf(m.Shared), - PtrAddr: xunsafe.AddrOf(m.Shared.Src), - } - p2 := P2{ - P3Addr: xunsafe.AddrOf(p3), - Scratch: uint64(m.Shared.Len), - } - - if debug.Enabled { - p1.Log(p2, "start", "%p:%d `%x`, %p:%v", - m.Shared.Src, m.Shared.Len, data, m.Type(), m.Type().Descriptor.FullName()) - } - - p1, p2 = p1.PushMessage(p2, m) - p1, p2 = p1.SetScratch(p2, 0) + p1, p2 := impl.New(data, m, options) + defer p2.P3().Done(m.Shared, &err) loop(p1, p2) if rand.Float64() < options.ProfileRate && options.Recorder != nil { @@ -88,7 +76,7 @@ func loop(p1 P1, p2 P2) { checkDone: if p1.Len() == 0 { - if p1.EndGroup != state.NotAGroup { + if p1.EndGroup != impl.NotAGroup { // If we run out of buffer while we're still p1.Fail(p2, tdp.ErrorEndGroup) } @@ -131,13 +119,13 @@ number: // Fast path: if the low sign bit is cleared, this is a one-byte tag. p1, p2 = p1.SetScratch(p2, uint64(*p1.Ptr())) - if p2.Scratch&0x80 == 0 { + if p2.Scratch()&0x80 == 0 { p1 = p1.Advance(1) t := p2.Type() lut := xunsafe.ByteAdd[byte](t, unsafe.Offsetof(t.TagLUT)) - offset := xunsafe.Load(lut, p2.Scratch) - p1.Log(p2, "small tag", "%v -> %#x", tdp.Tag(p2.Scratch), offset) + offset := xunsafe.Load(lut, p2.Scratch()) + p1.Log(p2, "small tag", "%v -> %#x", tdp.Tag(p2.Scratch()), offset) if offset != 0xff { p2.FieldAddr = xunsafe.AddrOf(t.Fields().Get(int(offset))) @@ -148,22 +136,22 @@ number: // Load up to eight bytes for the varint (at most 5 will be used). p1, p2 = p1.SetScratch(p2, xunsafe.ByteLoad[uint64](p1.Ptr(), 0)) - p1.Log(p2, "raw number", "%#x", p2.Scratch) + p1.Log(p2, "raw number", "%#x", p2.Scratch()) // Flip all of the sign bits. This essentially clears the sign bits // of all of the varint bytes except the highest one's. - p1, p2 = p1.SetScratch(p2, p2.Scratch^tdp.SignBits) + p1, p2 = p1.SetScratch(p2, p2.Scratch()^tdp.SignBits) // Determine the number of cleared sign bits. This will tell us how // many bits to mask off as "irrelevant". // // In a varint (big-endian order) like 0a8b8c8d, this will be looking // at ctz(80000000) = 31. Thus we need to mask off 64 - 31 = 33 bits. - tagBits := uint(bits.TrailingZeros64(p2.Scratch & tdp.SignBits)) + tagBits := uint(bits.TrailingZeros64(p2.Scratch() & tdp.SignBits)) // The &63 is to ensure that Go does not generate a cmov to implement // the x<<64 == 0 case. - masked = tdp.Tag(p2.Scratch &^ (^uint64(0) << (tagBits & 63))) + masked = tdp.Tag(p2.Scratch() &^ (^uint64(0) << (tagBits & 63))) // No need to strip the sign bits, the ^= above already did that. @@ -186,7 +174,7 @@ number: field: { tries := p2.P3().MaxMisses - tag := tdp.Tag(p2.Scratch) + tag := tdp.Tag(p2.Scratch()) for { p1.Log(p2, "try", "%v, %v, %v", tag, tries, p2.Field()) @@ -222,7 +210,7 @@ parseField: thunk := (*xunsafe.PC[Thunk])(&p2.Field().Parse).Get() p1.Log(p2, "call", "%v, %#x", debug.Func(thunk), p2.FieldAddr) - // NOTE: Thunks are allowed to rely on p2.Scratch still containing + // NOTE: Thunks are allowed to rely on p2.Scratch() still containing // the full field tag! p1, p2 = thunk(p1, p2) @@ -236,7 +224,7 @@ parseField: missedField: { - tag := tdp.Tag(p2.Scratch) + tag := tdp.Tag(p2.Scratch()) p1, p2 = p1.SetScratch(p2, 0) // Make sure no one relies on this being preserved. if tag == p1.EndGroup { @@ -250,7 +238,7 @@ missedField: p1.Fail(p2, tdp.ErrorOverflow) } - // Finish parsing number into a varint. + // Finish parsing number into a // This is a manual inlining of tag.decode. mask := tdp.Tag(0x7f) i := 0 @@ -291,7 +279,7 @@ missedField: } p1, p2 = p1.SetScratch(p2, uint64(p1.PtrAddr)) - p1, p2, tag2 = varint.Varint64(p1, p2) + p1, p2, tag2 = Varint64(p1, p2) if tag2 > math.MaxInt32<<3 { p1.Fail(p2, tdp.ErrorOverflow) } @@ -302,14 +290,14 @@ missedField: // we're in at this position, so we just send this to the main // parsing loop. p2.FieldAddr = p2.Type().Entrypoint.NextOk - p1.PtrAddr = xunsafe.Addr[byte](p2.Scratch) + p1.PtrAddr = xunsafe.Addr[byte](p2.Scratch()) p1.Log(p2, "goto end group", "%d", tag2) goto number } p1, p2, tag2 = p1.ByTag(p2, tag2) if p2.Field() != nil { - p1.PtrAddr = xunsafe.Addr[byte](p2.Scratch) + p1.PtrAddr = xunsafe.Addr[byte](p2.Scratch()) p1.Log(p2, "goto number", "%d", tag2) goto number } @@ -374,7 +362,7 @@ func handleUnknown(p1 P1, p2 P2, tag uint64) (P1, P2) { } func skipRecord(p1 P1, p2 P2, depth int) (P1, P2) { - tag := p2.Scratch + tag := p2.Scratch() num := protowire.Number(tag >> 3) ty := protowire.Type(tag & 0b111) p1.Log(p2, "skipping", "%d, %d", num, ty) @@ -385,7 +373,7 @@ func skipRecord(p1 P1, p2 P2, depth int) (P1, P2) { switch ty { case protowire.VarintType: - p1, p2, _ = varint.Varint64(p1, p2) + p1, p2, _ = Varint64(p1, p2) case protowire.BytesType: p1, p2, _ = Bytes(p1, p2) case protowire.Fixed32Type: @@ -401,7 +389,7 @@ func skipRecord(p1 P1, p2 P2, depth int) (P1, P2) { end := protowire.EncodeTag(num, protowire.EndGroupType) for { var raw uint64 - p1, p2, raw = varint.Varint64(p1, p2) + p1, p2, raw = Varint64(p1, p2) if raw == end { break @@ -427,7 +415,7 @@ func skipRecord(p1 P1, p2 P2, depth int) (P1, P2) { func checkLargeVarint(p1 P1, p2 P2) (P1, P2) { p1.Log(p2, "check large", "") - // This is a very large varint. We need to check the next two words. + // This is a very large We need to check the next two words. // This is a slow path, so we can afford to not be efficient. switch xunsafe.Load(p1.Ptr(), -1) { case 0x00: diff --git a/internal/tdp/vm/stencils.go b/internal/tdp/vm/stencils.go index bead3c1..9ec868a 100644 --- a/internal/tdp/vm/stencils.go +++ b/internal/tdp/vm/stencils.go @@ -24,13 +24,13 @@ func StoreFromScratch32(p1 P1, p2 P2) (P1, P2) { _ = StoreFromScratch[uint32] var p unsafe.Pointer p1, p2, p = getUntypedMutableField(p1, p2) - *(*uint32)(p) = uint32(p2.Scratch) + *(*uint32)(p) = uint32(p2.Scratch()) return p1, p2 } func StoreFromScratch64(p1 P1, p2 P2) (P1, P2) { _ = StoreFromScratch[uint64] var p unsafe.Pointer p1, p2, p = getUntypedMutableField(p1, p2) - *(*uint64)(p) = uint64(p2.Scratch) + *(*uint64)(p) = uint64(p2.Scratch()) return p1, p2 } diff --git a/internal/tdp/vm/vm.go b/internal/tdp/vm/vm.go index e8b26ef..c59760e 100644 --- a/internal/tdp/vm/vm.go +++ b/internal/tdp/vm/vm.go @@ -28,14 +28,33 @@ package vm import ( "buf.build/go/hyperpb/internal/debug" "buf.build/go/hyperpb/internal/tdp" - "buf.build/go/hyperpb/internal/tdp/vm/internal/state" - "buf.build/go/hyperpb/internal/tdp/vm/varint" + "buf.build/go/hyperpb/internal/tdp/vm/internal/impl" + "buf.build/go/hyperpb/internal/tdp/vm/internal/utf8" + "buf.build/go/hyperpb/internal/tdp/vm/internal/varint" "buf.build/go/hyperpb/internal/xunsafe" "buf.build/go/hyperpb/internal/zc" ) -type P1 = state.P1 -type P2 = state.P2 +// VM state types. +type ( + P1 = impl.P1 + P2 = impl.P2 +) + +// Varint32 parses a 64-bit varint, but will perform less work by discarding +// arbitrary high bits beyond bit 31. +// +//go:nosplit +func Varint32(p1 P1, p2 P2) (P1, P2, uint64) { + return varint.Varint32(p1, p2) +} + +// Varint64 parses a 64-bit varint. +// +//go:nosplit +func Varint64(p1 P1, p2 P2) (P1, P2, uint64) { + return varint.Varint64(p1, p2) +} // Fixed32 parses a 32-bit fixed-width integer. func Fixed32(p1 P1, p2 P2) (P1, P2, uint32) { @@ -66,7 +85,7 @@ func LengthPrefix(p1 P1, p2 P2) (P1, P2, int) { } var n uint64 - p1, p2, n = varint.Varint64(p1, p2) + p1, p2, n = Varint64(p1, p2) // Explicit inlining of atLeast(). len() is guaranteed to fit in a // uint32. @@ -97,7 +116,7 @@ func UTF8(p1 P1, p2 P2) (P1, P2, zc.Range) { return Bytes(p1, p2) } - return verifyUTF8(LengthPrefix(p1, p2)) + return utf8.Verify(LengthPrefix(p1, p2)) } // ParseMapEntry is a shim over [PushMessage] used for map entries. diff --git a/internal/testdata/testdata.go b/internal/testdata/testdata.go index 2934a4a..d6f3237 100644 --- a/internal/testdata/testdata.go +++ b/internal/testdata/testdata.go @@ -261,7 +261,7 @@ func parseTestCase(t testing.TB, path string, file []byte) *TestCase { for i := range test.Specimens { // Avoid confounding between the normal/zerocopy benchmarks by // making sure we have optimal message placement before we start. - test.Specimens[i] = memory.RelocatePageBoundary(test.Specimens[i], false) + test.Specimens[i] = memory.RelocatePageBoundary(test.Specimens[i], false, 15) } } diff --git a/message.go b/message.go index 339fafe..47599d9 100644 --- a/message.go +++ b/message.go @@ -28,7 +28,6 @@ import ( "buf.build/go/hyperpb/internal/tdp/dynamic" "buf.build/go/hyperpb/internal/tdp/empty" "buf.build/go/hyperpb/internal/tdp/vm" - vmoptions "buf.build/go/hyperpb/internal/tdp/vm/options" "buf.build/go/hyperpb/internal/xprotoreflect" "buf.build/go/hyperpb/internal/xunsafe" ) @@ -69,7 +68,7 @@ func NewMessage(ty *MessageType) *Message { // This function will return the approximate offset into data at which the // error occurred. func (m *Message) Unmarshal(data []byte, options ...UnmarshalOption) error { - opts := vmoptions.Defaults() + opts := vm.Defaults() for _, opt := range options { if opt.apply != nil { // Avoid having opt pointlessly escape to the heap. diff --git a/options.go b/options.go index f0ff672..05899bc 100644 --- a/options.go +++ b/options.go @@ -20,7 +20,7 @@ import ( "google.golang.org/protobuf/reflect/protoregistry" "buf.build/go/hyperpb/internal/tdp/compiler" - "buf.build/go/hyperpb/internal/tdp/vm/options" + "buf.build/go/hyperpb/internal/tdp/vm" ) // The below are not interfaces because of https://github.com/golang/go/issues/74356, @@ -60,7 +60,7 @@ func WithProfile(profile *Profile) CompileOption { } // UnmarshalOption is a configuration setting for [Message.Unmarshal]. -type UnmarshalOption struct{ apply func(*options.Options) } +type UnmarshalOption struct{ apply func(*vm.Options) } // WithMaxDecodeMisses sets the number of decode misses allowed in the parser before // switching to the slow path. @@ -69,14 +69,14 @@ type UnmarshalOption struct{ apply func(*options.Options) } // potential DoS vector due to quadratic worst case performance. The default // is 4. func WithMaxDecodeMisses(maxMisses int) UnmarshalOption { - return UnmarshalOption{func(opts *options.Options) { opts.MaxMisses = maxMisses }} + return UnmarshalOption{func(opts *vm.Options) { opts.MaxMisses = maxMisses }} } // WithMaxDepth sets the maximum recursion depth for the parser. // // Setting a large value enables potential DoS vectors. func WithMaxDepth(depth int) UnmarshalOption { - return UnmarshalOption{func(opts *options.Options) { opts.MaxDepth = min(depth, math.MaxUint32) }} + return UnmarshalOption{func(opts *vm.Options) { opts.MaxDepth = min(depth, math.MaxUint32) }} } // WithDiscardUnknown sets whether unknown fields should be discarded while @@ -85,13 +85,13 @@ func WithMaxDepth(depth int) UnmarshalOption { // Setting this option will break round-tripping, but will also improve parse // speeds of messages with many unknown fields. func WithDiscardUnknown(discard bool) UnmarshalOption { - return UnmarshalOption{func(opts *options.Options) { opts.DiscardUnknown = discard }} + return UnmarshalOption{func(opts *vm.Options) { opts.DiscardUnknown = discard }} } // WithAllowInvalidUTF8 sets whether UTF-8 is validated when parsing string // fields originating from non-proto2 files. func WithAllowInvalidUTF8(allow bool) UnmarshalOption { - return UnmarshalOption{func(opts *options.Options) { opts.AllowInvalidUTF8 = allow }} + return UnmarshalOption{func(opts *vm.Options) { opts.AllowInvalidUTF8 = allow }} } // WithAllowAlias sets whether aliasing the input buffer is allowed. This avoids @@ -99,7 +99,7 @@ func WithAllowInvalidUTF8(allow bool) UnmarshalOption { // // Analogous to [protoimpl.UnmarshalAliasBuffer]. func WithAllowAlias(allow bool) UnmarshalOption { - return UnmarshalOption{func(opts *options.Options) { opts.AllowAlias = allow }} + return UnmarshalOption{func(opts *vm.Options) { opts.AllowAlias = allow }} } // WithRecordProfile sets a profiler for an unmarshaling operation. Rate is a @@ -111,7 +111,7 @@ func WithAllowAlias(allow bool) UnmarshalOption { // which can be used to recompile this type to be more efficient using // [MessageType.Recompile]. func WithRecordProfile(profile *Profile, rate float64) UnmarshalOption { - return UnmarshalOption{func(opts *options.Options) { + return UnmarshalOption{func(opts *vm.Options) { if profile == nil { opts.Recorder = nil } else { From 600857c1bfb7262aaf532bcb999dca1798a41baf Mon Sep 17 00:00:00 2001 From: Miguel Young de la Sota Date: Thu, 12 Mar 2026 13:46:13 -0700 Subject: [PATCH 07/11] lint, tools file --- .golangci.yaml | 1 + Makefile | 45 +- go.mod | 6 + go.tool.mod | 302 ++++++ go.tool.sum | 1137 +++++++++++++++++++++ internal/scc/scc.go | 2 +- internal/swiss/table.go | 4 +- internal/swiss/table_bench_test.go | 2 +- internal/tdp/compiler/compile.go | 2 +- internal/tdp/compiler/linker/sym.go | 2 +- internal/tdp/dynamic/message.go | 6 +- internal/tdp/error.go | 3 +- internal/tdp/profile/recorder.go | 2 +- internal/tdp/tag.go | 6 +- internal/tdp/thunks/stencils.go | 5 +- internal/tdp/thunks/thunks.go | 2 +- internal/tdp/type.go | 2 +- internal/tdp/vm/internal/impl/impl.go | 2 +- internal/tdp/vm/internal/varint/varint.go | 2 +- internal/tdp/vm/message.go | 2 +- internal/tools/hyperdump/main.go | 8 +- internal/tools/hyperstencil/main.go | 17 +- internal/tools/hypertest/bench.go | 3 +- internal/tools/hypertest/exec.go | 6 +- internal/xsync/atomic.go | 2 +- internal/xunsafe/addr.go | 4 +- internal/xunsafe/layout/layout.go | 6 +- internal/xunsafe/untyped.go | 6 +- internal/xunsafe/vla.go | 2 +- internal/xunsafe/xunsafe.go | 2 +- internal/zc/zc.go | 2 +- 31 files changed, 1510 insertions(+), 83 deletions(-) create mode 100644 go.tool.mod create mode 100644 go.tool.sum diff --git a/.golangci.yaml b/.golangci.yaml index ab2ae46..981cf05 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -44,6 +44,7 @@ linters: - predeclared # Using predeclared names as variables is fine. - revive # Ditto. ^ + - goprintffuncname # Who cares. - lll # More trouble than it's worth. - makezero # Appending to non-empty slices is ok. - nestif # This encourages artificially breaking things up. diff --git a/Makefile b/Makefile index 4f31d08..8ab4a18 100644 --- a/Makefile +++ b/Makefile @@ -59,7 +59,11 @@ GO ?= go HOST_TARGET ?= GO_HOST := $(HOST_TARGET) $(GO) GO := $(EXEC_ENV) $(GO) -TEST := $(EXEC_ENV) $(BIN)/hypertest -o $(TESTS) $(HYPERTESTFLAGS) + +TEST := $(GO_HOST) tool hypertest -o $(TESTS) $(HYPERTESTFLAGS) +DUMP := $(GO_HOST) tool hyperdump +LINT := $(GO_HOST) tool -modfile go.tool.mod golangci-lint +BUF := $(GO_HOST) tool -modfile go.tool.mod buf TAGS ?= "" REMOTE ?= "" @@ -94,7 +98,7 @@ clean: ## Delete intermediate build artifacts git clean -Xdf .PHONY: test -test: build $(BIN)/hypertest ## Run unit tests +test: build ## Run unit tests $(TEST) -remote=$(REMOTE) -tags=$(TAGS) -checkptr -p $(PKGS) -- \ $(TESTFLAGS) @@ -114,7 +118,7 @@ profile: build $(BIN)/hypertest ## Profile benchmarks and open them in pprof .PHONY: asm asm: build ## Generate assembly output for manual inspection $(GO) test -tags=$(TAGS) -c -o hyperpb.test $(PKG) $(TESTFLAGS) - $(GO_HOST) run ./internal/tools/hyperdump \ + $(DUMP) \ -s '$(ASM_FILTER)' \ -info $(ASM_INFO) \ -prefix 'buf.build/go/hyperpb' \ @@ -132,23 +136,23 @@ show-env: ## Print the Go tool's interpreted environment. $(GO) env .PHONY: lint -lint: $(BIN)/golangci-lint ## Lint +lint: generate ## Lint $(GO_HOST) vet -unsafeptr=false ./... - $(BIN)/golangci-lint -v run \ + $(LINT) -v run \ --timeout 3m0s \ --modules-download-mode=readonly .PHONY: lintfix -lintfix: $(BIN)/golangci-lint ## Automatically fix some lint errors - $(BIN)/golangci-lint run \ +lintfix: generate ## Automatically fix some lint errors + $(LINT) run \ --timeout 3m0s \ --modules-download-mode=readonly \ --fix .PHONY: generate -generate: internal/gen/*/*.pb.go $(BIN)/license-header ## Regenerate code and licenses +generate: internal/gen/*/*.pb.go ## Regenerate code and licenses $(GO_HOST) generate ./... - $(BIN)/license-header \ + $(GO_HOST) tool -modfile go.tool.mod license-header \ --license-type apache \ --copyright-holder "Buf Technologies, Inc." \ --year-range "$(COPYRIGHT_YEARS)" \ @@ -165,23 +169,6 @@ checkgenerate: @# Used in CI to verify that `make generate` doesn't produce a diff. git --no-pager diff --exit-code >&2 -internal/gen/*/*.pb.go: $(BIN)/buf internal/proto/*/*/*.proto internal/proto/*/*/*/*.proto - $(BIN)/buf generate --clean - $(BIN)/buf generate --template buf.vt.gen.yaml - -.PHONY: $(BIN)/hypertest -$(BIN)/hypertest: generate - @mkdir -p $(@D) - $(GO_HOST) build -o $(BIN)/hypertest ./internal/tools/hypertest - -$(BIN)/buf: Makefile - @mkdir -p $(@D) - $(GO_HOST) install github.com/bufbuild/buf/cmd/buf@$(BUF_VERSION) - -$(BIN)/license-header: Makefile - @mkdir -p $(@D) - $(GO_HOST) install github.com/bufbuild/buf/private/pkg/licenseheader/cmd/license-header@$(BUF_VERSION) - -$(BIN)/golangci-lint: Makefile - @mkdir -p $(@D) - $(GO_HOST) install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(LINT_VERSION) +internal/gen/*/*.pb.go: internal/proto/*/*/*.proto internal/proto/*/*/*/*.proto + $(BUF) generate --clean + $(BUF) generate --template buf.vt.gen.yaml diff --git a/go.mod b/go.mod index 5de5994..40b1fbb 100644 --- a/go.mod +++ b/go.mod @@ -39,3 +39,9 @@ require ( google.golang.org/genproto/googleapis/api v0.0.0-20250811230008-5f3141c8851a // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250811230008-5f3141c8851a // indirect ) + +tool ( + buf.build/go/hyperpb/internal/tools/hyperdump + buf.build/go/hyperpb/internal/tools/hyperstencil + buf.build/go/hyperpb/internal/tools/hypertest +) diff --git a/go.tool.mod b/go.tool.mod new file mode 100644 index 0000000..ea978c0 --- /dev/null +++ b/go.tool.mod @@ -0,0 +1,302 @@ +module buf.build/go/hyperpb/tools + +go 1.26.1 + +tool ( + github.com/bufbuild/buf/cmd/buf + github.com/bufbuild/buf/private/pkg/licenseheader/cmd/license-header + github.com/golangci/golangci-lint/v2/cmd/golangci-lint +) + +require ( + al.essio.dev/pkg/shellescape v1.6.0 + github.com/melbahja/goph v1.4.0 + golang.org/x/crypto v0.48.0 + golang.org/x/term v0.40.0 +) + +require ( + 4d63.com/gocheckcompilerdirectives v1.3.0 // indirect + 4d63.com/gochecknoglobals v0.2.2 // indirect + buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.36.11-20250718181942-e35f9b667443.1 // indirect + buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260209202127-80ab13bee0bf.1 // indirect + buf.build/gen/go/bufbuild/registry/connectrpc/go v1.19.1-20260126144947-819582968857.2 // indirect + buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.36.11-20260126144947-819582968857.1 // indirect + buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.36.11-20241007202033-cf42259fcbfc.1 // indirect + buf.build/go/app v0.2.0 // indirect + buf.build/go/bufplugin v0.9.0 // indirect + buf.build/go/bufprivateusage v0.1.0 // indirect + buf.build/go/interrupt v1.1.0 // indirect + buf.build/go/protovalidate v1.1.3 // indirect + buf.build/go/protoyaml v0.6.0 // indirect + buf.build/go/spdx v0.2.0 // indirect + buf.build/go/standard v0.1.0 // indirect + cel.dev/expr v0.25.1 // indirect + codeberg.org/chavacava/garif v0.2.0 // indirect + codeberg.org/polyfloyd/go-errorlint v1.9.0 // indirect + connectrpc.com/connect v1.19.1 // indirect + connectrpc.com/otelconnect v0.9.0 // indirect + dev.gaijin.team/go/exhaustruct/v4 v4.0.0 // indirect + dev.gaijin.team/go/golib v0.6.0 // indirect + github.com/4meepo/tagalign v1.4.3 // indirect + github.com/Abirdcfly/dupword v0.1.7 // indirect + github.com/AdminBenni/iota-mixing v1.0.0 // indirect + github.com/AlwxSin/noinlineerr v1.0.5 // indirect + github.com/Antonboom/errname v1.1.1 // indirect + github.com/Antonboom/nilnil v1.1.1 // indirect + github.com/Antonboom/testifylint v1.6.4 // indirect + github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect + github.com/BurntSushi/toml v1.6.0 // indirect + github.com/Djarvur/go-err113 v0.1.1 // indirect + github.com/Masterminds/semver/v3 v3.4.0 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/MirrexOne/unqueryvet v1.5.4 // indirect + github.com/OpenPeeDeeP/depguard/v2 v2.2.1 // indirect + github.com/alecthomas/chroma/v2 v2.23.1 // indirect + github.com/alecthomas/go-check-sumtype v0.3.1 // indirect + github.com/alexkohler/nakedret/v2 v2.0.6 // indirect + github.com/alexkohler/prealloc v1.1.0 // indirect + github.com/alfatraining/structtag v1.0.0 // indirect + github.com/alingse/asasalint v0.0.11 // indirect + github.com/alingse/nilnesserr v0.2.0 // indirect + github.com/antlr4-go/antlr/v4 v4.13.1 // indirect + github.com/ashanbrown/forbidigo/v2 v2.3.0 // indirect + github.com/ashanbrown/makezero/v2 v2.1.0 // indirect + github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/bkielbasa/cyclop v1.2.3 // indirect + github.com/blizzy78/varnamelen v0.8.0 // indirect + github.com/bombsimon/wsl/v4 v4.7.0 // indirect + github.com/bombsimon/wsl/v5 v5.6.0 // indirect + github.com/breml/bidichk v0.3.3 // indirect + github.com/breml/errchkjson v0.4.1 // indirect + github.com/bufbuild/buf v1.66.1 // indirect + github.com/bufbuild/protocompile v0.14.2-0.20260306221011-519528254156 // indirect + github.com/bufbuild/protoplugin v0.0.0-20250218205857-750e09ce93e1 // indirect + github.com/butuzov/ireturn v0.4.0 // indirect + github.com/butuzov/mirror v1.3.0 // indirect + github.com/catenacyber/perfsprint v0.10.1 // indirect + github.com/ccojocar/zxcvbn-go v1.0.4 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/charithe/durationcheck v0.0.11 // indirect + github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect + github.com/charmbracelet/lipgloss v1.1.0 // indirect + github.com/charmbracelet/x/ansi v0.10.1 // indirect + github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd // indirect + github.com/charmbracelet/x/term v0.2.1 // indirect + github.com/ckaznocha/intrange v0.3.1 // indirect + github.com/cli/browser v1.3.0 // indirect + github.com/containerd/errdefs v1.0.0 // indirect + github.com/containerd/errdefs/pkg v0.3.0 // indirect + github.com/containerd/stargz-snapshotter/estargz v0.18.2 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect + github.com/curioswitch/go-reassign v0.3.0 // indirect + github.com/daixiang0/gci v0.13.7 // indirect + github.com/dave/dst v0.27.3 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/denis-tingaikin/go-header v0.5.0 // indirect + github.com/distribution/reference v0.6.0 // indirect + github.com/dlclark/regexp2 v1.11.5 // indirect + github.com/docker/cli v29.3.0+incompatible // indirect + github.com/docker/distribution v2.8.3+incompatible // indirect + github.com/docker/docker v28.5.2+incompatible // indirect + github.com/docker/docker-credential-helpers v0.9.5 // indirect + github.com/docker/go-connections v0.6.0 // indirect + github.com/docker/go-units v0.5.0 // indirect + github.com/ettle/strcase v0.2.0 // indirect + github.com/fatih/color v1.18.0 // indirect + github.com/fatih/structtag v1.2.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/firefart/nonamedreturns v1.0.6 // indirect + github.com/fsnotify/fsnotify v1.5.4 // indirect + github.com/fzipp/gocyclo v0.6.0 // indirect + github.com/ghostiam/protogetter v0.3.20 // indirect + github.com/go-critic/go-critic v0.14.3 // indirect + github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-toolsmith/astcast v1.1.0 // indirect + github.com/go-toolsmith/astcopy v1.1.0 // indirect + github.com/go-toolsmith/astequal v1.2.0 // indirect + github.com/go-toolsmith/astfmt v1.1.0 // indirect + github.com/go-toolsmith/astp v1.1.0 // indirect + github.com/go-toolsmith/strparse v1.1.0 // indirect + github.com/go-toolsmith/typep v1.1.0 // indirect + github.com/go-viper/mapstructure/v2 v2.5.0 // indirect + github.com/go-xmlfmt/xmlfmt v1.1.3 // indirect + github.com/gobwas/glob v0.2.3 // indirect + github.com/godoc-lint/godoc-lint v0.11.2 // indirect + github.com/gofrs/flock v0.13.0 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/golangci/asciicheck v0.5.0 // indirect + github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 // indirect + github.com/golangci/go-printf-func-name v0.1.1 // indirect + github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d // indirect + github.com/golangci/golangci-lint/v2 v2.11.3 // indirect + github.com/golangci/golines v0.15.0 // indirect + github.com/golangci/misspell v0.8.0 // indirect + github.com/golangci/plugin-module-register v0.1.2 // indirect + github.com/golangci/revgrep v0.8.0 // indirect + github.com/golangci/swaggoswag v0.0.0-20250504205917-77f2aca3143e // indirect + github.com/golangci/unconvert v0.0.0-20250410112200-a129a6e6413e // indirect + github.com/google/cel-go v0.27.0 // indirect + github.com/google/go-cmp v0.7.0 // indirect + github.com/google/go-containerregistry v0.21.2 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/gordonklaus/ineffassign v0.2.0 // indirect + github.com/gostaticanalysis/analysisutil v0.7.1 // indirect + github.com/gostaticanalysis/comment v1.5.0 // indirect + github.com/gostaticanalysis/forcetypeassert v0.2.0 // indirect + github.com/gostaticanalysis/nilerr v0.1.2 // indirect + github.com/hashicorp/go-immutable-radix/v2 v2.1.0 // indirect + github.com/hashicorp/go-version v1.8.0 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hexops/gotextdiff v1.0.3 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/jdx/go-netrc v1.0.0 // indirect + github.com/jgautheron/goconst v1.8.2 // indirect + github.com/jingyugao/rowserrcheck v1.1.1 // indirect + github.com/jjti/go-spancheck v0.6.5 // indirect + github.com/julz/importas v0.2.0 // indirect + github.com/karamaru-alpha/copyloopvar v1.2.2 // indirect + github.com/kisielk/errcheck v1.10.0 // indirect + github.com/kkHAIKE/contextcheck v1.1.6 // indirect + github.com/klauspost/compress v1.18.4 // indirect + github.com/klauspost/pgzip v1.2.6 // indirect + github.com/kr/fs v0.1.0 // indirect + github.com/kulti/thelper v0.7.1 // indirect + github.com/kunwardeep/paralleltest v1.0.15 // indirect + github.com/lasiar/canonicalheader v1.1.2 // indirect + github.com/ldez/exptostd v0.4.5 // indirect + github.com/ldez/gomoddirectives v0.8.0 // indirect + github.com/ldez/grignotin v0.10.1 // indirect + github.com/ldez/structtags v0.6.1 // indirect + github.com/ldez/tagliatelle v0.7.2 // indirect + github.com/ldez/usetesting v0.5.0 // indirect + github.com/leonklingele/grouper v1.1.2 // indirect + github.com/lucasb-eyer/go-colorful v1.2.0 // indirect + github.com/macabu/inamedparam v0.2.0 // indirect + github.com/magiconair/properties v1.8.6 // indirect + github.com/manuelarte/embeddedstructfieldcheck v0.4.0 // indirect + github.com/manuelarte/funcorder v0.5.0 // indirect + github.com/maratori/testableexamples v1.0.1 // indirect + github.com/maratori/testpackage v1.1.2 // indirect + github.com/matoous/godox v1.1.0 // indirect + github.com/mattn/go-colorable v0.1.14 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mattn/go-runewidth v0.0.16 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/mgechev/revive v1.15.0 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/moby/docker-image-spec v1.3.1 // indirect + github.com/moby/term v0.5.2 // indirect + github.com/moricho/tparallel v0.3.2 // indirect + github.com/morikuni/aec v1.1.0 // indirect + github.com/muesli/termenv v0.16.0 // indirect + github.com/nakabonne/nestif v0.3.1 // indirect + github.com/nishanths/exhaustive v0.12.0 // indirect + github.com/nishanths/predeclared v0.2.2 // indirect + github.com/nunnatsa/ginkgolinter v0.23.0 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.1.1 // indirect + github.com/pelletier/go-toml v1.9.5 // indirect + github.com/pelletier/go-toml/v2 v2.2.4 // indirect + github.com/petermattis/goid v0.0.0-20260226131333-17d1149c6ac6 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pkg/sftp v1.13.9 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.12.1 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.32.1 // indirect + github.com/prometheus/procfs v0.7.3 // indirect + github.com/quasilyte/go-ruleguard v0.4.5 // indirect + github.com/quasilyte/go-ruleguard/dsl v0.3.23 // indirect + github.com/quasilyte/gogrep v0.5.0 // indirect + github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect + github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect + github.com/quic-go/qpack v0.6.0 // indirect + github.com/quic-go/quic-go v0.59.0 // indirect + github.com/raeperd/recvcheck v0.2.0 // indirect + github.com/rivo/uniseg v0.4.7 // indirect + github.com/rogpeppe/go-internal v1.14.1 // indirect + github.com/rs/cors v1.11.1 // indirect + github.com/russross/blackfriday/v2 v2.1.0 // indirect + github.com/ryancurrah/gomodguard v1.4.1 // indirect + github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect + github.com/sanposhiho/wastedassign/v2 v2.1.0 // indirect + github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect + github.com/sashamelentyev/interfacebloat v1.1.0 // indirect + github.com/sashamelentyev/usestdlibvars v1.29.0 // indirect + github.com/securego/gosec/v2 v2.24.8-0.20260309165252-619ce2117e08 // indirect + github.com/segmentio/asm v1.2.1 // indirect + github.com/segmentio/encoding v0.5.3 // indirect + github.com/sirupsen/logrus v1.9.4 // indirect + github.com/sivchari/containedctx v1.0.3 // indirect + github.com/sonatard/noctx v0.5.0 // indirect + github.com/sourcegraph/go-diff v0.7.0 // indirect + github.com/spf13/afero v1.15.0 // indirect + github.com/spf13/cast v1.5.0 // indirect + github.com/spf13/cobra v1.10.2 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/spf13/pflag v1.0.10 // indirect + github.com/spf13/viper v1.12.0 // indirect + github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect + github.com/stbenjam/no-sprintf-host-port v0.3.1 // indirect + github.com/stretchr/objx v0.5.2 // indirect + github.com/stretchr/testify v1.11.1 // indirect + github.com/subosito/gotenv v1.4.1 // indirect + github.com/tetafro/godot v1.5.4 // indirect + github.com/tetratelabs/wazero v1.11.0 // indirect + github.com/tidwall/btree v1.8.1 // indirect + github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67 // indirect + github.com/timonwong/loggercheck v0.11.0 // indirect + github.com/tomarrell/wrapcheck/v2 v2.12.0 // indirect + github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect + github.com/ultraware/funlen v0.2.0 // indirect + github.com/ultraware/whitespace v0.2.0 // indirect + github.com/uudashr/gocognit v1.2.1 // indirect + github.com/uudashr/iface v1.4.1 // indirect + github.com/vbatts/tar-split v0.12.2 // indirect + github.com/xen0n/gosmopolitan v1.3.0 // indirect + github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect + github.com/yagipy/maintidx v1.0.0 // indirect + github.com/yeya24/promlinter v0.3.0 // indirect + github.com/ykadowak/zerologlint v0.1.5 // indirect + gitlab.com/bosi/decorder v0.4.2 // indirect + go-simpler.org/musttag v0.14.0 // indirect + go-simpler.org/sloglint v0.11.1 // indirect + go.augendre.info/arangolint v0.4.0 // indirect + go.augendre.info/fatcontext v0.9.0 // indirect + go.lsp.dev/jsonrpc2 v0.10.0 // indirect + go.lsp.dev/pkg v0.0.0-20210717090340-384b27a52fb2 // indirect + go.lsp.dev/protocol v0.12.0 // indirect + go.lsp.dev/uri v0.3.0 // indirect + go.opentelemetry.io/auto/sdk v1.2.1 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0 // indirect + go.opentelemetry.io/otel v1.42.0 // indirect + go.opentelemetry.io/otel/metric v1.42.0 // indirect + go.opentelemetry.io/otel/trace v1.42.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.1 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect + golang.org/x/exp v0.0.0-20260218203240-3dfff04db8fa // indirect + golang.org/x/exp/typeparams v0.0.0-20260209203927-2842357ff358 // indirect + golang.org/x/mod v0.33.0 // indirect + golang.org/x/net v0.51.0 // indirect + golang.org/x/sync v0.20.0 // indirect + golang.org/x/sys v0.42.0 // indirect + golang.org/x/text v0.34.0 // indirect + golang.org/x/tools v0.42.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260226221140-a57be14db171 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260226221140-a57be14db171 // indirect + google.golang.org/protobuf v1.36.11 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + honnef.co/go/tools v0.7.0 // indirect + mvdan.cc/gofumpt v0.9.2 // indirect + mvdan.cc/unparam v0.0.0-20251027182757-5beb8c8f8f15 // indirect + mvdan.cc/xurls/v2 v2.6.0 // indirect + pluginrpc.com/pluginrpc v0.5.0 // indirect +) diff --git a/go.tool.sum b/go.tool.sum new file mode 100644 index 0000000..6903548 --- /dev/null +++ b/go.tool.sum @@ -0,0 +1,1137 @@ +4d63.com/gocheckcompilerdirectives v1.3.0 h1:Ew5y5CtcAAQeTVKUVFrE7EwHMrTO6BggtEj8BZSjZ3A= +4d63.com/gocheckcompilerdirectives v1.3.0/go.mod h1:ofsJ4zx2QAuIP/NO/NAh1ig6R1Fb18/GI7RVMwz7kAY= +4d63.com/gochecknoglobals v0.2.2 h1:H1vdnwnMaZdQW/N+NrkT1SZMTBmcwHe9Vq8lJcYYTtU= +4d63.com/gochecknoglobals v0.2.2/go.mod h1:lLxwTQjL5eIesRbvnzIP3jZtG140FnTdz+AlMa+ogt0= +al.essio.dev/pkg/shellescape v1.6.0 h1:NxFcEqzFSEVCGN2yq7Huv/9hyCEGVa/TncnOOBBeXHA= +al.essio.dev/pkg/shellescape v1.6.0/go.mod h1:6sIqp7X2P6mThCQ7twERpZTuigpr6KbZWtls1U8I890= +buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.36.11-20250718181942-e35f9b667443.1 h1:zQ9C3e6FtwSZUFuKAQfpIKGFk5ZuRoGt5g35Bix55sI= +buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.36.11-20250718181942-e35f9b667443.1/go.mod h1:1Znr6gmYBhbxWUPRrrVnSLXQsz8bvFVw1HHJq2bI3VQ= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260209202127-80ab13bee0bf.1 h1:PMmTMyvHScV9Mn8wc6ASge9uRcHy0jtqPd+fM35LmsQ= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260209202127-80ab13bee0bf.1/go.mod h1:tvtbpgaVXZX4g6Pn+AnzFycuRK3MOz5HJfEGeEllXYM= +buf.build/gen/go/bufbuild/registry/connectrpc/go v1.19.1-20260126144947-819582968857.2 h1:XPrWCd9ydEo5Ofv1aNJVJaxndMXLQjRO9vVzsJG3jL8= +buf.build/gen/go/bufbuild/registry/connectrpc/go v1.19.1-20260126144947-819582968857.2/go.mod h1:mpsjeEaxOYPIJV2cz4IagLghZufRvx+NPVtInjEeoQ8= +buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.36.11-20260126144947-819582968857.1 h1:Yreby6Ypa58wdQUEm9Fnc5g8n/jP487Dq3aK5yBYwfk= +buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.36.11-20260126144947-819582968857.1/go.mod h1:1JJi9jvOqRxSMa+JxiZSm57doB+db/1WYCIa2lHfc40= +buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.36.11-20241007202033-cf42259fcbfc.1 h1:iGPvEJltOXUMANWf0zajcRcbiOXLD90ZwPUFvbcuv6Q= +buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.36.11-20241007202033-cf42259fcbfc.1/go.mod h1:nWVKKRA29zdt4uvkjka3i/y4mkrswyWwiu0TbdX0zts= +buf.build/go/app v0.2.0 h1:NYaH13A+RzPb7M5vO8uZYZ2maBZI5+MS9A9tQm66fy8= +buf.build/go/app v0.2.0/go.mod h1:0XVOYemubVbxNXVY0DnsVgWeGkcbbAvjDa1fmhBC+Wo= +buf.build/go/bufplugin v0.9.0 h1:ktZJNP3If7ldcWVqh46XKeiYJVPxHQxCfjzVQDzZ/lo= +buf.build/go/bufplugin v0.9.0/go.mod h1:Z0CxA3sKQ6EPz/Os4kJJneeRO6CjPeidtP1ABh5jPPY= +buf.build/go/bufprivateusage v0.1.0 h1:SzCoCcmzS3zyXHEXHeSQhGI7OTkgtljoknLzsUz9Gg4= +buf.build/go/bufprivateusage v0.1.0/go.mod h1:GlCCJ3VVF7EqqU0CoRmo1FzAwwaKymEWSr+ty69xU5w= +buf.build/go/hyperpb v0.1.3 h1:wiw2F7POvAe2VA2kkB0TAsFwj91lXbFrKM41D3ZgU1w= +buf.build/go/hyperpb v0.1.3/go.mod h1:IHXAM5qnS0/Fsnd7/HGDghFNvUET646WoHmq1FDZXIE= +buf.build/go/interrupt v1.1.0 h1:olBuhgv9Sav4/9pkSLoxgiOsZDgM5VhRhvRpn3DL0lE= +buf.build/go/interrupt v1.1.0/go.mod h1:ql56nXPG1oHlvZa6efNC7SKAQ/tUjS6z0mhJl0gyeRM= +buf.build/go/protovalidate v1.1.3 h1:m2GVEgQWd7rk+vIoAZ+f0ygGjvQTuqPQapBBdcpWVPE= +buf.build/go/protovalidate v1.1.3/go.mod h1:9XIuohWz+kj+9JVn3WQneHA5LZP50mjvneZMnbLkiIE= +buf.build/go/protoyaml v0.6.0 h1:Nzz1lvcXF8YgNZXk+voPPwdU8FjDPTUV4ndNTXN0n2w= +buf.build/go/protoyaml v0.6.0/go.mod h1:RgUOsBu/GYKLDSIRgQXniXbNgFlGEZnQpRAUdLAFV2Q= +buf.build/go/spdx v0.2.0 h1:IItqM0/cMxvFJJumcBuP8NrsIzMs/UYjp/6WSpq8LTw= +buf.build/go/spdx v0.2.0/go.mod h1:bXdwQFem9Si3nsbNy8aJKGPoaPi5DKwdeEp5/ArZ6w8= +buf.build/go/standard v0.1.0 h1:g98T9IyvAl0vS3Pq8iVk6Cvj2ZiFvoUJRtfyGa0120U= +buf.build/go/standard v0.1.0/go.mod h1:PiqpHz/7ZFq+kqvYhc/SK3lxFIB9N/aiH2CFC2JHIQg= +cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= +cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +codeberg.org/chavacava/garif v0.2.0 h1:F0tVjhYbuOCnvNcU3YSpO6b3Waw6Bimy4K0mM8y6MfY= +codeberg.org/chavacava/garif v0.2.0/go.mod h1:P2BPbVbT4QcvLZrORc2T29szK3xEOlnl0GiPTJmEqBQ= +codeberg.org/polyfloyd/go-errorlint v1.9.0 h1:VkdEEmA1VBpH6ecQoMR4LdphVI3fA4RrCh2an7YmodI= +codeberg.org/polyfloyd/go-errorlint v1.9.0/go.mod h1:GPRRu2LzVijNn4YkrZYJfatQIdS+TrcK8rL5Xs24qw8= +connectrpc.com/connect v1.19.1 h1:R5M57z05+90EfEvCY1b7hBxDVOUl45PrtXtAV2fOC14= +connectrpc.com/connect v1.19.1/go.mod h1:tN20fjdGlewnSFeZxLKb0xwIZ6ozc3OQs2hTXy4du9w= +connectrpc.com/otelconnect v0.9.0 h1:NggB3pzRC3pukQWaYbRHJulxuXvmCKCKkQ9hbrHAWoA= +connectrpc.com/otelconnect v0.9.0/go.mod h1:AEkVLjCPXra+ObGFCOClcJkNjS7zPaQSqvO0lCyjfZc= +dev.gaijin.team/go/exhaustruct/v4 v4.0.0 h1:873r7aNneqoBB3IaFIzhvt2RFYTuHgmMjoKfwODoI1Y= +dev.gaijin.team/go/exhaustruct/v4 v4.0.0/go.mod h1:aZ/k2o4Y05aMJtiux15x8iXaumE88YdiB0Ai4fXOzPI= +dev.gaijin.team/go/golib v0.6.0 h1:v6nnznFTs4bppib/NyU1PQxobwDHwCXXl15P7DV5Zgo= +dev.gaijin.team/go/golib v0.6.0/go.mod h1:uY1mShx8Z/aNHWDyAkZTkX+uCi5PdX7KsG1eDQa2AVE= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/4meepo/tagalign v1.4.3 h1:Bnu7jGWwbfpAie2vyl63Zup5KuRv21olsPIha53BJr8= +github.com/4meepo/tagalign v1.4.3/go.mod h1:00WwRjiuSbrRJnSVeGWPLp2epS5Q/l4UEy0apLLS37c= +github.com/Abirdcfly/dupword v0.1.7 h1:2j8sInznrje4I0CMisSL6ipEBkeJUJAmK1/lfoNGWrQ= +github.com/Abirdcfly/dupword v0.1.7/go.mod h1:K0DkBeOebJ4VyOICFdppB23Q0YMOgVafM0zYW0n9lF4= +github.com/AdminBenni/iota-mixing v1.0.0 h1:Os6lpjG2dp/AE5fYBPAA1zfa2qMdCAWwPMCgpwKq7wo= +github.com/AdminBenni/iota-mixing v1.0.0/go.mod h1:i4+tpAaB+qMVIV9OK3m4/DAynOd5bQFaOu+2AhtBCNY= +github.com/AlwxSin/noinlineerr v1.0.5 h1:RUjt63wk1AYWTXtVXbSqemlbVTb23JOSRiNsshj7TbY= +github.com/AlwxSin/noinlineerr v1.0.5/go.mod h1:+QgkkoYrMH7RHvcdxdlI7vYYEdgeoFOVjU9sUhw/rQc= +github.com/Antonboom/errname v1.1.1 h1:bllB7mlIbTVzO9jmSWVWLjxTEbGBVQ1Ff/ClQgtPw9Q= +github.com/Antonboom/errname v1.1.1/go.mod h1:gjhe24xoxXp0ScLtHzjiXp0Exi1RFLKJb0bVBtWKCWQ= +github.com/Antonboom/nilnil v1.1.1 h1:9Mdr6BYd8WHCDngQnNVV0b554xyisFioEKi30sksufQ= +github.com/Antonboom/nilnil v1.1.1/go.mod h1:yCyAmSw3doopbOWhJlVci+HuyNRuHJKIv6V2oYQa8II= +github.com/Antonboom/testifylint v1.6.4 h1:gs9fUEy+egzxkEbq9P4cpcMB6/G0DYdMeiFS87UiqmQ= +github.com/Antonboom/testifylint v1.6.4/go.mod h1:YO33FROXX2OoUfwjz8g+gUxQXio5i9qpVy7nXGbxDD4= +github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg= +github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk= +github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Djarvur/go-err113 v0.1.1 h1:eHfopDqXRwAi+YmCUas75ZE0+hoBHJ2GQNLYRSxao4g= +github.com/Djarvur/go-err113 v0.1.1/go.mod h1:IaWJdYFLg76t2ihfflPZnM1LIQszWOsFDh2hhhAVF6k= +github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= +github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/MirrexOne/unqueryvet v1.5.4 h1:38QOxShO7JmMWT+eCdDMbcUgGCOeJphVkzzRgyLJgsQ= +github.com/MirrexOne/unqueryvet v1.5.4/go.mod h1:fs9Zq6eh1LRIhsDIsxf9PONVUjYdFHdtkHIgZdJnyPU= +github.com/OpenPeeDeeP/depguard/v2 v2.2.1 h1:vckeWVESWp6Qog7UZSARNqfu/cZqvki8zsuj3piCMx4= +github.com/OpenPeeDeeP/depguard/v2 v2.2.1/go.mod h1:q4DKzC4UcVaAvcfd41CZh0PWpGgzrVxUYBlgKNGquUo= +github.com/alecthomas/chroma/v2 v2.23.1 h1:nv2AVZdTyClGbVQkIzlDm/rnhk1E9bU9nXwmZ/Vk/iY= +github.com/alecthomas/chroma/v2 v2.23.1/go.mod h1:NqVhfBR0lte5Ouh3DcthuUCTUpDC9cxBOfyMbMQPs3o= +github.com/alecthomas/go-check-sumtype v0.3.1 h1:u9aUvbGINJxLVXiFvHUlPEaD7VDULsrxJb4Aq31NLkU= +github.com/alecthomas/go-check-sumtype v0.3.1/go.mod h1:A8TSiN3UPRw3laIgWEUOHHLPa6/r9MtoigdlP5h3K/E= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/alexkohler/nakedret/v2 v2.0.6 h1:ME3Qef1/KIKr3kWX3nti3hhgNxw6aqN5pZmQiFSsuzQ= +github.com/alexkohler/nakedret/v2 v2.0.6/go.mod h1:l3RKju/IzOMQHmsEvXwkqMDzHHvurNQfAgE1eVmT40Q= +github.com/alexkohler/prealloc v1.1.0 h1:cKGRBqlXw5iyQGLYhrXrDlcHxugXpTq4tQ5c91wkf8M= +github.com/alexkohler/prealloc v1.1.0/go.mod h1:fT39Jge3bQrfA7nPMDngUfvUbQGQeJyGQnR+913SCig= +github.com/alfatraining/structtag v1.0.0 h1:2qmcUqNcCoyVJ0up879K614L9PazjBSFruTB0GOFjCc= +github.com/alfatraining/structtag v1.0.0/go.mod h1:p3Xi5SwzTi+Ryj64DqjLWz7XurHxbGsq6y3ubePJPus= +github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw= +github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I= +github.com/alingse/nilnesserr v0.2.0 h1:raLem5KG7EFVb4UIDAXgrv3N2JIaffeKNtcEXkEWd/w= +github.com/alingse/nilnesserr v0.2.0/go.mod h1:1xJPrXonEtX7wyTq8Dytns5P2hNzoWymVUIaKm4HNFg= +github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= +github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= +github.com/ashanbrown/forbidigo/v2 v2.3.0 h1:OZZDOchCgsX5gvToVtEBoV2UWbFfI6RKQTir2UZzSxo= +github.com/ashanbrown/forbidigo/v2 v2.3.0/go.mod h1:5p6VmsG5/1xx3E785W9fouMxIOkvY2rRV9nMdWadd6c= +github.com/ashanbrown/makezero/v2 v2.1.0 h1:snuKYMbqosNokUKm+R6/+vOPs8yVAi46La7Ck6QYSaE= +github.com/ashanbrown/makezero/v2 v2.1.0/go.mod h1:aEGT/9q3S8DHeE57C88z2a6xydvgx8J5hgXIGWgo0MY= +github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= +github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bkielbasa/cyclop v1.2.3 h1:faIVMIGDIANuGPWH031CZJTi2ymOQBULs9H21HSMa5w= +github.com/bkielbasa/cyclop v1.2.3/go.mod h1:kHTwA9Q0uZqOADdupvcFJQtp/ksSnytRMe8ztxG8Fuo= +github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ089M= +github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= +github.com/bombsimon/wsl/v4 v4.7.0 h1:1Ilm9JBPRczjyUs6hvOPKvd7VL1Q++PL8M0SXBDf+jQ= +github.com/bombsimon/wsl/v4 v4.7.0/go.mod h1:uV/+6BkffuzSAVYD+yGyld1AChO7/EuLrCF/8xTiapg= +github.com/bombsimon/wsl/v5 v5.6.0 h1:4z+/sBqC5vUmSp1O0mS+czxwH9+LKXtCWtHH9rZGQL8= +github.com/bombsimon/wsl/v5 v5.6.0/go.mod h1:Uqt2EfrMj2NV8UGoN1f1Y3m0NpUVCsUdrNCdet+8LvU= +github.com/breml/bidichk v0.3.3 h1:WSM67ztRusf1sMoqH6/c4OBCUlRVTKq+CbSeo0R17sE= +github.com/breml/bidichk v0.3.3/go.mod h1:ISbsut8OnjB367j5NseXEGGgO/th206dVa427kR8YTE= +github.com/breml/errchkjson v0.4.1 h1:keFSS8D7A2T0haP9kzZTi7o26r7kE3vymjZNeNDRDwg= +github.com/breml/errchkjson v0.4.1/go.mod h1:a23OvR6Qvcl7DG/Z4o0el6BRAjKnaReoPQFciAl9U3s= +github.com/bufbuild/buf v1.66.1 h1:wqmmU+6uoxB/eYDOmXq2To4qEXvOJN7gR6L9AxrPL1E= +github.com/bufbuild/buf v1.66.1/go.mod h1:Vd3ELm8IePWaDJaS9FLy94FFOnLrjLi4mDxmXtw9Xio= +github.com/bufbuild/protocompile v0.14.2-0.20260306221011-519528254156 h1:XOfIInPVufMjifwy3fli8qQVsGHWVCDVY/zp6elAOsY= +github.com/bufbuild/protocompile v0.14.2-0.20260306221011-519528254156/go.mod h1:cxhE8h+14t0Yxq2H9MV/UggzQ1L0gh0t2tJobITWsBE= +github.com/bufbuild/protoplugin v0.0.0-20250218205857-750e09ce93e1 h1:V1xulAoqLqVg44rY97xOR+mQpD2N+GzhMHVwJ030WEU= +github.com/bufbuild/protoplugin v0.0.0-20250218205857-750e09ce93e1/go.mod h1:c5D8gWRIZ2HLWO3gXYTtUfw/hbJyD8xikv2ooPxnklQ= +github.com/butuzov/ireturn v0.4.0 h1:+s76bF/PfeKEdbG8b54aCocxXmi0wvYdOVsWxVO7n8E= +github.com/butuzov/ireturn v0.4.0/go.mod h1:ghI0FrCmap8pDWZwfPisFD1vEc56VKH4NpQUxDHta70= +github.com/butuzov/mirror v1.3.0 h1:HdWCXzmwlQHdVhwvsfBb2Au0r3HyINry3bDWLYXiKoc= +github.com/butuzov/mirror v1.3.0/go.mod h1:AEij0Z8YMALaq4yQj9CPPVYOyJQyiexpQEQgihajRfI= +github.com/catenacyber/perfsprint v0.10.1 h1:u7Riei30bk46XsG8nknMhKLXG9BcXz3+3tl/WpKm0PQ= +github.com/catenacyber/perfsprint v0.10.1/go.mod h1:DJTGsi/Zufpuus6XPGJyKOTMELe347o6akPvWG9Zcsc= +github.com/ccojocar/zxcvbn-go v1.0.4 h1:FWnCIRMXPj43ukfX000kvBZvV6raSxakYr1nzyNrUcc= +github.com/ccojocar/zxcvbn-go v1.0.4/go.mod h1:3GxGX+rHmueTUMvm5ium7irpyjmm7ikxYFOSJB21Das= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/charithe/durationcheck v0.0.11 h1:g1/EX1eIiKS57NTWsYtHDZ/APfeXKhye1DidBcABctk= +github.com/charithe/durationcheck v0.0.11/go.mod h1:x5iZaixRNl8ctbM+3B2RrPG5t856TxRyVQEnbIEM2X4= +github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc h1:4pZI35227imm7yK2bGPcfpFEmuY1gc2YSTShr4iJBfs= +github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc/go.mod h1:X4/0JoqgTIPSFcRA/P6INZzIuyqdFY5rm8tb41s9okk= +github.com/charmbracelet/lipgloss v1.1.0 h1:vYXsiLHVkK7fp74RkV7b2kq9+zDLoEU4MZoFqR/noCY= +github.com/charmbracelet/lipgloss v1.1.0/go.mod h1:/6Q8FR2o+kj8rz4Dq0zQc3vYf7X+B0binUUBwA0aL30= +github.com/charmbracelet/x/ansi v0.10.1 h1:rL3Koar5XvX0pHGfovN03f5cxLbCF2YvLeyz7D2jVDQ= +github.com/charmbracelet/x/ansi v0.10.1/go.mod h1:3RQDQ6lDnROptfpWuUVIUG64bD2g2BgntdxH0Ya5TeE= +github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd h1:vy0GVL4jeHEwG5YOXDmi86oYw2yuYUGqz6a8sLwg0X8= +github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd/go.mod h1:xe0nKWGd3eJgtqZRaN9RjMtK7xUYchjzPr7q6kcvCCs= +github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ= +github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/ckaznocha/intrange v0.3.1 h1:j1onQyXvHUsPWujDH6WIjhyH26gkRt/txNlV7LspvJs= +github.com/ckaznocha/intrange v0.3.1/go.mod h1:QVepyz1AkUoFQkpEqksSYpNpUo3c5W7nWh/s6SHIJJk= +github.com/cli/browser v1.3.0 h1:LejqCrpWr+1pRqmEPDGnTZOjsMe7sehifLynZJuqJpo= +github.com/cli/browser v1.3.0/go.mod h1:HH8s+fOAxjhQoBUAsKuPCbqUuxZDhQ2/aD+SzsEfBTk= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI= +github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M= +github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE= +github.com/containerd/errdefs/pkg v0.3.0/go.mod h1:NJw6s9HwNuRhnjJhM7pylWwMyAkmCQvQ4GpJHEqRLVk= +github.com/containerd/stargz-snapshotter/estargz v0.18.2 h1:yXkZFYIzz3eoLwlTUZKz2iQ4MrckBxJjkmD16ynUTrw= +github.com/containerd/stargz-snapshotter/estargz v0.18.2/go.mod h1:XyVU5tcJ3PRpkA9XS2T5us6Eg35yM0214Y+wvrZTBrY= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/cpuguy83/go-md2man/v2 v2.0.7 h1:zbFlGlXEAKlwXpmvle3d8Oe3YnkKIK4xSRTd3sHPnBo= +github.com/cpuguy83/go-md2man/v2 v2.0.7/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/curioswitch/go-reassign v0.3.0 h1:dh3kpQHuADL3cobV/sSGETA8DOv457dwl+fbBAhrQPs= +github.com/curioswitch/go-reassign v0.3.0/go.mod h1:nApPCCTtqLJN/s8HfItCcKV0jIPwluBOvZP+dsJGA88= +github.com/daixiang0/gci v0.13.7 h1:+0bG5eK9vlI08J+J/NWGbWPTNiXPG4WhNLJOkSxWITQ= +github.com/daixiang0/gci v0.13.7/go.mod h1:812WVN6JLFY9S6Tv76twqmNqevN0pa3SX3nih0brVzQ= +github.com/dave/dst v0.27.3 h1:P1HPoMza3cMEquVf9kKy8yXsFirry4zEnWOdYPOoIzY= +github.com/dave/dst v0.27.3/go.mod h1:jHh6EOibnHgcUW3WjKHisiooEkYwqpHLBSX1iOBhEyc= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/denis-tingaikin/go-header v0.5.0 h1:SRdnP5ZKvcO9KKRP1KJrhFR3RrlGuD+42t4429eC9k8= +github.com/denis-tingaikin/go-header v0.5.0/go.mod h1:mMenU5bWrok6Wl2UsZjy+1okegmwQ3UgWl4V1D8gjlY= +github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= +github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ= +github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= +github.com/docker/cli v29.3.0+incompatible h1:z3iWveU7h19Pqx7alZES8j+IeFQZ1lhTwb2F+V9SVvk= +github.com/docker/cli v29.3.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= +github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v28.5.2+incompatible h1:DBX0Y0zAjZbSrm1uzOkdr1onVghKaftjlSWt4AFexzM= +github.com/docker/docker v28.5.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker-credential-helpers v0.9.5 h1:EFNN8DHvaiK8zVqFA2DT6BjXE0GzfLOZ38ggPTKePkY= +github.com/docker/docker-credential-helpers v0.9.5/go.mod h1:v1S+hepowrQXITkEfw6o4+BMbGot02wiKpzWhGUZK6c= +github.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94= +github.com/docker/go-connections v0.6.0/go.mod h1:AahvXYshr6JgfUJGdDCs2b5EZG/vmaMAntpSFH5BFKE= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/ettle/strcase v0.2.0 h1:fGNiVF21fHXpX1niBgk0aROov1LagYsOwV/xqKDKR/Q= +github.com/ettle/strcase v0.2.0/go.mod h1:DajmHElDSaX76ITe3/VHVyMin4LWSJN5Z909Wp+ED1A= +github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= +github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= +github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= +github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/firefart/nonamedreturns v1.0.6 h1:vmiBcKV/3EqKY3ZiPxCINmpS431OcE1S47AQUwhrg8E= +github.com/firefart/nonamedreturns v1.0.6/go.mod h1:R8NisJnSIpvPWheCq0mNRXJok6D8h7fagJTF8EMEwCo= +github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= +github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= +github.com/ghostiam/protogetter v0.3.20 h1:oW7OPFit2FxZOpmMRPP9FffU4uUpfeE/rEdE1f+MzD0= +github.com/ghostiam/protogetter v0.3.20/go.mod h1:FjIu5Yfs6FT391m+Fjp3fbAYJ6rkL/J6ySpZBfnODuI= +github.com/go-critic/go-critic v0.14.3 h1:5R1qH2iFeo4I/RJU8vTezdqs08Egi4u5p6vOESA0pog= +github.com/go-critic/go-critic v0.14.3/go.mod h1:xwntfW6SYAd7h1OqDzmN6hBX/JxsEKl5up/Y2bsxgVQ= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-toolsmith/astcast v1.1.0 h1:+JN9xZV1A+Re+95pgnMgDboWNVnIMMQXwfBwLRPgSC8= +github.com/go-toolsmith/astcast v1.1.0/go.mod h1:qdcuFWeGGS2xX5bLM/c3U9lewg7+Zu4mr+xPwZIB4ZU= +github.com/go-toolsmith/astcopy v1.1.0 h1:YGwBN0WM+ekI/6SS6+52zLDEf8Yvp3n2seZITCUBt5s= +github.com/go-toolsmith/astcopy v1.1.0/go.mod h1:hXM6gan18VA1T/daUEHCFcYiW8Ai1tIwIzHY6srfEAw= +github.com/go-toolsmith/astequal v1.0.3/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= +github.com/go-toolsmith/astequal v1.1.0/go.mod h1:sedf7VIdCL22LD8qIvv7Nn9MuWJruQA/ysswh64lffQ= +github.com/go-toolsmith/astequal v1.2.0 h1:3Fs3CYZ1k9Vo4FzFhwwewC3CHISHDnVUPC4x0bI2+Cw= +github.com/go-toolsmith/astequal v1.2.0/go.mod h1:c8NZ3+kSFtFY/8lPso4v8LuJjdJiUFVnSuU3s0qrrDY= +github.com/go-toolsmith/astfmt v1.1.0 h1:iJVPDPp6/7AaeLJEruMsBUlOYCmvg0MoCfJprsOmcco= +github.com/go-toolsmith/astfmt v1.1.0/go.mod h1:OrcLlRwu0CuiIBp/8b5PYF9ktGVZUjlNMV634mhwuQ4= +github.com/go-toolsmith/astp v1.1.0 h1:dXPuCl6u2llURjdPLLDxJeZInAeZ0/eZwFJmqZMnpQA= +github.com/go-toolsmith/astp v1.1.0/go.mod h1:0T1xFGz9hicKs8Z5MfAqSUitoUYS30pDMsRVIDHs8CA= +github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= +github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQiyP2Bvw= +github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ= +github.com/go-toolsmith/typep v1.1.0 h1:fIRYDyF+JywLfqzyhdiHzRop/GQDxxNhLGQ6gFUNHus= +github.com/go-toolsmith/typep v1.1.0/go.mod h1:fVIw+7zjdsMxDA3ITWnH1yOiw1rnTQKCsF/sk2H/qig= +github.com/go-viper/mapstructure/v2 v2.5.0 h1:vM5IJoUAy3d7zRSVtIwQgBj7BiWtMPfmPEgAXnvj1Ro= +github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-xmlfmt/xmlfmt v1.1.3 h1:t8Ey3Uy7jDSEisW2K3somuMKIpzktkWptA0iFCnRUWY= +github.com/go-xmlfmt/xmlfmt v1.1.3/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= +github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= +github.com/godoc-lint/godoc-lint v0.11.2 h1:Bp0FkJWoSdNsBikdNgIcgtaoo+xz6I/Y9s5WSBQUeeM= +github.com/godoc-lint/godoc-lint v0.11.2/go.mod h1:iVpGdL1JCikNH2gGeAn3Hh+AgN5Gx/I/cxV+91L41jo= +github.com/gofrs/flock v0.13.0 h1:95JolYOvGMqeH31+FC7D2+uULf6mG61mEZ/A8dRYMzw= +github.com/gofrs/flock v0.13.0/go.mod h1:jxeyy9R1auM5S6JYDBhDt+E2TCo7DkratH4Pgi8P+Z0= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golangci/asciicheck v0.5.0 h1:jczN/BorERZwK8oiFBOGvlGPknhvq0bjnysTj4nUfo0= +github.com/golangci/asciicheck v0.5.0/go.mod h1:5RMNAInbNFw2krqN6ibBxN/zfRFa9S6tA1nPdM0l8qQ= +github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 h1:WUvBfQL6EW/40l6OmeSBYQJNSif4O11+bmWEz+C7FYw= +github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32/go.mod h1:NUw9Zr2Sy7+HxzdjIULge71wI6yEg1lWQr7Evcu8K0E= +github.com/golangci/go-printf-func-name v0.1.1 h1:hIYTFJqAGp1iwoIfsNTpoq1xZAarogrvjO9AfiW3B4U= +github.com/golangci/go-printf-func-name v0.1.1/go.mod h1:Es64MpWEZbh0UBtTAICOZiB+miW53w/K9Or/4QogJss= +github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d h1:viFft9sS/dxoYY0aiOTsLKO2aZQAPT4nlQCsimGcSGE= +github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d/go.mod h1:ivJ9QDg0XucIkmwhzCDsqcnxxlDStoTl89jDMIoNxKY= +github.com/golangci/golangci-lint/v2 v2.11.3 h1:ySX1GtLwlwOEzcLKJifI/aIVesrcHDno+5mrro8rWes= +github.com/golangci/golangci-lint/v2 v2.11.3/go.mod h1:HmDEVZuxz77cNLumPfNNHAFyMX/b7IbA0tpmAbwiVfo= +github.com/golangci/golines v0.15.0 h1:Qnph25g8Y1c5fdo1X7GaRDGgnMHgnxh4Gk4VfPTtRx0= +github.com/golangci/golines v0.15.0/go.mod h1:AZjXd23tbHMpowhtnGlj9KCNsysj72aeZVVHnVcZx10= +github.com/golangci/misspell v0.8.0 h1:qvxQhiE2/5z+BVRo1kwYA8yGz+lOlu5Jfvtx2b04Jbg= +github.com/golangci/misspell v0.8.0/go.mod h1:WZyyI2P3hxPY2UVHs3cS8YcllAeyfquQcKfdeE9AFVg= +github.com/golangci/plugin-module-register v0.1.2 h1:e5WM6PO6NIAEcij3B053CohVp3HIYbzSuP53UAYgOpg= +github.com/golangci/plugin-module-register v0.1.2/go.mod h1:1+QGTsKBvAIvPvoY/os+G5eoqxWn70HYDm2uvUyGuVw= +github.com/golangci/revgrep v0.8.0 h1:EZBctwbVd0aMeRnNUsFogoyayvKHyxlV3CdUA46FX2s= +github.com/golangci/revgrep v0.8.0/go.mod h1:U4R/s9dlXZsg8uJmaR1GrloUr14D7qDl8gi2iPXJH8k= +github.com/golangci/swaggoswag v0.0.0-20250504205917-77f2aca3143e h1:ai0EfmVYE2bRA5htgAG9r7s3tHsfjIhN98WshBTJ9jM= +github.com/golangci/swaggoswag v0.0.0-20250504205917-77f2aca3143e/go.mod h1:Vrn4B5oR9qRwM+f54koyeH3yzphlecwERs0el27Fr/s= +github.com/golangci/unconvert v0.0.0-20250410112200-a129a6e6413e h1:gD6P7NEo7Eqtt0ssnqSJNNndxe69DOQ24A5h7+i3KpM= +github.com/golangci/unconvert v0.0.0-20250410112200-a129a6e6413e/go.mod h1:h+wZwLjUTJnm/P2rwlbJdRPZXOzaT36/FwnPnY2inzc= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/cel-go v0.27.0 h1:e7ih85+4qVrBuqQWTW4FKSqZYokVuc3HnhH5keboFTo= +github.com/google/cel-go v0.27.0/go.mod h1:tTJ11FWqnhw5KKpnWpvW9CJC3Y9GK4EIS0WXnBbebzw= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/go-containerregistry v0.21.2 h1:vYaMU4nU55JJGFC9JR/s8NZcTjbE9DBBbvusTW9NeS0= +github.com/google/go-containerregistry v0.21.2/go.mod h1:ctO5aCaewH4AK1AumSF5DPW+0+R+d2FmylMJdp5G7p0= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gordonklaus/ineffassign v0.2.0 h1:Uths4KnmwxNJNzq87fwQQDDnbNb7De00VOk9Nu0TySs= +github.com/gordonklaus/ineffassign v0.2.0/go.mod h1:TIpymnagPSexySzs7F9FnO1XFTy8IT3a59vmZp5Y9Lw= +github.com/gostaticanalysis/analysisutil v0.7.1 h1:ZMCjoue3DtDWQ5WyU16YbjbQEQ3VuzwxALrpYd+HeKk= +github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= +github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM= +github.com/gostaticanalysis/comment v1.5.0 h1:X82FLl+TswsUMpMh17srGRuKaaXprTaytmEpgnKIDu8= +github.com/gostaticanalysis/comment v1.5.0/go.mod h1:V6eb3gpCv9GNVqb6amXzEUX3jXLVK/AdA+IrAMSqvEc= +github.com/gostaticanalysis/forcetypeassert v0.2.0 h1:uSnWrrUEYDr86OCxWa4/Tp2jeYDlogZiZHzGkWFefTk= +github.com/gostaticanalysis/forcetypeassert v0.2.0/go.mod h1:M5iPavzE9pPqWyeiVXSFghQjljW1+l/Uke3PXHS6ILY= +github.com/gostaticanalysis/nilerr v0.1.2 h1:S6nk8a9N8g062nsx63kUkF6AzbHGw7zzyHMcpu52xQU= +github.com/gostaticanalysis/nilerr v0.1.2/go.mod h1:A19UHhoY3y8ahoL7YKz6sdjDtduwTSI4CsymaC2htPA= +github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= +github.com/hashicorp/go-immutable-radix/v2 v2.1.0 h1:CUW5RYIcysz+D3B+l1mDeXrQ7fUvGGCwJfdASSzbrfo= +github.com/hashicorp/go-immutable-radix/v2 v2.1.0/go.mod h1:hgdqLXA4f6NIjRVisM1TJ9aOJVNRqKZj+xDGF6m7PBw= +github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.8.0 h1:KAkNb1HAiZd1ukkxDFGmokVZe1Xy9HG6NUp+bPle2i4= +github.com/hashicorp/go-version v1.8.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jdx/go-netrc v1.0.0 h1:QbLMLyCZGj0NA8glAhxUpf1zDg6cxnWgMBbjq40W0gQ= +github.com/jdx/go-netrc v1.0.0/go.mod h1:Gh9eFQJnoTNIRHXl2j5bJXA1u84hQWJWgGh569zF3v8= +github.com/jgautheron/goconst v1.8.2 h1:y0XF7X8CikZ93fSNT6WBTb/NElBu9IjaY7CCYQrCMX4= +github.com/jgautheron/goconst v1.8.2/go.mod h1:A0oxgBCHy55NQn6sYpO7UdnA9p+h7cPtoOZUmvNIako= +github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= +github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= +github.com/jjti/go-spancheck v0.6.5 h1:lmi7pKxa37oKYIMScialXUK6hP3iY5F1gu+mLBPgYB8= +github.com/jjti/go-spancheck v0.6.5/go.mod h1:aEogkeatBrbYsyW6y5TgDfihCulDYciL1B7rG2vSsrU= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/julz/importas v0.2.0 h1:y+MJN/UdL63QbFJHws9BVC5RpA2iq0kpjrFajTGivjQ= +github.com/julz/importas v0.2.0/go.mod h1:pThlt589EnCYtMnmhmRYY/qn9lCf/frPOK+WMx3xiJY= +github.com/karamaru-alpha/copyloopvar v1.2.2 h1:yfNQvP9YaGQR7VaWLYcfZUlRP2eo2vhExWKxD/fP6q0= +github.com/karamaru-alpha/copyloopvar v1.2.2/go.mod h1:oY4rGZqZ879JkJMtX3RRkcXRkmUvH0x35ykgaKgsgJY= +github.com/kisielk/errcheck v1.10.0 h1:Lvs/YAHP24YKg08LA8oDw2z9fJVme090RAXd90S+rrw= +github.com/kisielk/errcheck v1.10.0/go.mod h1:kQxWMMVZgIkDq7U8xtG/n2juOjbLgZtedi0D+/VL/i8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kkHAIKE/contextcheck v1.1.6 h1:7HIyRcnyzxL9Lz06NGhiKvenXq7Zw6Q0UQu/ttjfJCE= +github.com/kkHAIKE/contextcheck v1.1.6/go.mod h1:3dDbMRNBFaq8HFXWC1JyvDSPm43CmE6IuHam8Wr0rkg= +github.com/klauspost/compress v1.18.4 h1:RPhnKRAQ4Fh8zU2FY/6ZFDwTVTxgJ/EMydqSTzE9a2c= +github.com/klauspost/compress v1.18.4/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4= +github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU= +github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kulti/thelper v0.7.1 h1:fI8QITAoFVLx+y+vSyuLBP+rcVIB8jKooNSCT2EiI98= +github.com/kulti/thelper v0.7.1/go.mod h1:NsMjfQEy6sd+9Kfw8kCP61W1I0nerGSYSFnGaxQkcbs= +github.com/kunwardeep/paralleltest v1.0.15 h1:ZMk4Qt306tHIgKISHWFJAO1IDQJLc6uDyJMLyncOb6w= +github.com/kunwardeep/paralleltest v1.0.15/go.mod h1:di4moFqtfz3ToSKxhNjhOZL+696QtJGCFe132CbBLGk= +github.com/lasiar/canonicalheader v1.1.2 h1:vZ5uqwvDbyJCnMhmFYimgMZnJMjwljN5VGY0VKbMXb4= +github.com/lasiar/canonicalheader v1.1.2/go.mod h1:qJCeLFS0G/QlLQ506T+Fk/fWMa2VmBUiEI2cuMK4djI= +github.com/ldez/exptostd v0.4.5 h1:kv2ZGUVI6VwRfp/+bcQ6Nbx0ghFWcGIKInkG/oFn1aQ= +github.com/ldez/exptostd v0.4.5/go.mod h1:QRjHRMXJrCTIm9WxVNH6VW7oN7KrGSht69bIRwvdFsM= +github.com/ldez/gomoddirectives v0.8.0 h1:JqIuTtgvFC2RdH1s357vrE23WJF2cpDCPFgA/TWDGpk= +github.com/ldez/gomoddirectives v0.8.0/go.mod h1:jutzamvZR4XYJLr0d5Honycp4Gy6GEg2mS9+2YX3F1Q= +github.com/ldez/grignotin v0.10.1 h1:keYi9rYsgbvqAZGI1liek5c+jv9UUjbvdj3Tbn5fn4o= +github.com/ldez/grignotin v0.10.1/go.mod h1:UlDbXFCARrXbWGNGP3S5vsysNXAPhnSuBufpTEbwOas= +github.com/ldez/structtags v0.6.1 h1:bUooFLbXx41tW8SvkfwfFkkjPYvFFs59AAMgVg6DUBk= +github.com/ldez/structtags v0.6.1/go.mod h1:YDxVSgDy/MON6ariaxLF2X09bh19qL7MtGBN5MrvbdY= +github.com/ldez/tagliatelle v0.7.2 h1:KuOlL70/fu9paxuxbeqlicJnCspCRjH0x8FW+NfgYUk= +github.com/ldez/tagliatelle v0.7.2/go.mod h1:PtGgm163ZplJfZMZ2sf5nhUT170rSuPgBimoyYtdaSI= +github.com/ldez/usetesting v0.5.0 h1:3/QtzZObBKLy1F4F8jLuKJiKBjjVFi1IavpoWbmqLwc= +github.com/ldez/usetesting v0.5.0/go.mod h1:Spnb4Qppf8JTuRgblLrEWb7IE6rDmUpGvxY3iRrzvDQ= +github.com/leonklingele/grouper v1.1.2 h1:o1ARBDLOmmasUaNDesWqWCIFH3u7hoFlM84YrjT3mIY= +github.com/leonklingele/grouper v1.1.2/go.mod h1:6D0M/HVkhs2yRKRFZUoGjeDy7EZTfFBE9gl4kjmIGkA= +github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= +github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= +github.com/macabu/inamedparam v0.2.0 h1:VyPYpOc10nkhI2qeNUdh3Zket4fcZjEWe35poddBCpE= +github.com/macabu/inamedparam v0.2.0/go.mod h1:+Pee9/YfGe5LJ62pYXqB89lJ+0k5bsR8Wgz/C0Zlq3U= +github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= +github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/manuelarte/embeddedstructfieldcheck v0.4.0 h1:3mAIyaGRtjK6EO9E73JlXLtiy7ha80b2ZVGyacxgfww= +github.com/manuelarte/embeddedstructfieldcheck v0.4.0/go.mod h1:z8dFSyXqp+fC6NLDSljRJeNQJJDWnY7RoWFzV3PC6UM= +github.com/manuelarte/funcorder v0.5.0 h1:llMuHXXbg7tD0i/LNw8vGnkDTHFpTnWqKPI85Rknc+8= +github.com/manuelarte/funcorder v0.5.0/go.mod h1:Yt3CiUQthSBMBxjShjdXMexmzpP8YGvGLjrxJNkO2hA= +github.com/maratori/testableexamples v1.0.1 h1:HfOQXs+XgfeRBJ+Wz0XfH+FHnoY9TVqL6Fcevpzy4q8= +github.com/maratori/testableexamples v1.0.1/go.mod h1:XE2F/nQs7B9N08JgyRmdGjYVGqxWwClLPCGSQhXQSrQ= +github.com/maratori/testpackage v1.1.2 h1:ffDSh+AgqluCLMXhM19f/cpvQAKygKAJXFl9aUjmbqs= +github.com/maratori/testpackage v1.1.2/go.mod h1:8F24GdVDFW5Ew43Et02jamrVMNXLUNaOynhDssITGfc= +github.com/matoous/godox v1.1.0 h1:W5mqwbyWrwZv6OQ5Z1a/DHGMOvXYCBP3+Ht7KMoJhq4= +github.com/matoous/godox v1.1.0/go.mod h1:jgE/3fUXiTurkdHOLT5WEkThTSuE7yxHv5iWPa80afs= +github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= +github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= +github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= +github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/melbahja/goph v1.4.0 h1:z0PgDbBFe66lRYl3v5dGb9aFgPy0kotuQ37QOwSQFqs= +github.com/melbahja/goph v1.4.0/go.mod h1:uG+VfK2Dlhk+O32zFrRlc3kYKTlV6+BtvPWd/kK7U68= +github.com/mgechev/revive v1.15.0 h1:vJ0HzSBzfNyPbHKolgiFjHxLek9KUijhqh42yGoqZ8Q= +github.com/mgechev/revive v1.15.0/go.mod h1:LlAKO3QQe9OJ0pVZzI2GPa8CbXGZ/9lNpCGvK4T/a8A= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ= +github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFLc= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/moricho/tparallel v0.3.2 h1:odr8aZVFA3NZrNybggMkYO3rgPRcqjeQUlBBFVxKHTI= +github.com/moricho/tparallel v0.3.2/go.mod h1:OQ+K3b4Ln3l2TZveGCywybl68glfLEwFGqvnjok8b+U= +github.com/morikuni/aec v1.1.0 h1:vBBl0pUnvi/Je71dsRrhMBtreIqNMYErSAbEeb8jrXQ= +github.com/morikuni/aec v1.1.0/go.mod h1:xDRgiq/iw5l+zkao76YTKzKttOp2cwPEne25HDkJnBw= +github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc= +github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nakabonne/nestif v0.3.1 h1:wm28nZjhQY5HyYPx+weN3Q65k6ilSBxDb8v5S81B81U= +github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= +github.com/nishanths/exhaustive v0.12.0 h1:vIY9sALmw6T/yxiASewa4TQcFsVYZQQRUQJhKRf3Swg= +github.com/nishanths/exhaustive v0.12.0/go.mod h1:mEZ95wPIZW+x8kC4TgC+9YCUgiST7ecevsVDTgc2obs= +github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= +github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= +github.com/nunnatsa/ginkgolinter v0.23.0 h1:x3o4DGYOWbBMP/VdNQKgSj+25aJKx2Pe6lHr8gBcgf8= +github.com/nunnatsa/ginkgolinter v0.23.0/go.mod h1:9qN1+0akwXEccwV1CAcCDfcoBlWXHB+ML9884pL4SZ4= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= +github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= +github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= +github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= +github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= +github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= +github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= +github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= +github.com/petermattis/goid v0.0.0-20260226131333-17d1149c6ac6 h1:rh2lKw/P/EqHa724vYH2+VVQ1YnW4u6EOXl0PMAovZE= +github.com/petermattis/goid v0.0.0-20260226131333-17d1149c6ac6/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.13.5/go.mod h1:wHDZ0IZX6JcBYRK1TH9bcVq8G7TLpVHYIGJRFnmPfxg= +github.com/pkg/sftp v1.13.9 h1:4NGkvGudBL7GteO3m6qnaQ4pC0Kvf0onSVc9gR3EWBw= +github.com/pkg/sftp v1.13.9/go.mod h1:OBN7bVXdstkFFN/gdnHPUb5TE8eb8G1Rp9wCItqjkkA= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/quasilyte/go-ruleguard v0.4.5 h1:AGY0tiOT5hJX9BTdx/xBdoCubQUAE2grkqY2lSwvZcA= +github.com/quasilyte/go-ruleguard v0.4.5/go.mod h1:Vl05zJ538vcEEwu16V/Hdu7IYZWyKSwIy4c88Ro1kRE= +github.com/quasilyte/go-ruleguard/dsl v0.3.23 h1:lxjt5B6ZCiBeeNO8/oQsegE6fLeCzuMRoVWSkXC4uvY= +github.com/quasilyte/go-ruleguard/dsl v0.3.23/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo= +github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= +github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl980XxGFEZSS6KlBGIV0diGdySzxATTWoqaU= +github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= +github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= +github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= +github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8= +github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII= +github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SAw= +github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU= +github.com/raeperd/recvcheck v0.2.0 h1:GnU+NsbiCqdC2XX5+vMZzP+jAJC5fht7rcVTAhX74UI= +github.com/raeperd/recvcheck v0.2.0/go.mod h1:n04eYkwIR0JbgD73wT8wL4JjPC3wm0nFtzBnWNocnYU= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= +github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryancurrah/gomodguard v1.4.1 h1:eWC8eUMNZ/wM/PWuZBv7JxxqT5fiIKSIyTvjb7Elr+g= +github.com/ryancurrah/gomodguard v1.4.1/go.mod h1:qnMJwV1hX9m+YJseXEBhd2s90+1Xn6x9dLz11ualI1I= +github.com/ryanrolds/sqlclosecheck v0.5.1 h1:dibWW826u0P8jNLsLN+En7+RqWWTYrjCB9fJfSfdyCU= +github.com/ryanrolds/sqlclosecheck v0.5.1/go.mod h1:2g3dUjoS6AL4huFdv6wn55WpLIDjY7ZgUR4J8HOO/XQ= +github.com/sanposhiho/wastedassign/v2 v2.1.0 h1:crurBF7fJKIORrV85u9UUpePDYGWnwvv3+A96WvwXT0= +github.com/sanposhiho/wastedassign/v2 v2.1.0/go.mod h1:+oSmSC+9bQ+VUAxA66nBb0Z7N8CK7mscKTDYC6aIek4= +github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 h1:KRzFb2m7YtdldCEkzs6KqmJw4nqEVZGK7IN2kJkjTuQ= +github.com/santhosh-tekuri/jsonschema/v6 v6.0.2/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU= +github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tMEOsumirXcOJqAw= +github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= +github.com/sashamelentyev/usestdlibvars v1.29.0 h1:8J0MoRrw4/NAXtjQqTHrbW9NN+3iMf7Knkq057v4XOQ= +github.com/sashamelentyev/usestdlibvars v1.29.0/go.mod h1:8PpnjHMk5VdeWlVb4wCdrB8PNbLqZ3wBZTZWkrpZZL8= +github.com/securego/gosec/v2 v2.24.8-0.20260309165252-619ce2117e08 h1:AoLtJX4WUtZkhhUUMFy3GgecAALp/Mb4S1iyQOA2s0U= +github.com/securego/gosec/v2 v2.24.8-0.20260309165252-619ce2117e08/go.mod h1:+XLCJiRE95ga77XInNELh2M6zQP+PdqiT9Zpm0D9Wpk= +github.com/segmentio/asm v1.2.1 h1:DTNbBqs57ioxAD4PrArqftgypG4/qNpXoJx8TVXxPR0= +github.com/segmentio/asm v1.2.1/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= +github.com/segmentio/encoding v0.5.3 h1:OjMgICtcSFuNvQCdwqMCv9Tg7lEOXGwm1J5RPQccx6w= +github.com/segmentio/encoding v0.5.3/go.mod h1:HS1ZKa3kSN32ZHVZ7ZLPLXWvOVIiZtyJnO1gPH1sKt0= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= +github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= +github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= +github.com/sivchari/containedctx v1.0.3 h1:x+etemjbsh2fB5ewm5FeLNi5bUjK0V8n0RB+Wwfd0XE= +github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4= +github.com/sonatard/noctx v0.5.0 h1:e/jdaqAsuWVOKQ0P6NWiIdDNHmHT5SwuuSfojFjzwrw= +github.com/sonatard/noctx v0.5.0/go.mod h1:64XdbzFb18XL4LporKXp8poqZtPKbCrqQ402CV+kJas= +github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0= +github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= +github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I= +github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= +github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= +github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= +github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= +github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0= +github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= +github.com/stbenjam/no-sprintf-host-port v0.3.1 h1:AyX7+dxI4IdLBPtDbsGAyqiTSLpCP9hWRrXQDU4Cm/g= +github.com/stbenjam/no-sprintf-host-port v0.3.1/go.mod h1:ODbZesTCHMVKthBHskvUUexdcNHAQRXk9NpSsL8p/HQ= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= +github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= +github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= +github.com/tetafro/godot v1.5.4 h1:u1ww+gqpRLiIA16yF2PV1CV1n/X3zhyezbNXC3E14Sg= +github.com/tetafro/godot v1.5.4/go.mod h1:eOkMrVQurDui411nBY2FA05EYH01r14LuWY/NrVDVcU= +github.com/tetratelabs/wazero v1.11.0 h1:+gKemEuKCTevU4d7ZTzlsvgd1uaToIDtlQlmNbwqYhA= +github.com/tetratelabs/wazero v1.11.0/go.mod h1:eV28rsN8Q+xwjogd7f4/Pp4xFxO7uOGbLcD/LzB1wiU= +github.com/tidwall/btree v1.8.1 h1:27ehoXvm5AG/g+1VxLS1SD3vRhp/H7LuEfwNvddEdmA= +github.com/tidwall/btree v1.8.1/go.mod h1:jBbTdUWhSZClZWoDg54VnvV7/54modSOzDN7VXftj1A= +github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67 h1:9LPGD+jzxMlnk5r6+hJnar67cgpDIz/iyD+rfl5r2Vk= +github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67/go.mod h1:mkjARE7Yr8qU23YcGMSALbIxTQ9r9QBVahQOBRfU460= +github.com/timonwong/loggercheck v0.11.0 h1:jdaMpYBl+Uq9mWPXv1r8jc5fC3gyXx4/WGwTnnNKn4M= +github.com/timonwong/loggercheck v0.11.0/go.mod h1:HEAWU8djynujaAVX7QI65Myb8qgfcZ1uKbdpg3ZzKl8= +github.com/tomarrell/wrapcheck/v2 v2.12.0 h1:H/qQ1aNWz/eeIhxKAFvkfIA+N7YDvq6TWVFL27Of9is= +github.com/tomarrell/wrapcheck/v2 v2.12.0/go.mod h1:AQhQuZd0p7b6rfW+vUwHm5OMCGgp63moQ9Qr/0BpIWo= +github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= +github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= +github.com/ultraware/funlen v0.2.0 h1:gCHmCn+d2/1SemTdYMiKLAHFYxTYz7z9VIDRaTGyLkI= +github.com/ultraware/funlen v0.2.0/go.mod h1:ZE0q4TsJ8T1SQcjmkhN/w+MceuatI6pBFSxxyteHIJA= +github.com/ultraware/whitespace v0.2.0 h1:TYowo2m9Nfj1baEQBjuHzvMRbp19i+RCcRYrSWoFa+g= +github.com/ultraware/whitespace v0.2.0/go.mod h1:XcP1RLD81eV4BW8UhQlpaR+SDc2givTvyI8a586WjW8= +github.com/uudashr/gocognit v1.2.1 h1:CSJynt5txTnORn/DkhiB4mZjwPuifyASC8/6Q0I/QS4= +github.com/uudashr/gocognit v1.2.1/go.mod h1:acaubQc6xYlXFEMb9nWX2dYBzJ/bIjEkc1zzvyIZg5Q= +github.com/uudashr/iface v1.4.1 h1:J16Xl1wyNX9ofhpHmQ9h9gk5rnv2A6lX/2+APLTo0zU= +github.com/uudashr/iface v1.4.1/go.mod h1:pbeBPlbuU2qkNDn0mmfrxP2X+wjPMIQAy+r1MBXSXtg= +github.com/vbatts/tar-split v0.12.2 h1:w/Y6tjxpeiFMR47yzZPlPj/FcPLpXbTUi/9H7d3CPa4= +github.com/vbatts/tar-split v0.12.2/go.mod h1:eF6B6i6ftWQcDqEn3/iGFRFRo8cBIMSJVOpnNdfTMFA= +github.com/xen0n/gosmopolitan v1.3.0 h1:zAZI1zefvo7gcpbCOrPSHJZJYA9ZgLfJqtKzZ5pHqQM= +github.com/xen0n/gosmopolitan v1.3.0/go.mod h1:rckfr5T6o4lBtM1ga7mLGKZmLxswUoH1zxHgNXOsEt4= +github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= +github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= +github.com/yagipy/maintidx v1.0.0 h1:h5NvIsCz+nRDapQ0exNv4aJ0yXSI0420omVANTv3GJM= +github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= +github.com/yeya24/promlinter v0.3.0 h1:JVDbMp08lVCP7Y6NP3qHroGAO6z2yGKQtS5JsjqtoFs= +github.com/yeya24/promlinter v0.3.0/go.mod h1:cDfJQQYv9uYciW60QT0eeHlFodotkYZlL+YcPQN+mW4= +github.com/ykadowak/zerologlint v0.1.5 h1:Gy/fMz1dFQN9JZTPjv1hxEk+sRWm05row04Yoolgdiw= +github.com/ykadowak/zerologlint v0.1.5/go.mod h1:KaUskqF3e/v59oPmdq1U1DnKcuHokl2/K1U4pmIELKg= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +gitlab.com/bosi/decorder v0.4.2 h1:qbQaV3zgwnBZ4zPMhGLW4KZe7A7NwxEhJx39R3shffo= +gitlab.com/bosi/decorder v0.4.2/go.mod h1:muuhHoaJkA9QLcYHq4Mj8FJUwDZ+EirSHRiaTcTf6T8= +go-simpler.org/musttag v0.14.0 h1:XGySZATqQYSEV3/YTy+iX+aofbZZllJaqwFWs+RTtSo= +go-simpler.org/musttag v0.14.0/go.mod h1:uP8EymctQjJ4Z1kUnjX0u2l60WfUdQxCwSNKzE1JEOE= +go-simpler.org/sloglint v0.11.1 h1:xRbPepLT/MHPTCA6TS/wNfZrDzkGvCCqUv4Bdwc3H7s= +go-simpler.org/sloglint v0.11.1/go.mod h1:2PowwiCOK8mjiF+0KGifVOT8ZsCNiFzvfyJeJOIt8MQ= +go.augendre.info/arangolint v0.4.0 h1:xSCZjRoS93nXazBSg5d0OGCi9APPLNMmmLrC995tR50= +go.augendre.info/arangolint v0.4.0/go.mod h1:l+f/b4plABuFISuKnTGD4RioXiCCgghv2xqst/xOvAA= +go.augendre.info/fatcontext v0.9.0 h1:Gt5jGD4Zcj8CDMVzjOJITlSb9cEch54hjRRlN3qDojE= +go.augendre.info/fatcontext v0.9.0/go.mod h1:L94brOAT1OOUNue6ph/2HnwxoNlds9aXDF2FcUntbNw= +go.lsp.dev/jsonrpc2 v0.10.0 h1:Pr/YcXJoEOTMc/b6OTmcR1DPJ3mSWl/SWiU1Cct6VmI= +go.lsp.dev/jsonrpc2 v0.10.0/go.mod h1:fmEzIdXPi/rf6d4uFcayi8HpFP1nBF99ERP1htC72Ac= +go.lsp.dev/pkg v0.0.0-20210717090340-384b27a52fb2 h1:hCzQgh6UcwbKgNSRurYWSqh8MufqRRPODRBblutn4TE= +go.lsp.dev/pkg v0.0.0-20210717090340-384b27a52fb2/go.mod h1:gtSHRuYfbCT0qnbLnovpie/WEmqyJ7T4n6VXiFMBtcw= +go.lsp.dev/protocol v0.12.0 h1:tNprUI9klQW5FAFVM4Sa+AbPFuVQByWhP1ttNUAjIWg= +go.lsp.dev/protocol v0.12.0/go.mod h1:Qb11/HgZQ72qQbeyPfJbu3hZBH23s1sr4st8czGeDMQ= +go.lsp.dev/uri v0.3.0 h1:KcZJmh6nFIBeJzTugn5JTU6OOyG0lDOo3R9KwTxTYbo= +go.lsp.dev/uri v0.3.0/go.mod h1:P5sbO1IQR+qySTWOCnhnK7phBx+W3zbLqSMDJNTw88I= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0 h1:OyrsyzuttWTSur2qN/Lm0m2a8yqyIjUVBZcxFPuXq2o= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0/go.mod h1:C2NGBr+kAB4bk3xtMXfZ94gqFDtg/GkI7e9zqGh5Beg= +go.opentelemetry.io/otel v1.42.0 h1:lSQGzTgVR3+sgJDAU/7/ZMjN9Z+vUip7leaqBKy4sho= +go.opentelemetry.io/otel v1.42.0/go.mod h1:lJNsdRMxCUIWuMlVJWzecSMuNjE7dOYyWlqOXWkdqCc= +go.opentelemetry.io/otel/metric v1.42.0 h1:2jXG+3oZLNXEPfNmnpxKDeZsFI5o4J+nz6xUlaFdF/4= +go.opentelemetry.io/otel/metric v1.42.0/go.mod h1:RlUN/7vTU7Ao/diDkEpQpnz3/92J9ko05BIwxYa2SSI= +go.opentelemetry.io/otel/trace v1.42.0 h1:OUCgIPt+mzOnaUTpOQcBiM/PLQ/Op7oq6g4LenLmOYY= +go.opentelemetry.io/otel/trace v1.42.0/go.mod h1:f3K9S+IFqnumBkKhRJMeaZeNk9epyhnCmQh/EysQCdc= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc= +go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= +golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= +golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20260218203240-3dfff04db8fa h1:Zt3DZoOFFYkKhDT3v7Lm9FDMEV06GpzjG2jrqW+QTE0= +golang.org/x/exp v0.0.0-20260218203240-3dfff04db8fa/go.mod h1:K79w1Vqn7PoiZn+TkNpx3BUWUQksGO3JcVX6qIjytmA= +golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20260209203927-2842357ff358 h1:qWFG1Dj7TBjOjOvhEOkmyGPVoquqUKnIU0lEVLp8xyk= +golang.org/x/exp/typeparams v0.0.0-20260209203927-2842357ff358/go.mod h1:4Mzdyp/6jzw9auFDJ3OMF5qksa7UvPnzKqTVGcb04ms= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= +golang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.51.0 h1:94R/GTO7mt3/4wIKpcR5gkGmRLOuE/2hNGeWq/GBIFo= +golang.org/x/net v0.51.0/go.mod h1:aamm+2QF5ogm02fjy5Bb7CQ0WMt1/WVM7FtyaTLlA9Y= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= +golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= +golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= +golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= +golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg= +golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk= +golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= +golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.42.0 h1:uNgphsn75Tdz5Ji2q36v/nsFSfR/9BRFvqhGBaJGd5k= +golang.org/x/tools v0.42.0/go.mod h1:Ma6lCIwGZvHK6XtgbswSoWroEkhugApmsXyrUmBhfr0= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto/googleapis/api v0.0.0-20260226221140-a57be14db171 h1:tu/dtnW1o3wfaxCOjSLn5IRX4YDcJrtlpzYkhHhGaC4= +google.golang.org/genproto/googleapis/api v0.0.0-20260226221140-a57be14db171/go.mod h1:M5krXqk4GhBKvB596udGL3UyjL4I1+cTbK0orROM9ng= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260226221140-a57be14db171 h1:ggcbiqK8WWh6l1dnltU4BgWGIGo+EVYxCaAPih/zQXQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260226221140-a57be14db171/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.7.0 h1:w6WUp1VbkqPEgLz4rkBzH/CSU6HkoqNLp6GstyTx3lU= +honnef.co/go/tools v0.7.0/go.mod h1:pm29oPxeP3P82ISxZDgIYeOaf9ta6Pi0EWvCFoLG2vc= +mvdan.cc/gofumpt v0.9.2 h1:zsEMWL8SVKGHNztrx6uZrXdp7AX8r421Vvp23sz7ik4= +mvdan.cc/gofumpt v0.9.2/go.mod h1:iB7Hn+ai8lPvofHd9ZFGVg2GOr8sBUw1QUWjNbmIL/s= +mvdan.cc/unparam v0.0.0-20251027182757-5beb8c8f8f15 h1:ssMzja7PDPJV8FStj7hq9IKiuiKhgz9ErWw+m68e7DI= +mvdan.cc/unparam v0.0.0-20251027182757-5beb8c8f8f15/go.mod h1:4M5MMXl2kW6fivUT6yRGpLLPNfuGtU2Z0cPvFquGDYU= +mvdan.cc/xurls/v2 v2.6.0 h1:3NTZpeTxYVWNSokW3MKeyVkz/j7uYXYiMtXRUfmjbgI= +mvdan.cc/xurls/v2 v2.6.0/go.mod h1:bCvEZ1XvdA6wDnxY7jPPjEmigDtvtvPXAD/Exa9IMSk= +pluginrpc.com/pluginrpc v0.5.0 h1:tOQj2D35hOmvHyPu8e7ohW2/QvAnEtKscy2IJYWQ2yo= +pluginrpc.com/pluginrpc v0.5.0/go.mod h1:UNWZ941hcVAoOZUn8YZsMmOZBzbUjQa3XMns8RQLp9o= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/internal/scc/scc.go b/internal/scc/scc.go index 769c15c..ee0fde5 100644 --- a/internal/scc/scc.go +++ b/internal/scc/scc.go @@ -70,7 +70,7 @@ func (d *DAG[Node]) ForNode(node Node) *Component[Node] { return &d.components[idx] } -// To range over the components some node depends on. +// Topological range over the components some node depends on. func (d *DAG[Node]) Topological() iter.Seq[*Component[Node]] { return func(yield func(*Component[Node]) bool) { for i := range d.components { diff --git a/internal/swiss/table.go b/internal/swiss/table.go index 5227600..13c907f 100644 --- a/internal/swiss/table.go +++ b/internal/swiss/table.go @@ -37,7 +37,7 @@ import ( "buf.build/go/hyperpb/internal/xunsafe" ) -//go:generate go run ../tools/hyperstencil +//go:generate go tool hyperstencil const ( minEntires = ctrlSize * 7 / 8 @@ -234,7 +234,7 @@ func (t *Table[K, V]) LookupFunc(k []byte, extract func(K) []byte) *V { return t.values().Get(idx) } -// insert returns a pointer to the slot for the given key. extract is an +// Insert returns a pointer to the slot for the given key. extract is an // optional function for extracting variable-length key material from keys // in the table. // diff --git a/internal/swiss/table_bench_test.go b/internal/swiss/table_bench_test.go index 461b49c..c36f8b8 100644 --- a/internal/swiss/table_bench_test.go +++ b/internal/swiss/table_bench_test.go @@ -37,7 +37,7 @@ const ( var benchProbes = flag.Bool("hyperpb.benchprobe", false, "if true, benchmark probe sequence length") -//go:generate go run ../tools/hyperstencil +//go:generate go tool hyperstencil func BenchmarkTable(b *testing.B) { u32Benchmark(b, uint32s{}, mapSize) diff --git a/internal/tdp/compiler/compile.go b/internal/tdp/compiler/compile.go index 730ff87..c017c12 100644 --- a/internal/tdp/compiler/compile.go +++ b/internal/tdp/compiler/compile.go @@ -37,7 +37,7 @@ import ( "buf.build/go/hyperpb/internal/xunsafe" ) -// CompileOption is a configuration setting for [Compile]. +// Options is a configuration setting for [Compile]. type Options struct { Profile profile.Profile Extensions ExtensionResolver diff --git a/internal/tdp/compiler/linker/sym.go b/internal/tdp/compiler/linker/sym.go index d7dd1bb..f610297 100644 --- a/internal/tdp/compiler/linker/sym.go +++ b/internal/tdp/compiler/linker/sym.go @@ -65,7 +65,7 @@ func (s *Sym) Push(v any) int { return s.PushBytes(align, xunsafe.AnyBytes(v)) } -// Push appends raw bytes to this symbol, ensuring that it is correctly-aligned. +// PushBytes appends raw bytes to this symbol, ensuring that it is correctly-aligned. // // Returns the offset of the pushed data. func (s *Sym) PushBytes(align int, data []byte) int { diff --git a/internal/tdp/dynamic/message.go b/internal/tdp/dynamic/message.go index 8eb2b00..8b3aa7e 100644 --- a/internal/tdp/dynamic/message.go +++ b/internal/tdp/dynamic/message.go @@ -158,7 +158,7 @@ func (m *Message) Get(fd protoreflect.FieldDescriptor) protoreflect.Value { return fd.Default() } -// GetByIndex is like [Message.Get], but it takes a raw field index, performing +// GetByIndexUnchecked is like [Message.Get], but it takes a raw field index, performing // no bounds checks. func (m *Message) GetByIndexUnchecked(n int) protoreflect.Value { return m.Type().ByIndex(n).Get(unsafe.Pointer(m)) @@ -201,7 +201,7 @@ func (m *Message) GetBit(n uint32) bool { return word&mask != 0 } -// StBit sets the value of the nth bit from this message's bitset. +// SetBit sets the value of the nth bit from this message's bitset. func (m *Message) SetBit(n uint32, flag bool) { words := xunsafe.Cast[uint32](xunsafe.Add(m, 1)) word := xunsafe.Add(words, int(n)/32) @@ -219,7 +219,7 @@ func (m *Message) Type() *tdp.Type { return m.Shared.lib.AtOffset(m.TypeOffset) } -// cold returns a pointer to the cold region, or nil if it hasn't been allocated. +// Cold returns a pointer to the cold region, or nil if it hasn't been allocated. func (m *Message) Cold() *Cold { if m.ColdIndex < 0 { return nil diff --git a/internal/tdp/error.go b/internal/tdp/error.go index 5253885..14ac92e 100644 --- a/internal/tdp/error.go +++ b/internal/tdp/error.go @@ -20,9 +20,10 @@ import ( "io" ) +// These match the errors in protowire. const ( ErrorOk ErrorCode = iota - // These match the errors in protowire. + ErrorTruncated ErrorFieldNumber ErrorOverflow diff --git a/internal/tdp/profile/recorder.go b/internal/tdp/profile/recorder.go index de59ae7..1f1c60b 100644 --- a/internal/tdp/profile/recorder.go +++ b/internal/tdp/profile/recorder.go @@ -129,7 +129,7 @@ func (r *Recorder) ForField(site Site) Field { // Dump dumps this recorder's profile. func (r *Recorder) Dump() string { - var ms []*metrics //nolint:prealloc // I literally can't!!! + var ms []*metrics for _, v := range r.profiles.All() { ms = append(ms, v) } diff --git a/internal/tdp/tag.go b/internal/tdp/tag.go index 4a28d79..5b374f5 100644 --- a/internal/tdp/tag.go +++ b/internal/tdp/tag.go @@ -30,7 +30,7 @@ import ( // message, but with the high bit of each byte cleared. type Tag uint64 -// encode encodes this field tag from the given number and type. +// EncodeTag encodes this field tag from the given number and type. func EncodeTag(n protowire.Number, t protowire.Type) Tag { var tag Tag protowire.AppendTag(xunsafe.Bytes(&tag)[:0], n, t) @@ -76,8 +76,8 @@ func (t Tag) Format(s fmt.State, verb rune) { debug.Fprintf("%#x:%d:%d", uint64(t), n, ty).Format(s, verb) } -// Returns whether this tag is "too large", i.e., if it has more than 32 bits -// when decoded. +// Overflows returns whether this tag is "too large", i.e., if it has more than +// 32 bits when decoded. func (t Tag) Overflows() bool { return bits.LeadingZeros64(uint64(t)) < (64 - 32 - 4) } diff --git a/internal/tdp/thunks/stencils.go b/internal/tdp/thunks/stencils.go index ce51ca1..695c89e 100644 --- a/internal/tdp/thunks/stencils.go +++ b/internal/tdp/thunks/stencils.go @@ -17,9 +17,6 @@ package thunks import ( - "math/bits" - "unsafe" - "buf.build/go/hyperpb/internal/arena/slice" "buf.build/go/hyperpb/internal/debug" "buf.build/go/hyperpb/internal/swiss" @@ -31,6 +28,8 @@ import ( "buf.build/go/hyperpb/internal/xunsafe/layout" "buf.build/go/hyperpb/internal/zigzag" "google.golang.org/protobuf/encoding/protowire" + "math/bits" + "unsafe" ) func parseMapV32xV32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { diff --git a/internal/tdp/thunks/thunks.go b/internal/tdp/thunks/thunks.go index 35e4511..928f8ab 100644 --- a/internal/tdp/thunks/thunks.go +++ b/internal/tdp/thunks/thunks.go @@ -25,7 +25,7 @@ import ( "buf.build/go/hyperpb/internal/tdp/vm" ) -//go:generate go run ../../tools/hyperstencil +//go:generate go tool hyperstencil // Custom field kinds used by archetype selection; they're all negative. const ( diff --git a/internal/tdp/type.go b/internal/tdp/type.go index 99f056d..0baba05 100644 --- a/internal/tdp/type.go +++ b/internal/tdp/type.go @@ -54,7 +54,7 @@ type Type struct { // aforementioned field table. } -// byIndex returns the nth byIndex (in byIndex number order) for this type. +// ByIndex returns the nth byIndex (in byIndex number order) for this type. // // If n == 0 and this type has no fields, returns a byIndex with an invalid byIndex number. // diff --git a/internal/tdp/vm/internal/impl/impl.go b/internal/tdp/vm/internal/impl/impl.go index 57ffc01..a611cb0 100644 --- a/internal/tdp/vm/internal/impl/impl.go +++ b/internal/tdp/vm/internal/impl/impl.go @@ -148,7 +148,7 @@ func (p2 P2) Scratch() uint64 { return p2.scratch } -// Scratch sets the scratch register. +// SetScratch sets the scratch register. // // The caller is responsible for spilling this value if necessary. func (p1 P1) SetScratch(p2 P2, v uint64) (P1, P2) { diff --git a/internal/tdp/vm/internal/varint/varint.go b/internal/tdp/vm/internal/varint/varint.go index 483a480..033e08f 100644 --- a/internal/tdp/vm/internal/varint/varint.go +++ b/internal/tdp/vm/internal/varint/varint.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:generate go run buf.build/go/hyperpb/internal/tools/hyperstencil +//go:generate go tool hyperstencil package varint diff --git a/internal/tdp/vm/message.go b/internal/tdp/vm/message.go index ef64f31..520a1be 100644 --- a/internal/tdp/vm/message.go +++ b/internal/tdp/vm/message.go @@ -23,7 +23,7 @@ import ( "buf.build/go/hyperpb/internal/xunsafe" ) -//go:generate go run ../../tools/hyperstencil +//go:generate go tool hyperstencil // This file contains inlined or modified versions of functions from // package [dynamic], since Go cannot seem to inline them, resulting in diff --git a/internal/tools/hyperdump/main.go b/internal/tools/hyperdump/main.go index f39b2fc..d9548f2 100644 --- a/internal/tools/hyperdump/main.go +++ b/internal/tools/hyperdump/main.go @@ -133,7 +133,7 @@ func parseDump(data string) (fns []Func, err error) { return arg } - for _, line := range strings.Split(data, "\n") { + for line := range strings.SplitSeq(data, "\n") { if line == "" { continue } @@ -323,11 +323,9 @@ func run(binary string) error { // Annotate each function with jump labels. wg := new(sync.WaitGroup) for i := range fns { - wg.Add(1) - go func() { - defer wg.Done() + wg.Go(func() { generateLabels(&fns[i]) - }() + }) } wg.Wait() diff --git a/internal/tools/hyperstencil/main.go b/internal/tools/hyperstencil/main.go index 9f3dcb9..7d985f1 100644 --- a/internal/tools/hyperstencil/main.go +++ b/internal/tools/hyperstencil/main.go @@ -25,6 +25,8 @@ // // Generated functions are placed in a file called _stencils.go. All files in // a package are processed in one go. +// +//nolint:gosec package main import ( @@ -330,7 +332,7 @@ func run() error { } } - var files []string //nolint:prealloc + var files []string var newer bool for _, dirent := range dir { if dirent.Type().IsDir() || @@ -378,9 +380,7 @@ func run() error { // Stenciling isn't super fast; parallelizing it helps a lot. outs := make([]output, len(files)) for i, path := range files { - wg.Add(1) - go func() { - defer wg.Done() + wg.Go(func() { file, err := parser.ParseFile(fset, path, nil, parser.ParseComments|parser.SkipObjectResolution) if err != nil { ch <- fmt.Errorf("%s:%w", path, err) @@ -467,10 +467,7 @@ func run() error { } for i, dir := range directives { - wg.Add(1) - go func() { - defer wg.Done() - + wg.Go(func() { // Start by finding a func in file with this name. generic := funcs[dir.Source] stencil, err := makeStencil(dir, generic, &out.bases, &attrs) @@ -481,9 +478,9 @@ func run() error { // Finally, append stencil to the output file. out.decls[i] = stencil - }() + }) } - }() + }) } wg.Wait() diff --git a/internal/tools/hypertest/bench.go b/internal/tools/hypertest/bench.go index aed9aa5..022b42f 100644 --- a/internal/tools/hypertest/bench.go +++ b/internal/tools/hypertest/bench.go @@ -74,7 +74,7 @@ func parseBenchmarkOutput(stdout string) *benchReport { var prev string subtests := map[string]int{} - for _, line := range strings.Split(stdout, "\n") { + for line := range strings.SplitSeq(stdout, "\n") { if !strings.HasPrefix(line, "Benchmark") { continue } @@ -234,6 +234,7 @@ func parseBenchmarkOutput(stdout string) *benchReport { return r } +//nolint:prealloc func (r *benchReport) toCSV(w io.Writer) error { subtests := map[string]int{} for i, s := range r.subtests { diff --git a/internal/tools/hypertest/exec.go b/internal/tools/hypertest/exec.go index fee7cf4..f1df155 100644 --- a/internal/tools/hypertest/exec.go +++ b/internal/tools/hypertest/exec.go @@ -215,9 +215,7 @@ func (r *runner) runOverSSH(remote string, tests []test) (string, error) { wg := new(sync.WaitGroup) syncErr := new(atomic.Pointer[error]) for _, test := range tests { - wg.Add(1) - go func() { - defer wg.Done() + wg.Go(func() { var err error { fmt.Printf("uploading %s...\n", test.binary(r, "")) @@ -265,7 +263,7 @@ func (r *runner) runOverSSH(remote string, tests []test) (string, error) { panic("got spurious nil error") } syncErr.CompareAndSwap(nil, &err) - }() + }) } wg.Wait() if err := syncErr.Load(); err != nil { diff --git a/internal/xsync/atomic.go b/internal/xsync/atomic.go index 693ca49..269c432 100644 --- a/internal/xsync/atomic.go +++ b/internal/xsync/atomic.go @@ -38,7 +38,7 @@ func (x *AtomicFloat64) Swap(val float64) (old float64) { return math.Float64frombits((*atomic.Uint64)(x).Swap(math.Float64bits(val))) } -// Swap atomically stores the given float64 if x currently holds a float with +// BitwiseCompareAndSwap atomically stores the given float64 if x currently holds a float with // the same bit-pattern as val. // // That is to say, this does *not* perform a floating-point comparison! diff --git a/internal/xunsafe/addr.go b/internal/xunsafe/addr.go index 207f6b0..91c0871 100644 --- a/internal/xunsafe/addr.go +++ b/internal/xunsafe/addr.go @@ -64,7 +64,7 @@ func (a Addr[T]) ByteAdd(n int) Addr[T] { return a + Addr[T](n) } -// Add adds the given offset to this address. +// Sub returns the offset between two addresses. func (a Addr[T]) Sub(b Addr[T]) int { return int(a-b) / layout.Size[T]() } @@ -75,7 +75,7 @@ func (a Addr[T]) Padding(align int) int { return layout.Padding(int(a), align) } -// RoundUp rounds this address upwards to align, which must be a power of two. +// RoundUpTo rounds this address upwards to align, which must be a power of two. func (a Addr[T]) RoundUpTo(align int) Addr[T] { return Addr[T](layout.RoundUp(uintptr(a), uintptr(align))) } diff --git a/internal/xunsafe/layout/layout.go b/internal/xunsafe/layout/layout.go index 56cf6ef..ac23911 100644 --- a/internal/xunsafe/layout/layout.go +++ b/internal/xunsafe/layout/layout.go @@ -34,12 +34,12 @@ func Size[T any]() int { return int(unsafe.Sizeof(z)) } -// Size returns T's size in bits. +// Bits returns T's size in bits. func Bits[T any]() int { return Size[T]() * 8 } -// Size returns T's alignment in bytes. +// Align returns T's alignment in bytes. func Align[T any]() int { var z T return int(unsafe.Alignof(z)) @@ -66,7 +66,7 @@ func RoundDown[T Int](v, align T) T { return v &^ (align - 1) } -// RoundDown rounds v up to a power of two. +// RoundUp rounds v up to a power of two. func RoundUp[T Int](v, align T) T { return (v + align - 1) &^ (align - 1) } diff --git a/internal/xunsafe/untyped.go b/internal/xunsafe/untyped.go index fa36cf0..6a3a7b6 100644 --- a/internal/xunsafe/untyped.go +++ b/internal/xunsafe/untyped.go @@ -31,10 +31,10 @@ import "unsafe" // //go:nocheckptr func ByteAdd[T any, P ~*E, E any, I Int](p P, n I) *T { - return (*T)(unsafe.Pointer(uintptr(unsafe.Pointer(p)) + uintptr(n))) + return (*T)(unsafe.Add(unsafe.Pointer(p), n)) } -// Sub computes the difference between two pointers, without scaling. +// ByteSub computes the difference between two pointers, without scaling. func ByteSub[P1 ~*E1, P2 ~*E2, E1, E2 any](p1 P1, p2 P2) int { return int(uintptr(unsafe.Pointer(p1)) - uintptr(unsafe.Pointer(p2))) } @@ -44,7 +44,7 @@ func ByteLoad[T any, P ~*E, E any, I Int](p P, n I) T { return *ByteAdd[T](p, n) } -// ByteLoad stores a value of the given type at the given byte offset. +// ByteStore stores a value of the given type at the given byte offset. func ByteStore[T any, P ~*E, E any, I Int](p P, n I, v T) { *ByteAdd[T](p, n) = v } diff --git a/internal/xunsafe/vla.go b/internal/xunsafe/vla.go index acf0808..9c53ddd 100644 --- a/internal/xunsafe/vla.go +++ b/internal/xunsafe/vla.go @@ -48,7 +48,7 @@ func (a *VLA[T]) Get(n int) *T { return Add(Cast[T](a), n) } -// Get returns a pointer to the element of this array at the given byte offset. +// ByteGet returns a pointer to the element of this array at the given byte offset. func (a *VLA[T]) ByteGet(n int) *T { return ByteAdd[T](a, n) } diff --git a/internal/xunsafe/xunsafe.go b/internal/xunsafe/xunsafe.go index 21662f2..d8434c7 100644 --- a/internal/xunsafe/xunsafe.go +++ b/internal/xunsafe/xunsafe.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package unsafe provides a more convenient interface for performing unsafe +// Package xunsafe provides a more convenient interface for performing unsafe // operations than Go's built-in package unsafe. package xunsafe diff --git a/internal/zc/zc.go b/internal/zc/zc.go index 55d90d4..e6298a2 100644 --- a/internal/zc/zc.go +++ b/internal/zc/zc.go @@ -89,7 +89,7 @@ type ExtractFrom struct { Src *byte } -// ExtractBytes returns a func that calls [Range.Bytes]. +// Bytes is a func that calls [Range.Bytes]. // // This exists to work around inlining failure in certain places in the parser. func (e ExtractFrom) Bytes(raw uint64) []byte { From 9b5871ba7e9835734e47e75df3ac8a310babff37 Mon Sep 17 00:00:00 2001 From: Miguel Young de la Sota Date: Thu, 12 Mar 2026 13:47:50 -0700 Subject: [PATCH 08/11] delete the simd stuff --- internal/debug/debug.go | 5 - internal/tdp/vm/internal/varint/avx.go | 256 -------------------- internal/tdp/vm/internal/varint/empty.s | 1 - internal/tdp/vm/internal/varint/no_avx.go | 27 --- internal/tdp/vm/internal/varint/split.go | 10 - internal/tdp/vm/internal/varint/stencils.go | 181 -------------- internal/tdp/vm/internal/varint/varint.go | 31 +-- internal/xsimd/avx_dynamic.go | 21 -- internal/xsimd/avx_none.go | 19 -- internal/xsimd/avx_static.go | 19 -- internal/xsimd/format.go | 56 ----- 11 files changed, 6 insertions(+), 620 deletions(-) delete mode 100644 internal/tdp/vm/internal/varint/avx.go delete mode 100644 internal/tdp/vm/internal/varint/empty.s delete mode 100644 internal/tdp/vm/internal/varint/no_avx.go delete mode 100644 internal/tdp/vm/internal/varint/stencils.go delete mode 100644 internal/xsimd/avx_dynamic.go delete mode 100644 internal/xsimd/avx_none.go delete mode 100644 internal/xsimd/avx_static.go delete mode 100644 internal/xsimd/format.go diff --git a/internal/debug/debug.go b/internal/debug/debug.go index d0932cf..72aa2a3 100644 --- a/internal/debug/debug.go +++ b/internal/debug/debug.go @@ -27,7 +27,6 @@ import ( "strings" "buf.build/go/hyperpb/internal/xflag" - "buf.build/go/hyperpb/internal/xsimd" "github.com/timandy/routine" ) @@ -67,10 +66,6 @@ again: file = filepath.Base(file) - for i := range args { - args[i] = xsimd.Format(args[i]) - } - buf := new(strings.Builder) _, _ = fmt.Fprintf(buf, "%s/%s:%d [g%04d", pkg, file, line, routine.Goid()) diff --git a/internal/tdp/vm/internal/varint/avx.go b/internal/tdp/vm/internal/varint/avx.go deleted file mode 100644 index d7b6646..0000000 --- a/internal/tdp/vm/internal/varint/avx.go +++ /dev/null @@ -1,256 +0,0 @@ -// Copyright 2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package varintsimd provides a SIMD-accelerated protobuf varint decoder -// using Go 1.26's simd/archsimd package (GOEXPERIMENT=simd). -// -// This is a port of the approach used in Google's protobuf C++ implementation -// (varint_shuffle.h), which uses SSSE3 PSHUFB to strip continuation bits from -// varint-encoded bytes and pack the 7-bit payloads into a 64-bit integer. -// -// The algorithm: -// 1. Load 16 bytes from the input buffer into an XMM register. -// 2. Detect the varint boundary by finding the first byte without the MSB set. -// 3. Use a precomputed PSHUFB shuffle mask (indexed by the continuation-bit pattern) -// to strip each byte's MSB and pack the 7-bit groups into a contiguous 64-bit value. -// 4. Return the decoded uint64 and the number of bytes consumed. - -//go:build amd64 - -package varint - -import ( - "math/bits" - "runtime" - "simd/archsimd" - - "buf.build/go/hyperpb/internal/debug" - "buf.build/go/hyperpb/internal/tdp" - "buf.build/go/hyperpb/internal/tdp/vm/internal/state" - "buf.build/go/hyperpb/internal/xunsafe" - "buf.build/go/hyperpb/internal/xunsafe/layout" -) - -var ( - signBits128 = archsimd.BroadcastUint8x16(0x7f) - - // And truncMasks[i] with a vector to zero all lanes i or greater, and all - // sign bits. - truncMasks = func() [17]archsimd.Uint8x16 { - var mask archsimd.Uint8x16 - var masks [17]archsimd.Uint8x16 - for i := range masks { - if i < 16 { - mask = mask.SetElem(uint8(i), 0xff) - } - masks[i] = mask.And(signBits128) - } - - return masks - }() - - mulShift = makeU16x8(func(i uint16) uint16 { return 1 << (8 - i) }) - - shuffles = [...]archsimd.Int8x16{ - makeI8x16(func(i int8) int8 { - if i < 7 { - return i*2 + 1 - } - return -1 - }), - makeI8x16(func(i int8) int8 { - if i < 7 { - return i*2 + 2 - } - return -1 - }), - makeI8x16(func(i int8) int8 { - if i == 7 { - return 1 - } - return -1 - }), - makeI8x16(func(i int8) int8 { - if i == 7 { - return 2 - } - return -1 - }), - } - - rotate8Shuffle = makeI8x16(func(u int8) int8 { return (u + 8) % 16 }) -) - -func makeI8x16(f func(int8) int8) archsimd.Int8x16 { - var v archsimd.Int8x16 - for i := range int8(16) { - v = v.SetElem(uint8(i), f(i)) - } - return v -} - -func makeU16x8(f func(uint16) uint16) archsimd.Uint16x8 { - var v archsimd.Uint16x8 - for i := range uint16(8) { - v = v.SetElem(uint8(i), f(i)) - } - return v -} - -func split8to16(v archsimd.Uint8x16) (lo, hi archsimd.Uint16x8) { - lo = v.ExtendLo8ToUint16() - hi = v.PermuteOrZero(rotate8Shuffle).ExtendLo8ToUint16() - return lo, hi -} - -//hyperpb:stencil AVX32 AVX[uint32] -//hyperpb:stencil AVX64 AVX[uint64] - -// AVX is an AVX-accelerated varint parsing function. -// -//go:nosplit -func AVX[T uint32 | uint64](p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) { - long := layout.Size[T]() == 8 - - start := p1.PtrAddr - var x uint64 - - { - // Callers often have an inlined fast-path. - if p1.Len() < 16 { - return ScalarSplit(p1, p2) - } - - data := archsimd.LoadUint8x16(xunsafe.Cast[[16]uint8](p1.Ptr())) - p1.Log(p2, "varint-avx", "data: %b", data) - - // Find all of the continuation bytes. ToBits produces pmovmskb which is - // what we want, although we have to do a redundant comparison here... - signs := archsimd.Mask8x16(data.AsInt8x16()).ToBits() - - n := bits.TrailingZeros16(^signs) - len := bits.TrailingZeros16(^signs) + 1 - - // Discard extra bytes and the sign bits. - data = data.And(truncMasks[n]) - p1.Log(p2, "varint-avx", "len: %d, trunc: %b", len, data) - - var lo, hi archsimd.Uint16x8 - if long { - lo, hi = split8to16(data) - } else { - lo = data.ExtendLo8ToUint16() - } - p1.Log(p2, "varint-avx", "lo: %b, hi: %b", lo, hi) - - // lo and hi are now of the following form (highest bytes irrelevant, big - // endian u16s). - // - // 00000000 0aaaaaaa 00000000 0bbbbbbb 00000000 0ccccccc 00000000 0ddddddd - // 00000000 0eeeeeee 00000000 0fffffff 00000000 0ggggggg 00000000 0hhhhhhh - // - // 00000000 0iiiiiii 00000000 0jjjjjjj xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx - // xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx - // - // We want to get them into this form, which we can then shuffle into - // something we can or together. - // - // 00000000 0aaaaaaa b0000000 00bbbbbb cc000000 000ccccc ddd00000 0000dddd - // eeee0000 00000eee fffff000 000000ff gggggg00 0000000g hhhhhhh0 00000000 - // - // 00000000 0iiiiiii j0000000 00jjjjjj xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx - // xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx - // - // To convert 00000000 0bbbbbbb -> b0000000 00bbbbbb, we can left shift by - // 7 and then swap the bytes, then 6 bits, and so on. This can be realized - // as a multiply plus a shuffle. - // - // However, we want to overlay alternating bytes, like so: - // - // 0aaaaaaa 00bbbbbb 000ccccc 0000dddd fffff000 gggggg00 hhhhhhh0 00000000 - // 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 - // - // b0000000 cc000000 ddd00000 eeee0000 00000eee 000000ff 0000000g 00000000 - // 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 - // - // 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0iiiiiii - // 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 - // - // 00000000 00000000 00000000 00000000 00000000 00000000 00000000 j0000000 - // 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 - // - // If we or all four vectors together, we get our desired result. - // - // The shuffle masks need to incorporate the byte shift, so this - // is what we have after the multiplies: - // - // 0aaaaaaa 00000000 00bbbbbb b0000000 000ccccc cc000000 0000dddd ddd00000 - // 00000eee eeee0000 000000ff fffff000 0000000g gggggg00 00000000 hhhhhhh0 - // - // 0iiiiiii 00000000 00jjjjjj j0000000 xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx - // xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx - // - // The shuffles are straightforward from this, remembering that the above - // is big-endian. - - lo = lo.Mul(mulShift) - if long { - hi = hi.Mul(mulShift) - } - p1.Log(p2, "varint-avx", "lo: %b, hi: %b", lo, hi) - - // TODO: we can replace two of these the below vmovdqus with a - // a vpbroadcastb of 1 and vpsubb of the resulting vector, reducing - // memory traffic. - - shuf0 := lo.AsUint8x16().PermuteOrZero(shuffles[0]) - shuf1 := lo.AsUint8x16().PermuteOrZero(shuffles[1]) - p1.Log(p2, "varint-avx", "0: %b, 1: %b", shuf0, shuf1) - or := shuf0.Or(shuf1) - - if long { - shuf2 := hi.AsUint8x16().PermuteOrZero(shuffles[2]) - shuf3 := hi.AsUint8x16().PermuteOrZero(shuffles[3]) - p1.Log(p2, "varint-avx", "2: %b, 3: %b", shuf2, shuf3) - or = or.Or(shuf2).Or(shuf3) - } - - p1.Log(p2, "varint-avx", "or: %b", or) - x = or.AsUint64x2().GetElem(0) - p1.Log(p2, "varint-avx", "out: %d, %b", x, x) - - // Now, some cleanup. We have overflow conditions in the following cases: - // - // 1. len == 10 and data[9] is greater than 1. - // 2. len > 10. - if len >= 10 && (len > 10 || data.GetElem(9) > 1) { - goto fail - } - - p1.PtrAddr = p1.PtrAddr.Add(len) - } - - if debug.Enabled { - len := int(p1.PtrAddr - start) // For debug only. - p1.Log(p2, "varint-avx", "%d:%#x (%d bytes)", x, x, len) - runtime.GC() // This checks for the above crash bug. - } - - return p1, p2, x - -fail: - p1.Fail(p2, tdp.ErrorTruncated) - for { - } -} diff --git a/internal/tdp/vm/internal/varint/empty.s b/internal/tdp/vm/internal/varint/empty.s deleted file mode 100644 index bd78273..0000000 --- a/internal/tdp/vm/internal/varint/empty.s +++ /dev/null @@ -1 +0,0 @@ -// For allowing function declarations. \ No newline at end of file diff --git a/internal/tdp/vm/internal/varint/no_avx.go b/internal/tdp/vm/internal/varint/no_avx.go deleted file mode 100644 index 1934500..0000000 --- a/internal/tdp/vm/internal/varint/no_avx.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build !amd64 - -package varint - -import "buf.build/go/hyperpb/internal/tdp/vm/internal/impl" - -func AVX32(p1 impl.P1, p2 impl.P2) (impl.P1, impl.P2, uint64) /*{ - // Unimplemented, calling this function causes a linker error. -}*/ - -func AVX64(p1 impl.P1, p2 impl.P2) (impl.P1, impl.P2, uint64) /*{ - // Unimplemented, calling this function causes a linker error. -}*/ diff --git a/internal/tdp/vm/internal/varint/split.go b/internal/tdp/vm/internal/varint/split.go index 349aadc..cac6379 100644 --- a/internal/tdp/vm/internal/varint/split.go +++ b/internal/tdp/vm/internal/varint/split.go @@ -20,13 +20,3 @@ import "buf.build/go/hyperpb/internal/tdp/vm/internal/impl" func ScalarSplit(p1 impl.P1, p2 impl.P2) (impl.P1, impl.P2, uint64) { return Scalar(p1, p2) } - -//go:noinline -func AVX32Split(p1 impl.P1, p2 impl.P2) (impl.P1, impl.P2, uint64) { - return AVX32(p1, p2) -} - -//go:noinline -func AVX64Split(p1 impl.P1, p2 impl.P2) (impl.P1, impl.P2, uint64) { - return AVX64(p1, p2) -} diff --git a/internal/tdp/vm/internal/varint/stencils.go b/internal/tdp/vm/internal/varint/stencils.go deleted file mode 100644 index c8f83d4..0000000 --- a/internal/tdp/vm/internal/varint/stencils.go +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright 2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by buf.build/go/hyperpb/internal/tools/hyperstencil. DO NOT EDIT. - -//go:build amd64 - -package varint - -import ( - "buf.build/go/hyperpb/internal/debug" - "buf.build/go/hyperpb/internal/tdp" - "buf.build/go/hyperpb/internal/xunsafe" - "buf.build/go/hyperpb/internal/xunsafe/layout" - "math/bits" - "runtime" - "simd/archsimd" -) - -//go:nosplit -func AVX32(p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) { - _ = AVX[uint32] - long := layout.Size[uint32]() == 8 - - start := p1.PtrAddr - var x uint64 - - { - - if p1.Len() < 16 { - return ScalarSplit(p1, p2) - } - - data := archsimd.LoadUint8x16(xunsafe.Cast[[16]uint8](p1.Ptr())) - p1.Log(p2, "varint-avx", "data: %b", data) - - signs := archsimd.Mask8x16(data.AsInt8x16()).ToBits() - - n := bits.TrailingZeros16(^signs) - len := bits.TrailingZeros16(^signs) + 1 - - data = data.And(truncMasks[n]) - p1.Log(p2, "varint-avx", "len: %d, trunc: %b", len, data) - - var lo, hi archsimd.Uint16x8 - if long { - lo, hi = split8to16(data) - } else { - lo = data.ExtendLo8ToUint16() - } - p1.Log(p2, "varint-avx", "lo: %b, hi: %b", lo, hi) - - lo = lo.Mul(mulShift) - if long { - hi = hi.Mul(mulShift) - } - p1.Log(p2, "varint-avx", "lo: %b, hi: %b", lo, hi) - - shuf0 := lo.AsUint8x16().PermuteOrZero(shuffles[0]) - shuf1 := lo.AsUint8x16().PermuteOrZero(shuffles[1]) - p1.Log(p2, "varint-avx", "0: %b, 1: %b", shuf0, shuf1) - or := shuf0.Or(shuf1) - - if long { - shuf2 := hi.AsUint8x16().PermuteOrZero(shuffles[2]) - shuf3 := hi.AsUint8x16().PermuteOrZero(shuffles[3]) - p1.Log(p2, "varint-avx", "2: %b, 3: %b", shuf2, shuf3) - or = or.Or(shuf2).Or(shuf3) - } - - p1.Log(p2, "varint-avx", "or: %b", or) - x = or.AsUint64x2().GetElem(0) - p1.Log(p2, "varint-avx", "out: %d, %b", x, x) - - if len >= 10 && (len > 10 || data.GetElem(9) > 1) { - goto fail - } - - p1.PtrAddr = p1.PtrAddr.Add(len) - } - - if debug.Enabled { - len := int(p1.PtrAddr - start) - p1.Log(p2, "varint-avx", "%d:%#x (%d bytes)", x, x, len) - runtime.GC() - } - - return p1, p2, x - -fail: - p1.Fail(p2, tdp.ErrorTruncated) - for { - } -} - -//go:nosplit -func AVX64(p1 state.P1, p2 state.P2) (state.P1, state.P2, uint64) { - _ = AVX[uint64] - long := layout.Size[uint64]() == 8 - - start := p1.PtrAddr - var x uint64 - - { - - if p1.Len() < 16 { - return ScalarSplit(p1, p2) - } - - data := archsimd.LoadUint8x16(xunsafe.Cast[[16]uint8](p1.Ptr())) - p1.Log(p2, "varint-avx", "data: %b", data) - - signs := archsimd.Mask8x16(data.AsInt8x16()).ToBits() - - n := bits.TrailingZeros16(^signs) - len := bits.TrailingZeros16(^signs) + 1 - - data = data.And(truncMasks[n]) - p1.Log(p2, "varint-avx", "len: %d, trunc: %b", len, data) - - var lo, hi archsimd.Uint16x8 - if long { - lo, hi = split8to16(data) - } else { - lo = data.ExtendLo8ToUint16() - } - p1.Log(p2, "varint-avx", "lo: %b, hi: %b", lo, hi) - - lo = lo.Mul(mulShift) - if long { - hi = hi.Mul(mulShift) - } - p1.Log(p2, "varint-avx", "lo: %b, hi: %b", lo, hi) - - shuf0 := lo.AsUint8x16().PermuteOrZero(shuffles[0]) - shuf1 := lo.AsUint8x16().PermuteOrZero(shuffles[1]) - p1.Log(p2, "varint-avx", "0: %b, 1: %b", shuf0, shuf1) - or := shuf0.Or(shuf1) - - if long { - shuf2 := hi.AsUint8x16().PermuteOrZero(shuffles[2]) - shuf3 := hi.AsUint8x16().PermuteOrZero(shuffles[3]) - p1.Log(p2, "varint-avx", "2: %b, 3: %b", shuf2, shuf3) - or = or.Or(shuf2).Or(shuf3) - } - - p1.Log(p2, "varint-avx", "or: %b", or) - x = or.AsUint64x2().GetElem(0) - p1.Log(p2, "varint-avx", "out: %d, %b", x, x) - - if len >= 10 && (len > 10 || data.GetElem(9) > 1) { - goto fail - } - - p1.PtrAddr = p1.PtrAddr.Add(len) - } - - if debug.Enabled { - len := int(p1.PtrAddr - start) - p1.Log(p2, "varint-avx", "%d:%#x (%d bytes)", x, x, len) - runtime.GC() - } - - return p1, p2, x - -fail: - p1.Fail(p2, tdp.ErrorTruncated) - for { - } -} diff --git a/internal/tdp/vm/internal/varint/varint.go b/internal/tdp/vm/internal/varint/varint.go index 033e08f..b147b96 100644 --- a/internal/tdp/vm/internal/varint/varint.go +++ b/internal/tdp/vm/internal/varint/varint.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:generate go tool hyperstencil - package varint import ( @@ -22,7 +20,6 @@ import ( "buf.build/go/hyperpb/internal/debug" "buf.build/go/hyperpb/internal/tdp" "buf.build/go/hyperpb/internal/tdp/vm/internal/impl" - "buf.build/go/hyperpb/internal/xsimd" ) // Varint32 parses a 64-bit varint, but will perform less work by discarding @@ -30,36 +27,20 @@ import ( // //go:nosplit func Varint32(p1 impl.P1, p2 impl.P2) (impl.P1, impl.P2, uint64) { - switch { - case xsimd.AVX(): - if debug.Enabled { - return AVX32Split(p1, p2) - } - return AVX32(p1, p2) - default: - if debug.Enabled { - return ScalarSplit(p1, p2) - } - return Scalar(p1, p2) + if debug.Enabled { + return ScalarSplit(p1, p2) } + return Scalar(p1, p2) } // Varint64 parses a 32-bit varint. // //go:nosplit func Varint64(p1 impl.P1, p2 impl.P2) (impl.P1, impl.P2, uint64) { - switch { - case xsimd.AVX(): - if debug.Enabled { - return AVX64Split(p1, p2) - } - return AVX64(p1, p2) - default: - if debug.Enabled { - return ScalarSplit(p1, p2) - } - return Scalar(p1, p2) + if debug.Enabled { + return ScalarSplit(p1, p2) } + return Scalar(p1, p2) } // Scalar is the core varint parsing implementation, using scalar operations diff --git a/internal/xsimd/avx_dynamic.go b/internal/xsimd/avx_dynamic.go deleted file mode 100644 index 58cfbbc..0000000 --- a/internal/xsimd/avx_dynamic.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build amd64 && !amd64.v3 - -package xsimd - -import "simd/archsimd" - -func AVX() bool { return archsimd.X86.AVX() } diff --git a/internal/xsimd/avx_none.go b/internal/xsimd/avx_none.go deleted file mode 100644 index 82679dd..0000000 --- a/internal/xsimd/avx_none.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build !amd64 - -package xsimd - -func AVX() bool { return false } diff --git a/internal/xsimd/avx_static.go b/internal/xsimd/avx_static.go deleted file mode 100644 index 2104f62..0000000 --- a/internal/xsimd/avx_static.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build amd64.v3 - -package xsimd - -func AVX() bool { return true } diff --git a/internal/xsimd/format.go b/internal/xsimd/format.go deleted file mode 100644 index ea33862..0000000 --- a/internal/xsimd/format.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2025 Buf Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package xsimd - -import ( - "fmt" - "reflect" -) - -// Format returns either v, or if v is a SIMD vector, a type which formats it -// as if it were a slice. -func Format(v any) any { - t := reflect.TypeOf(v) - if t == nil || t.Size() == 0 || t.PkgPath() != "simd/archsimd" { - return t - } - return &format{v} -} - -type format struct { - v any -} - -func (f format) Format(s fmt.State, v rune) { - r := reflect.ValueOf(f.v) - d := reflect.New(r.Type()) - d.Elem().Set(r) - - get, _ := r.Type().MethodByName("GetElem") - elem := get.Type.Out(0) - - n := int(r.Type().Size() / elem.Size()) - a := reflect.NewAt(reflect.ArrayOf(n, elem), d.UnsafePointer()) - - format := fmt.FormatString(s, v) - fmt.Fprint(s, "[") - for i := range n { - if i > 0 { - fmt.Fprint(s, " ") - } - fmt.Fprintf(s, format, a.Index(i)) - } - fmt.Fprint(s, "]") -} From f92c465fac64cd7c1a67451357d3c04d3877879c Mon Sep 17 00:00:00 2001 From: Miguel Young de la Sota Date: Thu, 12 Mar 2026 14:02:24 -0700 Subject: [PATCH 09/11] ci --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f56cc14..82562e7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,7 +19,7 @@ jobs: # to private repositories. os: [ubuntu-latest, macos-15] mode: [fast, debug, race, unopt] - go-version: [1.24.x, 1.25.x] + go-version: [1.25.x, 1.26.x] runs-on: ${{ matrix.os }} steps: From 526b7f4167766caa8653df15c40b4892838fe6e3 Mon Sep 17 00:00:00 2001 From: Miguel Young de la Sota Date: Thu, 12 Mar 2026 14:13:53 -0700 Subject: [PATCH 10/11] tools --- .github/workflows/buf.yaml | 2 +- .github/workflows/ci.yaml | 2 +- Makefile | 11 +- go.tool.mod => internal/tools/external/go.mod | 14 +- go.tool.sum => internal/tools/external/go.sum | 133 ++++++++++++------ 5 files changed, 102 insertions(+), 60 deletions(-) rename go.tool.mod => internal/tools/external/go.mod (98%) rename go.tool.sum => internal/tools/external/go.sum (92%) diff --git a/.github/workflows/buf.yaml b/.github/workflows/buf.yaml index 10dbb7f..94a56d0 100644 --- a/.github/workflows/buf.yaml +++ b/.github/workflows/buf.yaml @@ -14,6 +14,6 @@ jobs: - uses: actions/checkout@v5 - uses: bufbuild/buf-action@v1 with: - version: 1.56.0 # Keep in sync with Makefile BUF_VERSION + version: 1.66.0 # Keep in sync with internal/tools/external/go.mod. format: false # Turn off format, since most proto definitions are for testing token: ${{ secrets.BUF_TOKEN }} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 82562e7..67976f1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -82,4 +82,4 @@ jobs: - name: Lint uses: golangci/golangci-lint-action@v8 - with: {version: v2.4.0} # Keep in sync with the Makefile. + with: {version: v2.11.3} # Keep in sync with internal/tools/external/go.mod. diff --git a/Makefile b/Makefile index 8ab4a18..8791710 100644 --- a/Makefile +++ b/Makefile @@ -29,10 +29,6 @@ export GOBIN := $(abspath $(BIN)) COPYRIGHT_YEARS := 2025 LICENSE_IGNORE := testdata/ -GO_VERSION := go1.26.1 -BUF_VERSION := v1.56.0 # Keep in sync w/ .github/workflows/buf.yaml. -LINT_VERSION := v2.4.0 # Keep in sync w/ .github/workflows/ci.yaml. - GOOS_HOST := $(shell go env GOOS) GOARCH_HOST := $(shell go env GOARCH) @@ -60,10 +56,11 @@ HOST_TARGET ?= GO_HOST := $(HOST_TARGET) $(GO) GO := $(EXEC_ENV) $(GO) +TOOLS := ./internal/tools/external/go.mod TEST := $(GO_HOST) tool hypertest -o $(TESTS) $(HYPERTESTFLAGS) DUMP := $(GO_HOST) tool hyperdump -LINT := $(GO_HOST) tool -modfile go.tool.mod golangci-lint -BUF := $(GO_HOST) tool -modfile go.tool.mod buf +LINT := $(GO_HOST) tool -modfile $(TOOLS) golangci-lint +BUF := $(GO_HOST) tool -modfile $(TOOLS) TAGS ?= "" REMOTE ?= "" @@ -152,7 +149,7 @@ lintfix: generate ## Automatically fix some lint errors .PHONY: generate generate: internal/gen/*/*.pb.go ## Regenerate code and licenses $(GO_HOST) generate ./... - $(GO_HOST) tool -modfile go.tool.mod license-header \ + $(GO_HOST) tool -modfile $(TOOLS) license-header \ --license-type apache \ --copyright-holder "Buf Technologies, Inc." \ --year-range "$(COPYRIGHT_YEARS)" \ diff --git a/go.tool.mod b/internal/tools/external/go.mod similarity index 98% rename from go.tool.mod rename to internal/tools/external/go.mod index ea978c0..6d8c026 100644 --- a/go.tool.mod +++ b/internal/tools/external/go.mod @@ -1,4 +1,4 @@ -module buf.build/go/hyperpb/tools +module buf.build/go/hyperpb/internal/tools/external go 1.26.1 @@ -9,13 +9,15 @@ tool ( ) require ( - al.essio.dev/pkg/shellescape v1.6.0 - github.com/melbahja/goph v1.4.0 - golang.org/x/crypto v0.48.0 - golang.org/x/term v0.40.0 + github.com/golangci/golangci-lint/v2 v2.11.3 + github.com/bufbuild/buf v1.66.1 ) require ( + al.essio.dev/pkg/shellescape v1.6.0 // indirect + github.com/melbahja/goph v1.4.0 // indirect + golang.org/x/crypto v0.48.0 // indirect + golang.org/x/term v0.40.0 // indirect 4d63.com/gocheckcompilerdirectives v1.3.0 // indirect 4d63.com/gochecknoglobals v0.2.2 // indirect buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.36.11-20250718181942-e35f9b667443.1 // indirect @@ -70,7 +72,6 @@ require ( github.com/bombsimon/wsl/v5 v5.6.0 // indirect github.com/breml/bidichk v0.3.3 // indirect github.com/breml/errchkjson v0.4.1 // indirect - github.com/bufbuild/buf v1.66.1 // indirect github.com/bufbuild/protocompile v0.14.2-0.20260306221011-519528254156 // indirect github.com/bufbuild/protoplugin v0.0.0-20250218205857-750e09ce93e1 // indirect github.com/butuzov/ireturn v0.4.0 // indirect @@ -131,7 +132,6 @@ require ( github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 // indirect github.com/golangci/go-printf-func-name v0.1.1 // indirect github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d // indirect - github.com/golangci/golangci-lint/v2 v2.11.3 // indirect github.com/golangci/golines v0.15.0 // indirect github.com/golangci/misspell v0.8.0 // indirect github.com/golangci/plugin-module-register v0.1.2 // indirect diff --git a/go.tool.sum b/internal/tools/external/go.sum similarity index 92% rename from go.tool.sum rename to internal/tools/external/go.sum index 6903548..19f9f70 100644 --- a/go.tool.sum +++ b/internal/tools/external/go.sum @@ -2,10 +2,10 @@ 4d63.com/gocheckcompilerdirectives v1.3.0/go.mod h1:ofsJ4zx2QAuIP/NO/NAh1ig6R1Fb18/GI7RVMwz7kAY= 4d63.com/gochecknoglobals v0.2.2 h1:H1vdnwnMaZdQW/N+NrkT1SZMTBmcwHe9Vq8lJcYYTtU= 4d63.com/gochecknoglobals v0.2.2/go.mod h1:lLxwTQjL5eIesRbvnzIP3jZtG140FnTdz+AlMa+ogt0= -al.essio.dev/pkg/shellescape v1.6.0 h1:NxFcEqzFSEVCGN2yq7Huv/9hyCEGVa/TncnOOBBeXHA= -al.essio.dev/pkg/shellescape v1.6.0/go.mod h1:6sIqp7X2P6mThCQ7twERpZTuigpr6KbZWtls1U8I890= buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.36.11-20250718181942-e35f9b667443.1 h1:zQ9C3e6FtwSZUFuKAQfpIKGFk5ZuRoGt5g35Bix55sI= buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.36.11-20250718181942-e35f9b667443.1/go.mod h1:1Znr6gmYBhbxWUPRrrVnSLXQsz8bvFVw1HHJq2bI3VQ= +buf.build/gen/go/bufbuild/protodescriptor/protocolbuffers/go v1.36.11-20250109164928-1da0de137947.1 h1:HwzzCRS4ZrEm1++rzSDxHnO0DOjiT1b8I/24e8a4exY= +buf.build/gen/go/bufbuild/protodescriptor/protocolbuffers/go v1.36.11-20250109164928-1da0de137947.1/go.mod h1:8PRKXhgNes29Tjrnv8KdZzg3I1QceOkzibW1QK7EXv0= buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260209202127-80ab13bee0bf.1 h1:PMmTMyvHScV9Mn8wc6ASge9uRcHy0jtqPd+fM35LmsQ= buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260209202127-80ab13bee0bf.1/go.mod h1:tvtbpgaVXZX4g6Pn+AnzFycuRK3MOz5HJfEGeEllXYM= buf.build/gen/go/bufbuild/registry/connectrpc/go v1.19.1-20260126144947-819582968857.2 h1:XPrWCd9ydEo5Ofv1aNJVJaxndMXLQjRO9vVzsJG3jL8= @@ -20,8 +20,6 @@ buf.build/go/bufplugin v0.9.0 h1:ktZJNP3If7ldcWVqh46XKeiYJVPxHQxCfjzVQDzZ/lo= buf.build/go/bufplugin v0.9.0/go.mod h1:Z0CxA3sKQ6EPz/Os4kJJneeRO6CjPeidtP1ABh5jPPY= buf.build/go/bufprivateusage v0.1.0 h1:SzCoCcmzS3zyXHEXHeSQhGI7OTkgtljoknLzsUz9Gg4= buf.build/go/bufprivateusage v0.1.0/go.mod h1:GlCCJ3VVF7EqqU0CoRmo1FzAwwaKymEWSr+ty69xU5w= -buf.build/go/hyperpb v0.1.3 h1:wiw2F7POvAe2VA2kkB0TAsFwj91lXbFrKM41D3ZgU1w= -buf.build/go/hyperpb v0.1.3/go.mod h1:IHXAM5qnS0/Fsnd7/HGDghFNvUET646WoHmq1FDZXIE= buf.build/go/interrupt v1.1.0 h1:olBuhgv9Sav4/9pkSLoxgiOsZDgM5VhRhvRpn3DL0lE= buf.build/go/interrupt v1.1.0/go.mod h1:ql56nXPG1oHlvZa6efNC7SKAQ/tUjS6z0mhJl0gyeRM= buf.build/go/protovalidate v1.1.3 h1:m2GVEgQWd7rk+vIoAZ+f0ygGjvQTuqPQapBBdcpWVPE= @@ -109,10 +107,14 @@ github.com/MirrexOne/unqueryvet v1.5.4 h1:38QOxShO7JmMWT+eCdDMbcUgGCOeJphVkzzRgy github.com/MirrexOne/unqueryvet v1.5.4/go.mod h1:fs9Zq6eh1LRIhsDIsxf9PONVUjYdFHdtkHIgZdJnyPU= github.com/OpenPeeDeeP/depguard/v2 v2.2.1 h1:vckeWVESWp6Qog7UZSARNqfu/cZqvki8zsuj3piCMx4= github.com/OpenPeeDeeP/depguard/v2 v2.2.1/go.mod h1:q4DKzC4UcVaAvcfd41CZh0PWpGgzrVxUYBlgKNGquUo= +github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0= +github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= github.com/alecthomas/chroma/v2 v2.23.1 h1:nv2AVZdTyClGbVQkIzlDm/rnhk1E9bU9nXwmZ/Vk/iY= github.com/alecthomas/chroma/v2 v2.23.1/go.mod h1:NqVhfBR0lte5Ouh3DcthuUCTUpDC9cxBOfyMbMQPs3o= github.com/alecthomas/go-check-sumtype v0.3.1 h1:u9aUvbGINJxLVXiFvHUlPEaD7VDULsrxJb4Aq31NLkU= github.com/alecthomas/go-check-sumtype v0.3.1/go.mod h1:A8TSiN3UPRw3laIgWEUOHHLPa6/r9MtoigdlP5h3K/E= +github.com/alecthomas/repr v0.5.2 h1:SU73FTI9D1P5UNtvseffFSGmdNci/O6RsqzeXJtP0Qs= +github.com/alecthomas/repr v0.5.2/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -144,6 +146,8 @@ github.com/bkielbasa/cyclop v1.2.3 h1:faIVMIGDIANuGPWH031CZJTi2ymOQBULs9H21HSMa5 github.com/bkielbasa/cyclop v1.2.3/go.mod h1:kHTwA9Q0uZqOADdupvcFJQtp/ksSnytRMe8ztxG8Fuo= github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ089M= github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= +github.com/bmatcuk/doublestar/v4 v4.10.0 h1:zU9WiOla1YA122oLM6i4EXvGW62DvKZVxIe6TYWexEs= +github.com/bmatcuk/doublestar/v4 v4.10.0/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= github.com/bombsimon/wsl/v4 v4.7.0 h1:1Ilm9JBPRczjyUs6hvOPKvd7VL1Q++PL8M0SXBDf+jQ= github.com/bombsimon/wsl/v4 v4.7.0/go.mod h1:uV/+6BkffuzSAVYD+yGyld1AChO7/EuLrCF/8xTiapg= github.com/bombsimon/wsl/v5 v5.6.0 h1:4z+/sBqC5vUmSp1O0mS+czxwH9+LKXtCWtHH9rZGQL8= @@ -152,6 +156,8 @@ github.com/breml/bidichk v0.3.3 h1:WSM67ztRusf1sMoqH6/c4OBCUlRVTKq+CbSeo0R17sE= github.com/breml/bidichk v0.3.3/go.mod h1:ISbsut8OnjB367j5NseXEGGgO/th206dVa427kR8YTE= github.com/breml/errchkjson v0.4.1 h1:keFSS8D7A2T0haP9kzZTi7o26r7kE3vymjZNeNDRDwg= github.com/breml/errchkjson v0.4.1/go.mod h1:a23OvR6Qvcl7DG/Z4o0el6BRAjKnaReoPQFciAl9U3s= +github.com/brianvoe/gofakeit/v6 v6.28.0 h1:Xib46XXuQfmlLS2EXRuJpqcw8St6qSZz75OUo0tgAW4= +github.com/brianvoe/gofakeit/v6 v6.28.0/go.mod h1:Xj58BMSnFqcn/fAQeSK+/PLtC5kSb7FJIq4JyGa8vEs= github.com/bufbuild/buf v1.66.1 h1:wqmmU+6uoxB/eYDOmXq2To4qEXvOJN7gR6L9AxrPL1E= github.com/bufbuild/buf v1.66.1/go.mod h1:Vd3ELm8IePWaDJaS9FLy94FFOnLrjLi4mDxmXtw9Xio= github.com/bufbuild/protocompile v0.14.2-0.20260306221011-519528254156 h1:XOfIInPVufMjifwy3fli8qQVsGHWVCDVY/zp6elAOsY= @@ -166,6 +172,8 @@ github.com/catenacyber/perfsprint v0.10.1 h1:u7Riei30bk46XsG8nknMhKLXG9BcXz3+3tl github.com/catenacyber/perfsprint v0.10.1/go.mod h1:DJTGsi/Zufpuus6XPGJyKOTMELe347o6akPvWG9Zcsc= github.com/ccojocar/zxcvbn-go v1.0.4 h1:FWnCIRMXPj43ukfX000kvBZvV6raSxakYr1nzyNrUcc= github.com/ccojocar/zxcvbn-go v1.0.4/go.mod h1:3GxGX+rHmueTUMvm5ium7irpyjmm7ikxYFOSJB21Das= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -196,17 +204,23 @@ github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M= github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE= github.com/containerd/errdefs/pkg v0.3.0/go.mod h1:NJw6s9HwNuRhnjJhM7pylWwMyAkmCQvQ4GpJHEqRLVk= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/containerd/stargz-snapshotter/estargz v0.18.2 h1:yXkZFYIzz3eoLwlTUZKz2iQ4MrckBxJjkmD16ynUTrw= github.com/containerd/stargz-snapshotter/estargz v0.18.2/go.mod h1:XyVU5tcJ3PRpkA9XS2T5us6Eg35yM0214Y+wvrZTBrY= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/cpuguy83/go-md2man/v2 v2.0.7 h1:zbFlGlXEAKlwXpmvle3d8Oe3YnkKIK4xSRTd3sHPnBo= github.com/cpuguy83/go-md2man/v2 v2.0.7/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/curioswitch/go-reassign v0.3.0 h1:dh3kpQHuADL3cobV/sSGETA8DOv457dwl+fbBAhrQPs= github.com/curioswitch/go-reassign v0.3.0/go.mod h1:nApPCCTtqLJN/s8HfItCcKV0jIPwluBOvZP+dsJGA88= github.com/daixiang0/gci v0.13.7 h1:+0bG5eK9vlI08J+J/NWGbWPTNiXPG4WhNLJOkSxWITQ= github.com/daixiang0/gci v0.13.7/go.mod h1:812WVN6JLFY9S6Tv76twqmNqevN0pa3SX3nih0brVzQ= github.com/dave/dst v0.27.3 h1:P1HPoMza3cMEquVf9kKy8yXsFirry4zEnWOdYPOoIzY= github.com/dave/dst v0.27.3/go.mod h1:jHh6EOibnHgcUW3WjKHisiooEkYwqpHLBSX1iOBhEyc= +github.com/dave/jennifer v1.7.1 h1:B4jJJDHelWcDhlRQxWeo0Npa/pYKBLrirAQoTN45txo= +github.com/dave/jennifer v1.7.1/go.mod h1:nXbxhEmQfOZhWml3D1cDK5M1FLnMSozpbFN/m3RmGZc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -242,6 +256,8 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2 github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/firefart/nonamedreturns v1.0.6 h1:vmiBcKV/3EqKY3ZiPxCINmpS431OcE1S47AQUwhrg8E= github.com/firefart/nonamedreturns v1.0.6/go.mod h1:R8NisJnSIpvPWheCq0mNRXJok6D8h7fagJTF8EMEwCo= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= @@ -264,7 +280,11 @@ github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= +github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-toolsmith/astcast v1.1.0 h1:+JN9xZV1A+Re+95pgnMgDboWNVnIMMQXwfBwLRPgSC8= github.com/go-toolsmith/astcast v1.1.0/go.mod h1:qdcuFWeGGS2xX5bLM/c3U9lewg7+Zu4mr+xPwZIB4ZU= github.com/go-toolsmith/astcopy v1.1.0 h1:YGwBN0WM+ekI/6SS6+52zLDEf8Yvp3n2seZITCUBt5s= @@ -277,6 +297,8 @@ github.com/go-toolsmith/astfmt v1.1.0 h1:iJVPDPp6/7AaeLJEruMsBUlOYCmvg0MoCfJprsO github.com/go-toolsmith/astfmt v1.1.0/go.mod h1:OrcLlRwu0CuiIBp/8b5PYF9ktGVZUjlNMV634mhwuQ4= github.com/go-toolsmith/astp v1.1.0 h1:dXPuCl6u2llURjdPLLDxJeZInAeZ0/eZwFJmqZMnpQA= github.com/go-toolsmith/astp v1.1.0/go.mod h1:0T1xFGz9hicKs8Z5MfAqSUitoUYS30pDMsRVIDHs8CA= +github.com/go-toolsmith/pkgload v1.2.2 h1:0CtmHq/02QhxcF7E9N5LIFcYFsMR5rdovfqTtRKkgIk= +github.com/go-toolsmith/pkgload v1.2.2/go.mod h1:R2hxLNRKuAsiXCo2i5J6ZQPhnPMOVtU+f0arbFPWCus= github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQiyP2Bvw= github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ= @@ -320,8 +342,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golangci/asciicheck v0.5.0 h1:jczN/BorERZwK8oiFBOGvlGPknhvq0bjnysTj4nUfo0= github.com/golangci/asciicheck v0.5.0/go.mod h1:5RMNAInbNFw2krqN6ibBxN/zfRFa9S6tA1nPdM0l8qQ= github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 h1:WUvBfQL6EW/40l6OmeSBYQJNSif4O11+bmWEz+C7FYw= @@ -359,7 +381,6 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/go-containerregistry v0.21.2 h1:vYaMU4nU55JJGFC9JR/s8NZcTjbE9DBBbvusTW9NeS0= @@ -374,6 +395,8 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 h1:z2ogiKUYzX5Is6zr/vP9vJGqPwcdqsWjOt+V8J7+bTc= +github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83/go.mod h1:MxpfABSjhmINe3F1It9d+8exIHFvUqtLIRCdOGNXqiI= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -391,8 +414,14 @@ github.com/gostaticanalysis/forcetypeassert v0.2.0/go.mod h1:M5iPavzE9pPqWyeiVXS github.com/gostaticanalysis/nilerr v0.1.2 h1:S6nk8a9N8g062nsx63kUkF6AzbHGw7zzyHMcpu52xQU= github.com/gostaticanalysis/nilerr v0.1.2/go.mod h1:A19UHhoY3y8ahoL7YKz6sdjDtduwTSI4CsymaC2htPA= github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= +github.com/gostaticanalysis/testutil v0.5.0 h1:Dq4wT1DdTwTGCQQv3rl3IvD5Ld0E6HiY+3Zh0sUGqw8= +github.com/gostaticanalysis/testutil v0.5.0/go.mod h1:OLQSbuM6zw2EvCcXTz1lVq5unyoNft372msDY0nY5Hs= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0 h1:HWRh5R2+9EifMyIHV7ZV+MIZqgz+PMpZ14Jynv3O2Zs= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0/go.mod h1:JfhWUomR1baixubs02l85lZYYOm7LV6om4ceouMv45c= github.com/hashicorp/go-immutable-radix/v2 v2.1.0 h1:CUW5RYIcysz+D3B+l1mDeXrQ7fUvGGCwJfdASSzbrfo= github.com/hashicorp/go-immutable-radix/v2 v2.1.0/go.mod h1:hgdqLXA4f6NIjRVisM1TJ9aOJVNRqKZj+xDGF6m7PBw= +github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= +github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.8.0 h1:KAkNb1HAiZd1ukkxDFGmokVZe1Xy9HG6NUp+bPle2i4= github.com/hashicorp/go-version v1.8.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= @@ -411,6 +440,8 @@ github.com/jdx/go-netrc v1.0.0 h1:QbLMLyCZGj0NA8glAhxUpf1zDg6cxnWgMBbjq40W0gQ= github.com/jdx/go-netrc v1.0.0/go.mod h1:Gh9eFQJnoTNIRHXl2j5bJXA1u84hQWJWgGh569zF3v8= github.com/jgautheron/goconst v1.8.2 h1:y0XF7X8CikZ93fSNT6WBTb/NElBu9IjaY7CCYQrCMX4= github.com/jgautheron/goconst v1.8.2/go.mod h1:A0oxgBCHy55NQn6sYpO7UdnA9p+h7cPtoOZUmvNIako= +github.com/jhump/protoreflect/v2 v2.0.0-beta.2 h1:qZU+rEZUOYTz1Bnhi3xbwn+VxdXkLVeEpAeZzVXLY88= +github.com/jhump/protoreflect/v2 v2.0.0-beta.2/go.mod h1:4tnOYkB/mq7QTyS3YKtVtNrJv4Psqout8HA1U+hZtgM= github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= github.com/jjti/go-spancheck v0.6.5 h1:lmi7pKxa37oKYIMScialXUK6hP3iY5F1gu+mLBPgYB8= @@ -439,12 +470,14 @@ github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kulti/thelper v0.7.1 h1:fI8QITAoFVLx+y+vSyuLBP+rcVIB8jKooNSCT2EiI98= github.com/kulti/thelper v0.7.1/go.mod h1:NsMjfQEy6sd+9Kfw8kCP61W1I0nerGSYSFnGaxQkcbs= github.com/kunwardeep/paralleltest v1.0.15 h1:ZMk4Qt306tHIgKISHWFJAO1IDQJLc6uDyJMLyncOb6w= @@ -481,6 +514,7 @@ github.com/maratori/testpackage v1.1.2 h1:ffDSh+AgqluCLMXhM19f/cpvQAKygKAJXFl9aU github.com/maratori/testpackage v1.1.2/go.mod h1:8F24GdVDFW5Ew43Et02jamrVMNXLUNaOynhDssITGfc= github.com/matoous/godox v1.1.0 h1:W5mqwbyWrwZv6OQ5Z1a/DHGMOvXYCBP3+Ht7KMoJhq4= github.com/matoous/godox v1.1.0/go.mod h1:jgE/3fUXiTurkdHOLT5WEkThTSuE7yxHv5iWPa80afs= +github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= @@ -490,8 +524,6 @@ github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6T github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/melbahja/goph v1.4.0 h1:z0PgDbBFe66lRYl3v5dGb9aFgPy0kotuQ37QOwSQFqs= -github.com/melbahja/goph v1.4.0/go.mod h1:uG+VfK2Dlhk+O32zFrRlc3kYKTlV6+BtvPWd/kK7U68= github.com/mgechev/revive v1.15.0 h1:vJ0HzSBzfNyPbHKolgiFjHxLek9KUijhqh42yGoqZ8Q= github.com/mgechev/revive v1.15.0/go.mod h1:LlAKO3QQe9OJ0pVZzI2GPa8CbXGZ/9lNpCGvK4T/a8A= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -500,6 +532,10 @@ github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyua github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/sys/atomicwriter v0.1.0 h1:kw5D/EqkBwsBFi0ss9v1VG3wIkVhzGvLklJ+w3A14Sw= +github.com/moby/sys/atomicwriter v0.1.0/go.mod h1:Ul8oqv2ZMNHOceF643P6FKPXeCmYtlQMvpizfsSoaWs= +github.com/moby/sys/sequential v0.6.0 h1:qrx7XFUd/5DxtqcoH1h438hF5TmOvzC/lspjy7zgvCU= +github.com/moby/sys/sequential v0.6.0/go.mod h1:uyv8EUTrca5PnDsdMGXhZe6CCe8U/UiTWd+lL+7b/Ko= github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ= github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFLc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -523,11 +559,17 @@ github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= github.com/nunnatsa/ginkgolinter v0.23.0 h1:x3o4DGYOWbBMP/VdNQKgSj+25aJKx2Pe6lHr8gBcgf8= github.com/nunnatsa/ginkgolinter v0.23.0/go.mod h1:9qN1+0akwXEccwV1CAcCDfcoBlWXHB+ML9884pL4SZ4= +github.com/onsi/ginkgo/v2 v2.28.1 h1:S4hj+HbZp40fNKuLUQOYLDgZLwNUVn19N3Atb98NCyI= +github.com/onsi/ginkgo/v2 v2.28.1/go.mod h1:CLtbVInNckU3/+gC8LzkGUb9oF+e8W8TdUsxPwvdOgE= +github.com/onsi/gomega v1.39.1 h1:1IJLAad4zjPn2PsnhH70V4DKRFlrCzGBNrNaru+Vf28= +github.com/onsi/gomega v1.39.1/go.mod h1:hL6yVALoTOxeWudERyfppUcZXjMwIMLnuSfruD2lcfg= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= +github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= +github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= @@ -542,9 +584,6 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.13.5/go.mod h1:wHDZ0IZX6JcBYRK1TH9bcVq8G7TLpVHYIGJRFnmPfxg= -github.com/pkg/sftp v1.13.9 h1:4NGkvGudBL7GteO3m6qnaQ4pC0Kvf0onSVc9gR3EWBw= -github.com/pkg/sftp v1.13.9/go.mod h1:OBN7bVXdstkFFN/gdnHPUb5TE8eb8G1Rp9wCItqjkkA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -569,6 +608,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/protocolbuffers/protoscope v0.0.0-20221109213918-8e7a6aafa2c9 h1:arwj11zP0yJIxIRiDn22E0H8PxfF7TsTrc2wIPFIsf4= +github.com/protocolbuffers/protoscope v0.0.0-20221109213918-8e7a6aafa2c9/go.mod h1:SKZx6stCn03JN3BOWTwvVIO2ajMkb/zQdTceXYhKw/4= github.com/quasilyte/go-ruleguard v0.4.5 h1:AGY0tiOT5hJX9BTdx/xBdoCubQUAE2grkqY2lSwvZcA= github.com/quasilyte/go-ruleguard v0.4.5/go.mod h1:Vl05zJ538vcEEwu16V/Hdu7IYZWyKSwIy4c88Ro1kRE= github.com/quasilyte/go-ruleguard/dsl v0.3.23 h1:lxjt5B6ZCiBeeNO8/oQsegE6fLeCzuMRoVWSkXC4uvY= @@ -588,6 +629,8 @@ github.com/raeperd/recvcheck v0.2.0/go.mod h1:n04eYkwIR0JbgD73wT8wL4JjPC3wm0nFtz github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rodaine/protogofakeit v0.1.1 h1:ZKouljuRM3A+TArppfBqnH8tGZHOwM/pjvtXe9DaXH8= +github.com/rodaine/protogofakeit v0.1.1/go.mod h1:pXn/AstBYMaSfc1/RqH3N82pBuxtWgejz1AlYpY1mI0= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= @@ -613,6 +656,8 @@ github.com/segmentio/asm v1.2.1 h1:DTNbBqs57ioxAD4PrArqftgypG4/qNpXoJx8TVXxPR0= github.com/segmentio/asm v1.2.1/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= github.com/segmentio/encoding v0.5.3 h1:OjMgICtcSFuNvQCdwqMCv9Tg7lEOXGwm1J5RPQccx6w= github.com/segmentio/encoding v0.5.3/go.mod h1:HS1ZKa3kSN32ZHVZ7ZLPLXWvOVIiZtyJnO1gPH1sKt0= +github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= @@ -646,20 +691,18 @@ github.com/stbenjam/no-sprintf-host-port v0.3.1 h1:AyX7+dxI4IdLBPtDbsGAyqiTSLpCP github.com/stbenjam/no-sprintf-host-port v0.3.1/go.mod h1:ODbZesTCHMVKthBHskvUUexdcNHAQRXk9NpSsL8p/HQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA= github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= +github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpRQGxTSkNYKJ51yaw6ChIqO+Je8UqsTKN/cDag= github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= github.com/tetafro/godot v1.5.4 h1:u1ww+gqpRLiIA16yF2PV1CV1n/X3zhyezbNXC3E14Sg= github.com/tetafro/godot v1.5.4/go.mod h1:eOkMrVQurDui411nBY2FA05EYH01r14LuWY/NrVDVcU= @@ -704,6 +747,8 @@ github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= gitlab.com/bosi/decorder v0.4.2 h1:qbQaV3zgwnBZ4zPMhGLW4KZe7A7NwxEhJx39R3shffo= gitlab.com/bosi/decorder v0.4.2/go.mod h1:muuhHoaJkA9QLcYHq4Mj8FJUwDZ+EirSHRiaTcTf6T8= +go-simpler.org/assert v0.9.0 h1:PfpmcSvL7yAnWyChSjOz6Sp6m9j5lyK8Ok9pEL31YkQ= +go-simpler.org/assert v0.9.0/go.mod h1:74Eqh5eI6vCK6Y5l3PI8ZYFXG4Sa+tkr70OIPJAUr28= go-simpler.org/musttag v0.14.0 h1:XGySZATqQYSEV3/YTy+iX+aofbZZllJaqwFWs+RTtSo= go-simpler.org/musttag v0.14.0/go.mod h1:uP8EymctQjJ4Z1kUnjX0u2l60WfUdQxCwSNKzE1JEOE= go-simpler.org/sloglint v0.11.1 h1:xRbPepLT/MHPTCA6TS/wNfZrDzkGvCCqUv4Bdwc3H7s= @@ -731,10 +776,24 @@ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0 h1:Oyrsyzu go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0/go.mod h1:C2NGBr+kAB4bk3xtMXfZ94gqFDtg/GkI7e9zqGh5Beg= go.opentelemetry.io/otel v1.42.0 h1:lSQGzTgVR3+sgJDAU/7/ZMjN9Z+vUip7leaqBKy4sho= go.opentelemetry.io/otel v1.42.0/go.mod h1:lJNsdRMxCUIWuMlVJWzecSMuNjE7dOYyWlqOXWkdqCc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.42.0 h1:THuZiwpQZuHPul65w4WcwEnkX2QIuMT+UFoOrygtoJw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.42.0/go.mod h1:J2pvYM5NGHofZ2/Ru6zw/TNWnEQp5crgyDeSrYpXkAw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.33.0 h1:wpMfgF8E1rkrT1Z6meFh1NDtownE9Ii3n3X2GJYjsaU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.33.0/go.mod h1:wAy0T/dUbs468uOlkT31xjvqQgEVXv58BRFWEgn5v/0= go.opentelemetry.io/otel/metric v1.42.0 h1:2jXG+3oZLNXEPfNmnpxKDeZsFI5o4J+nz6xUlaFdF/4= go.opentelemetry.io/otel/metric v1.42.0/go.mod h1:RlUN/7vTU7Ao/diDkEpQpnz3/92J9ko05BIwxYa2SSI= +go.opentelemetry.io/otel/sdk v1.42.0 h1:LyC8+jqk6UJwdrI/8VydAq/hvkFKNHZVIWuslJXYsDo= +go.opentelemetry.io/otel/sdk v1.42.0/go.mod h1:rGHCAxd9DAph0joO4W6OPwxjNTYWghRWmkHuGbayMts= +go.opentelemetry.io/otel/sdk/metric v1.42.0 h1:D/1QR46Clz6ajyZ3G8SgNlTJKBdGp84q9RKCAZ3YGuA= +go.opentelemetry.io/otel/sdk/metric v1.42.0/go.mod h1:Ua6AAlDKdZ7tdvaQKfSmnFTdHx37+J4ba8MwVCYM5hc= go.opentelemetry.io/otel/trace v1.42.0 h1:OUCgIPt+mzOnaUTpOQcBiM/PLQ/Op7oq6g4LenLmOYY= go.opentelemetry.io/otel/trace v1.42.0/go.mod h1:f3K9S+IFqnumBkKhRJMeaZeNk9epyhnCmQh/EysQCdc= +go.opentelemetry.io/proto/otlp v1.9.0 h1:l706jCMITVouPOqEnii2fIAuO3IVGBRPV5ICjceRb/A= +go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/mock v0.5.2 h1:LbtPTcP8A5k9WPXj54PPPbjcI4Y6lhyOZXn+VS7wNko= +go.uber.org/mock v0.5.2/go.mod h1:wLlUxC2vVTPTaE3UD51E0BGOAElKrILxhVSDYQLld5o= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc= @@ -748,13 +807,8 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= -golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= -golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -800,8 +854,6 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= golang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -837,14 +889,11 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/net v0.51.0 h1:94R/GTO7mt3/4wIKpcR5gkGmRLOuE/2hNGeWq/GBIFo= golang.org/x/net v0.51.0/go.mod h1:aamm+2QF5ogm02fjy5Bb7CQ0WMt1/WVM7FtyaTLlA9Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -868,9 +917,6 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -915,7 +961,6 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -925,21 +970,14 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= -golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= -golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= -golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= -golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg= golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -952,14 +990,13 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk= golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -1010,9 +1047,12 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/tools v0.42.0 h1:uNgphsn75Tdz5Ji2q36v/nsFSfR/9BRFvqhGBaJGd5k= golang.org/x/tools v0.42.0/go.mod h1:Ma6lCIwGZvHK6XtgbswSoWroEkhugApmsXyrUmBhfr0= +golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM= +golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= +golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM= +golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated/go.mod h1:RVAQXBGNv1ib0J382/DPCRS/BPnsGebyM1Gj5VSDpG8= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1084,6 +1124,8 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.79.1 h1:zGhSi45ODB9/p3VAawt9a+O/MULLl9dpizzNNpq7flY= +google.golang.org/grpc v1.79.1/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1102,6 +1144,8 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= @@ -1112,9 +1156,10 @@ gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= +gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From 31add9ad296e08baf83b66e34c311d3609ca2171 Mon Sep 17 00:00:00 2001 From: Miguel Young de la Sota Date: Wed, 18 Mar 2026 20:27:10 -0400 Subject: [PATCH 11/11] cherrypick --- Makefile | 13 +++-- go.mod | 1 + internal/inlinetest/inlinetest.go | 80 +++++++++++++++++++++++++++ internal/tdp/dynamic/shared.go | 6 +- internal/tdp/profile/recorder.go | 3 +- internal/tdp/thunks/repeated.go | 14 ++--- internal/tdp/thunks/singular.go | 8 +-- internal/tdp/thunks/stencils.go | 26 ++++----- internal/tdp/thunks/thunks.go | 14 ----- internal/tdp/vm/internal/impl/impl.go | 5 +- internal/tdp/vm/internal/impl/init.go | 2 +- internal/tdp/vm/memory/memory.go | 16 ++++-- internal/tdp/vm/vm.go | 2 + internal/testdata/testdata.go | 2 +- internal/tools/hyperstencil/main.go | 27 +++++---- internal/tools/hypertag/main.go | 80 +++++++++++++++++++++++++++ internal/tools/hypertest/exec.go | 4 +- internal/tools/hypertest/main.go | 3 + internal/xprotoreflect/value.go | 11 ++-- internal/xunsafe/any.go | 47 +++++++++++++--- message.go | 2 +- 21 files changed, 284 insertions(+), 82 deletions(-) create mode 100644 internal/inlinetest/inlinetest.go create mode 100644 internal/tools/hypertag/main.go diff --git a/Makefile b/Makefile index 8791710..00594be 100644 --- a/Makefile +++ b/Makefile @@ -43,9 +43,6 @@ GOEXPERIMENT ?= simd HOST_ENV ?= GOTOOLCHAIN=$(GOTOOLCHAIN) GOEXPERIMENT=$(GOEXPERIMENT) EXEC_ENV ?= GOOS=$(GOOS) GOARCH=$(GOARCH) GOAMD64=$(GOAMD64) GOARM64=$(GOARM64) GOTOOLCHAIN=$(GOTOOLCHAIN) GOEXPERIMENT=$(GOEXPERIMENT) -# Go will carelessly pick these up on host-side builds if we don't unexport them. -unexport GOOS -unexport GOARCH HYPERTESTFLAGS ?= TESTFLAGS ?= @@ -53,14 +50,14 @@ BENCHFLAGS ?= -test.benchmem GO ?= go HOST_TARGET ?= -GO_HOST := $(HOST_TARGET) $(GO) +GO_HOST := $(HOST_ENV) $(GO) GO := $(EXEC_ENV) $(GO) TOOLS := ./internal/tools/external/go.mod -TEST := $(GO_HOST) tool hypertest -o $(TESTS) $(HYPERTESTFLAGS) +TEST := $(GO_HOST) tool hypertest -o $(TESTS) -env "GOOS=$(GOOS);GOARCH=$(GOARCH);GOAMD64=$(GOAMD64);GOARM64=$(GOARM64)" $(HYPERTESTFLAGS) DUMP := $(GO_HOST) tool hyperdump LINT := $(GO_HOST) tool -modfile $(TOOLS) golangci-lint -BUF := $(GO_HOST) tool -modfile $(TOOLS) +BUF := $(GO_HOST) tool -modfile $(TOOLS) buf TAGS ?= "" REMOTE ?= "" @@ -78,6 +75,10 @@ else endif PKG ?= . +# Go will carelessly pick these up on host-side builds if we don't unexport them. +unexport GOOS +unexport GOARCH + .PHONY: help help: ## Describe useful make targets @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \ diff --git a/go.mod b/go.mod index 40b1fbb..8f19b60 100644 --- a/go.mod +++ b/go.mod @@ -43,5 +43,6 @@ require ( tool ( buf.build/go/hyperpb/internal/tools/hyperdump buf.build/go/hyperpb/internal/tools/hyperstencil + buf.build/go/hyperpb/internal/tools/hypertag buf.build/go/hyperpb/internal/tools/hypertest ) diff --git a/internal/inlinetest/inlinetest.go b/internal/inlinetest/inlinetest.go new file mode 100644 index 0000000..70db3bc --- /dev/null +++ b/internal/inlinetest/inlinetest.go @@ -0,0 +1,80 @@ +// Copyright 2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package inlinetest + +import ( + "errors" + "fmt" + "os" + "os/exec" + "regexp" + "runtime/debug" + "strings" + "testing" + + "github.com/stretchr/testify/assert" +) + +// AssertInlined returns whether the compiler is willing to inline the given +// symbols in the package being tested. +// +// The symbols must be either a single identifier or of the form Type.Method. +// Pointer-receiver methods should not use the (*Type).Method syntax. +func AssertInlined(t *testing.T, symbols ...string) { + t.Helper() + for _, symbol := range symbols { + _, ok := inlined[symbol] + assert.True(t, ok, "%s is not inlined", symbol) + } +} + +var inlined = make(map[string]struct{}) + +func init() { + if !testing.Testing() { + panic("inlinetest: cannot import inlinetest except in a test") + } + + // This is based on a pattern of tests appearing in several places in Go's + // standard library. + tool := "go" + if env, ok := os.LookupEnv("GO"); ok { + tool = env + } + + info, ok := debug.ReadBuildInfo() + if !ok { + panic(errors.New("inlinetest: could not read build info")) + } + + //nolint:gosec + out, err := exec.Command( + tool, + "build", + "--gcflags=-m", // -m records optimization decisions. + strings.TrimSuffix(info.Path, ".test"), + ).CombinedOutput() + if err != nil { + panic(fmt.Errorf("inlinetest: go build failed: %w, %s", err, out)) + } + + remarkRe := regexp.MustCompile(`(?m)^\./\S+\.go:\d+:\d+: can inline (.+?)$`) + ptrRe := regexp.MustCompile(`\(\*(.+)\)\.`) + for _, match := range remarkRe.FindAllSubmatch(out, -1) { + match := string(match[1]) + match = ptrRe.ReplaceAllString(match, "$1.") + inlined[match] = struct{}{} + } +} diff --git a/internal/tdp/dynamic/shared.go b/internal/tdp/dynamic/shared.go index 9a42d34..be0f194 100644 --- a/internal/tdp/dynamic/shared.go +++ b/internal/tdp/dynamic/shared.go @@ -33,9 +33,13 @@ type Shared struct { arena arena.Arena lib *tdp.Library - Src *byte + Src *byte // Needs to be a pointer to root the source buffer. Len int + // Must *not* be a pointer, it's one-past-the-end. This points to one past the + // furthest address we are guaranteed to be able to load from. + End xunsafe.Addr[byte] + // Synchronizes calls to startParse() with this context. Lock sync.Mutex diff --git a/internal/tdp/profile/recorder.go b/internal/tdp/profile/recorder.go index 1f1c60b..3541d99 100644 --- a/internal/tdp/profile/recorder.go +++ b/internal/tdp/profile/recorder.go @@ -29,6 +29,7 @@ import ( "buf.build/go/hyperpb/internal/tdp/dynamic" "buf.build/go/hyperpb/internal/xprotoreflect" "buf.build/go/hyperpb/internal/xsync" + "buf.build/go/hyperpb/internal/xunsafe" ) // hyperpbMessage is the itab for *hyperpb.Message. @@ -36,7 +37,7 @@ import ( // This is connected to the root package via linkname. // //go:linkname hyperpbMessage -var hyperpbMessage uintptr +var hyperpbMessage xunsafe.Type // Recorder is a profile recorder, which walks a message to record information // about its fields after a successful parse. diff --git a/internal/tdp/thunks/repeated.go b/internal/tdp/thunks/repeated.go index 2d38a87..20c3e74 100644 --- a/internal/tdp/thunks/repeated.go +++ b/internal/tdp/thunks/repeated.go @@ -226,12 +226,12 @@ func getRepeatedBytes(m *dynamic.Message, _ *tdp.Type, getter *tdp.Accessor) pro // //go:nosplit // TODO(#30): Enable once upstream is fixed. // -//hyperpb:stencil parseRepeatedVarint8 parseRepeatedVarint[uint8] appendVarint -> appendVarint8 varint64 -> varint32 -//hyperpb:stencil parseRepeatedVarint32 parseRepeatedVarint[uint32] appendVarint -> appendVarint32 varint64 -> varint32 +//hyperpb:stencil parseRepeatedVarint8 parseRepeatedVarint[uint8] appendVarint -> appendVarint8 vm.Varint64 -> vm.Varint32 +//hyperpb:stencil parseRepeatedVarint32 parseRepeatedVarint[uint32] appendVarint -> appendVarint32 vm.Varint64 -> vm.Varint32 //hyperpb:stencil parseRepeatedVarint64 parseRepeatedVarint[uint64] appendVarint -> appendVarint64 func parseRepeatedVarint[T tdp.Int](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { var n uint64 - p1, p2, n = varint64(p1, p2) + p1, p2, n = vm.Varint64(p1, p2) var r *repeated.Scalars[byte, T] p1, p2, r = vm.GetMutableField[repeated.Scalars[byte, T]](p1, p2) @@ -271,8 +271,8 @@ func parseRepeatedVarint[T tdp.Int](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { // //go:nosplit // TODO(#30): Enable once upstream is fixed. // //go:norace // Race instrumentation causes this function to fail the nosplit check. -//hyperpb:stencil parsePackedVarint8 parsePackedVarint[uint8] varint32 -> varint64 -//hyperpb:stencil parsePackedVarint32 parsePackedVarint[uint32] varint32 -> varint64 +//hyperpb:stencil parsePackedVarint8 parsePackedVarint[uint8] vm.Varint64 -> vm.Varint32 +//hyperpb:stencil parsePackedVarint32 parsePackedVarint[uint32] vm.Varint64 -> vm.Varint32 //hyperpb:stencil parsePackedVarint64 parsePackedVarint[uint64] func parsePackedVarint[T tdp.Int](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { var n int @@ -376,7 +376,7 @@ func parsePackedVarint[T tdp.Int](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { x = uint64(*p1.Ptr()&0x7f) | uint64(*c.AssertValid())<<7 p1.PtrAddr += 2 } else { - p1, p2, x = varint64(p1, p2) + p1, p2, x = vm.Varint64(p1, p2) } *p.AssertValid() = T(x) @@ -390,7 +390,7 @@ func parsePackedVarint[T tdp.Int](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { default: for { var x uint64 - p1, p2, x = varint64(p1, p2) + p1, p2, x = vm.Varint64(p1, p2) *p.AssertValid() = T(x) p = p.Add(1) diff --git a/internal/tdp/thunks/singular.go b/internal/tdp/thunks/singular.go index 29706bb..47b3421 100644 --- a/internal/tdp/thunks/singular.go +++ b/internal/tdp/thunks/singular.go @@ -258,10 +258,10 @@ func getMessage(m *dynamic.Message, ty *tdp.Type, getter *tdp.Accessor) protoref // //go:nosplit // TODO(#30): Enable once upstream is fixed. // -//hyperpb:stencil parseVarint32 parseVarint[uint32] StoreFromScratch -> StoreFromScratch32 varint64 -> varint32 +//hyperpb:stencil parseVarint32 parseVarint[uint32] StoreFromScratch -> StoreFromScratch32 vm.Varint64 -> vm.Varint32 //hyperpb:stencil parseVarint64 parseVarint[uint64] StoreFromScratch -> StoreFromScratch64 func parseVarint[T tdp.Int](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { - p1, p2 = vm.P1.SetScratch(varint64(p1, p2)) + p1, p2 = vm.P1.SetScratch(vm.Varint64(p1, p2)) var p *T p1, p2, p = vm.GetMutableField[T](p1, p2) @@ -272,10 +272,10 @@ func parseVarint[T tdp.Int](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { // //go:nosplit // TODO(#30): Enable once upstream is fixed. // -//hyperpb:stencil parseZigZag32 parseZigZag[uint32] StoreFromScratch -> StoreFromScratch32 varint64 -> varint32 +//hyperpb:stencil parseZigZag32 parseZigZag[uint32] StoreFromScratch -> StoreFromScratch32 vm.Varint64 -> vm.Varint32 //hyperpb:stencil parseZigZag64 parseZigZag[uint64] StoreFromScratch -> StoreFromScratch64 func parseZigZag[T tdp.Int](p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { - p1, p2 = vm.P1.SetScratch(varint64(p1, p2)) + p1, p2 = vm.P1.SetScratch(vm.Varint64(p1, p2)) p1, p2 = p1.SetScratch(p2, uint64(zigzag.Decode64[T](p2.Scratch()))) var p *T diff --git a/internal/tdp/thunks/stencils.go b/internal/tdp/thunks/stencils.go index 695c89e..e210533 100644 --- a/internal/tdp/thunks/stencils.go +++ b/internal/tdp/thunks/stencils.go @@ -8226,7 +8226,7 @@ insert: func parseRepeatedVarint8(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseRepeatedVarint[uint8] var n uint64 - p1, p2, n = varint32(p1, p2) + p1, p2, n = vm.Varint64(p1, p2) var r *repeated.Scalars[byte, uint8] p1, p2, r = vm.GetMutableField[repeated.Scalars[byte, uint8]](p1, p2) @@ -8263,7 +8263,7 @@ func parseRepeatedVarint8(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { func parseRepeatedVarint32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseRepeatedVarint[uint32] var n uint64 - p1, p2, n = varint32(p1, p2) + p1, p2, n = vm.Varint64(p1, p2) var r *repeated.Scalars[byte, uint32] p1, p2, r = vm.GetMutableField[repeated.Scalars[byte, uint32]](p1, p2) @@ -8300,7 +8300,7 @@ func parseRepeatedVarint32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { func parseRepeatedVarint64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseRepeatedVarint[uint64] var n uint64 - p1, p2, n = varint64(p1, p2) + p1, p2, n = vm.Varint64(p1, p2) var r *repeated.Scalars[byte, uint64] p1, p2, r = vm.GetMutableField[repeated.Scalars[byte, uint64]](p1, p2) @@ -8430,7 +8430,7 @@ func parsePackedVarint8(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { x = uint64(*p1.Ptr()&0x7f) | uint64(*c.AssertValid())<<7 p1.PtrAddr += 2 } else { - p1, p2, x = varint64(p1, p2) + p1, p2, x = vm.Varint64(p1, p2) } *p.AssertValid() = uint8(x) @@ -8444,7 +8444,7 @@ func parsePackedVarint8(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { default: for { var x uint64 - p1, p2, x = varint64(p1, p2) + p1, p2, x = vm.Varint64(p1, p2) *p.AssertValid() = uint8(x) p = p.Add(1) @@ -8559,7 +8559,7 @@ func parsePackedVarint32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { x = uint64(*p1.Ptr()&0x7f) | uint64(*c.AssertValid())<<7 p1.PtrAddr += 2 } else { - p1, p2, x = varint64(p1, p2) + p1, p2, x = vm.Varint64(p1, p2) } *p.AssertValid() = uint32(x) @@ -8573,7 +8573,7 @@ func parsePackedVarint32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { default: for { var x uint64 - p1, p2, x = varint64(p1, p2) + p1, p2, x = vm.Varint64(p1, p2) *p.AssertValid() = uint32(x) p = p.Add(1) @@ -8688,7 +8688,7 @@ func parsePackedVarint64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { x = uint64(*p1.Ptr()&0x7f) | uint64(*c.AssertValid())<<7 p1.PtrAddr += 2 } else { - p1, p2, x = varint64(p1, p2) + p1, p2, x = vm.Varint64(p1, p2) } *p.AssertValid() = uint64(x) @@ -8702,7 +8702,7 @@ func parsePackedVarint64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { default: for { var x uint64 - p1, p2, x = varint64(p1, p2) + p1, p2, x = vm.Varint64(p1, p2) *p.AssertValid() = uint64(x) p = p.Add(1) @@ -8895,7 +8895,7 @@ exit: } func parseVarint32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseVarint[uint32] - p1, p2 = vm.P1.SetScratch(varint32(p1, p2)) + p1, p2 = vm.P1.SetScratch(vm.Varint64(p1, p2)) var p *uint32 p1, p2, p = vm.GetMutableField[uint32](p1, p2) @@ -8905,7 +8905,7 @@ func parseVarint32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { } func parseVarint64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseVarint[uint64] - p1, p2 = vm.P1.SetScratch(varint64(p1, p2)) + p1, p2 = vm.P1.SetScratch(vm.Varint64(p1, p2)) var p *uint64 p1, p2, p = vm.GetMutableField[uint64](p1, p2) @@ -8916,7 +8916,7 @@ func parseVarint64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { func parseZigZag32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseZigZag[uint32] - p1, p2 = vm.P1.SetScratch(varint32(p1, p2)) + p1, p2 = vm.P1.SetScratch(vm.Varint64(p1, p2)) p1, p2 = p1.SetScratch(p2, uint64(zigzag.Decode64[uint32](p2.Scratch()))) var p *uint32 @@ -8927,7 +8927,7 @@ func parseZigZag32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { } func parseZigZag64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2) { _ = parseZigZag[uint64] - p1, p2 = vm.P1.SetScratch(varint64(p1, p2)) + p1, p2 = vm.P1.SetScratch(vm.Varint64(p1, p2)) p1, p2 = p1.SetScratch(p2, uint64(zigzag.Decode64[uint64](p2.Scratch()))) var p *uint64 diff --git a/internal/tdp/thunks/thunks.go b/internal/tdp/thunks/thunks.go index 928f8ab..5970db1 100644 --- a/internal/tdp/thunks/thunks.go +++ b/internal/tdp/thunks/thunks.go @@ -22,7 +22,6 @@ import ( "buf.build/go/hyperpb/internal/tdp/compiler" "buf.build/go/hyperpb/internal/tdp/profile" - "buf.build/go/hyperpb/internal/tdp/vm" ) //go:generate go tool hyperstencil @@ -71,16 +70,3 @@ func fieldKind(fd protoreflect.FieldDescriptor, prof profile.Field) protoreflect return k } } - -// Helpers for allowing stencils to select between varint32 and varint64, since -// it does not support replacing free functions of the form a.F. - -//go:nosplit -func varint32(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2, uint64) { - return vm.Varint32(p1, p2) -} - -//go:nosplit -func varint64(p1 vm.P1, p2 vm.P2) (vm.P1, vm.P2, uint64) { - return vm.Varint64(p1, p2) -} diff --git a/internal/tdp/vm/internal/impl/impl.go b/internal/tdp/vm/internal/impl/impl.go index a611cb0..69217df 100644 --- a/internal/tdp/vm/internal/impl/impl.go +++ b/internal/tdp/vm/internal/impl/impl.go @@ -177,7 +177,10 @@ func (p1 P1) Log(p2 P2, op, format string, args ...any) { start := p1.PtrAddr.Sub(xunsafe.AddrOf(p1.Src())) end := p1.EndAddr.Sub(xunsafe.AddrOf(p1.Src())) - height := p2.P3().stack.bottom.Sub(p2.P3().stack.ptr) + var height int + if p2.P3() != nil { + height = p2.P3().stack.bottom.Sub(p2.P3().stack.ptr) + } var b byte if p1.PtrAddr < p1.EndAddr { b = *p1.Ptr() diff --git a/internal/tdp/vm/internal/impl/init.go b/internal/tdp/vm/internal/impl/init.go index 98fd31e..9c0fc29 100644 --- a/internal/tdp/vm/internal/impl/init.go +++ b/internal/tdp/vm/internal/impl/init.go @@ -44,7 +44,7 @@ func New(data []byte, m *dynamic.Message, options *options.Options) (P1, P2) { p3 := p3Pool.Get() p3.Options = *options - data = memory.RelocatePageBoundary(data, !p3.AllowAlias, 15) + data, m.Shared.End = memory.RelocatePageBoundary(data, !p3.AllowAlias, 15) m.Shared.Src = unsafe.SliceData(data) m.Shared.Len = len(data) // The arena keeps m.context alive, so we don't need to KeepAlive src. diff --git a/internal/tdp/vm/memory/memory.go b/internal/tdp/vm/memory/memory.go index 7ae8a78..f8bc74a 100644 --- a/internal/tdp/vm/memory/memory.go +++ b/internal/tdp/vm/memory/memory.go @@ -15,6 +15,8 @@ package memory import ( + "unsafe" + "buf.build/go/hyperpb/internal/xunsafe" ) @@ -41,11 +43,13 @@ const PageBoundary = 0x1000 // Exported for use by benchmarks. // //go:nosplit -func RelocatePageBoundary(data []byte, force bool, extra int) []byte { +func RelocatePageBoundary(data []byte, force bool, extra int) ([]byte, xunsafe.Addr[byte]) { + end := xunsafe.AddrOf(unsafe.SliceData(data)).Add(cap(data)) + furthest := end.RoundUpTo(PageBoundary) if !force { // Check if there is capacity to spare. if cap(data)-len(data) >= extra { - return data + return data, furthest } // If not, we need to check if there is a page boundary beyond this @@ -53,10 +57,14 @@ func RelocatePageBoundary(data []byte, force bool, extra int) []byte { if xunsafe.EndOf(data).Padding(PageBoundary) >= extra { // All good, we have nine or more bytes ahead of us before the next // page boundary. - return data + return data, furthest } } // Copy to a new slice with just enough capacity. - return append(data[:cap(data)], make([]byte, 9)...)[:len(data):cap(data)] + data = append(data[:cap(data)], make([]byte, extra)...)[:len(data):cap(data)] + end = xunsafe.AddrOf(unsafe.SliceData(data)).Add(cap(data)) + furthest = end.RoundUpTo(PageBoundary) + + return data, furthest } diff --git a/internal/tdp/vm/vm.go b/internal/tdp/vm/vm.go index c59760e..032e595 100644 --- a/internal/tdp/vm/vm.go +++ b/internal/tdp/vm/vm.go @@ -111,6 +111,8 @@ func Bytes(p1 P1, p2 P2) (P1, P2, zc.Range) { } // UTF8 parses a length-delimited byte buffer, and validates it for UTF8. +// +// Does not preserve p2.Scratch(). func UTF8(p1 P1, p2 P2) (P1, P2, zc.Range) { if p2.P3().AllowInvalidUTF8 { return Bytes(p1, p2) diff --git a/internal/testdata/testdata.go b/internal/testdata/testdata.go index d6f3237..f376ef2 100644 --- a/internal/testdata/testdata.go +++ b/internal/testdata/testdata.go @@ -261,7 +261,7 @@ func parseTestCase(t testing.TB, path string, file []byte) *TestCase { for i := range test.Specimens { // Avoid confounding between the normal/zerocopy benchmarks by // making sure we have optimal message placement before we start. - test.Specimens[i] = memory.RelocatePageBoundary(test.Specimens[i], false, 15) + test.Specimens[i], _ = memory.RelocatePageBoundary(test.Specimens[i], false, 15) } } diff --git a/internal/tools/hyperstencil/main.go b/internal/tools/hyperstencil/main.go index 7d985f1..4ad68b0 100644 --- a/internal/tools/hyperstencil/main.go +++ b/internal/tools/hyperstencil/main.go @@ -217,28 +217,31 @@ func makeStencil( } case *ast.CallExpr: - if sel, ok := n.Fun.(*ast.SelectorExpr); ok { + switch callee := n.Fun.(type) { + case *ast.SelectorExpr: // Special case for calling a method that is in the renames // array. - if arg, ok := dir.Renames[sel.Sel.Name]; ok { + if arg, ok := dir.Renames[callee.Sel.Name]; ok { // Rewrite the function expression to an identifier. n.Fun = &ast.Ident{Name: arg} // Append the selectee as the first argument of the call. - n.Args = slices.Insert(n.Args, 0, sel.X) + n.Args = slices.Insert(n.Args, 0, callee.X) + break } - } else if idx, ok := n.Fun.(*ast.IndexExpr); ok { - // Special case for calling a generic function. - if sel, ok := idx.X.(*ast.SelectorExpr); ok { - if arg, ok := dir.Renames[sel.Sel.Name]; ok { - // Rewrite the call to be non-generic. - sel.Sel.Name = arg - n.Fun = sel + + // Check for the selector + the function being in the renames + // array. + if id, ok := callee.X.(*ast.Ident); ok { + if arg, ok := dir.Renames[id.Name+"."+callee.Sel.Name]; ok { + // Rewrite the function expression to an identifier. + n.Fun = &ast.Ident{Name: arg} } } - } else if idx, ok := n.Fun.(*ast.IndexExpr); ok { + + case *ast.IndexExpr: // Special case for calling a generic function. - if sel, ok := idx.X.(*ast.SelectorExpr); ok { + if sel, ok := callee.X.(*ast.SelectorExpr); ok { if arg, ok := dir.Renames[sel.Sel.Name]; ok { // Rewrite the call to be non-generic. sel.Sel.Name = arg diff --git a/internal/tools/hypertag/main.go b/internal/tools/hypertag/main.go new file mode 100644 index 0000000..acb6aed --- /dev/null +++ b/internal/tools/hypertag/main.go @@ -0,0 +1,80 @@ +// Copyright 2025 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// hypertag is a code generator for generating a constant corresponding to +// a build constraint. It generates two files, one for the constraint being +// true and one for it being false, and a constant within indicating which is +// which. +package main + +import ( + "bytes" + "errors" + "flag" + "fmt" + "go/format" + "os" + "runtime/debug" + "strings" +) + +var ( + tag = flag.String("tag", "", "the constraint to generate files for") + name = flag.String("name", "", "the const to generate") +) + +func write(file string, data *bytes.Buffer) error { + defer data.Reset() + fmt, err := format.Source(data.Bytes()) + if err != nil { + return err + } + return os.WriteFile(file, fmt, 0666) +} + +func run() error { + info, ok := debug.ReadBuildInfo() + if !ok { + return errors.New("could not parse buildinfo") + } + warning := fmt.Sprintf("// Code generated %s DO NOT EDIT.", info.Main.Path) + + pkg := os.Getenv("GOPACKAGE") + buf := new(bytes.Buffer) + for _, b := range []bool{false, true} { + sigil := "" + if !b { + sigil = "!" + } + + fmt.Fprintf(buf, "%s\n\n", warning) + fmt.Fprintf(buf, "//go:build %s%s\n\n", sigil, *tag) + fmt.Fprintf(buf, "package %s\n\n", pkg) + fmt.Fprintf(buf, "// %s indicates whether the build tag %s is set.\n", *name, *tag) + fmt.Fprintf(buf, "const %s = %v\n", *name, b) + if err := write(fmt.Sprintf("tag_%s.%v.go", strings.ToLower(*name), b), buf); err != nil { + return err + } + } + + return nil +} + +func main() { + flag.Parse() + if err := run(); err != nil { + fmt.Fprintf(os.Stderr, "%e\n", err) + os.Exit(1) + } +} diff --git a/internal/tools/hypertest/exec.go b/internal/tools/hypertest/exec.go index f1df155..50d262c 100644 --- a/internal/tools/hypertest/exec.go +++ b/internal/tools/hypertest/exec.go @@ -49,6 +49,7 @@ type runner struct { race bool // Whether to build with -race. unopt bool // Whether to build without optimizations. args []string // Args for the test binary(s). + env []string // Env variables for builds. } type test string @@ -104,7 +105,7 @@ func (r *runner) build() ([]test, error) { // Build the command we're going to run. cmd := exec.Command(r.tool, args...) - cmd.Env = os.Environ() + cmd.Env = append(os.Environ(), r.env...) fmt.Printf("running: %s %s\n", cmd.Path, strings.Join(cmd.Args, " ")) if out, err := cmd.CombinedOutput(); err != nil { if exit, ok := xerrors.As[*exec.ExitError](err); ok { @@ -288,6 +289,7 @@ func (r *runner) runOverSSH(remote string, tests []test) (string, error) { } cmd, err := ssh.Command(test.binary(r, tmpdir), args...) + fmt.Printf("running: %s %s\n", cmd.Path, strings.Join(cmd.Args, " ")) if err != nil { return "", err } diff --git a/internal/tools/hypertest/main.go b/internal/tools/hypertest/main.go index 2229f75..73bfb2b 100644 --- a/internal/tools/hypertest/main.go +++ b/internal/tools/hypertest/main.go @@ -23,6 +23,7 @@ import ( "fmt" "os" "os/exec" + "strings" "buf.build/go/hyperpb/internal/xerrors" ) @@ -37,6 +38,7 @@ var ( checkptr = flag.Bool("checkptr", false, "build with checkptr (crappy asan) instrumentation") race = flag.Bool("race", false, "build with -race") unopt = flag.Bool("unopt", false, "build with optimizations turned off") + env = flag.String("env", "", "environment variables to set in the build, ;-separated") benchCsv = flag.String("csv", "", "file for benchmark csv output") benchTable = flag.String("table", "", "file for benchmark table output") @@ -67,6 +69,7 @@ func run() error { checkptr: *checkptr, race: *race, unopt: *unopt, + env: strings.Split(*env, ";"), args: flag.Args(), } diff --git a/internal/xprotoreflect/value.go b/internal/xprotoreflect/value.go index 09c9d15..de20a0b 100644 --- a/internal/xprotoreflect/value.go +++ b/internal/xprotoreflect/value.go @@ -66,7 +66,7 @@ func ValueOfScalar(v any) protoreflect.Value { func GetInt[T Int](v protoreflect.Value) T { var z T r := unwrapValue(v) - if r.typ != xunsafe.AnyType(z) { + if r.typ != xunsafe.TypeOf(z) { panic(typeMismatch(protoreflect.ValueOf(z), v)) } @@ -77,7 +77,7 @@ func GetInt[T Int](v protoreflect.Value) T { // type is not a string. func GetString(v protoreflect.Value) string { r := unwrapValue(v) - if r.typ != xunsafe.AnyType("") { + if r.typ != xunsafe.TypeOf("") { panic(typeMismatch(protoreflect.ValueOf(""), v)) } @@ -138,7 +138,7 @@ func Map(v protoreflect.Value) protoreflect.Map { // UnsafeUnwrap unwraps a [protoreflect.Value] into a raw pointer, checking // that it has a particular type. -func UnsafeUnwrap(v protoreflect.Value, ty uintptr) unsafe.Pointer { +func UnsafeUnwrap(v protoreflect.Value, ty xunsafe.Type) unsafe.Pointer { r := unwrapValue(v) if r.typ != ty { return nil @@ -148,10 +148,7 @@ func UnsafeUnwrap(v protoreflect.Value, ty uintptr) unsafe.Pointer { // rawValue matches the layout of protoreflect.Value exactly. type rawValue struct { - // It is slightly funny that they store typ as an unsafe.Pointer, since most - // of the runtime stores itabs as uintptrs, because all itabs live in - // permanent memory. - typ uintptr + typ xunsafe.Type data *byte num uint64 } diff --git a/internal/xunsafe/any.go b/internal/xunsafe/any.go index 7a3c387..8474083 100644 --- a/internal/xunsafe/any.go +++ b/internal/xunsafe/any.go @@ -24,24 +24,50 @@ import ( "buf.build/go/hyperpb/internal/xsync" ) -var isDirectMap xsync.Map[reflect.Type, bool] +var ( + isDirectMap xsync.Map[reflect.Type, bool] + reflectTypeItab = BitCast[iface](reflect.TypeFor[int]()).itab +) // iface is the internal representation an a Go interface value. type iface struct { - itab uintptr + itab Type data *byte } -// AnyData extracts the pointer value from an any. -func AnyData(v any) *byte { - return Cast[iface](NoEscape(&v)).data +// Type is a pointer to a type descriptor from the runtime. +// +// This memory is not managed by the GC, so it does not need to be a Go pointer. +type Type Addr[byte] + +// TypeFor returns the [Type] for a given type parameter. +func TypeFor[T any]() Type { + return FromReflect(reflect.TypeFor[T]()) } -// AnyType extracts the opaque type from an any. -func AnyType(v any) uintptr { +// TypeOf extracts the opaque type from an any. +func TypeOf(v any) Type { return Cast[iface](NoEscape(&v)).itab } +// FromReflect converts a [reflect.Type] into an opaque type pointer. +func FromReflect(t reflect.Type) Type { + return Type(AddrOf(AnyData(t))) +} + +// Reflect returns the [reflect.Type] for an opaque type pointer. +func (t Type) Reflect() reflect.Type { + return BitCast[reflect.Type](iface{ + itab: reflectTypeItab, + data: Addr[byte](t).AssertValid(), + }) +} + +// AnyData extracts the pointer value from an any. +func AnyData(v any) *byte { + return Cast[iface](NoEscape(&v)).data +} + // AnyBytes extracts a slice pointing to the variable-length data of an any. func AnyBytes(v any) []byte { if v == nil { @@ -57,8 +83,13 @@ func AnyBytes(v any) []byte { return Bytes(&p2) } +// AnyCast changes the type of an any. +func AnyCast(ty reflect.Type, v any) any { + return MakeAny(FromReflect(ty), AnyData(v)) +} + // MakeAny builds an any out of the given data. -func MakeAny(typ uintptr, data *byte) any { +func MakeAny(typ Type, data *byte) any { raw := iface{typ, data} return BitCast[any](raw) } diff --git a/message.go b/message.go index 47599d9..bae79ae 100644 --- a/message.go +++ b/message.go @@ -39,7 +39,7 @@ var ( errInvalid = errors.New("hyperpb: invalid message") //go:linkname hyperpbMessage buf.build/go/hyperpb/internal/tdp/profile.hyperpbMessage - hyperpbMessage = xunsafe.AnyType((*Message)(nil)) + hyperpbMessage = xunsafe.TypeOf((*Message)(nil)) ) // Message implements [protoreflect.Message].