OSDN Git Service

Update Go compiler, library, and testsuite on gcc 4.7 branch.
[pf3gnuchains/gcc-fork.git] / libgo / go / runtime / type.go
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.
4
5 /*
6  * Runtime type representation.
7  * This file exists only to provide types that 6l can turn into
8  * DWARF information for use by gdb.  Nothing else uses these.
9  * They should match the same types in ../reflect/type.go.
10  * For comments see ../reflect/type.go.
11  */
12
13 package runtime
14
15 import "unsafe"
16
17 type commonType struct {
18         Kind       uint8
19         align      uint8
20         fieldAlign uint8
21         size       uintptr
22         hash       uint32
23
24         hashfn  func(unsafe.Pointer, uintptr) uintptr
25         equalfn func(unsafe.Pointer, unsafe.Pointer, uintptr) bool
26
27         string *string
28         *uncommonType
29         ptrToThis *commonType
30 }
31
32 type _method struct {
33         name    *string
34         pkgPath *string
35         mtyp    *commonType
36         typ     *commonType
37         tfn     unsafe.Pointer
38 }
39
40 type uncommonType struct {
41         name    *string
42         pkgPath *string
43         methods []_method
44 }
45
46 type _imethod struct {
47         name    *string
48         pkgPath *string
49         typ     *commonType
50 }
51
52 type interfaceType struct {
53         commonType
54         methods []_imethod
55 }