type value … type tuple … type array … type iface … type structure … type iter … type closure … type bad … type rtype … // hashString computes the FNV hash of s. func hashString(s string) int { … } var mu … var hasher … // hashType returns a hash for t such that // types.Identical(x, y) => hashType(x) == hashType(y). func hashType(t types.Type) int { … } // usesBuiltinMap returns true if the built-in hash function and // equivalence relation for type t are consistent with those of the // interpreter's representation of type t. Such types are: all basic // types (bool, numbers, string), pointers and channels. // // usesBuiltinMap returns false for types that require a custom map // implementation: interfaces, arrays and structs. // // Panic ensues if t is an invalid map key type: function, map or slice. func usesBuiltinMap(t types.Type) bool { … } func (x array) eq(t types.Type, _y interface{ … } func (x array) hash(t types.Type) int { … } func (x structure) eq(t types.Type, _y interface{ … } func (x structure) hash(t types.Type) int { … } // nil-tolerant variant of types.Identical. func sameType(x, y types.Type) bool { … } func (x iface) eq(t types.Type, _y interface{ … } func (x iface) hash(outer types.Type) int { … } func (x rtype) hash(_ types.Type) int { … } func (x rtype) eq(_ types.Type, y interface{ … } // equals returns true iff x and y are equal according to Go's // linguistic equivalence relation for type t. // In a well-typed program, the dynamic types of x and y are // guaranteed equal. func equals(t types.Type, x, y value) bool { … } // Returns an integer hash of x such that equals(x, y) => hash(x) == hash(y). // The outer type is used only for the "unhashable" panic message. func hash(outer, t types.Type, x value) int { … } // load returns the value of type T in *addr. func load(T types.Type, addr *value) value { … } // store stores value v of type T into *addr. func store(T types.Type, addr *value, v value) { … } // Prints in the style of built-in println. // (More or less; in gc println is actually a compiler intrinsic and // can distinguish println(1) from println(interface{}(1)).) func writeValue(buf *bytes.Buffer, v value) { … } // Implements printing of Go values in the style of built-in println. func toString(v value) string { … } type stringIter … func (it *stringIter) next() tuple { … } type mapIter … func (it *mapIter) next() tuple { … } type hashmapIter … func (it *hashmapIter) next() tuple { … }