1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 // Runtime type representation.
19 hashfn
func(unsafe
.Pointer
, uintptr) uintptr
20 equalfn
func(unsafe
.Pointer
, unsafe
.Pointer
) bool
28 // Return whether two type descriptors are equal.
29 // This is gccgo-specific, as gccgo, unlike gc, permits multiple
30 // independent descriptors for a single type.
31 func eqtype(t1
, t2
*_type
) bool {
35 case t1
== nil || t2
== nil:
37 case t1
.kind
!= t2
.kind || t1
.hash
!= t2
.hash
:
40 return *t1
.string == *t2
.string
52 type uncommontype
struct {
64 type interfacetype
struct {
73 bucket
*_type
// internal type representing a hash bucket
74 hmap
*_type
// internal type representing a hmap
75 keysize
uint8 // size of key slot
76 indirectkey
bool // store ptr to key instead of key itself
77 valuesize
uint8 // size of value slot
78 indirectvalue
bool // store ptr to value instead of value itself
79 bucketsize
uint16 // size of bucket
80 reflexivekey
bool // true if k==k for all keys
81 needkeyupdate
bool // true if we need to update key on an overwrite
84 type arraytype
struct {
91 type chantype
struct {
97 type slicetype
struct {
102 type functype
struct {
109 type ptrtype
struct {
114 type structfield
struct {
115 name
*string // nil for embedded fields
116 pkgPath
*string // nil for exported Names; otherwise import path
117 typ
*_type
// type of field
118 tag
*string // nil if no tag
119 offset
uintptr // byte offset of field within struct
122 type structtype
struct {