mirror of
https://github.com/golang/go
synced 2024-11-11 23:10:23 -07:00
function literals
go/test: passes 86% (297/343) R=rsc APPROVED=rsc DELTA=14 (10 added, 1 deleted, 3 changed) OCL=35881 CL=35884
This commit is contained in:
parent
21b41bec83
commit
b4896b496e
@ -189,7 +189,7 @@ isfat(Type *t)
|
||||
void
|
||||
afunclit(Addr *a)
|
||||
{
|
||||
if(a->type == D_ADDR && a->name == D_EXTERN || a->type == D_REG) {
|
||||
if(a->type == D_CONST && a->name == D_EXTERN || a->type == D_REG) {
|
||||
a->type = D_OREG;
|
||||
}
|
||||
}
|
||||
@ -1099,6 +1099,7 @@ naddr(Node *n, Addr *a)
|
||||
break;
|
||||
case PFUNC:
|
||||
a->name = D_EXTERN;
|
||||
a->type = D_CONST;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -1147,13 +1148,18 @@ naddr(Node *n, Addr *a)
|
||||
|
||||
case OADDR:
|
||||
naddr(n->left, a);
|
||||
if(a->type == D_OREG) {
|
||||
switch(a->type) {
|
||||
case D_OREG:
|
||||
a->type = D_CONST;
|
||||
break;
|
||||
} else if (a->type == D_REG) {
|
||||
|
||||
case D_REG:
|
||||
case D_CONST:
|
||||
break;
|
||||
|
||||
default:
|
||||
fatal("naddr: OADDR %d\n", a->type);
|
||||
}
|
||||
fatal("naddr: OADDR %d\n", a->type);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,6 +72,7 @@ fixedbugs/bug051.go
|
||||
fixedbugs/bug052.go
|
||||
fixedbugs/bug053.go
|
||||
fixedbugs/bug054.go
|
||||
fixedbugs/bug055.go
|
||||
fixedbugs/bug056.go
|
||||
fixedbugs/bug057.go
|
||||
fixedbugs/bug058.go
|
||||
@ -253,6 +254,7 @@ ken/interfun.go
|
||||
ken/intervar.go
|
||||
ken/label.go
|
||||
ken/mfunc.go
|
||||
ken/ptrfun.go
|
||||
ken/ptrvar.go
|
||||
ken/range.go
|
||||
ken/rob1.go
|
||||
@ -281,6 +283,7 @@ parentype.go
|
||||
printbig.go
|
||||
rename.go
|
||||
rename1.go
|
||||
runtime.go
|
||||
sieve.go
|
||||
sigchld.go
|
||||
simassign.go
|
||||
|
Loading…
Reference in New Issue
Block a user