summaryrefslogtreecommitdiff
path: root/src/runtime/typekind.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/typekind.go')
-rw-r--r--src/runtime/typekind.go44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/runtime/typekind.go b/src/runtime/typekind.go
new file mode 100644
index 000000000..b64ec44f9
--- /dev/null
+++ b/src/runtime/typekind.go
@@ -0,0 +1,44 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package runtime
+
+const (
+ kindBool = _KindBool
+ kindInt = _KindInt
+ kindInt8 = _KindInt8
+ kindInt16 = _KindInt16
+ kindInt32 = _KindInt32
+ kindInt64 = _KindInt64
+ kindUint = _KindUint
+ kindUint8 = _KindUint8
+ kindUint16 = _KindUint16
+ kindUint32 = _KindUint32
+ kindUint64 = _KindUint64
+ kindUintptr = _KindUintptr
+ kindFloat32 = _KindFloat32
+ kindFloat64 = _KindFloat64
+ kindComplex64 = _KindComplex64
+ kindComplex128 = _KindComplex128
+ kindArray = _KindArray
+ kindChan = _KindChan
+ kindFunc = _KindFunc
+ kindInterface = _KindInterface
+ kindMap = _KindMap
+ kindPtr = _KindPtr
+ kindSlice = _KindSlice
+ kindString = _KindString
+ kindStruct = _KindStruct
+ kindUnsafePointer = _KindUnsafePointer
+
+ kindDirectIface = _KindDirectIface
+ kindGCProg = _KindGCProg
+ kindNoPointers = _KindNoPointers
+ kindMask = _KindMask
+)
+
+// isDirectIface reports whether t is stored directly in an interface value.
+func isDirectIface(t *_type) bool {
+ return t.kind&kindDirectIface != 0
+}