runtime: remove holes in FUNCDATA tables
Shrinks the text segment size by about 1.5% for the "go", "gofmt",
and "camlistored" commands on linux/amd64.
Before:
$ size go gofmt camlistored
text data bss dec hex filename
6506842 136996 105784 6749622 66fdb6 go
2376046 85232 90984 2552262 26f1c6 gofmt
17051050 190256 130320 17371626 10911ea camlistored
After:
$ size go gofmt camlistored
text data bss dec hex filename
6403034 136996 105784 6645814 656836 go
2331118 85232 90984 2507334 264246 gofmt
16842586 190256 130320 17163162 105e39a camlistored
Fixes #8604.
LGTM=rsc
R=golang-codereviews, bradfitz, rsc
CC=golang-codereviews
https://golang.org/cl/137790043
diff --git a/src/pkg/runtime/funcdata.h b/src/pkg/runtime/funcdata.h
index 1f624b5..85e8283 100644
--- a/src/pkg/runtime/funcdata.h
+++ b/src/pkg/runtime/funcdata.h
@@ -10,9 +10,9 @@
#define PCDATA_ArgSize 0 /* argument size at CALL instruction */
#define PCDATA_StackMapIndex 1
-#define FUNCDATA_ArgsPointerMaps 2 /* garbage collector blocks */
-#define FUNCDATA_LocalsPointerMaps 3
-#define FUNCDATA_DeadValueMaps 4
+#define FUNCDATA_ArgsPointerMaps 0 /* garbage collector blocks */
+#define FUNCDATA_LocalsPointerMaps 1
+#define FUNCDATA_DeadValueMaps 2
// To be used in assembly.
#define ARGSIZE(n) PCDATA $PCDATA_ArgSize, $n
@@ -27,9 +27,9 @@
enum {
PCDATA_ArgSize = 0,
PCDATA_StackMapIndex = 1,
- FUNCDATA_ArgsPointerMaps = 2,
- FUNCDATA_LocalsPointerMaps = 3,
- FUNCDATA_DeadValueMaps = 4,
+ FUNCDATA_ArgsPointerMaps = 0,
+ FUNCDATA_LocalsPointerMaps = 1,
+ FUNCDATA_DeadValueMaps = 2,
ArgsSizeUnknown = 0x80000000,
};
*/