LEFT | RIGHT |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 /* | 5 /* |
6 * Runtime type representation. | 6 * Runtime type representation. |
7 * This file exists only to provide types that 6l can turn into | 7 * This file exists only to provide types that 6l can turn into |
8 * DWARF information for use by gdb. Nothing else uses these. | 8 * DWARF information for use by gdb. Nothing else uses these. |
9 * They should match the same types in ../reflect/type.go. | 9 * They should match the same types in ../reflect/type.go. |
10 * For comments see ../reflect/type.go. | 10 * For comments see ../reflect/type.go. |
11 */ | 11 */ |
12 | 12 |
13 package runtime | 13 package runtime |
14 | 14 |
15 import "unsafe" | 15 import "unsafe" |
16 | 16 |
17 // This should be rtype but saying commonType avoids having to update gdb. | 17 type rtype struct { |
18 type commonType struct { | |
19 size uintptr | 18 size uintptr |
20 hash uint32 | 19 hash uint32 |
21 _ uint8 | 20 _ uint8 |
22 align uint8 | 21 align uint8 |
23 fieldAlign uint8 | 22 fieldAlign uint8 |
24 kind uint8 | 23 kind uint8 |
25 alg unsafe.Pointer | 24 alg unsafe.Pointer |
26 gc unsafe.Pointer | 25 gc unsafe.Pointer |
27 string *string | 26 string *string |
28 *uncommonType | 27 *uncommonType |
29 » ptrToThis *commonType | 28 » ptrToThis *rtype |
30 } | 29 } |
31 | 30 |
32 type _method struct { | 31 type _method struct { |
33 name *string | 32 name *string |
34 pkgPath *string | 33 pkgPath *string |
35 » mtyp *commonType | 34 » mtyp *rtype |
36 » typ *commonType | 35 » typ *rtype |
37 ifn unsafe.Pointer | 36 ifn unsafe.Pointer |
38 tfn unsafe.Pointer | 37 tfn unsafe.Pointer |
39 } | 38 } |
40 | 39 |
41 type uncommonType struct { | 40 type uncommonType struct { |
42 name *string | 41 name *string |
43 pkgPath *string | 42 pkgPath *string |
44 methods []_method | 43 methods []_method |
45 } | 44 } |
46 | 45 |
47 type _imethod struct { | 46 type _imethod struct { |
48 name *string | 47 name *string |
49 pkgPath *string | 48 pkgPath *string |
50 » typ *commonType | 49 » typ *rtype |
51 } | 50 } |
52 | 51 |
53 type interfaceType struct { | 52 type interfaceType struct { |
54 » commonType | 53 » rtype |
55 methods []_imethod | 54 methods []_imethod |
56 } | 55 } |
LEFT | RIGHT |