diff options
| author | Carl Shapiro <cshapiro@google.com> | 2013-05-28 17:59:10 -0700 |
|---|---|---|
| committer | Carl Shapiro <cshapiro@google.com> | 2013-05-28 17:59:10 -0700 |
| commit | 4e0a51c210ededa82809756ca1cc72b1fb1def8d (patch) | |
| tree | 73e39d7d22cc17088ea10bcd2bc0ce165b45ef0d /src/pkg/runtime/extern.go | |
| parent | 8bbb08533dab0dcf627db0b76ba65c3fb9b1d682 (diff) | |
| download | go-4e0a51c210ededa82809756ca1cc72b1fb1def8d.tar.xz | |
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
Diffstat (limited to 'src/pkg/runtime/extern.go')
| -rw-r--r-- | src/pkg/runtime/extern.go | 7 |
1 files changed, 4 insertions, 3 deletions
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 |
