mirror of
https://github.com/golang/go
synced 2024-10-02 18:08:33 -06:00
cmd/gc, runtime: correct a misnomer regarding dead value maps
The funcdata symbol incorrectly named the dead value map the dead pointer map. The dead value map identifies all dead values, including pointers and non-pointers, in a stack frame. The purpose of this map is to allow the runtime to poison locations of dead data to catch lost invariants. R=golang-dev, iant CC=golang-dev https://golang.org/cl/38670043
This commit is contained in:
parent
9a53fb571d
commit
bc9691c465
@ -159,7 +159,7 @@ compile(Node *fn)
|
||||
// compile time. At present, the amount of additional RSS is
|
||||
// substantial enough to affect our smallest build machines.
|
||||
if(0)
|
||||
gcdead = makefuncdatasym("gcdead·%d", FUNCDATA_DeadPointerMaps);
|
||||
gcdead = makefuncdatasym("gcdead·%d", FUNCDATA_DeadValueMaps);
|
||||
else
|
||||
gcdead = nil;
|
||||
|
||||
|
@ -1477,9 +1477,11 @@ liveness(Node *fn, Prog *firstp, Sym *argssym, Sym *livesym, Sym *deadsym)
|
||||
if(0) livenessprintcfg(lv);
|
||||
livenessepilogue(lv);
|
||||
|
||||
// Emit the map data structures
|
||||
// Emit the live pointer map data structures
|
||||
twobitwritesymbol(lv->livepointers, livesym, nil);
|
||||
twobitwritesymbol(lv->argslivepointers, argssym, nil);
|
||||
|
||||
// Optionally emit a dead value map data structure for locals.
|
||||
if(deadsym != nil)
|
||||
twobitwritesymbol(lv->deadvalues, deadsym, nil);
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
#define FUNCDATA_ArgsPointerMaps 2 /* garbage collector blocks */
|
||||
#define FUNCDATA_LocalsPointerMaps 3
|
||||
#define FUNCDATA_DeadPointerMaps 4
|
||||
#define FUNCDATA_DeadValueMaps 4
|
||||
|
||||
// To be used in assembly.
|
||||
#define ARGSIZE(n) PCDATA $PCDATA_ArgSize, $n
|
||||
|
Loading…
Reference in New Issue
Block a user