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
b033c581
Commit
b033c581
authored
Sep 30, 2008
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix export bug for /usr/r/rpc
R=ken OCL=16218 CL=16218
parent
ca6d4238
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
dcl.c
src/cmd/gc/dcl.c
+2
-1
export.c
src/cmd/gc/export.c
+13
-8
No files found.
src/cmd/gc/dcl.c
View file @
b033c581
...
@@ -335,7 +335,7 @@ addmethod(Node *n, Type *t, int local)
...
@@ -335,7 +335,7 @@ addmethod(Node *n, Type *t, int local)
return
;
return
;
bad:
bad:
yyerror
(
"unknown method pointer: %T
"
,
pa
);
yyerror
(
"unknown method pointer: %T
%S %S"
,
pa
,
sf
,
st
);
}
}
/*
/*
...
@@ -748,6 +748,7 @@ addvar(Node *n, Type *t, int ctxt)
...
@@ -748,6 +748,7 @@ addvar(Node *n, Type *t, int ctxt)
s
->
oname
=
n
;
s
->
oname
=
n
;
s
->
offset
=
0
;
s
->
offset
=
0
;
s
->
vblock
=
block
;
s
->
vblock
=
block
;
s
->
lexical
=
LNAME
;
n
->
type
=
t
;
n
->
type
=
t
;
n
->
vargen
=
gen
;
n
->
vargen
=
gen
;
...
...
src/cmd/gc/export.c
View file @
b033c581
...
@@ -263,7 +263,7 @@ dumpe(Sym *s)
...
@@ -263,7 +263,7 @@ dumpe(Sym *s)
{
{
switch
(
s
->
lexical
)
{
switch
(
s
->
lexical
)
{
default:
default:
yyerror
(
"unknown export symbol: %S"
,
s
,
s
->
lexical
);
yyerror
(
"unknown export symbol: %S"
,
s
);
break
;
break
;
case
LPACK
:
case
LPACK
:
yyerror
(
"package export symbol: %S"
,
s
);
yyerror
(
"package export symbol: %S"
,
s
);
...
@@ -288,6 +288,7 @@ void
...
@@ -288,6 +288,7 @@ void
dumpm
(
Sym
*
s
)
dumpm
(
Sym
*
s
)
{
{
Type
*
t
,
*
f
;
Type
*
t
,
*
f
;
Dcl
*
back
,
*
d1
;
switch
(
s
->
lexical
)
{
switch
(
s
->
lexical
)
{
default:
default:
...
@@ -305,17 +306,27 @@ dumpm(Sym *s)
...
@@ -305,17 +306,27 @@ dumpm(Sym *s)
}
}
for
(
f
=
t
->
method
;
f
!=
T
;
f
=
f
->
down
)
{
for
(
f
=
t
->
method
;
f
!=
T
;
f
=
f
->
down
)
{
back
=
exportlist
->
back
;
if
(
f
->
etype
!=
TFIELD
)
if
(
f
->
etype
!=
TFIELD
)
fatal
(
"dumpexporttype: method not field: %lT"
,
f
);
fatal
(
"dumpexporttype: method not field: %lT"
,
f
);
reexport
(
f
->
type
);
reexport
(
f
->
type
);
Bprint
(
bout
,
"
\t
func %S %lS
\n
"
,
f
->
sym
,
f
->
type
->
sym
);
Bprint
(
bout
,
"
\t
func %S %lS
\n
"
,
f
->
sym
,
f
->
type
->
sym
);
if
(
back
!=
exportlist
->
back
)
{
// redo first pass on new entries
for
(
d1
=
back
;
d1
!=
D
;
d1
=
d1
->
forw
)
{
lineno
=
d1
->
lineno
;
dumpe
(
d1
->
dsym
);
}
}
}
}
}
}
void
void
dumpexport
(
void
)
dumpexport
(
void
)
{
{
Dcl
*
d
;
Dcl
*
d
,
*
d1
;
int32
lno
;
int32
lno
;
lno
=
lineno
;
lno
=
lineno
;
...
@@ -337,12 +348,6 @@ dumpexport(void)
...
@@ -337,12 +348,6 @@ dumpexport(void)
dumpm
(
d
->
dsym
);
dumpm
(
d
->
dsym
);
}
}
// third pass pick up redefs from previous passes
for
(
d
=
exportlist
->
forw
;
d
!=
D
;
d
=
d
->
forw
)
{
lineno
=
d
->
lineno
;
dumpe
(
d
->
dsym
);
}
Bprint
(
bout
,
" ))
\n
"
);
Bprint
(
bout
,
" ))
\n
"
);
lineno
=
lno
;
lineno
=
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