mirror of
https://github.com/golang/go
synced 2024-11-20 02:54:39 -07:00
cc: change cas to newcase
Change the name of cas() in cc to newcase() to avoid a NIX conflict. cas() is used in cc to create a new Case struct. There is a name conflict in that cas() is a commonly-used name for compare and swap. Since cas() is only used internally in the compiler in 3 places, change the name to avoid a wider conflict with the NIX runtime. This issue might well come up on other OSes in the future anyway, as the name is fairly common. R=rsc CC=golang-dev https://golang.org/cl/5294071
This commit is contained in:
parent
8658b36ba2
commit
1bc1caa802
@ -304,7 +304,7 @@ void gpseudo(int, Sym*, Node*);
|
||||
int swcmp(const void*, const void*);
|
||||
void doswit(Node*);
|
||||
void swit1(C1*, int, int32, Node*);
|
||||
void cas(void);
|
||||
void newcase(void);
|
||||
void bitload(Node*, Node*, Node*, Node*, Node*);
|
||||
void bitstore(Node*, Node*, Node*, Node*, Node*);
|
||||
int mulcon(Node*, Node*);
|
||||
|
@ -299,7 +299,7 @@ void gpseudo(int, Sym*, Node*);
|
||||
int swcmp(const void*, const void*);
|
||||
void doswit(Node*);
|
||||
void swit1(C1*, int, int32, Node*);
|
||||
void cas(void);
|
||||
void newcase(void);
|
||||
void bitload(Node*, Node*, Node*, Node*, Node*);
|
||||
void bitstore(Node*, Node*, Node*, Node*, Node*);
|
||||
int32 outstring(char*, int32);
|
||||
|
@ -304,7 +304,7 @@ void gpseudo(int, Sym*, Node*);
|
||||
int swcmp(const void*, const void*);
|
||||
void doswit(Node*);
|
||||
void swit1(C1*, int, int32, Node*);
|
||||
void cas(void);
|
||||
void newcase(void);
|
||||
void bitload(Node*, Node*, Node*, Node*, Node*);
|
||||
void bitstore(Node*, Node*, Node*, Node*, Node*);
|
||||
int32 outstring(char*, int32);
|
||||
|
@ -266,7 +266,7 @@ loop:
|
||||
if(cases == C)
|
||||
diag(n, "case/default outside a switch");
|
||||
if(l == Z) {
|
||||
cas();
|
||||
newcase();
|
||||
cases->val = 0;
|
||||
cases->def = 1;
|
||||
cases->label = pc;
|
||||
@ -278,7 +278,7 @@ loop:
|
||||
goto rloop;
|
||||
if(l->op == OCONST)
|
||||
if(typeword[l->type->etype] && l->type->etype != TIND) {
|
||||
cas();
|
||||
newcase();
|
||||
cases->val = l->vconst;
|
||||
cases->def = 0;
|
||||
cases->label = pc;
|
||||
@ -303,7 +303,7 @@ loop:
|
||||
|
||||
cn = cases;
|
||||
cases = C;
|
||||
cas();
|
||||
newcase();
|
||||
|
||||
sbc = breakpc;
|
||||
breakpc = pc;
|
||||
|
@ -92,7 +92,7 @@ doswit(Node *n)
|
||||
}
|
||||
|
||||
void
|
||||
cas(void)
|
||||
newcase(void)
|
||||
{
|
||||
Case *c;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user