diff options
Diffstat (limited to 'vendor/github.com/bytedance/sonic/internal/rt')
3 files changed, 15 insertions, 2 deletions
diff --git a/vendor/github.com/bytedance/sonic/internal/rt/fastmem.go b/vendor/github.com/bytedance/sonic/internal/rt/fastmem.go index 358ce80ce..5bf80dd4e 100644 --- a/vendor/github.com/bytedance/sonic/internal/rt/fastmem.go +++ b/vendor/github.com/bytedance/sonic/internal/rt/fastmem.go @@ -87,7 +87,6 @@ func GuardSlice(buf *[]byte, n int) { copy(tmp, *buf) *buf = tmp } - return } //go:nosplit diff --git a/vendor/github.com/bytedance/sonic/internal/rt/fastvalue.go b/vendor/github.com/bytedance/sonic/internal/rt/fastvalue.go index 87df6b94a..2b2757f5b 100644 --- a/vendor/github.com/bytedance/sonic/internal/rt/fastvalue.go +++ b/vendor/github.com/bytedance/sonic/internal/rt/fastvalue.go @@ -22,14 +22,23 @@ import ( ) var ( - reflectRtypeItab = findReflectRtypeItab() + reflectRtypeItab = findReflectRtypeItab() ) +// GoType.KindFlags const const ( F_direct = 1 << 5 F_kind_mask = (1 << 5) - 1 ) +// GoType.Flags const +const ( + tflagUncommon uint8 = 1 << 0 + tflagExtraStar uint8 = 1 << 1 + tflagNamed uint8 = 1 << 2 + tflagRegularMemory uint8 = 1 << 3 +) + type GoType struct { Size uintptr PtrData uintptr @@ -44,6 +53,10 @@ type GoType struct { PtrToSelf int32 } +func (self *GoType) IsNamed() bool { + return (self.Flags & tflagNamed) != 0 +} + func (self *GoType) Kind() reflect.Kind { return reflect.Kind(self.KindFlags & F_kind_mask) } diff --git a/vendor/github.com/bytedance/sonic/internal/rt/stackmap.go b/vendor/github.com/bytedance/sonic/internal/rt/stackmap.go index e2c28c598..84ed9a95f 100644 --- a/vendor/github.com/bytedance/sonic/internal/rt/stackmap.go +++ b/vendor/github.com/bytedance/sonic/internal/rt/stackmap.go @@ -152,6 +152,7 @@ type StackMapBuilder struct { b Bitmap } +//go:nocheckptr func (self *StackMapBuilder) Build() (p *StackMap) { nb := len(self.b.B) bm := mallocgc(_StackMapSize + uintptr(nb) - 1, byteType, false) |
