mirror of
https://github.com/golang/go
synced 2024-11-26 23:21:22 -07:00
cmd/5l: move offset2 into Adr.u0 union to save 4/8 bytes for Adr/Prog resp.
sizeof(Adr) from 24 bytes down to 20 bytes. sizeof(Prog) from 84 bytes down to 76 bytes. 5l linking cmd/godoc statistics: Before: Maximum resident set size (kbytes): 106668 After: Maximum resident set size (kbytes): 99412 R=golang-dev, dave CC=golang-dev https://golang.org/cl/7100059
This commit is contained in:
parent
bee148bf23
commit
e00c9f0dbb
@ -68,21 +68,24 @@ struct Adr
|
||||
{
|
||||
union
|
||||
{
|
||||
int32 u0offset;
|
||||
struct {
|
||||
int32 offset;
|
||||
int32 offset2; // argsize
|
||||
} u0off;
|
||||
char* u0sval;
|
||||
Ieee u0ieee;
|
||||
char* u0sbig;
|
||||
} u0;
|
||||
Sym* sym;
|
||||
Sym* gotype;
|
||||
int32 offset2; // argsize
|
||||
char type;
|
||||
char reg;
|
||||
char name;
|
||||
char class;
|
||||
};
|
||||
|
||||
#define offset u0.u0offset
|
||||
#define offset u0.u0off.offset
|
||||
#define offset2 u0.u0off.offset2
|
||||
#define sval u0.u0sval
|
||||
#define scon sval
|
||||
#define ieee u0.u0ieee
|
||||
|
Loading…
Reference in New Issue
Block a user