mirror of
https://github.com/golang/go
synced 2024-11-20 00:44:45 -07:00
runtime: move Itab to runtime.h
The 'type' field of Itab will be used by the garbage collector. R=rsc CC=golang-dev https://golang.org/cl/6815059
This commit is contained in:
parent
1eae1252e9
commit
5c1422afab
@ -20,19 +20,6 @@ runtime·printeface(Eface e)
|
|||||||
runtime·printf("(%p,%p)", e.type, e.data);
|
runtime·printf("(%p,%p)", e.type, e.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* layout of Itab known to compilers
|
|
||||||
*/
|
|
||||||
struct Itab
|
|
||||||
{
|
|
||||||
InterfaceType* inter;
|
|
||||||
Type* type;
|
|
||||||
Itab* link;
|
|
||||||
int32 bad;
|
|
||||||
int32 unused;
|
|
||||||
void (*fun[])(void);
|
|
||||||
};
|
|
||||||
|
|
||||||
static Itab* hash[1009];
|
static Itab* hash[1009];
|
||||||
static Lock ifacelock;
|
static Lock ifacelock;
|
||||||
|
|
||||||
|
@ -62,6 +62,7 @@ typedef struct MCache MCache;
|
|||||||
typedef struct FixAlloc FixAlloc;
|
typedef struct FixAlloc FixAlloc;
|
||||||
typedef struct Iface Iface;
|
typedef struct Iface Iface;
|
||||||
typedef struct Itab Itab;
|
typedef struct Itab Itab;
|
||||||
|
typedef struct InterfaceType InterfaceType;
|
||||||
typedef struct Eface Eface;
|
typedef struct Eface Eface;
|
||||||
typedef struct Type Type;
|
typedef struct Type Type;
|
||||||
typedef struct ChanType ChanType;
|
typedef struct ChanType ChanType;
|
||||||
@ -322,6 +323,17 @@ struct Func
|
|||||||
int32 locals; // number of 32-bit locals
|
int32 locals; // number of 32-bit locals
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// layout of Itab known to compilers
|
||||||
|
struct Itab
|
||||||
|
{
|
||||||
|
InterfaceType* inter;
|
||||||
|
Type* type;
|
||||||
|
Itab* link;
|
||||||
|
int32 bad;
|
||||||
|
int32 unused;
|
||||||
|
void (*fun[])(void);
|
||||||
|
};
|
||||||
|
|
||||||
struct WinCall
|
struct WinCall
|
||||||
{
|
{
|
||||||
void (*fn)(void*);
|
void (*fn)(void*);
|
||||||
@ -823,7 +835,7 @@ void runtime·chansend(ChanType*, Hchan*, byte*, bool*, void*);
|
|||||||
void runtime·chanrecv(ChanType*, Hchan*, byte*, bool*, bool*);
|
void runtime·chanrecv(ChanType*, Hchan*, byte*, bool*, bool*);
|
||||||
bool runtime·showframe(Func*);
|
bool runtime·showframe(Func*);
|
||||||
|
|
||||||
void runtime·ifaceE2I(struct InterfaceType*, Eface, Iface*);
|
void runtime·ifaceE2I(InterfaceType*, Eface, Iface*);
|
||||||
|
|
||||||
uintptr runtime·memlimit(void);
|
uintptr runtime·memlimit(void);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user