Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
ad48706a
Commit
ad48706a
authored
Oct 23, 2008
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not use fake names on anonymous function return values
R=ken OCL=17679 CL=17679
parent
6fecb76e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
9 deletions
+3
-9
gsubr.c
src/cmd/6g/gsubr.c
+1
-3
dcl.c
src/cmd/gc/dcl.c
+1
-5
subr.c
src/cmd/gc/subr.c
+1
-1
No files found.
src/cmd/6g/gsubr.c
View file @
ad48706a
...
@@ -1002,10 +1002,8 @@ naddr(Node *n, Addr *a)
...
@@ -1002,10 +1002,8 @@ naddr(Node *n, Addr *a)
a
->
etype
=
n
->
etype
;
a
->
etype
=
n
->
etype
;
a
->
offset
=
n
->
xoffset
;
a
->
offset
=
n
->
xoffset
;
a
->
sym
=
n
->
sym
;
a
->
sym
=
n
->
sym
;
if
(
a
->
sym
==
S
)
{
if
(
a
->
sym
==
S
)
a
->
sym
=
lookup
(
".noname"
);
a
->
sym
=
lookup
(
".noname"
);
fatal
(
"noname"
);
}
if
(
n
->
method
)
{
if
(
n
->
method
)
{
if
(
n
->
type
!=
T
)
if
(
n
->
type
!=
T
)
if
(
n
->
type
->
sym
!=
S
)
if
(
n
->
type
->
sym
!=
S
)
...
...
src/cmd/gc/dcl.c
View file @
ad48706a
...
@@ -472,12 +472,8 @@ loop:
...
@@ -472,12 +472,8 @@ loop:
if
(
n
->
left
!=
N
&&
n
->
left
->
op
==
ONAME
)
{
if
(
n
->
left
!=
N
&&
n
->
left
->
op
==
ONAME
)
{
f
->
nname
=
n
->
left
;
f
->
nname
=
n
->
left
;
f
->
embedded
=
n
->
embedded
;
f
->
embedded
=
n
->
embedded
;
}
else
{
vargen
++
;
snprint
(
buf
,
sizeof
(
buf
),
"_e%s_%.3ld"
,
filename
,
vargen
);
f
->
nname
=
newname
(
lookup
(
buf
));
}
f
->
sym
=
f
->
nname
->
sym
;
f
->
sym
=
f
->
nname
->
sym
;
}
*
t
=
f
;
*
t
=
f
;
t
=
&
f
->
down
;
t
=
&
f
->
down
;
...
...
src/cmd/gc/subr.c
View file @
ad48706a
...
@@ -1061,7 +1061,7 @@ Tpretty(Fmt *fp, Type *t)
...
@@ -1061,7 +1061,7 @@ Tpretty(Fmt *fp, Type *t)
return
fmtprint
(
fp
,
" }"
);
return
fmtprint
(
fp
,
" }"
);
case
TFIELD
:
case
TFIELD
:
if
(
t
->
sym
==
S
||
t
->
sym
->
name
[
0
]
==
'_'
||
t
->
embedded
)
{
if
(
t
->
sym
==
S
||
t
->
embedded
)
{
if
(
exporting
)
if
(
exporting
)
fmtprint
(
fp
,
"? "
);
fmtprint
(
fp
,
"? "
);
return
fmtprint
(
fp
,
"%T"
,
t
->
type
);
return
fmtprint
(
fp
,
"%T"
,
t
->
type
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment