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
c5bb50c9
Commit
c5bb50c9
authored
Jun 18, 2008
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
assign nil to interface
SVN=123256
parent
7131bf47
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
gen.c
src/cmd/6g/gen.c
+1
-1
walk.c
src/cmd/gc/walk.c
+4
-5
No files found.
src/cmd/6g/gen.c
View file @
c5bb50c9
...
@@ -729,7 +729,7 @@ cgen_as(Node *nl, Node *nr, int op)
...
@@ -729,7 +729,7 @@ cgen_as(Node *nl, Node *nr, int op)
if
(
tl
==
T
)
if
(
tl
==
T
)
return
;
return
;
if
(
nr
==
N
)
{
if
(
nr
==
N
||
isnil
(
nr
)
)
{
if
(
isfat
(
tl
))
{
if
(
isfat
(
tl
))
{
/* clear a fat object */
/* clear a fat object */
if
(
debug
[
'g'
])
if
(
debug
[
'g'
])
...
...
src/cmd/gc/walk.c
View file @
c5bb50c9
...
@@ -43,8 +43,7 @@ loop:
...
@@ -43,8 +43,7 @@ loop:
if
(
n
->
op
!=
ONAME
)
if
(
n
->
op
!=
ONAME
)
dynlineno
=
n
->
lineno
;
// for diagnostics
dynlineno
=
n
->
lineno
;
// for diagnostics
if
(
debug
[
'w'
]
>
1
&&
top
==
Etop
)
if
(
debug
[
'w'
]
>
1
&&
top
==
Etop
&&
n
->
op
!=
OLIST
)
if
(
n
->
op
!=
OLIST
)
dump
(
"walk-before"
,
n
);
dump
(
"walk-before"
,
n
);
t
=
T
;
t
=
T
;
...
@@ -218,7 +217,6 @@ loop:
...
@@ -218,7 +217,6 @@ loop:
walktype
(
l
,
Elv
);
walktype
(
l
,
Elv
);
walktype
(
r
,
Erv
);
walktype
(
r
,
Erv
);
if
(
l
==
N
||
l
->
type
==
T
)
if
(
l
==
N
||
l
->
type
==
T
)
goto
ret
;
goto
ret
;
...
@@ -233,6 +231,7 @@ loop:
...
@@ -233,6 +231,7 @@ loop:
}
}
goto
ret
;
goto
ret
;
}
}
l
=
ascompatee
(
n
->
op
,
&
n
->
left
,
&
n
->
right
);
l
=
ascompatee
(
n
->
op
,
&
n
->
left
,
&
n
->
right
);
if
(
l
!=
N
)
if
(
l
!=
N
)
*
n
=
*
reorder3
(
l
);
*
n
=
*
reorder3
(
l
);
...
@@ -662,8 +661,8 @@ badt:
...
@@ -662,8 +661,8 @@ badt:
goto
ret
;
goto
ret
;
ret:
ret:
if
(
debug
[
'w'
]
&&
top
==
Etop
)
if
(
debug
[
'w'
]
&&
top
==
Etop
&&
n
!=
N
)
dump
(
"walk
-after
"
,
n
);
dump
(
"walk"
,
n
);
ullmancalc
(
n
);
ullmancalc
(
n
);
dynlineno
=
lno
;
dynlineno
=
lno
;
...
...
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