aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/runtime.h
diff options
context:
space:
mode:
authorJan Ziak <0xe2.0x9a.0x9b@gmail.com>2012-11-01 13:13:20 -0400
committerRuss Cox <rsc@golang.org>2012-11-01 13:13:20 -0400
commit5c1422afabb7efa26b382e818314748bb8c857d9 (patch)
tree05304b3aee87e26e02a3d000282f7b00b08b6f7b /src/pkg/runtime/runtime.h
parent1eae1252e9ba5d11f637e656617e804ce7990c3d (diff)
downloadgo-5c1422afabb7efa26b382e818314748bb8c857d9.tar.xz
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
Diffstat (limited to 'src/pkg/runtime/runtime.h')
-rw-r--r--src/pkg/runtime/runtime.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h
index cd2f6f0587..51a5aeca91 100644
--- a/src/pkg/runtime/runtime.h
+++ b/src/pkg/runtime/runtime.h
@@ -62,6 +62,7 @@ typedef struct MCache MCache;
typedef struct FixAlloc FixAlloc;
typedef struct Iface Iface;
typedef struct Itab Itab;
+typedef struct InterfaceType InterfaceType;
typedef struct Eface Eface;
typedef struct Type Type;
typedef struct ChanType ChanType;
@@ -322,6 +323,17 @@ struct Func
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
{
void (*fn)(void*);
@@ -823,7 +835,7 @@ void runtime·chansend(ChanType*, Hchan*, byte*, bool*, void*);
void runtime·chanrecv(ChanType*, Hchan*, byte*, bool*, bool*);
bool runtime·showframe(Func*);
-void runtime·ifaceE2I(struct InterfaceType*, Eface, Iface*);
+void runtime·ifaceE2I(InterfaceType*, Eface, Iface*);
uintptr runtime·memlimit(void);