mirror of
https://github.com/golang/go
synced 2024-09-18 15:32:18 +00:00
cmd/gc: rename AFATVARDEF to AVARDEF
The "fat" referred to being used for multiword values only. We're going to use it for non-fat values sometimes too. No change other than the renaming. TBR=iant CC=golang-codereviews https://golang.org/cl/63650043
This commit is contained in:
parent
824e918ca4
commit
801e40a0a4
|
@ -772,7 +772,7 @@ clearfat(Node *nl)
|
|||
if(componentgen(N, nl))
|
||||
return;
|
||||
|
||||
gfatvardef(nl);
|
||||
gvardef(nl);
|
||||
|
||||
c = w % 4; // bytes
|
||||
q = w / 4; // quads
|
||||
|
|
|
@ -1164,7 +1164,7 @@ copyu(Prog *p, Adr *v, Adr *s)
|
|||
|
||||
case APCDATA:
|
||||
case AFUNCDATA:
|
||||
case AFATVARDEF:
|
||||
case AVARDEF:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ static ProgInfo progtable[ALAST] = {
|
|||
[AUNDEF]= {Break},
|
||||
[AUSEFIELD]= {OK},
|
||||
[ACHECKNIL]= {LeftRead},
|
||||
[AFATVARDEF]= {Pseudo | RightWrite},
|
||||
[AVARDEF]= {Pseudo | RightWrite},
|
||||
|
||||
// NOP is an internal no-op that also stands
|
||||
// for USED and SET annotations, not the Intel opcode.
|
||||
|
|
|
@ -198,7 +198,7 @@ enum as
|
|||
AFUNCDATA,
|
||||
APCDATA,
|
||||
ACHECKNIL,
|
||||
AFATVARDEF,
|
||||
AVARDEF,
|
||||
|
||||
AMRC, // MRC/MCR
|
||||
|
||||
|
|
|
@ -1023,7 +1023,7 @@ clearfat(Node *nl)
|
|||
if(debug['g'])
|
||||
dump("\nclearfat", nl);
|
||||
|
||||
gfatvardef(nl);
|
||||
gvardef(nl);
|
||||
|
||||
w = nl->type->width;
|
||||
// Avoid taking the address for simple enough types.
|
||||
|
|
|
@ -41,7 +41,7 @@ static ProgInfo progtable[ALAST] = {
|
|||
[AUNDEF]= {Break},
|
||||
[AUSEFIELD]= {OK},
|
||||
[ACHECKNIL]= {LeftRead},
|
||||
[AFATVARDEF]= {Pseudo | RightWrite},
|
||||
[AVARDEF]= {Pseudo | RightWrite},
|
||||
|
||||
// NOP is an internal no-op that also stands
|
||||
// for USED and SET annotations, not the Intel opcode.
|
||||
|
|
|
@ -762,7 +762,7 @@ enum as
|
|||
AFUNCDATA,
|
||||
APCDATA,
|
||||
ACHECKNIL,
|
||||
AFATVARDEF,
|
||||
AVARDEF,
|
||||
|
||||
ALAST
|
||||
};
|
||||
|
|
|
@ -78,7 +78,7 @@ clearfat(Node *nl)
|
|||
if(componentgen(N, nl))
|
||||
return;
|
||||
|
||||
gfatvardef(nl);
|
||||
gvardef(nl);
|
||||
|
||||
c = w % 4; // bytes
|
||||
q = w / 4; // quads
|
||||
|
|
|
@ -41,7 +41,7 @@ static ProgInfo progtable[ALAST] = {
|
|||
[AUNDEF]= {Break},
|
||||
[AUSEFIELD]= {OK},
|
||||
[ACHECKNIL]= {LeftRead},
|
||||
[AFATVARDEF]= {Pseudo | RightWrite},
|
||||
[AVARDEF]= {Pseudo | RightWrite},
|
||||
|
||||
// NOP is an internal no-op that also stands
|
||||
// for USED and SET annotations, not the Intel opcode.
|
||||
|
|
|
@ -579,7 +579,7 @@ enum as
|
|||
AFUNCDATA,
|
||||
APCDATA,
|
||||
ACHECKNIL,
|
||||
AFATVARDEF,
|
||||
AVARDEF,
|
||||
|
||||
ALAST
|
||||
};
|
||||
|
|
|
@ -768,7 +768,7 @@ cgen_eface(Node *n, Node *res)
|
|||
*/
|
||||
Node dst;
|
||||
|
||||
gfatvardef(res);
|
||||
gvardef(res);
|
||||
dst = *res;
|
||||
dst.type = types[tptr];
|
||||
dst.xoffset += widthptr;
|
||||
|
@ -797,7 +797,7 @@ cgen_slice(Node *n, Node *res)
|
|||
if(n->list->next->next)
|
||||
offs = n->list->next->next->n;
|
||||
|
||||
gfatvardef(res);
|
||||
gvardef(res);
|
||||
|
||||
// dst.len = hi [ - lo ]
|
||||
dst = *res;
|
||||
|
|
|
@ -1494,7 +1494,7 @@ void gdatacomplex(Node*, Mpcplx*);
|
|||
void gdatastring(Node*, Strlit*);
|
||||
void ggloblnod(Node *nam);
|
||||
void ggloblsym(Sym *s, int32 width, int dupok, int rodata);
|
||||
void gfatvardef(Node*);
|
||||
void gvardef(Node*);
|
||||
Prog* gjmp(Prog*);
|
||||
void gused(Node*);
|
||||
void movelarge(NodeList*);
|
||||
|
|
|
@ -32,28 +32,28 @@ makefuncdatasym(char *namefmt, int64 funcdatakind)
|
|||
}
|
||||
|
||||
void
|
||||
gfatvardef(Node *n)
|
||||
gvardef(Node *n)
|
||||
{
|
||||
if(n == N || !isfat(n->type))
|
||||
fatal("gfatvardef: node is not fat");
|
||||
fatal("gvardef: node is not fat");
|
||||
switch(n->class) {
|
||||
case PAUTO:
|
||||
case PPARAM:
|
||||
case PPARAMOUT:
|
||||
gins(AFATVARDEF, N, n);
|
||||
gins(AVARDEF, N, n);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
removefatvardef(Prog *firstp)
|
||||
removevardef(Prog *firstp)
|
||||
{
|
||||
Prog *p;
|
||||
|
||||
for(p = firstp; p != P; p = p->link) {
|
||||
while(p->link != P && p->link->as == AFATVARDEF)
|
||||
while(p->link != P && p->link->as == AVARDEF)
|
||||
p->link = p->link->link;
|
||||
if(p->to.type == D_BRANCH)
|
||||
while(p->to.u.branch != P && p->to.u.branch->as == AFATVARDEF)
|
||||
while(p->to.u.branch != P && p->to.u.branch->as == AVARDEF)
|
||||
p->to.u.branch = p->to.u.branch->link;
|
||||
}
|
||||
}
|
||||
|
@ -249,7 +249,7 @@ compile(Node *fn)
|
|||
frame(0);
|
||||
|
||||
// Remove leftover instrumentation from the instruction stream.
|
||||
removefatvardef(ptxt);
|
||||
removevardef(ptxt);
|
||||
ret:
|
||||
lineno = lno;
|
||||
}
|
||||
|
|
|
@ -710,7 +710,7 @@ progeffects(Prog *prog, Array *vars, Bvec *uevar, Bvec *varkill, Bvec *avarinit)
|
|||
if(info.flags & (LeftRead | LeftAddr))
|
||||
bvset(uevar, pos);
|
||||
if(info.flags & LeftWrite)
|
||||
if(from->node != nil && (!isfat(from->node->type) || prog->as == AFATVARDEF))
|
||||
if(from->node != nil && (!isfat(from->node->type) || prog->as == AVARDEF))
|
||||
bvset(varkill, pos);
|
||||
}
|
||||
}
|
||||
|
@ -736,7 +736,7 @@ Next:
|
|||
if(info.flags & (RightRead | RightAddr))
|
||||
bvset(uevar, pos);
|
||||
if(info.flags & RightWrite)
|
||||
if(to->node != nil && (!isfat(to->node->type) || prog->as == AFATVARDEF))
|
||||
if(to->node != nil && (!isfat(to->node->type) || prog->as == AVARDEF))
|
||||
bvset(varkill, pos);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1518,7 +1518,7 @@ Optab optab[] =
|
|||
{ AFUNCDATA, yfuncdata, Px, 0,0 },
|
||||
{ APCDATA, ypcdata, Px, 0,0 },
|
||||
{ ACHECKNIL },
|
||||
{ AFATVARDEF },
|
||||
{ AVARDEF },
|
||||
|
||||
{ AEND },
|
||||
0
|
||||
|
|
|
@ -1146,7 +1146,7 @@ static Optab optab[] =
|
|||
{ AFUNCDATA, yfuncdata, Px, 0,0 },
|
||||
{ APCDATA, ypcdata, Px, 0,0 },
|
||||
{ ACHECKNIL },
|
||||
{ AFATVARDEF },
|
||||
{ AVARDEF },
|
||||
|
||||
0
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue