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
d015f896
Commit
d015f896
authored
Oct 02, 2008
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clear output parameters
R=r OCL=16345 CL=16345
parent
5e92fb20
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
gen.c
src/cmd/6g/gen.c
+12
-0
No files found.
src/cmd/6g/gen.c
View file @
d015f896
...
...
@@ -20,6 +20,7 @@ compile(Node *fn)
Node
nod1
;
Prog
*
ptxt
;
int32
lno
;
Type
*
t
;
if
(
newproc
==
N
)
{
newproc
=
nod
(
ONAME
,
N
,
N
);
...
...
@@ -56,6 +57,17 @@ if(throwreturn == N) {
curfn
=
fn
;
dowidth
(
curfn
->
type
);
if
(
curfn
->
type
->
outnamed
)
{
// add clearing of the output parameters
t
=
structfirst
(
&
pl
,
getoutarg
(
curfn
->
type
));
while
(
t
!=
T
)
{
if
(
t
->
nname
!=
N
&&
t
->
nname
->
sym
->
name
[
0
]
!=
'_'
)
{
curfn
->
nbody
=
list
(
nod
(
OAS
,
t
->
nname
,
N
),
curfn
->
nbody
);
}
t
=
structnext
(
&
pl
);
}
}
walk
(
curfn
);
if
(
nerrors
!=
0
)
goto
ret
;
...
...
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