summaryrefslogtreecommitdiff
path: root/vendor/github.com/bytedance/sonic/internal/encoder
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2025-04-14 09:43:56 +0200
committerLibravatar GitHub <noreply@github.com>2025-04-14 09:43:56 +0200
commit51b9ef5c346f333e558eca38fd954464322f3b7d (patch)
treebf5cd0de887a27c1afc66345b1a464921d96e503 /vendor/github.com/bytedance/sonic/internal/encoder
parent[docs] Remind the user that password resets don't work without restarting. (#... (diff)
downloadgotosocial-51b9ef5c346f333e558eca38fd954464322f3b7d.tar.xz
[chore]: Bump github.com/gin-contrib/gzip from 1.2.2 to 1.2.3 (#4000)
Bumps [github.com/gin-contrib/gzip](https://github.com/gin-contrib/gzip) from 1.2.2 to 1.2.3. - [Release notes](https://github.com/gin-contrib/gzip/releases) - [Changelog](https://github.com/gin-contrib/gzip/blob/master/.goreleaser.yaml) - [Commits](https://github.com/gin-contrib/gzip/compare/v1.2.2...v1.2.3) --- updated-dependencies: - dependency-name: github.com/gin-contrib/gzip dependency-version: 1.2.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/bytedance/sonic/internal/encoder')
-rw-r--r--vendor/github.com/bytedance/sonic/internal/encoder/alg/mapiter.go11
-rw-r--r--vendor/github.com/bytedance/sonic/internal/encoder/alg/primitives.go17
-rw-r--r--vendor/github.com/bytedance/sonic/internal/encoder/alg/spec.go4
-rw-r--r--vendor/github.com/bytedance/sonic/internal/encoder/alg/spec_compat.go2
-rw-r--r--vendor/github.com/bytedance/sonic/internal/encoder/compiler.go29
-rw-r--r--vendor/github.com/bytedance/sonic/internal/encoder/ir/op.go28
-rw-r--r--vendor/github.com/bytedance/sonic/internal/encoder/pools_amd64.go21
-rw-r--r--vendor/github.com/bytedance/sonic/internal/encoder/vars/errors.go4
-rw-r--r--vendor/github.com/bytedance/sonic/internal/encoder/vm/vm.go24
-rw-r--r--vendor/github.com/bytedance/sonic/internal/encoder/x86/asm_stubs_amd64_go121.go4
-rw-r--r--vendor/github.com/bytedance/sonic/internal/encoder/x86/assembler_regabi_amd64.go31
-rw-r--r--vendor/github.com/bytedance/sonic/internal/encoder/x86/debug_go117.go4
-rw-r--r--vendor/github.com/bytedance/sonic/internal/encoder/x86/stbus.go3
13 files changed, 119 insertions, 63 deletions
diff --git a/vendor/github.com/bytedance/sonic/internal/encoder/alg/mapiter.go b/vendor/github.com/bytedance/sonic/internal/encoder/alg/mapiter.go
index 5d9956a90..032ae3b8a 100644
--- a/vendor/github.com/bytedance/sonic/internal/encoder/alg/mapiter.go
+++ b/vendor/github.com/bytedance/sonic/internal/encoder/alg/mapiter.go
@@ -165,19 +165,20 @@ func IteratorNext(p *MapIterator) {
p.ki++
}
-func IteratorStart(t *rt.GoMapType, m *rt.GoMap, fv uint64) (*MapIterator, error) {
+func IteratorStart(t *rt.GoMapType, m unsafe.Pointer, fv uint64) (*MapIterator, error) {
it := newIterator()
rt.Mapiterinit(t, m, &it.It)
+ count := rt.Maplen(m)
/* check for key-sorting, empty map don't need sorting */
- if m.Count == 0 || (fv & (1<<BitSortMapKeys)) == 0 {
+ if count == 0 || (fv & (1<<BitSortMapKeys)) == 0 {
it.ki = -1
return it, nil
}
/* pre-allocate space if needed */
- if m.Count > it.kv.Cap {
- it.kv = rt.GrowSlice(iteratorPair, it.kv, m.Count)
+ if count > it.kv.Cap {
+ it.kv = rt.GrowSlice(iteratorPair, it.kv, count)
}
/* dump all the key-value pairs */
@@ -189,7 +190,7 @@ func IteratorStart(t *rt.GoMapType, m *rt.GoMap, fv uint64) (*MapIterator, error
}
/* sort the keys, map with only 1 item don't need sorting */
- if it.ki = 1; m.Count > 1 {
+ if it.ki = 1; count > 1 {
radixQsort(it.data(), 0, maxDepth(it.kv.Len))
}
diff --git a/vendor/github.com/bytedance/sonic/internal/encoder/alg/primitives.go b/vendor/github.com/bytedance/sonic/internal/encoder/alg/primitives.go
index 63fa01890..e2610fbc8 100644
--- a/vendor/github.com/bytedance/sonic/internal/encoder/alg/primitives.go
+++ b/vendor/github.com/bytedance/sonic/internal/encoder/alg/primitives.go
@@ -1,12 +1,12 @@
/**
* Copyright 2024 ByteDance 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.
@@ -19,8 +19,11 @@ package alg
import (
"encoding"
"encoding/json"
+ "reflect"
+ "unsafe"
"github.com/bytedance/sonic/internal/encoder/vars"
+ "github.com/bytedance/sonic/internal/resolver"
"github.com/bytedance/sonic/internal/rt"
)
@@ -92,4 +95,10 @@ func EncodeTextMarshaler(buf *[]byte, val encoding.TextMarshaler, opt uint64) er
return nil
}
}
- \ No newline at end of file
+
+func IsZero(val unsafe.Pointer, fv *resolver.FieldMeta) bool {
+ rv := reflect.NewAt(fv.Type, val).Elem()
+ b1 := fv.IsZero == nil && rv.IsZero()
+ b2 := fv.IsZero != nil && fv.IsZero(rv)
+ return b1 || b2
+}
diff --git a/vendor/github.com/bytedance/sonic/internal/encoder/alg/spec.go b/vendor/github.com/bytedance/sonic/internal/encoder/alg/spec.go
index bff943626..6f76ac739 100644
--- a/vendor/github.com/bytedance/sonic/internal/encoder/alg/spec.go
+++ b/vendor/github.com/bytedance/sonic/internal/encoder/alg/spec.go
@@ -1,5 +1,5 @@
-//go:build (amd64 && go1.16 && !go1.24) || (arm64 && go1.20 && !go1.24)
-// +build amd64,go1.16,!go1.24 arm64,go1.20,!go1.24
+//go:build (amd64 && go1.16 && !go1.25) || (arm64 && go1.20 && !go1.25)
+// +build amd64,go1.16,!go1.25 arm64,go1.20,!go1.25
/**
* Copyright 2024 ByteDance Inc.
diff --git a/vendor/github.com/bytedance/sonic/internal/encoder/alg/spec_compat.go b/vendor/github.com/bytedance/sonic/internal/encoder/alg/spec_compat.go
index c15cbf7d8..cd8369834 100644
--- a/vendor/github.com/bytedance/sonic/internal/encoder/alg/spec_compat.go
+++ b/vendor/github.com/bytedance/sonic/internal/encoder/alg/spec_compat.go
@@ -1,4 +1,4 @@
-// +build !amd64,!arm64 go1.24 !go1.16 arm64,!go1.20
+// +build !amd64,!arm64 go1.25 !go1.16 arm64,!go1.20
/**
* Copyright 2024 ByteDance Inc.
diff --git a/vendor/github.com/bytedance/sonic/internal/encoder/compiler.go b/vendor/github.com/bytedance/sonic/internal/encoder/compiler.go
index 902fbc98b..737dd3e07 100644
--- a/vendor/github.com/bytedance/sonic/internal/encoder/compiler.go
+++ b/vendor/github.com/bytedance/sonic/internal/encoder/compiler.go
@@ -219,7 +219,7 @@ func (self *Compiler) compileOps(p *ir.Program, sp int, vt reflect.Type) {
case reflect.Struct:
self.compileStruct(p, sp, vt)
default:
- panic(vars.Error_type(vt))
+ self.compileUnsupportedType(p, vt)
}
}
@@ -440,7 +440,8 @@ func (self *Compiler) compileStructBody(p *ir.Program, sp int, vt reflect.Type)
p.Add(ir.OP_cond_set)
/* compile each field */
- for _, fv := range resolver.ResolveStruct(vt) {
+ fvs := resolver.ResolveStruct(vt)
+ for i, fv := range fvs {
var s []int
var o resolver.Offset
@@ -463,7 +464,12 @@ func (self *Compiler) compileStructBody(p *ir.Program, sp int, vt reflect.Type)
/* check for "omitempty" option */
if fv.Type.Kind() != reflect.Struct && fv.Type.Kind() != reflect.Array && (fv.Opts&resolver.F_omitempty) != 0 {
s = append(s, p.PC())
- self.compileStructFieldZero(p, fv.Type)
+ self.compileStructFieldEmpty(p, fv.Type)
+ }
+ /* check for "omitzero" option */
+ if fv.Opts&resolver.F_omitzero != 0 {
+ s = append(s, p.PC())
+ p.VField(ir.OP_is_zero, &fvs[i])
}
/* add the comma if not the first element */
@@ -574,7 +580,7 @@ func (self *Compiler) compileStructFieldStr(p *ir.Program, sp int, vt reflect.Ty
}
}
-func (self *Compiler) compileStructFieldZero(p *ir.Program, vt reflect.Type) {
+func (self *Compiler) compileStructFieldEmpty(p *ir.Program, vt reflect.Type) {
switch vt.Kind() {
case reflect.Bool:
p.Add(ir.OP_is_zero_1)
@@ -626,16 +632,16 @@ func (self *Compiler) compileStructFieldQuoted(p *ir.Program, sp int, vt reflect
}
func (self *Compiler) compileInterface(p *ir.Program, vt reflect.Type) {
- x := p.PC()
- p.Add(ir.OP_is_nil_p1)
-
/* iface and efaces are different */
if vt.NumMethod() == 0 {
p.Add(ir.OP_eface)
- } else {
- p.Add(ir.OP_iface)
+ return
}
+ x := p.PC()
+ p.Add(ir.OP_is_nil_p1)
+ p.Add(ir.OP_iface)
+
/* the "null" value */
e := p.PC()
p.Add(ir.OP_goto)
@@ -644,6 +650,11 @@ func (self *Compiler) compileInterface(p *ir.Program, vt reflect.Type) {
p.Pin(e)
}
+func (self *Compiler) compileUnsupportedType(p *ir.Program, vt reflect.Type) {
+ p.Rtt(ir.OP_unsupported, vt)
+}
+
+
func (self *Compiler) compileMarshaler(p *ir.Program, op ir.Op, vt reflect.Type, mt reflect.Type) {
pc := p.PC()
vk := vt.Kind()
diff --git a/vendor/github.com/bytedance/sonic/internal/encoder/ir/op.go b/vendor/github.com/bytedance/sonic/internal/encoder/ir/op.go
index a0c693f00..fe5a4ebe7 100644
--- a/vendor/github.com/bytedance/sonic/internal/encoder/ir/op.go
+++ b/vendor/github.com/bytedance/sonic/internal/encoder/ir/op.go
@@ -24,6 +24,7 @@ import (
"unsafe"
"github.com/bytedance/sonic/internal/encoder/vars"
+ "github.com/bytedance/sonic/internal/resolver"
"github.com/bytedance/sonic/internal/rt"
)
@@ -80,6 +81,8 @@ const (
OP_marshal_text_p
OP_cond_set
OP_cond_testc
+ OP_unsupported
+ OP_is_zero
)
const (
@@ -141,6 +144,7 @@ var OpNames = [256]string{
OP_marshal_text_p: "marshal_text_p",
OP_cond_set: "cond_set",
OP_cond_testc: "cond_testc",
+ OP_unsupported: "unsupported type",
}
func (self Op) String() string {
@@ -229,6 +233,11 @@ type typAndTab struct {
itab *rt.GoItab
}
+type typAndField struct {
+ vt reflect.Type
+ fv *resolver.FieldMeta
+}
+
func NewInsVtab(op Op, vt reflect.Type, itab *rt.GoItab) Instr {
return Instr{
o: op,
@@ -239,6 +248,13 @@ func NewInsVtab(op Op, vt reflect.Type, itab *rt.GoItab) Instr {
}
}
+func NewInsField(op Op, fv *resolver.FieldMeta) Instr {
+ return Instr{
+ o: op,
+ p: unsafe.Pointer(fv),
+ }
+}
+
func NewInsVp(op Op, vt reflect.Type, pv bool) Instr {
i := 0
if pv {
@@ -263,6 +279,10 @@ func (self Instr) Vf() uint8 {
return (*rt.GoType)(self.p).KindFlags
}
+func (self Instr) VField() (*resolver.FieldMeta) {
+ return (*resolver.FieldMeta)(self.p)
+}
+
func (self Instr) Vs() (v string) {
(*rt.GoString)(unsafe.Pointer(&v)).Ptr = self.p
(*rt.GoString)(unsafe.Pointer(&v)).Len = self.Vi()
@@ -273,6 +293,10 @@ func (self Instr) Vk() reflect.Kind {
return (*rt.GoType)(self.p).Kind()
}
+func (self Instr) GoType() *rt.GoType {
+ return (*rt.GoType)(self.p)
+}
+
func (self Instr) Vt() reflect.Type {
return (*rt.GoType)(self.p).Pack()
}
@@ -442,6 +466,10 @@ func (self *Program) Vtab(op Op, vt reflect.Type, itab *rt.GoItab) {
*self = append(*self, NewInsVtab(op, vt, itab))
}
+func (self *Program) VField(op Op, fv *resolver.FieldMeta) {
+ *self = append(*self, NewInsField(op, fv))
+}
+
func (self Program) Disassemble() string {
nb := len(self)
tab := make([]bool, nb+1)
diff --git a/vendor/github.com/bytedance/sonic/internal/encoder/pools_amd64.go b/vendor/github.com/bytedance/sonic/internal/encoder/pools_amd64.go
index 43f026fbe..eda46025d 100644
--- a/vendor/github.com/bytedance/sonic/internal/encoder/pools_amd64.go
+++ b/vendor/github.com/bytedance/sonic/internal/encoder/pools_amd64.go
@@ -17,7 +17,6 @@
package encoder
import (
- "errors"
"reflect"
"unsafe"
@@ -52,29 +51,11 @@ var _KeepAlive struct {
frame [x86.FP_offs]byte
}
-var errCallShadow = errors.New("DON'T CALL THIS!")
-
-// Faker func of _Encoder, used to export its stackmap as _Encoder's
-func _Encoder_Shadow(rb *[]byte, vp unsafe.Pointer, sb *vars.Stack, fv uint64) (err error) {
- // align to assembler_amd64.go: x86.FP_offs
- var frame [x86.FP_offs]byte
-
- // must keep all args and frames noticeable to GC
- _KeepAlive.rb = rb
- _KeepAlive.vp = vp
- _KeepAlive.sb = sb
- _KeepAlive.fv = fv
- _KeepAlive.err = err
- _KeepAlive.frame = frame
-
- return errCallShadow
-}
-
func makeEncoderX86(vt *rt.GoType, ex ...interface{}) (interface{}, error) {
pp, err := NewCompiler().Compile(vt.Pack(), ex[0].(bool))
if err != nil {
return nil, err
- }
+ }
as := x86.NewAssembler(pp)
as.Name = vt.String()
return as.Load(), nil
diff --git a/vendor/github.com/bytedance/sonic/internal/encoder/vars/errors.go b/vendor/github.com/bytedance/sonic/internal/encoder/vars/errors.go
index 77919c44a..ca3bbca1f 100644
--- a/vendor/github.com/bytedance/sonic/internal/encoder/vars/errors.go
+++ b/vendor/github.com/bytedance/sonic/internal/encoder/vars/errors.go
@@ -47,6 +47,10 @@ func Error_number(number json.Number) error {
}
}
+func Error_unsuppoted(typ *rt.GoType) error {
+ return &json.UnsupportedTypeError{Type: typ.Pack() }
+}
+
func Error_marshaler(ret []byte, pos int) error {
return fmt.Errorf("invalid Marshaler output json syntax at %d: %q", pos, ret)
}
diff --git a/vendor/github.com/bytedance/sonic/internal/encoder/vm/vm.go b/vendor/github.com/bytedance/sonic/internal/encoder/vm/vm.go
index b75ba807a..aa3f515ce 100644
--- a/vendor/github.com/bytedance/sonic/internal/encoder/vm/vm.go
+++ b/vendor/github.com/bytedance/sonic/internal/encoder/vm/vm.go
@@ -26,7 +26,6 @@ import (
"github.com/bytedance/sonic/internal/encoder/ir"
"github.com/bytedance/sonic/internal/encoder/vars"
"github.com/bytedance/sonic/internal/rt"
- "github.com/bytedance/sonic/internal/base64"
)
const (
@@ -176,7 +175,7 @@ func Execute(b *[]byte, p unsafe.Pointer, s *vars.Stack, flags uint64, prog *ir.
buf = alg.F64toa(buf, v)
case ir.OP_bin:
v := *(*[]byte)(p)
- buf = base64.EncodeBase64(buf, v)
+ buf = rt.EncodeBase64(buf, v)
case ir.OP_quote:
v := *(*string)(p)
buf = alg.Quote(buf, v, true)
@@ -202,13 +201,13 @@ func Execute(b *[]byte, p unsafe.Pointer, s *vars.Stack, flags uint64, prog *ir.
}
buf = *b
case ir.OP_is_zero_map:
- v := *(**rt.GoMap)(p)
- if v == nil || v.Count == 0 {
+ v := *(*unsafe.Pointer)(p)
+ if v == nil || rt.Maplen(v) == 0 {
pc = ins.Vi()
continue
}
case ir.OP_map_iter:
- v := *(**rt.GoMap)(p)
+ v := *(*unsafe.Pointer)(p)
vt := ins.Vr()
it, err := alg.IteratorStart(rt.MapType(vt), v, flags)
if err != nil {
@@ -284,6 +283,12 @@ func Execute(b *[]byte, p unsafe.Pointer, s *vars.Stack, flags uint64, prog *ir.
pc = ins.Vi()
continue
}
+ case ir.OP_is_zero:
+ fv := ins.VField()
+ if alg.IsZero(p, fv) {
+ pc = ins.Vi()
+ continue
+ }
case ir.OP_is_zero_1:
if *(*uint8)(p) == 0 {
pc = ins.Vi()
@@ -338,6 +343,8 @@ func Execute(b *[]byte, p unsafe.Pointer, s *vars.Stack, flags uint64, prog *ir.
if err := alg.EncodeJsonMarshaler(&buf, *(*json.Marshaler)(unsafe.Pointer(&it)), (flags)); err != nil {
return err
}
+ case ir.OP_unsupported:
+ return vars.Error_unsuppoted(ins.GoType())
default:
panic(fmt.Sprintf("not implement %s at %d", ins.Op().String(), pc))
}
@@ -347,13 +354,6 @@ func Execute(b *[]byte, p unsafe.Pointer, s *vars.Stack, flags uint64, prog *ir.
return nil
}
-// func to_buf(w unsafe.Pointer, l int, c int) []byte {
-// return rt.BytesFrom(unsafe.Pointer(uintptr(w)-uintptr(l)), l, c)
-// }
-
-// func from_buf(buf []byte) (unsafe.Pointer, int, int) {
-// return rt.IndexByte(buf, len(buf)), len(buf), cap(buf)
-// }
func has_opts(opts uint64, bit int) bool {
return opts & (1<<bit) != 0
diff --git a/vendor/github.com/bytedance/sonic/internal/encoder/x86/asm_stubs_amd64_go121.go b/vendor/github.com/bytedance/sonic/internal/encoder/x86/asm_stubs_amd64_go121.go
index 3d70021e4..6956bd9ba 100644
--- a/vendor/github.com/bytedance/sonic/internal/encoder/x86/asm_stubs_amd64_go121.go
+++ b/vendor/github.com/bytedance/sonic/internal/encoder/x86/asm_stubs_amd64_go121.go
@@ -1,5 +1,5 @@
-//go:build go1.21 && !go1.24
-// +build go1.21,!go1.24
+//go:build go1.21 && !go1.25
+// +build go1.21,!go1.25
// Copyright 2023 CloudWeGo Authors
//
diff --git a/vendor/github.com/bytedance/sonic/internal/encoder/x86/assembler_regabi_amd64.go b/vendor/github.com/bytedance/sonic/internal/encoder/x86/assembler_regabi_amd64.go
index c0912fb81..d6d451329 100644
--- a/vendor/github.com/bytedance/sonic/internal/encoder/x86/assembler_regabi_amd64.go
+++ b/vendor/github.com/bytedance/sonic/internal/encoder/x86/assembler_regabi_amd64.go
@@ -1,5 +1,5 @@
-//go:build go1.17 && !go1.24
-// +build go1.17,!go1.24
+//go:build go1.17 && !go1.25
+// +build go1.17,!go1.25
/*
* Copyright 2021 ByteDance Inc.
@@ -265,6 +265,8 @@ var _OpFuncTab = [256]func(*Assembler, *ir.Instr){
ir.OP_marshal_text_p: (*Assembler)._asm_OP_marshal_text_p,
ir.OP_cond_set: (*Assembler)._asm_OP_cond_set,
ir.OP_cond_testc: (*Assembler)._asm_OP_cond_testc,
+ ir.OP_unsupported: (*Assembler)._asm_OP_unsupported,
+ ir.OP_is_zero: (*Assembler)._asm_OP_is_zero,
}
func (self *Assembler) instr(v *ir.Instr) {
@@ -756,7 +758,7 @@ var (
_F_f32toa = jit.Imm(int64(native.S_f32toa))
_F_i64toa = jit.Imm(int64(native.S_i64toa))
_F_u64toa = jit.Imm(int64(native.S_u64toa))
- _F_b64encode = jit.Imm(int64(_subr__b64encode))
+ _F_b64encode = jit.Imm(int64(rt.SubrB64Encode))
)
var (
@@ -1097,6 +1099,20 @@ func (self *Assembler) _asm_OP_is_zero_map(p *ir.Instr) {
self.Xjmp("JE", p.Vi()) // JE p.Vi()
}
+var (
+ _F_is_zero = jit.Func(alg.IsZero)
+ _T_reflect_Type = rt.UnpackIface(reflect.Type(nil))
+)
+
+func (self *Assembler) _asm_OP_is_zero(p *ir.Instr) {
+ fv := p.VField()
+ self.Emit("MOVQ", _SP_p, _AX) // ptr
+ self.Emit("MOVQ", jit.ImmPtr(unsafe.Pointer(fv)), _BX) // fv
+ self.call_go(_F_is_zero) // CALL $fn
+ self.Emit("CMPB", _AX, jit.Imm(0)) // CMPB (SP.p), $0
+ self.Xjmp("JNE", p.Vi()) // JE p.Vi()
+}
+
func (self *Assembler) _asm_OP_goto(p *ir.Instr) {
self.Xjmp("JMP", p.Vi())
}
@@ -1187,6 +1203,15 @@ func (self *Assembler) _asm_OP_cond_testc(p *ir.Instr) {
self.Xjmp("JC", p.Vi())
}
+var _F_error_unsupported = jit.Func(vars.Error_unsuppoted)
+
+func (self *Assembler) _asm_OP_unsupported(i *ir.Instr) {
+ typ := int64(uintptr(unsafe.Pointer(i.GoType())))
+ self.Emit("MOVQ", jit.Imm(typ), _AX)
+ self.call_go(_F_error_unsupported)
+ self.Sjmp("JMP", _LB_error)
+}
+
func (self *Assembler) print_gc(i int, p1 *ir.Instr, p2 *ir.Instr) {
self.Emit("MOVQ", jit.Imm(int64(p2.Op())), _CX) // MOVQ $(p2.Op()), AX
self.Emit("MOVQ", jit.Imm(int64(p1.Op())), _BX) // MOVQ $(p1.Op()), BX
diff --git a/vendor/github.com/bytedance/sonic/internal/encoder/x86/debug_go117.go b/vendor/github.com/bytedance/sonic/internal/encoder/x86/debug_go117.go
index 0aca3f4c5..1d1338756 100644
--- a/vendor/github.com/bytedance/sonic/internal/encoder/x86/debug_go117.go
+++ b/vendor/github.com/bytedance/sonic/internal/encoder/x86/debug_go117.go
@@ -1,5 +1,5 @@
-//go:build go1.17 && !go1.24
-// +build go1.17,!go1.24
+//go:build go1.17 && !go1.25
+// +build go1.17,!go1.25
/*
* Copyright 2021 ByteDance Inc.
diff --git a/vendor/github.com/bytedance/sonic/internal/encoder/x86/stbus.go b/vendor/github.com/bytedance/sonic/internal/encoder/x86/stbus.go
index b9fa473f5..7b6b1f96b 100644
--- a/vendor/github.com/bytedance/sonic/internal/encoder/x86/stbus.go
+++ b/vendor/github.com/bytedance/sonic/internal/encoder/x86/stbus.go
@@ -27,9 +27,6 @@ import (
_ "github.com/cloudwego/base64x"
)
-//go:linkname _subr__b64encode github.com/cloudwego/base64x._subr__b64encode
-var _subr__b64encode uintptr
-
var compiler func(*rt.GoType, ... interface{}) (interface{}, error)
func SetCompiler(c func(*rt.GoType, ... interface{}) (interface{}, error)) {