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
diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h
index 44cc013..c7ade2b 100644
--- a/src/pkg/runtime/runtime.h
+++ b/src/pkg/runtime/runtime.h
@@ -412,6 +412,7 @@
int32 frame; // stack frame size
int32 args; // in/out args size
int32 locals; // locals size
+ Slice ptrs; // pointer map
};
// layout of Itab known to compilers
@@ -811,6 +812,7 @@
void runtime·crash(void);
#pragma varargck argpos runtime·printf 1
+#pragma varargck type "c" int32
#pragma varargck type "d" int32
#pragma varargck type "d" uint32
#pragma varargck type "D" int64