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
c6e8e1ce
Commit
c6e8e1ce
authored
Jul 15, 2008
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go call fn address
SVN=127151
parent
42ae6851
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
gen.c
src/cmd/6g/gen.c
+8
-2
export.c
src/cmd/gc/export.c
+4
-4
No files found.
src/cmd/6g/gen.c
View file @
c6e8e1ce
...
...
@@ -606,8 +606,11 @@ ginscall(Node *f, int proc)
if
(
proc
)
{
nodreg
(
&
reg
,
types
[
TINT64
],
D_AX
);
gins
(
ALEAQ
,
f
,
&
reg
);
gins
(
APUSHQ
,
&
reg
,
N
);
if
(
f
->
op
!=
OREGISTER
)
{
gins
(
ALEAQ
,
f
,
&
reg
);
gins
(
APUSHQ
,
&
reg
,
N
);
}
else
gins
(
APUSHQ
,
f
,
N
);
nodconst
(
&
con
,
types
[
TINT32
],
argsize
(
f
->
type
));
gins
(
APUSHQ
,
&
con
,
N
);
gins
(
ACALL
,
N
,
newproc
);
...
...
@@ -658,6 +661,7 @@ cgen_callinter(Node *n, Node *res, int proc)
nodo
.
xoffset
=
n
->
left
->
xoffset
+
4
*
widthptr
;
cgen
(
&
nodo
,
&
nodr
);
// REG = 32+offset(REG) -- i.m->fun[f]
// BOTCH nodr.type = fntype;
ginscall
(
&
nodr
,
proc
);
regfree
(
&
nodr
);
...
...
@@ -717,6 +721,7 @@ cgen_call(Node *n, int proc)
if
(
n
->
left
->
ullman
>=
UINF
)
{
regalloc
(
&
nod
,
types
[
tptr
],
N
);
cgen_as
(
&
nod
,
&
afun
,
0
);
nod
.
type
=
t
;
ginscall
(
&
nod
,
proc
);
regfree
(
&
nod
);
goto
ret
;
...
...
@@ -726,6 +731,7 @@ cgen_call(Node *n, int proc)
if
(
isptr
[
n
->
left
->
type
->
etype
])
{
regalloc
(
&
nod
,
types
[
tptr
],
N
);
cgen_as
(
&
nod
,
n
->
left
,
0
);
nod
.
type
=
t
;
ginscall
(
&
nod
,
proc
);
regfree
(
&
nod
);
goto
ret
;
...
...
src/cmd/gc/export.c
View file @
c6e8e1ce
...
...
@@ -118,7 +118,7 @@ dumpexportvar(Sym *s)
n
=
s
->
oname
;
if
(
n
==
N
||
n
->
type
==
T
)
{
yyerror
(
"variable exported but not defined: %S
\n
"
,
s
);
yyerror
(
"variable exported but not defined: %S"
,
s
);
return
;
}
...
...
@@ -144,7 +144,7 @@ dumpexporttype(Sym *s)
t
=
s
->
otype
;
if
(
t
==
T
)
{
yyerror
(
"type exported but not defined: %S
\n
"
,
s
);
yyerror
(
"type exported but not defined: %S"
,
s
);
return
;
}
...
...
@@ -251,10 +251,10 @@ dumpe(Sym *s)
{
switch
(
s
->
lexical
)
{
default:
yyerror
(
"unknown export symbol: %S
\n
"
,
s
,
s
->
lexical
);
yyerror
(
"unknown export symbol: %S"
,
s
,
s
->
lexical
);
break
;
case
LPACK
:
yyerror
(
"package export symbol: %S
\n
"
,
s
);
yyerror
(
"package export symbol: %S"
,
s
);
break
;
case
LATYPE
:
case
LBASETYPE
:
...
...
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