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.
4
5package reflect
6
7// MakeRO returns a copy of v with the read-only flag set.
8func MakeRO(v Value) Value {
9	v.flag |= flagStickyRO
10	return v
11}
12
13// IsRO reports whether v's read-only flag is set.
14func IsRO(v Value) bool {
15	return v.flag&flagStickyRO != 0
16}
17
18var CallGC = &callGC
19
20const PtrSize = ptrSize
21
22func FuncLayout(t Type, rcvr Type) (frametype Type, argSize, retOffset uintptr, stack []byte, gc []byte, ptrs bool) {
23	return
24}
25
26func TypeLinks() []string {
27	return nil
28}
29
30var GCBits = gcbits
31
32// Will be provided by runtime eventually.
33func gcbits(interface{}) []byte {
34	return nil
35}
36
37func MapBucketOf(x, y Type) Type {
38	return nil
39}
40
41func CachedBucketOf(m Type) Type {
42	return nil
43}
44
45type EmbedWithUnexpMeth struct{}
46
47func (EmbedWithUnexpMeth) f() {}
48
49type pinUnexpMeth interface {
50	f()
51}
52
53var pinUnexpMethI = pinUnexpMeth(EmbedWithUnexpMeth{})
54
55/*
56func FirstMethodNameBytes(t Type) *byte {
57	_ = pinUnexpMethI
58
59	ut := t.uncommon()
60	if ut == nil {
61		panic("type has no methods")
62	}
63	m := ut.methods()[0]
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")
67	}
68	return mname.bytes
69}
70*/
71
72type OtherPkgFields struct {
73	OtherExported   int
74	otherUnexported int
75}
76
77func IsExported(t Type) bool {
78	return t.PkgPath() == ""
79}
80
81/*
82func ResolveReflectName(s string) {
83	resolveReflectName(newName(s, "", false))
84}
85*/
86
87type Buffer struct {
88	buf []byte
89}
90