Commit 3d128dbf authored by Matthew Dempsky's avatar Matthew Dempsky Committed by Ian Lance Taylor

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
parent b3de7f28
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
#define PCDATA_ArgSize 0 /* argument size at CALL instruction */ #define PCDATA_ArgSize 0 /* argument size at CALL instruction */
#define PCDATA_StackMapIndex 1 #define PCDATA_StackMapIndex 1
#define FUNCDATA_ArgsPointerMaps 2 /* garbage collector blocks */ #define FUNCDATA_ArgsPointerMaps 0 /* garbage collector blocks */
#define FUNCDATA_LocalsPointerMaps 3 #define FUNCDATA_LocalsPointerMaps 1
#define FUNCDATA_DeadValueMaps 4 #define FUNCDATA_DeadValueMaps 2
// To be used in assembly. // To be used in assembly.
#define ARGSIZE(n) PCDATA $PCDATA_ArgSize, $n #define ARGSIZE(n) PCDATA $PCDATA_ArgSize, $n
...@@ -27,9 +27,9 @@ ...@@ -27,9 +27,9 @@
enum { enum {
PCDATA_ArgSize = 0, PCDATA_ArgSize = 0,
PCDATA_StackMapIndex = 1, PCDATA_StackMapIndex = 1,
FUNCDATA_ArgsPointerMaps = 2, FUNCDATA_ArgsPointerMaps = 0,
FUNCDATA_LocalsPointerMaps = 3, FUNCDATA_LocalsPointerMaps = 1,
FUNCDATA_DeadValueMaps = 4, FUNCDATA_DeadValueMaps = 2,
ArgsSizeUnknown = 0x80000000, ArgsSizeUnknown = 0x80000000,
}; };
*/ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment