Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
2bba3a61
Commit
2bba3a61
authored
Jun 11, 2008
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reorder1 - function first instead of last
SVN=122160
parent
a544938c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
src/cmd/gc/walk.c
src/cmd/gc/walk.c
+8
-10
No files found.
src/cmd/gc/walk.c
View file @
2bba3a61
...
...
@@ -1224,6 +1224,7 @@ convas(Node *n)
if
(
n
->
op
!=
OAS
)
fatal
(
"convas: not as %O"
,
n
->
op
);
ullmancalc
(
n
);
l
=
n
->
left
;
r
=
n
->
right
;
if
(
l
==
N
||
r
==
N
)
...
...
@@ -1321,7 +1322,7 @@ loop1:
if
(
c
==
0
||
t
==
1
)
return
n
;
if
(
c
>
1
)
{
yyerror
(
"reorder1: too many func
a
tion calls evaluating parameters"
);
yyerror
(
"reorder1: too many function calls evaluating parameters"
);
return
n
;
}
goto
pass2
;
...
...
@@ -1337,21 +1338,18 @@ loop1:
pass2:
l
=
listfirst
(
&
save
,
&
n
);
f
=
N
;
// isolated function call
r
=
N
;
// rest of them
r
=
N
;
// rest
f
=
N
;
// fncall
loop2:
if
(
l
==
N
)
{
if
(
r
==
N
||
f
==
N
)
fatal
(
"reorder1 not nil 1"
);
r
=
nod
(
OLIST
,
f
,
r
);
return
rev
(
r
);
r
=
rev
(
r
);
return
r
;
}
if
(
l
->
ullman
>=
UINF
)
{
if
(
f
!=
N
)
fatal
(
"reorder1 not nil 2"
);
if
(
l
->
ullman
>=
UINF
)
f
=
l
;
}
else
else
if
(
r
==
N
)
r
=
l
;
else
...
...
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