Left: | ||
Right: |
OLD | NEW |
---|---|
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; master is type.go | 6 * Runtime type representation; master is type.go |
7 * | 7 * |
8 * The Type*s here correspond 1-1 to type.go's *rtype. | 8 * The Type*s here correspond 1-1 to type.go's *rtype. |
9 */ | 9 */ |
10 | 10 |
11 typedef struct Type Type; | 11 typedef struct Type Type; |
12 typedef struct UncommonType UncommonType; | 12 typedef struct UncommonType UncommonType; |
13 typedef struct InterfaceType InterfaceType; | 13 typedef struct InterfaceType InterfaceType; |
14 typedef struct Method Method; | 14 typedef struct Method Method; |
15 typedef struct IMethod IMethod; | 15 typedef struct IMethod IMethod; |
16 typedef struct SliceType SliceType; | 16 typedef struct SliceType SliceType; |
17 typedef struct FuncType FuncType; | 17 typedef struct FuncType FuncType; |
18 | 18 |
19 // Needs to be in sync with ../../cmd/ld/decodesym.c:/^commonsize | 19 // Needs to be in sync with ../../cmd/ld/decodesym.c:/^commonsize, |
20 // pkg/reflect/type.go:/type anf type.go:/rtype | |
20 struct Type | 21 struct Type |
21 { | 22 { |
22 uintptr size; | 23 uintptr size; |
23 uint32 hash; | 24 uint32 hash; |
24 uint8 _unused; | 25 uint8 _unused; |
25 uint8 align; | 26 uint8 align; |
26 uint8 fieldAlign; | 27 uint8 fieldAlign; |
27 uint8 kind; | 28 uint8 kind; |
28 Alg *alg; | 29 Alg *alg; |
29 » void *gc; | 30 » uintptr gc[2]; |
khr
2014/07/23 22:42:04
This really needs a long comment describing what g
dvyukov
2014/07/24 09:35:17
Done.
| |
30 String *string; | 31 String *string; |
31 UncommonType *x; | 32 UncommonType *x; |
32 Type *ptrto; | 33 Type *ptrto; |
33 byte *zero; // ptr to the zero value for this type | 34 byte *zero; // ptr to the zero value for this type |
34 }; | 35 }; |
35 | 36 |
36 struct Method | 37 struct Method |
37 { | 38 { |
38 String *name; | 39 String *name; |
39 String *pkgPath; | 40 String *pkgPath; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
93 bool dotdotdot; | 94 bool dotdotdot; |
94 Slice in; | 95 Slice in; |
95 Slice out; | 96 Slice out; |
96 }; | 97 }; |
97 | 98 |
98 struct PtrType | 99 struct PtrType |
99 { | 100 { |
100 Type; | 101 Type; |
101 Type *elem; | 102 Type *elem; |
102 }; | 103 }; |
OLD | NEW |