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
1cb3b7d1
Commit
1cb3b7d1
authored
Apr 16, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
panicln: emit just one newline
R=ken OCL=27537 CL=27545
parent
57bff962
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
walk.c
src/cmd/gc/walk.c
+6
-2
No files found.
src/cmd/gc/walk.c
View file @
1cb3b7d1
...
...
@@ -271,7 +271,7 @@ loop:
if
(
top
!=
Etop
)
goto
nottop
;
walktype
(
n
->
left
,
Erv
);
indir
(
n
,
list
(
prcompat
(
n
->
left
,
1
),
nodpanic
(
n
->
lineno
)));
indir
(
n
,
list
(
prcompat
(
n
->
left
,
2
),
nodpanic
(
n
->
lineno
)));
goto
ret
;
case
OLITERAL
:
...
...
@@ -1980,6 +1980,10 @@ ascompat(Type *dst, Type *src)
return
0
;
}
// generate code for print
// fmt = 0: print
// fmt = 1: println
// fmt = 2: panicln (like println but no trailing newline)
Node
*
prcompat
(
Node
*
n
,
int
fmt
)
{
...
...
@@ -1995,7 +1999,7 @@ prcompat(Node *n, int fmt)
loop:
if
(
l
==
N
)
{
if
(
fmt
)
{
if
(
fmt
==
1
)
{
on
=
syslook
(
"printnl"
,
0
);
r
=
list
(
r
,
nod
(
OCALL
,
on
,
N
));
}
...
...
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