aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/runtime.def
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2013-06-18 23:49:49 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2013-06-18 23:49:49 +0000
commitfdbc38a6e8d7c920eea6c6231c7fe2c987fa8aa2 (patch)
tree1a7d38cd8be5484451189338ed6f4b76d8521f31 /gcc/go/gofrontend/runtime.def
parent25e00ab67444a01dce446e95308521d1a73f8232 (diff)
downloadgcc-fdbc38a6e8d7c920eea6c6231c7fe2c987fa8aa2.zip
gcc-fdbc38a6e8d7c920eea6c6231c7fe2c987fa8aa2.tar.gz
gcc-fdbc38a6e8d7c920eea6c6231c7fe2c987fa8aa2.tar.bz2
compiler, runtime: Use function descriptors.
This changes the representation of a Go value of function type from being a pointer to function code (like a C function pointer) to being a pointer to a struct. The first field of the struct points to the function code. The remaining fields, if any, are the addresses of variables referenced in enclosing functions. For each call to a function, the address of the function descriptor is passed as the last argument. This lets us avoid generating trampolines, and removes the use of writable/executable sections of the heap. From-SVN: r200181
Diffstat (limited to 'gcc/go/gofrontend/runtime.def')
-rw-r--r--gcc/go/gofrontend/runtime.def5
1 files changed, 0 insertions, 5 deletions
diff --git a/gcc/go/gofrontend/runtime.def b/gcc/go/gofrontend/runtime.def
index 0d9ff03..0d3fd3c 100644
--- a/gcc/go/gofrontend/runtime.def
+++ b/gcc/go/gofrontend/runtime.def
@@ -224,11 +224,6 @@ DEF_GO_RUNTIME(NEW, "__go_new", P1(UINTPTR), R1(POINTER))
DEF_GO_RUNTIME(NEW_NOPOINTERS, "__go_new_nopointers", P1(UINTPTR), R1(POINTER))
-// Allocate a trampoline for a function literal.
-DEF_GO_RUNTIME(ALLOCATE_GO_TRAMPOLINE, "__go_allocate_trampoline",
- P2(UINTPTR, POINTER), R1(POINTER))
-
-
// Start a new goroutine.
DEF_GO_RUNTIME(GO, "__go_go", P2(FUNC_PTR, POINTER), R0())