github.com/pkujhd/goloader@v0.0.0-20240411034752-1a28096bd7bd/type.1.14.go (about)

     1  //go:build go1.14 && !go1.23
     2  // +build go1.14,!go1.23
     3  
     4  package goloader
     5  
     6  import (
     7  	"unsafe"
     8  )
     9  
    10  // Needs to be in sync with ../cmd/link/internal/ld/decodesym.go:/^func.commonsize,
    11  // ../cmd/compile/internal/gc/reflect.go:/^func.dcommontype and
    12  // ../reflect/type.go:/^type.rtype.
    13  // ../internal/reflectlite/type.go:/^type.rtype.
    14  type _type struct {
    15  	size       uintptr
    16  	ptrdata    uintptr // size of memory prefix holding all pointers
    17  	hash       uint32
    18  	tflag      tflag
    19  	align      uint8
    20  	fieldAlign uint8
    21  	kind       uint8
    22  	// function for comparing objects of this type
    23  	// (ptr to object A, ptr to object B) -> ==?
    24  	equal func(unsafe.Pointer, unsafe.Pointer) bool
    25  	// gcdata stores the GC type data for the garbage collector.
    26  	// If the KindGCProg bit is set in kind, gcdata is a GC program.
    27  	// Otherwise it is a ptrmask bitmap. See mbitmap.go for details.
    28  	gcdata    *byte
    29  	str       nameOff
    30  	ptrToThis typeOff
    31  }