From 48769bf546ba7ad830c2edc05656e217d15a20c8 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 19 Jul 2013 16:04:09 -0400 Subject: runtime: use funcdata to supply garbage collection information This CL introduces a FUNCDATA number for runtime-specific garbage collection metadata, changes the C and Go compilers to emit that metadata, and changes the runtime to expect it. The old pseudo-instructions that carried this information are gone, as is the linker code to process them. R=golang-dev, dvyukov, cshapiro CC=golang-dev https://golang.org/cl/11406044 --- src/pkg/runtime/runtime.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/pkg/runtime/runtime.h') diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h index 811ec76653..f405287aa8 100644 --- a/src/pkg/runtime/runtime.h +++ b/src/pkg/runtime/runtime.h @@ -407,10 +407,10 @@ struct Func // TODO: Remove these fields. int32 args; // in/out args size - int32 locals; // locals size + int32 x1; // locals size int32 frame; // legacy frame size; use pcsp if possible - int32 ptrsoff; - int32 ptrslen; + int32 x2; + int32 x3; int32 pcsp; int32 pcfile; @@ -677,10 +677,9 @@ struct Stkframe uintptr lr; // program counter at caller aka link register uintptr sp; // stack pointer at pc uintptr fp; // stack pointer at caller aka frame pointer + byte* varp; // top of local variables byte* argp; // pointer to function arguments uintptr arglen; // number of bytes at argp - byte* varp; // pointer to local variables - uintptr varlen; // number of bytes at varp }; int32 runtime·gentraceback(uintptr, uintptr, uintptr, G*, int32, uintptr*, int32, void(*)(Stkframe*, void*), void*, bool); @@ -856,6 +855,7 @@ void runtime·netpollready(G**, PollDesc*, int32); void runtime·crash(void); void runtime·parsedebugvars(void); void _rt0_go(void); +void* runtime·funcdata(Func*, int32); #pragma varargck argpos runtime·printf 1 #pragma varargck type "c" int32 -- cgit v1.3-5-g9baa