1 // Copyright 2012 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.
7 // MakeRO returns a copy of v with the read-only flag set.
8 func MakeRO(v Value
) Value
{
13 // IsRO reports whether v's read-only flag is set.
14 func IsRO(v Value
) bool {
15 return v
.flag
&flagStickyRO
!= 0
20 const PtrSize
= ptrSize
22 func FuncLayout(t Type
, rcvr Type
) (frametype Type
, argSize
, retOffset
uintptr, stack
[]byte, gc
[]byte, ptrs
bool) {
26 func TypeLinks() []string {
32 // Will be provided by runtime eventually.
33 func gcbits(interface{}) []byte {
37 func MapBucketOf(x
, y Type
) Type
{
41 func CachedBucketOf(m Type
) Type
{
45 type EmbedWithUnexpMeth
struct{}
47 func (EmbedWithUnexpMeth
) f() {}
49 type pinUnexpMeth
interface {
53 var pinUnexpMethI
= pinUnexpMeth(EmbedWithUnexpMeth
{})
56 func FirstMethodNameBytes(t Type) *byte {
61 panic("type has no methods")
64 mname := t.(*rtype).nameOff(m.name)
65 if *mname.data(0, "name flag field")&(1<<2) == 0 {
66 panic("method name does not have pkgPath *string")
72 type OtherPkgFields
struct {
77 func IsExported(t Type
) bool {
78 return t
.PkgPath() == ""
82 func ResolveReflectName(s string) {
83 resolveReflectName(newName(s, "", false))