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
0a7e4a74
Commit
0a7e4a74
authored
Sep 10, 2008
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug generating duplicate interface signatures
R=r OCL=15119 CL=15119
parent
27a56171
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
8 deletions
+49
-8
src/cmd/6g/gsubr.c
src/cmd/6g/gsubr.c
+5
-1
src/cmd/6g/obj.c
src/cmd/6g/obj.c
+40
-2
src/cmd/gc/dcl.c
src/cmd/gc/dcl.c
+1
-0
src/cmd/gc/go.h
src/cmd/gc/go.h
+3
-1
src/cmd/gc/walk.c
src/cmd/gc/walk.c
+0
-4
No files found.
src/cmd/6g/gsubr.c
View file @
0a7e4a74
...
...
@@ -322,7 +322,11 @@ loop:
s
=
t
->
sym
;
if
(
s
==
S
)
fatal
(
"nodtypesig: no sym for type"
);
fatal
(
"signame: no sym for type"
);
// mark it as used so signature will be generated
if
(
s
->
local
==
1
)
s
->
local
=
2
;
snprint
(
namebuf
,
sizeof
(
namebuf
),
"%s_%s"
,
e
,
s
->
name
);
s
=
pkglookup
(
namebuf
,
s
->
package
);
...
...
src/cmd/6g/obj.c
View file @
0a7e4a74
...
...
@@ -459,7 +459,7 @@ sigcmp(Sig *a, Sig *b)
void
dumpsignatures
(
void
)
{
Dcl
*
d
;
Dcl
*
d
,
*
x
;
Type
*
t
,
*
f
;
Sym
*
s1
,
*
s
;
int
et
,
o
,
wi
,
ot
;
...
...
@@ -468,6 +468,44 @@ dumpsignatures(void)
Prog
*
p
;
char
*
sp
;
// copy externdcl list to signatlist
for
(
d
=
externdcl
;
d
!=
D
;
d
=
d
->
forw
)
{
if
(
d
->
op
!=
OTYPE
)
continue
;
t
=
d
->
dtype
;
if
(
t
==
T
)
continue
;
et
=
t
->
etype
;
if
(
et
!=
TSTRUCT
&&
et
!=
TINTER
)
continue
;
s
=
d
->
dsym
;
if
(
s
==
S
)
continue
;
if
(
s
->
name
[
0
]
==
'_'
)
continue
;
// if it was imported
if
(
s
->
local
==
0
)
continue
;
// until i can figure out
// when/if it is used, do them all
// // if not used and not exported
// if(s->local == 1 && !s->export)
// continue;
x
=
mal
(
sizeof
(
*
d
));
x
->
op
=
OTYPE
;
x
->
dsym
=
s
;
x
->
dtype
=
t
;
x
->
forw
=
signatlist
;
signatlist
=
x
;
}
/*
* put all the names into a linked
* list so that it may be generated in sorted order.
...
...
@@ -505,7 +543,7 @@ dumpsignatures(void)
wi
=
types
[
TINT32
]
->
width
;
for
(
d
=
externdcl
;
d
!=
D
;
d
=
d
->
forw
)
{
for
(
d
=
signatlist
;
d
!=
D
;
d
=
d
->
forw
)
{
if
(
d
->
op
!=
OTYPE
)
continue
;
...
...
src/cmd/gc/dcl.c
View file @
0a7e4a74
...
...
@@ -52,6 +52,7 @@ dodcltype(Type *n, Type *t)
}
if
(
exportadj
)
exportsym
(
n
->
sym
);
n
->
sym
->
local
=
1
;
addtyp
(
n
,
t
,
dclcontext
);
}
...
...
src/cmd/gc/go.h
View file @
0a7e4a74
...
...
@@ -195,8 +195,9 @@ struct Sym
uchar
undef
;
// a diagnostic has been generated
uchar
export
;
// marked as export
uchar
exported
;
//
has been
exported
uchar
exported
;
// exported
uchar
sym
;
// huffman encoding in object file
uchar
local
;
// created in this file
char
*
opackage
;
// original package name
char
*
package
;
// package name
...
...
@@ -429,6 +430,7 @@ EXTERN Dcl* autodcl;
EXTERN
Dcl
*
paramdcl
;
EXTERN
Dcl
*
externdcl
;
EXTERN
Dcl
*
exportlist
;
EXTERN
Dcl
*
signatlist
;
EXTERN
int
dclcontext
;
// PEXTERN/PAUTO
EXTERN
int
importflag
;
EXTERN
int
inimportsys
;
...
...
src/cmd/gc/walk.c
View file @
0a7e4a74
...
...
@@ -1970,8 +1970,6 @@ mapop(Node *n, int top)
goto
shape
;
// mapassign1(hmap *map[any-1]any-2, key any-3, val any-4);
//dump("assign1", n);
if
(
n
->
left
->
op
!=
OINDEX
)
goto
shape
;
...
...
@@ -1999,8 +1997,6 @@ mapop(Node *n, int top)
assign2:
// mapassign2(hmap *map[any]any, key any, val any, pres bool);
//dump("assign2", n);
if
(
n
->
left
->
op
!=
OINDEX
)
goto
shape
;
...
...
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