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.
20 hashfn
func(unsafe
.Pointer
, uintptr) uintptr
21 equalfn
func(unsafe
.Pointer
, unsafe
.Pointer
) bool
29 // Return whether two type descriptors are equal.
30 // This is gccgo-specific, as gccgo, unlike gc, permits multiple
31 // independent descriptors for a single type.
32 func eqtype(t1
, t2
*_type
) bool {
36 case t1
== nil || t2
== nil:
38 case t1
.kind
!= t2
.kind || t1
.hash
!= t2
.hash
:
41 return *t1
.string == *t2
.string
53 type uncommontype
struct {
65 type interfacetype
struct {
74 bucket
*_type
// internal type representing a hash bucket
75 hmap
*_type
// internal type representing a hmap
76 keysize
uint8 // size of key slot
77 indirectkey
bool // store ptr to key instead of key itself
78 valuesize
uint8 // size of value slot
79 indirectvalue
bool // store ptr to value instead of value itself
80 bucketsize
uint16 // size of bucket
81 reflexivekey
bool // true if k==k for all keys
82 needkeyupdate
bool // true if we need to update key on an overwrite
85 type arraytype
struct {
92 type chantype
struct {
98 type slicetype
struct {
103 type functype
struct {
110 type ptrtype
struct {
115 type structfield
struct {
116 name
*string // nil for embedded fields
117 pkgPath
*string // nil for exported Names; otherwise import path
118 typ
*_type
// type of field
119 tag
*string // nil if no tag
120 offset
uintptr // byte offset of field within struct
123 type structtype
struct {