From 4e0a51c210ededa82809756ca1cc72b1fb1def8d Mon Sep 17 00:00:00 2001 From: Carl Shapiro Date: Tue, 28 May 2013 17:59:10 -0700 Subject: cmd/5l, cmd/6l, cmd/8l, cmd/gc, runtime: generate and use bitmaps of argument pointer locations With this change the compiler emits a bitmap for each function covering its stack frame arguments area. If an argument word is known to contain a pointer, a bit is set. The garbage collector reads this information when scanning the stack by frames and uses it to ignores locations known to not contain a pointer. R=golang-dev, bradfitz, daniel.morsing, dvyukov, khr, khr, iant, cshapiro CC=golang-dev https://golang.org/cl/9223046 --- src/pkg/runtime/extern.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/pkg/runtime/extern.go') diff --git a/src/pkg/runtime/extern.go b/src/pkg/runtime/extern.go index 20f2342530..7c5eb5317b 100644 --- a/src/pkg/runtime/extern.go +++ b/src/pkg/runtime/extern.go @@ -85,9 +85,10 @@ type Func struct { // Keep in sync with runtime.h:struct Func entry uintptr // entry pc pc0 uintptr // starting pc, ln for table ln0 int32 - frame int32 // stack frame size - args int32 // in/out args size - locals int32 // locals size + frame int32 // stack frame size + args int32 // in/out args size + locals int32 // locals size + ptrs []int32 // pointer map } // FuncForPC returns a *Func describing the function that contains the -- cgit v1.3-5-g9baa