aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/runtime.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2016-10-20 18:51:35 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2016-10-20 18:51:35 +0000
commit6b752cfac4ecf8b620726bfcd703844ebfaca6ea (patch)
tree458f96322bb64b331d71a3304f09cd7c032efa9c /libgo/runtime/runtime.h
parentfceabe505cf0dc7030602e582fadadcce73dd6de (diff)
downloadgcc-6b752cfac4ecf8b620726bfcd703844ebfaca6ea.zip
gcc-6b752cfac4ecf8b620726bfcd703844ebfaca6ea.tar.gz
gcc-6b752cfac4ecf8b620726bfcd703844ebfaca6ea.tar.bz2
runtime: rewrite interface code into Go
I started to copy the Go 1.7 interface code, but the gc and gccgo representations of interfaces are too different. So instead I rewrote the gccgo interface code from C to Go. The code is largely the same as it was, but the names are more like those used in the gc runtime. I also copied over the string comparison functions, and tweaked the compiler to use eqstring when comparing strings for equality. Reviewed-on: https://go-review.googlesource.com/31591 From-SVN: r241384
Diffstat (limited to 'libgo/runtime/runtime.h')
-rw-r--r--libgo/runtime/runtime.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/libgo/runtime/runtime.h b/libgo/runtime/runtime.h
index e60eaed..8a91429 100644
--- a/libgo/runtime/runtime.h
+++ b/libgo/runtime/runtime.h
@@ -22,7 +22,6 @@
#include <sys/mman.h>
#endif
-#include "interface.h"
#include "go-alloc.h"
#define _STRINGIFY2_(x) #x
@@ -76,8 +75,8 @@ typedef struct PollDesc PollDesc;
typedef struct sudog SudoG;
typedef struct __go_open_array Slice;
-typedef struct __go_interface Iface;
-typedef struct __go_empty_interface Eface;
+typedef struct iface Iface;
+typedef struct eface Eface;
typedef struct __go_type_descriptor Type;
typedef struct _defer Defer;
typedef struct _panic Panic;
@@ -105,7 +104,6 @@ struct FuncVal
};
#include "array.h"
-#include "interface.h"
// Rename Go types generated by mkrsysinfo.sh from C types, to avoid
// the name conflict.
@@ -587,3 +585,7 @@ extern _Bool runtime_iscgo;
extern _Bool runtime_cgoHasExtraM;
extern Hchan *runtime_main_init_done;
extern uintptr __go_end __attribute__ ((weak));
+extern void *getitab(const struct __go_type_descriptor *,
+ const struct __go_type_descriptor *,
+ _Bool)
+ __asm__ (GOSYM_PREFIX "runtime.getitab");